blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
410
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 0
51
| license_type
stringclasses 2
values | repo_name
stringlengths 5
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
80
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 5.85k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 131
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 3
9.45M
| extension
stringclasses 32
values | content
stringlengths 3
9.45M
| authors
sequencelengths 1
1
| author_id
stringlengths 0
313
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
70c018b5b4a9c2b8a7c10a454a34328412a8031f | 50716588aac8c08230e59761447129021800efeb | /src/prova2/FactoryPratos.java | de923ad5707344c0022a65b0128b8a091caf70be | [] | no_license | niltonmng/ProgramaDosPratos | 2d0aefabdbe914c1fb949cc5ad261cedcdbee846 | 291e75dac4919a9e40de18e9cf1e36520060860b | refs/heads/master | 2020-12-25T14:49:14.157077 | 2016-09-06T00:16:11 | 2016-09-06T00:16:11 | 67,259,976 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 916 | java | package prova2;
import Excessoes.StringInvalidaException;
import Excessoes.ValorInvalidoException;
public class FactoryPratos {
public PratoRetangular criaPratoRetangular(double precoBase, String personalizacao, int base, int altura)
throws StringInvalidaException, ValorInvalidoException{
PratoRetangular pr = new PratoRetangular(precoBase, personalizacao, base, altura);
return pr;
}
public PratoCircular criaPratoCircular(double precoBase, String personalizacao, int raio)
throws StringInvalidaException, ValorInvalidoException{
PratoCircular pc = new PratoCircular(precoBase, personalizacao, raio);
return pc;
}
public PratoTriangular criaPratoTriangular(double precoBase, String personalizacao, int base, int altura)
throws StringInvalidaException, ValorInvalidoException{
PratoTriangular pt = new PratoTriangular(precoBase, personalizacao, base, altura);
return pt;
}
}
| [
"Nilton Ginani"
] | Nilton Ginani |
74a4d37c5782386ea5d15033d86530ed8b01fe6c | 5cb89c33c1aa634f822f1e56c41a5512be461d55 | /app/src/androidTest/java/com/example/huascar/zoo_manager_system_java/ExampleInstrumentedTest.java | 93b82c3f00d49b88b58dd63128011754ed5c685b | [] | no_license | huasmc/zoo_manager_system_java | ecedbcd2f335a565a2aa0d90e63f45cd9f3a6355 | 8291e7b05a1b06ece36d4461ae0d5995ec2ae1a0 | refs/heads/master | 2021-08-09T00:23:13.409693 | 2017-11-11T18:17:05 | 2017-11-11T18:17:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 787 | java | package com.example.huascar.zoo_manager_system_java;
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() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.huascar.zoo_manager_system_java", appContext.getPackageName());
}
}
| [
"[email protected]"
] | |
2238ca9e31654a9000deb3c64b3c4964702e208b | 107deb04ac830d99e21774764c3c3f56767d2d49 | /projeto-jpa/src/main/java/br/com/alura/jpa/testes/CriaContaComSaldo.java | b7310022f5bfd2fd08db4fd99642cb8fb9ad24c4 | [] | no_license | LuanCMartins/testeJpaHibernate | dc6b5f852faa96408653890698d1faaaac085e6c | 45078a2a29b689f2f84c51c8d3a0ae4b9ccc370c | refs/heads/main | 2023-03-17T15:27:09.268571 | 2021-03-11T02:04:20 | 2021-03-11T02:04:20 | 346,548,026 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 666 | java | package br.com.alura.jpa.testes;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import br.com.alura.jpa.modelo.Conta.Conta;
public class CriaContaComSaldo {
public static void main(String[] args) {
EntityManagerFactory emf = Persistence.createEntityManagerFactory("alura");
EntityManager em = emf.createEntityManager();
Conta conta = new Conta();
conta.setTitular("Giovanna");
conta.setNumero(55976);
conta.setAgencia(3482);
conta.setSaldo(1000.0);
em.getTransaction().begin();
em.persist(conta);
em.getTransaction().commit();
}
}
| [
"[email protected]"
] | |
e0a7690cb0034ed82dbd62f33ca915440d0be2d2 | 9554309f7b3f33ca912b54370f03cf0c3710d105 | /app/src/main/java/com/lshl/bean/HuzhuDetailsBean.java | c6a6a63036ccdecebdd7c5e4328a03b3361946d2 | [] | no_license | lvqingfeng/Lshl | ab490ffe492deba94f9522b71b829b8998b669eb | 15ae1cdfd2155a6a04a20edf58107e5d9265d647 | refs/heads/master | 2021-07-09T21:42:34.913186 | 2017-10-10T09:34:01 | 2017-10-10T09:34:01 | 106,397,119 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 11,636 | java | package com.lshl.bean;
import java.util.List;
/**
* Created by Administrator on 2017/1/22.
*/
public class HuzhuDetailsBean {
/**
* status : 1
* info : {"ma_id":"1","ma_uid":"6","ma_project_name":"互助测试","ma_project_money":"555555.00","ma_project_info":"测试玩玩","ma_project_img":"5881caf800cbe60647.png","ma_addtime":"1484901112","ma_repayment":"2019年01月20日","ma_repayment_time":"1547913600","ma_status":"21","ma_audit_info":"EAW","ma_audit_time":"1484901137","ma_donate_money":"0.00","ma_guarantee":"姐弟的,622727199111132644","f_vote_total_number":"1","f_vote_support":"0","f_vote_opposition":"0","f_vote_wairer":"0","f_vote_endtime":"1485359999","s_vote_total_number":"0","s_vote_support":"0","s_vote_opposition":"0","s_vote_wairer":"0","s_vote_enttime":"1485187199","t_vote_total_number":"0","t_vote_support":"0","t_vote_opposition":"0","t_vote_wairer":"0","t_vote_enttime":null,"ma_payment":null,"ma_payment_time":null,"ma_payment_info":null,"ma_payment_img":null,"name":"安若兮","allmember":"","imgs":["5881caf800cbe60647.png"]}
*/
private int status;
private InfoBean info;
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public InfoBean getInfo() {
return info;
}
public void setInfo(InfoBean info) {
this.info = info;
}
public static class InfoBean {
/**
* ma_id : 1
* ma_uid : 6
* ma_project_name : 互助测试
* ma_project_money : 555555.00
* ma_project_info : 测试玩玩
* ma_project_img : 5881caf800cbe60647.png
* ma_addtime : 1484901112
* ma_repayment : 2019年01月20日
* ma_repayment_time : 1547913600
* ma_status : 21
* ma_audit_info : EAW
* ma_audit_time : 1484901137
* ma_donate_money : 0.00
* ma_guarantee : 姐弟的,622727199111132644
* f_vote_total_number : 1
* f_vote_support : 0
* f_vote_opposition : 0
* f_vote_wairer : 0
* f_vote_endtime : 1485359999
* s_vote_total_number : 0
* s_vote_support : 0
* s_vote_opposition : 0
* s_vote_wairer : 0
* s_vote_enttime : 1485187199
* t_vote_total_number : 0
* t_vote_support : 0
* t_vote_opposition : 0
* t_vote_wairer : 0
* t_vote_enttime : null
* ma_payment : null
* ma_payment_time : null
* ma_payment_info : null
* ma_payment_img : null
* name : 安若兮
* allmember :
* imgs : ["5881caf800cbe60647.png"]
*/
private String ma_id;
private String ma_uid;
private String ma_project_name;
private String ma_project_money;
private String ma_project_info;
private String ma_project_img;
private String ma_addtime;
private String ma_repayment;
private String ma_repayment_time;
private String ma_status;
private String ma_audit_info;
private String ma_audit_time;
private String ma_donate_money;
private String ma_guarantee;
private String f_vote_total_number;
private String f_vote_support;
private String f_vote_opposition;
private String f_vote_wairer;
private String f_vote_endtime;
private String s_vote_total_number;
private String s_vote_support;
private String s_vote_opposition;
private String s_vote_wairer;
private String s_vote_enttime;
private String t_vote_total_number;
private String t_vote_support;
private String t_vote_opposition;
private String t_vote_wairer;
private Object t_vote_enttime;
private Object ma_payment;
private Object ma_payment_time;
private Object ma_payment_info;
private Object ma_payment_img;
private String name;
private String allmember;
private List<String> imgs;
public String getMa_id() {
return ma_id;
}
public void setMa_id(String ma_id) {
this.ma_id = ma_id;
}
public String getMa_uid() {
return ma_uid;
}
public void setMa_uid(String ma_uid) {
this.ma_uid = ma_uid;
}
public String getMa_project_name() {
return ma_project_name;
}
public void setMa_project_name(String ma_project_name) {
this.ma_project_name = ma_project_name;
}
public String getMa_project_money() {
return ma_project_money;
}
public void setMa_project_money(String ma_project_money) {
this.ma_project_money = ma_project_money;
}
public String getMa_project_info() {
return ma_project_info;
}
public void setMa_project_info(String ma_project_info) {
this.ma_project_info = ma_project_info;
}
public String getMa_project_img() {
return ma_project_img;
}
public void setMa_project_img(String ma_project_img) {
this.ma_project_img = ma_project_img;
}
public String getMa_addtime() {
return ma_addtime;
}
public void setMa_addtime(String ma_addtime) {
this.ma_addtime = ma_addtime;
}
public String getMa_repayment() {
return ma_repayment;
}
public void setMa_repayment(String ma_repayment) {
this.ma_repayment = ma_repayment;
}
public String getMa_repayment_time() {
return ma_repayment_time;
}
public void setMa_repayment_time(String ma_repayment_time) {
this.ma_repayment_time = ma_repayment_time;
}
public String getMa_status() {
return ma_status;
}
public void setMa_status(String ma_status) {
this.ma_status = ma_status;
}
public String getMa_audit_info() {
return ma_audit_info;
}
public void setMa_audit_info(String ma_audit_info) {
this.ma_audit_info = ma_audit_info;
}
public String getMa_audit_time() {
return ma_audit_time;
}
public void setMa_audit_time(String ma_audit_time) {
this.ma_audit_time = ma_audit_time;
}
public String getMa_donate_money() {
return ma_donate_money;
}
public void setMa_donate_money(String ma_donate_money) {
this.ma_donate_money = ma_donate_money;
}
public String getMa_guarantee() {
return ma_guarantee;
}
public void setMa_guarantee(String ma_guarantee) {
this.ma_guarantee = ma_guarantee;
}
public String getF_vote_total_number() {
return f_vote_total_number;
}
public void setF_vote_total_number(String f_vote_total_number) {
this.f_vote_total_number = f_vote_total_number;
}
public String getF_vote_support() {
return f_vote_support;
}
public void setF_vote_support(String f_vote_support) {
this.f_vote_support = f_vote_support;
}
public String getF_vote_opposition() {
return f_vote_opposition;
}
public void setF_vote_opposition(String f_vote_opposition) {
this.f_vote_opposition = f_vote_opposition;
}
public String getF_vote_wairer() {
return f_vote_wairer;
}
public void setF_vote_wairer(String f_vote_wairer) {
this.f_vote_wairer = f_vote_wairer;
}
public String getF_vote_endtime() {
return f_vote_endtime;
}
public void setF_vote_endtime(String f_vote_endtime) {
this.f_vote_endtime = f_vote_endtime;
}
public String getS_vote_total_number() {
return s_vote_total_number;
}
public void setS_vote_total_number(String s_vote_total_number) {
this.s_vote_total_number = s_vote_total_number;
}
public String getS_vote_support() {
return s_vote_support;
}
public void setS_vote_support(String s_vote_support) {
this.s_vote_support = s_vote_support;
}
public String getS_vote_opposition() {
return s_vote_opposition;
}
public void setS_vote_opposition(String s_vote_opposition) {
this.s_vote_opposition = s_vote_opposition;
}
public String getS_vote_wairer() {
return s_vote_wairer;
}
public void setS_vote_wairer(String s_vote_wairer) {
this.s_vote_wairer = s_vote_wairer;
}
public String getS_vote_enttime() {
return s_vote_enttime;
}
public void setS_vote_enttime(String s_vote_enttime) {
this.s_vote_enttime = s_vote_enttime;
}
public String getT_vote_total_number() {
return t_vote_total_number;
}
public void setT_vote_total_number(String t_vote_total_number) {
this.t_vote_total_number = t_vote_total_number;
}
public String getT_vote_support() {
return t_vote_support;
}
public void setT_vote_support(String t_vote_support) {
this.t_vote_support = t_vote_support;
}
public String getT_vote_opposition() {
return t_vote_opposition;
}
public void setT_vote_opposition(String t_vote_opposition) {
this.t_vote_opposition = t_vote_opposition;
}
public String getT_vote_wairer() {
return t_vote_wairer;
}
public void setT_vote_wairer(String t_vote_wairer) {
this.t_vote_wairer = t_vote_wairer;
}
public Object getT_vote_enttime() {
return t_vote_enttime;
}
public void setT_vote_enttime(Object t_vote_enttime) {
this.t_vote_enttime = t_vote_enttime;
}
public Object getMa_payment() {
return ma_payment;
}
public void setMa_payment(Object ma_payment) {
this.ma_payment = ma_payment;
}
public Object getMa_payment_time() {
return ma_payment_time;
}
public void setMa_payment_time(Object ma_payment_time) {
this.ma_payment_time = ma_payment_time;
}
public Object getMa_payment_info() {
return ma_payment_info;
}
public void setMa_payment_info(Object ma_payment_info) {
this.ma_payment_info = ma_payment_info;
}
public Object getMa_payment_img() {
return ma_payment_img;
}
public void setMa_payment_img(Object ma_payment_img) {
this.ma_payment_img = ma_payment_img;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAllmember() {
return allmember;
}
public void setAllmember(String allmember) {
this.allmember = allmember;
}
public List<String> getImgs() {
return imgs;
}
public void setImgs(List<String> imgs) {
this.imgs = imgs;
}
}
}
| [
"[email protected]"
] | |
6995fedf107ae7e899fd4c8b9fc48018f1a4ac21 | 40bb61d5c2246f24be2217ecb933bdc0da9d7168 | /GRS/app/src/main/java/com/prakhar_squared_mayank/grs/NotificationsAdapter.java | a9039dd807b5655218eae0574784431280e4823c | [] | no_license | Prakhar0409/newApp | b9e4fa45fc30608bf742feb12e5a499e60c68ad3 | 36728d1b48374263e52e908a0e9628484be22592 | refs/heads/master | 2021-01-10T16:09:04.162715 | 2016-03-30T18:01:15 | 2016-03-30T18:01:15 | 55,012,248 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,684 | java | package com.prakhar_squared_mayank.grs;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import org.json.JSONArray;
import org.json.JSONObject;
/**
* Created by mayank on 29/03/16.
*/
public class NotificationsAdapter extends BaseAdapter {
Context mContext;
LayoutInflater mInflater;
JSONArray mJsonArray;
ListView listView;
public NotificationsAdapter(Context context, LayoutInflater inflater) {
mContext = context;
mInflater = inflater;
mJsonArray = new JSONArray();
}
@Override
public int getCount() {
return mJsonArray.length();
}
@Override
public Object getItem(int position) {
return mJsonArray.optJSONObject(position);
}
@Override
public long getItemId(int position) {
return position;
}
public void updateData(JSONArray jsonArray) {
// update the adapter's dataset
mJsonArray = jsonArray;
notifyDataSetChanged();
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder;
if (convertView == null) {
// Inflate the custom row layout from your XML.
convertView = mInflater.inflate(R.layout.notification_row, parent, false);
// create a new "Holder" with subviews
holder = new ViewHolder();
holder.notifTitleTV = (TextView) convertView.findViewById(R.id.text_nr);
holder.picIV = (ImageView) convertView.findViewById(R.id.pic_nr);
// hang onto this holder for future recyclage
convertView.setTag(holder);
} else {
// skip all the expensive inflation/findViewById
// and just get the holder you already made
holder = (ViewHolder) convertView.getTag();
}
JSONObject jsonObject = (JSONObject) getItem(position);
String title = "Notification Title.";
if (jsonObject.has("notification")) {
title = (jsonObject.optString("notification"));
}
holder.notifTitleTV.setText(title);
holder.picIV.setOnClickListener(new View.OnClickListener() { // TODO: 27/03/16
@Override
public void onClick(View view) {
}
});
return convertView;
}
private static class ViewHolder {
public TextView notifTitleTV;
public ImageView picIV;
}
} | [
"[email protected]"
] | |
59f14cfd43a73c54f54ab65c8f65bf80efde83a4 | 2739e525d84a9ca0b9736ca26e319be8a7ee8857 | /src/Luke.java | d8c6b27a475e51ec22fc0cc99b2ba437c21f5e7d | [] | no_license | y553546436/auto-judge | bf2c0c95694d1935bbf817c9c1047f74bcd41225 | f0d6611e1f88b11bb5e95b7ac7fe5370f2afd937 | refs/heads/master | 2023-03-03T12:34:56.994052 | 2021-02-18T14:32:03 | 2021-02-18T14:32:03 | 296,606,807 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 77,573 | java | import static jbse.meta.Analysis.ass3rt;
import jbse.apps.run.Run;
import jbse.apps.run.RunParameters;
class Driver {
static public void main(String[] args) throws Exception {
Class c = Driver.class;
java.lang.reflect.Method m = c.getDeclaredMethod(args[0]);
m.invoke(null);
}
static public void main(String cn, String tn) throws Exception {
main(cn, tn, null);
}
static public void main(String cn, String tn, String en) throws Exception {
main(cn, tn, en, null, null);
}
static public void main(String cn, String tn, String en, String[] bn, String[] an) throws Exception {
System.out.println(cn+"#"+tn);
Class c = Class.forName(cn);
Object o = c.newInstance();
if (bn != null) {
for (String b : bn) {
java.lang.reflect.Method bm = c.getMethod(b);
bm.invoke(o);
}
}
boolean caught = false;
try {
java.lang.reflect.Method m = c.getMethod(tn);
m.invoke(o);
} catch (java.lang.reflect.InvocationTargetException e) {
if (en == null) throw e;
// assert(en != null);
Throwable t = e.getCause();
if (t == null) throw e;
//assert(e.getCause() != null);
//System.out.println("t.getClass() = " + t.getClass());
if (!t.getClass().getName().endsWith(en)) throw e;
else caught = true;
//assert(e.getCause().getClass().getName().endsWith(en));
} catch (Throwable t) {
if (en == null || !t.getClass().getName().endsWith(en)) throw t;
else caught = true;
} finally {
//TODO handle the case where there is not expected assertion
if(en != null && !caught) throw new RuntimeException();
if (an != null) {
for (String a : an) {
java.lang.reflect.Method am = c.getMethod(a);
am.invoke(o);
}
}
//TODO run @after method even when the test failed
}
}
static public void main0() throws Exception {
//if(true) throw new RuntimeException("Hello");
Driver.main("cn.hutool.core.io.FileTypeUtilTest", "fileTypeUtilTest");
}
}
class Driver_android_rss {
static public void main1() throws Exception { Driver.main("org.mcsoxford.rss.RSSBaseTest", "equalsNull", null, new String[]{"setup"}, null); }
static public void main2() throws Exception { Driver.main("org.mcsoxford.rss.RSSBaseTest", "equalsOtherType", null, new String[]{"setup"}, null); }
static public void main3() throws Exception { Driver.main("org.mcsoxford.rss.RSSBaseTest", "equalsSame", null, new String[]{"setup"}, null); }
static public void main4() throws Exception { Driver.main("org.mcsoxford.rss.RSSBaseTest", "equalsOtherNullLink", null, new String[]{"setup"}, null); }
static public void main5() throws Exception { Driver.main("org.mcsoxford.rss.RSSBaseTest", "equalsOtherLink", null, new String[]{"setup"}, null); }
static public void main6() throws Exception { Driver.main("org.mcsoxford.rss.RSSBaseTest", "equalsLink", null, new String[]{"setup"}, null); }
static public void main7() throws Exception { Driver.main("org.mcsoxford.rss.RSSHandlerTest", "isBufferingChannel", null, new String[]{"setup"}, null); }
static public void main8() throws Exception { Driver.main("org.mcsoxford.rss.RSSHandlerTest", "isBufferingItem", null, new String[]{"setup"}, null); }
static public void main9() throws Exception { Driver.main("org.mcsoxford.rss.RSSHandlerTest", "isBufferingTitle", null, new String[]{"setup"}, null); }
static public void main10() throws Exception { Driver.main("org.mcsoxford.rss.RSSHandlerTest", "isBufferingDescription", null, new String[]{"setup"}, null); }
static public void main11() throws Exception { Driver.main("org.mcsoxford.rss.RSSHandlerTest", "isBufferingContent", null, new String[]{"setup"}, null); }
static public void main12() throws Exception { Driver.main("org.mcsoxford.rss.RSSHandlerTest", "isBufferingCategory", null, new String[]{"setup"}, null); }
static public void main13() throws Exception { Driver.main("org.mcsoxford.rss.RSSHandlerTest", "isBufferingLink", null, new String[]{"setup"}, null); }
static public void main14() throws Exception { Driver.main("org.mcsoxford.rss.RSSHandlerTest", "isBufferingPubDate", null, new String[]{"setup"}, null); }
static public void main15() throws Exception { Driver.main("org.mcsoxford.rss.RSSHandlerTest", "isBufferingThumbnail", null, new String[]{"setup"}, null); }
static public void main16() throws Exception { Driver.main("org.mcsoxford.rss.RSSHandlerTest", "parseChannelWithThumbnail", null, new String[]{"setup"}, null); }
static public void main17() throws Exception { Driver.main("org.mcsoxford.rss.RSSHandlerTest", "parseThumbnailWithoutUrl", null, new String[]{"setup"}, null); }
static public void main18() throws Exception { Driver.main("org.mcsoxford.rss.RSSHandlerTest", "channelTitle", null, new String[]{"setup"}, null); }
static public void main19() throws Exception { Driver.main("org.mcsoxford.rss.RSSHandlerTest", "itemTitle", null, new String[]{"setup"}, null); }
static public void main20() throws Exception { Driver.main("org.mcsoxford.rss.RSSHandlerTest", "items", null, new String[]{"setup"}, null); }
}
class Driver_Bukkit {
static public void main1() throws Exception { Driver.main("org.bukkit.CoalTypeTest", "getByData"); }
static public void main2() throws Exception { Driver.main("org.bukkit.CropStateTest", "getByData"); }
static public void main3() throws Exception { Driver.main("org.bukkit.InstrumentTest", "getByType"); }
static public void main4() throws Exception { Driver.main("org.bukkit.conversations.ConversationTest", "testBaseConversationFlow"); }
static public void main5() throws Exception { Driver.main("org.bukkit.conversations.ConversationTest", "testConversationFactory"); }
static public void main6() throws Exception { Driver.main("org.bukkit.conversations.ConversationTest", "testEscapeSequence"); }
static public void main7() throws Exception { Driver.main("org.bukkit.conversations.ConversationTest", "testNotPlayer"); }
static public void main8() throws Exception { Driver.main("org.bukkit.conversations.ConversationContextTest", "TestFromWhom"); }
static public void main9() throws Exception { Driver.main("org.bukkit.conversations.ConversationContextTest", "TestPlugin"); }
static public void main10() throws Exception { Driver.main("org.bukkit.conversations.ConversationContextTest", "TestSessionData"); }
static public void main11() throws Exception { Driver.main("org.bukkit.conversations.ValidatingPromptTest", "TestBooleanPrompt"); }
static public void main12() throws Exception { Driver.main("org.bukkit.conversations.ValidatingPromptTest", "TestFixedSetPrompt"); }
static public void main13() throws Exception { Driver.main("org.bukkit.conversations.ValidatingPromptTest", "TestNumericPrompt"); }
static public void main14() throws Exception { Driver.main("org.bukkit.conversations.ValidatingPromptTest", "TestRegexPrompt"); }
static public void main15() throws Exception { Driver.main("org.bukkit.metadata.MetadataConversionTest", "testFromInt"); }
static public void main16() throws Exception { Driver.main("org.bukkit.metadata.MetadataConversionTest", "testFromFloat"); }
static public void main17() throws Exception { Driver.main("org.bukkit.metadata.MetadataConversionTest", "testFromNumericString"); }
static public void main18() throws Exception { Driver.main("org.bukkit.metadata.MetadataConversionTest", "testFromNonNumericString"); }
static public void main19() throws Exception { Driver.main("org.bukkit.metadata.MetadataConversionTest", "testFromNull"); }
static public void main20() throws Exception { Driver.main("org.bukkit.metadata.FixedMetadataValueTest", "testBasic"); }
static public void main21() throws Exception { Driver.main("org.bukkit.metadata.FixedMetadataValueTest", "testNumberTypes"); }
static public void main22() throws Exception { Driver.main("org.bukkit.metadata.FixedMetadataValueTest", "testInvalidateDoesNothing"); }
static public void main23() throws Exception { Driver.main("org.bukkit.metadata.MetadataValueAdapterTest", "testAdapterBasics"); }
static public void main24() throws Exception { Driver.main("org.bukkit.metadata.MetadataValueAdapterTest", "testAdapterConversions"); }
static public void main25() throws Exception { Driver.main("org.bukkit.metadata.MetadataValueAdapterTest", "testBooleanConversion"); }
static public void main26() throws Exception { Driver.main("org.bukkit.metadata.MetadataValueAdapterTest", "testStringConversionNull"); }
static public void main27() throws Exception { Driver.main("org.bukkit.EntityEffectTest", "getByData"); }
static public void main28() throws Exception { Driver.main("org.bukkit.ArtTest", "getByNullName", "IllegalArgumentException"); }
static public void main29() throws Exception { Driver.main("org.bukkit.ArtTest", "getById"); }
static public void main30() throws Exception { Driver.main("org.bukkit.ArtTest", "getByName"); }
static public void main31() throws Exception { Driver.main("org.bukkit.ArtTest", "dimensionSanityCheck"); }
static public void main32() throws Exception { Driver.main("org.bukkit.ArtTest", "getByNameWithMixedCase"); }
static public void main33() throws Exception { Driver.main("org.bukkit.configuration.MemoryConfigurationTest", "testAddDefault"); }
static public void main34() throws Exception { Driver.main("org.bukkit.configuration.MemoryConfigurationTest", "testAddDefaults_Map"); }
static public void main35() throws Exception { Driver.main("org.bukkit.configuration.MemoryConfigurationTest", "testAddDefaults_Configuration"); }
static public void main36() throws Exception { Driver.main("org.bukkit.configuration.MemoryConfigurationTest", "testSetDefaults"); }
static public void main37() throws Exception { Driver.main("org.bukkit.configuration.MemoryConfigurationTest", "testCreateSection"); }
static public void main38() throws Exception { Driver.main("org.bukkit.configuration.MemoryConfigurationTest", "testGetDefaults"); }
static public void main39() throws Exception { Driver.main("org.bukkit.util.StringUtilTest", "nullPrefixTest", "NullPointerException"); }
static public void main40() throws Exception { Driver.main("org.bukkit.util.StringUtilTest", "nullStringTest", "IllegalArgumentException"); }
static public void main41() throws Exception { Driver.main("org.bukkit.util.StringUtilTest", "nullCollectionTest", "IllegalArgumentException"); }
static public void main42() throws Exception { Driver.main("org.bukkit.util.StringUtilTest", "nullIterableTest", "IllegalArgumentException"); }
static public void main43() throws Exception { Driver.main("org.bukkit.util.StringUtilTest", "nullTokenTest", "IllegalArgumentException"); }
static public void main44() throws Exception { Driver.main("org.bukkit.util.StringUtilTest", "copyTokenTest"); }
static public void main45() throws Exception { Driver.main("org.bukkit.util.StringUtilTest", "copyUnsupportedTest", "UnsupportedOperationException"); }
static public void main46() throws Exception { Driver.main("org.bukkit.util.StringUtilTest", "copyNullTest", "IllegalArgumentException"); }
static public void main47() throws Exception { Driver.main("org.bukkit.metadata.LazyMetadataValueTest", "testLazyInt"); }
static public void main48() throws Exception { Driver.main("org.bukkit.metadata.LazyMetadataValueTest", "testLazyDouble"); }
static public void main49() throws Exception { Driver.main("org.bukkit.metadata.LazyMetadataValueTest", "testLazyString"); }
static public void main50() throws Exception { Driver.main("org.bukkit.metadata.LazyMetadataValueTest", "testLazyBoolean"); }
static public void main51() throws Exception { Driver.main("org.bukkit.metadata.LazyMetadataValueTest", "testEvalException", "MetadataEvaluationException"); }
static public void main52() throws Exception { Driver.main("org.bukkit.metadata.LazyMetadataValueTest", "testCacheStrategyCacheAfterFirstEval"); }
static public void main53() throws Exception { Driver.main("org.bukkit.metadata.LazyMetadataValueTest", "testCacheStrategyNeverCache"); }
static public void main54() throws Exception { Driver.main("org.bukkit.metadata.LazyMetadataValueTest", "testCacheStrategyEternally"); }
static public void main55() throws Exception { Driver.main("org.bukkit.metadata.MetadataStoreTest", "testMetadataStore"); }
static public void main56() throws Exception { Driver.main("org.bukkit.metadata.MetadataStoreTest", "testMetadataNotPresent"); }
static public void main57() throws Exception { Driver.main("org.bukkit.metadata.MetadataStoreTest", "testInvalidateAll"); }
static public void main58() throws Exception { Driver.main("org.bukkit.metadata.MetadataStoreTest", "testInvalidateAllButActuallyNothing"); }
static public void main59() throws Exception { Driver.main("org.bukkit.metadata.MetadataStoreTest", "testMetadataReplace"); }
static public void main60() throws Exception { Driver.main("org.bukkit.metadata.MetadataStoreTest", "testMetadataRemove"); }
static public void main61() throws Exception { Driver.main("org.bukkit.metadata.MetadataStoreTest", "testMetadataRemoveLast"); }
static public void main62() throws Exception { Driver.main("org.bukkit.metadata.MetadataStoreTest", "testMetadataRemoveForNonExistingPlugin"); }
static public void main63() throws Exception { Driver.main("org.bukkit.metadata.MetadataStoreTest", "testHasMetadata"); }
}
class Driver_commafeed {
static public void main1() throws Exception { Driver.main("com.commafeed.backend.feed.EstimateDirectionTest", "testEstimateDirection"); }
static public void main2() throws Exception { Driver.main("com.commafeed.backend.FixedSizeSortedSetTest", "testSimpleAdd", null, new String[]{"init"}, null); }
static public void main3() throws Exception { Driver.main("com.commafeed.backend.FixedSizeSortedSetTest", "testIsFull", null, new String[]{"init"}, null); }
static public void main4() throws Exception { Driver.main("com.commafeed.backend.FixedSizeSortedSetTest", "testOrder", null, new String[]{"init"}, null); }
static public void main5() throws Exception { Driver.main("com.commafeed.backend.FixedSizeSortedSetTest", "testEviction", null, new String[]{"init"}, null); }
static public void main6() throws Exception { Driver.main("com.commafeed.backend.FixedSizeSortedSetTest", "testCapacity", null, new String[]{"init"}, null); }
static public void main7() throws Exception { Driver.main("com.commafeed.backend.FixedSizeSortedSetTest", "testLast", null, new String[]{"init"}, null); }
}
class Driver_maven_plugins {
static public void main1() throws Exception { Driver.main("com.github.maven.plugins.core.StringUtilsTest", "isEmpty"); }
static public void main2() throws Exception { Driver.main("com.github.maven.plugins.core.StringUtilsTest", "removeEmpties"); }
static public void main3() throws Exception { Driver.main("com.github.maven.plugins.core.CustomHostnameTest", "validHostname"); }
static public void main4() throws Exception { Driver.main("com.github.maven.plugins.core.CustomHostnameTest", "nullHostname"); }
static public void main5() throws Exception { Driver.main("com.github.maven.plugins.core.CustomHostnameTest", "emptyHost"); }
}
class Driver_akela {
static public void main1() throws Exception { Driver.main("com.mozilla.util.StringUtilTest", "testJoin"); }
static public void main2() throws Exception { Driver.main("com.mozilla.util.DateUtilTest", "testTimeAtResolution"); }
static public void main3() throws Exception { Driver.main("com.mozilla.util.DateUtilTest", "testEndTimeAtResolution"); }
static public void main4() throws Exception { Driver.main("com.mozilla.util.DateUtilTest", "testTimeDelta"); }
static public void main5() throws Exception { Driver.main("com.mozilla.util.DateUtilTest", "testIterateByDay"); }
static public void main6() throws Exception { Driver.main("com.mozilla.util.DateUtilTest", "testIterateByHour"); }
}
class Driver_spring_data_jdbc_repository {
static public void main1() throws Exception { Driver.main("com.nurkiewicz.jdbcrepository.sql.SqlGeneratorTest", "buildSqlForSelectByIdsWhenSingleIdColumnAndNoId"); }
static public void main2() throws Exception { Driver.main("com.nurkiewicz.jdbcrepository.sql.SqlGeneratorTest", "buildSqlForSelectByIdsWhenSingleIdColumnAndOneId"); }
static public void main3() throws Exception { Driver.main("com.nurkiewicz.jdbcrepository.sql.SqlGeneratorTest", "buildSqlForSelectByIdsWhenSingleIdColumnAndTwoIds"); }
static public void main4() throws Exception { Driver.main("com.nurkiewicz.jdbcrepository.sql.SqlGeneratorTest", "buildSqlForSelectByIdsWhenSingleIdColumnAndSeveralIds"); }
static public void main5() throws Exception { Driver.main("com.nurkiewicz.jdbcrepository.sql.SqlGeneratorTest", "buildSqlForSelectByIdsWhenMultipleIdColumnsAndNoId"); }
static public void main6() throws Exception { Driver.main("com.nurkiewicz.jdbcrepository.sql.SqlGeneratorTest", "buildSqlForSelectByIdsWhenMultipleIdColumnsAndOneId"); }
static public void main7() throws Exception { Driver.main("com.nurkiewicz.jdbcrepository.sql.SqlGeneratorTest", "buildSqlForSelectByIdsWhenMultipleIdColumnsAndTwoIds"); }
static public void main8() throws Exception { Driver.main("com.nurkiewicz.jdbcrepository.sql.SqlGeneratorTest", "buildSqlForSelectByIdsWhenMultipleIdColumnsAndSeveralIds"); }
static public void main9() throws Exception { Driver.main("com.nurkiewicz.jdbcrepository.sql.SqlGeneratorTest", "buildSqlForDeleteBySingleIdColumn"); }
static public void main10() throws Exception { Driver.main("com.nurkiewicz.jdbcrepository.sql.SqlGeneratorTest", "buildSqlForDeleteByTwoIdColumns"); }
static public void main11() throws Exception { Driver.main("com.nurkiewicz.jdbcrepository.sql.SqlGeneratorTest", "buildSqlForDeleteByMultipleIdColumns"); }
static public void main12() throws Exception { Driver.main("com.nurkiewicz.jdbcrepository.sql.SqlGeneratorTest", "buildSqlForUpdateWithSingleIdColumn"); }
static public void main13() throws Exception { Driver.main("com.nurkiewicz.jdbcrepository.sql.SqlGeneratorTest", "buildSqlForUpdateWithMultipleIdColumns"); }
}
class Driver_jopt_simple {
static public void main1() throws Exception { Driver.main("joptsimple.ValueConverterAdmitsSubclassesOfValueTypeTest", "subclassOfValueType"); }
static public void main2() throws Exception { Driver.main("joptsimple.OptionSpecsReportTheirOptionsSortedSpeciallyTest", "shortOptionsComeFirstFollowedByLongOptionsLexicographically"); }
static public void main3() throws Exception { Driver.main("joptsimple.PunctuationInShortOptionTest", "disallowsHyphenAsShortOption", "IllegalOptionSpecificationException"); }
static public void main4() throws Exception { Driver.main("joptsimple.PunctuationInShortOptionTest", "allowsQuestionMarkAsShortOption"); }
static public void main5() throws Exception { Driver.main("joptsimple.PunctuationInShortOptionTest", "allowsDotAsShortOption"); }
static public void main6() throws Exception { Driver.main("joptsimple.PunctuationInShortOptionTest", "allowsUnderscoreAsShortOption"); }
static public void main7() throws Exception { Driver.main("joptsimple.examples.LongOptionsWithArgumentPositioningTest", "allowsDifferentFormsOfPairingArgumentWithOption"); }
static public void main8() throws Exception { Driver.main("joptsimple.examples.ShortOptionsWithArgumentPositioningTest", "allowsDifferentFormsOfPairingArgumentWithOption"); }
static public void main9() throws Exception { Driver.main("joptsimple.examples.TypesafeOptionArgumentRetrievalTest", "allowsTypesafeRetrievalOfOptionArguments"); }
static public void main10() throws Exception { Driver.main("joptsimple.examples.ShortOptionsClusteringTest", "allowsClusteringShortOptions"); }
static public void main11() throws Exception { Driver.main("joptsimple.examples.LongOptionsTest", "acceptsLongOptions"); }
static public void main12() throws Exception { Driver.main("joptsimple.examples.ExportOptionsTest", "allowsExportOfOptions"); }
static public void main13() throws Exception { Driver.main("joptsimple.examples.RequiredOptionsTest", "allowsSpecificationOfRequiredOptions", "OptionException"); }
static public void main14() throws Exception { Driver.main("joptsimple.examples.RequiredOptionsTest", "aHelpOptionMeansRequiredOptionsNeedNotBePresent"); }
static public void main15() throws Exception { Driver.main("joptsimple.examples.RequiredOptionsTest", "missingHelpOptionMeansRequiredOptionsMustBePresent", "OptionException"); }
static public void main16() throws Exception { Driver.main("joptsimple.examples.OptionSynonymTest", "supportsOptionSynonyms"); }
static public void main17() throws Exception { Driver.main("joptsimple.ArgumentListHasNoMoreArgsTest", "peek", "IndexOutOfBoundsException", new String[]{"setUp"}, null); }
static public void main18() throws Exception { Driver.main("joptsimple.ArgumentListHasNoMoreArgsTest", "next", "IndexOutOfBoundsException", new String[]{"setUp"}, null); }
static public void main19() throws Exception { Driver.main("joptsimple.ArgumentListHasNoMoreArgsTest", "treatNextAsLongOption", "IndexOutOfBoundsException", new String[]{"setUp"}, null); }
static public void main20() throws Exception { Driver.main("joptsimple.ArgumentListTest", "nextAndPeek", null, new String[]{"setUp"}, null); }
static public void main21() throws Exception { Driver.main("joptsimple.ArgumentListTest", "treatNextAsLongOption", null, new String[]{"setUp"}, null); }
static public void main22() throws Exception { Driver.main("joptsimple.examples.LongOptionsWithArgumentsTest", "supportsLongOptionsWithArgumentsAndAbbreviations"); }
static public void main23() throws Exception { Driver.main("joptsimple.examples.LongOptionsWithArgumentsTest", "supportsLongOptionsWithEmptyArguments"); }
static public void main24() throws Exception { Driver.main("joptsimple.internal.RowsTest", "optionsAndDescriptionsWithinOverallWidth"); }
static public void main25() throws Exception { Driver.main("joptsimple.internal.RowsTest", "someOptionsExceedOverallWidth"); }
static public void main26() throws Exception { Driver.main("joptsimple.internal.RowsTest", "someDescriptionsExceedOverallWidth"); }
static public void main27() throws Exception { Driver.main("joptsimple.internal.SimpleOptionNameMapTest", "putAndContains"); }
static public void main28() throws Exception { Driver.main("joptsimple.internal.SimpleOptionNameMapTest", "get"); }
static public void main29() throws Exception { Driver.main("joptsimple.internal.SimpleOptionNameMapTest", "putAll"); }
static public void main30() throws Exception { Driver.main("joptsimple.internal.SimpleOptionNameMapTest", "remove"); }
static public void main31() throws Exception { Driver.main("joptsimple.internal.SimpleOptionNameMapTest", "toJavaUtilMap"); }
static public void main32() throws Exception { Driver.main("joptsimple.util.KeyValuePairTest", "nullArg", "NullPointerException"); }
static public void main33() throws Exception { Driver.main("joptsimple.util.KeyValuePairTest", "empty"); }
static public void main34() throws Exception { Driver.main("joptsimple.util.KeyValuePairTest", "noEqualsSign"); }
static public void main35() throws Exception { Driver.main("joptsimple.util.KeyValuePairTest", "signAtEnd"); }
static public void main36() throws Exception { Driver.main("joptsimple.util.KeyValuePairTest", "signAtStart"); }
static public void main37() throws Exception { Driver.main("joptsimple.util.KeyValuePairTest", "typical"); }
static public void main38() throws Exception { Driver.main("joptsimple.util.KeyValuePairTest", "multipleEqualsSignsDoNotMatter"); }
static public void main39() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "nullValuesAreIllegal", "NullPointerException", new String[]{"setUp"}, null); }
static public void main40() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "nullKeysAreIllegalToAdd", "NullPointerException", new String[]{"setUp"}, null); }
static public void main41() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "nullKeysAreIllegalToCheckForContains", "NullPointerException", new String[]{"setUp"}, null); }
static public void main42() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "zeroLengthKeysAreIllegalToAdd", "IllegalArgumentException", new String[]{"setUp"}, null); }
static public void main43() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "nullKeysAreIllegalToRemove", "NullPointerException", new String[]{"setUp"}, null); }
static public void main44() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "zeroLengthKeysAreIllegalToRemove", "IllegalArgumentException", new String[]{"setUp"}, null); }
static public void main45() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "empty", null, new String[]{"setUp"}, null); }
static public void main46() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "addingOne", null, new String[]{"setUp"}, null); }
static public void main47() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "addingManyWithNoCommonPrefix", null, new String[]{"setUp"}, null); }
static public void main48() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "addingTwoWithCommonPrefix", null, new String[]{"setUp"}, null); }
static public void main49() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "addingThreeWithSuccessivelySmallerPrefixes", null, new String[]{"setUp"}, null); }
static public void main50() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "addingThreeWithSuccessivelyLargerPrefixes", null, new String[]{"setUp"}, null); }
static public void main51() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "addingThreeWithMixOfPrefixSize", null, new String[]{"setUp"}, null); }
static public void main52() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "addingOneThenReplacing", null, new String[]{"setUp"}, null); }
static public void main53() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "removingNonExistentKeyHasNoEffect", null, new String[]{"setUp"}, null); }
static public void main54() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "removingSingleKey", null, new String[]{"setUp"}, null); }
static public void main55() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "cannotRemoveByUniqueAbbreviation", null, new String[]{"setUp"}, null); }
static public void main56() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "removeKeyWithCommonPrefix", null, new String[]{"setUp"}, null); }
static public void main57() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "addKeysWithCommonPrefixThenRemoveNonExistentKeyWithCommonPrefix", null, new String[]{"setUp"}, null); }
static public void main58() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "addKeysWithCommonPrefixesStairstepStyle", null, new String[]{"setUp"}, null); }
static public void main59() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "addKeysWithCommonPrefixesStairstepStyleJumbled", null, new String[]{"setUp"}, null); }
static public void main60() throws Exception { Driver.main("joptsimple.internal.AbbreviationMapTest", "multipleKeysWithCommonPrefix", null, new String[]{"setUp"}, null); }
}
class Driver_slf4j {
static public void main1() throws Exception { Driver.main("org.slf4j.BasicMarkerTest", "testPrimitive"); }
static public void main2() throws Exception { Driver.main("org.slf4j.BasicMarkerTest", "testPrimitiveByName"); }
static public void main3() throws Exception { Driver.main("org.slf4j.BasicMarkerTest", "testComposite"); }
static public void main4() throws Exception { Driver.main("org.slf4j.BasicMarkerTest", "testCompositeByName"); }
static public void main5() throws Exception { Driver.main("org.slf4j.BasicMarkerTest", "testMultiComposite"); }
static public void main6() throws Exception { Driver.main("org.slf4j.BasicMarkerTest", "testMultiCompositeByName"); }
static public void main7() throws Exception { Driver.main("org.slf4j.BasicMarkerTest", "testMultiAdd"); }
static public void main8() throws Exception { Driver.main("org.slf4j.BasicMarkerTest", "testAddRemove"); }
static public void main9() throws Exception { Driver.main("org.slf4j.BasicMarkerTest", "testSelfRecursion"); }
static public void main10() throws Exception { Driver.main("org.slf4j.BasicMarkerTest", "testIndirectRecursion"); }
static public void main11() throws Exception { Driver.main("org.slf4j.BasicMarkerTest", "testHomonyms"); }
static public void main12() throws Exception { Driver.main("org.slf4j.helpers.SubstituteLoggerFactoryTest", "testFactory"); }
static public void main13() throws Exception { Driver.main("org.slf4j.helpers.SubstituteLoggerFactoryTest", "testLoggerNameList"); }
static public void main14() throws Exception { Driver.main("org.slf4j.helpers.SubstituteLoggerFactoryTest", "testLoggers"); }
static public void main15() throws Exception { Driver.main("org.slf4j.helpers.SubstitutableLoggerTest", "testDelegate"); }
static public void main16() throws Exception { Driver.main("org.slf4j.helpers.BubbleSortTest", "testSmoke"); }
static public void main17() throws Exception { Driver.main("org.slf4j.helpers.BubbleSortTest", "testEmpty"); }
static public void main18() throws Exception { Driver.main("org.slf4j.helpers.BubbleSortTest", "testSorted"); }
static public void main19() throws Exception { Driver.main("org.slf4j.helpers.BubbleSortTest", "testInverted"); }
static public void main20() throws Exception { Driver.main("org.slf4j.helpers.BubbleSortTest", "testWithSameEntry"); }
static public void main21() throws Exception { Driver.main("org.slf4j.helpers.BubbleSortTest", "testRandom"); }
static public void main22() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "singleMessage", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
static public void main23() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "oneParameter", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
static public void main24() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "messageTwoParameters", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
static public void main25() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "traceMessageThreeParameters", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
static public void main26() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "testMessageThrowable", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
static public void main27() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "traceMessageOneParameterThrowable", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
static public void main28() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "traceMessageTwoParametersThrowable", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
static public void main29() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "testMessageThreeParametersThrowable", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
static public void main30() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "markerMessage", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
static public void main31() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "markerMessageOneParameter", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
static public void main32() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "traceMarkerMessageTwoParameters", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
static public void main33() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "traceMarkerMessageThreeParameters", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
static public void main34() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "markerMessageThrowable", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
static public void main35() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "markerMessageOneParameterThrowable", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
static public void main36() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "traceMarkerMessageTwoParametersThrowable", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
static public void main37() throws Exception { Driver.main("org.slf4j.event.EventRecodingLoggerTest", "traceMarkerMessageThreeParametersThrowable", null, new String[]{"setUp"}, new String[]{"tearDown"}); }
}
class Driver_spring_test_mvc {
static public void main1() throws Exception { Driver.main("org.springframework.test.web.server.samples.standalone.resulthandlers.PrintingResultHandlerTests", "testPrint"); }
static public void main2() throws Exception { Driver.main("org.springframework.test.web.server.result.FlashAttributeResultMatchersTests", "attributeExists"); }
static public void main3() throws Exception { Driver.main("org.springframework.test.web.server.result.FlashAttributeResultMatchersTests", "attributeExists_doesntExist", "AssertionError"); }
static public void main4() throws Exception { Driver.main("org.springframework.test.web.server.result.FlashAttributeResultMatchersTests", "attribute"); }
static public void main5() throws Exception { Driver.main("org.springframework.test.web.server.result.FlashAttributeResultMatchersTests", "attribute_incorrectValue", "AssertionError"); }
static public void main6() throws Exception { Driver.main("org.springframework.test.web.client.response.ResponseCreatorsTests", "success"); }
static public void main7() throws Exception { Driver.main("org.springframework.test.web.client.response.ResponseCreatorsTests", "successWithContent"); }
static public void main8() throws Exception { Driver.main("org.springframework.test.web.client.response.ResponseCreatorsTests", "successWithContentWithoutContentType"); }
static public void main9() throws Exception { Driver.main("org.springframework.test.web.client.response.ResponseCreatorsTests", "created"); }
static public void main10() throws Exception { Driver.main("org.springframework.test.web.client.response.ResponseCreatorsTests", "noContent"); }
static public void main11() throws Exception { Driver.main("org.springframework.test.web.client.response.ResponseCreatorsTests", "badRequest"); }
static public void main12() throws Exception { Driver.main("org.springframework.test.web.client.response.ResponseCreatorsTests", "unauthorized"); }
static public void main13() throws Exception { Driver.main("org.springframework.test.web.client.response.ResponseCreatorsTests", "serverError"); }
static public void main14() throws Exception { Driver.main("org.springframework.test.web.client.response.ResponseCreatorsTests", "withStatus"); }
static public void main15() throws Exception { Driver.main("org.springframework.test.web.client.match.XpathRequestMatchersTests", "testNodeMatcher", null, new String[]{"setUp"}, null); }
static public void main16() throws Exception { Driver.main("org.springframework.test.web.client.match.XpathRequestMatchersTests", "testNodeMatcherNoMatch", "AssertionError", new String[]{"setUp"}, null); }
static public void main17() throws Exception { Driver.main("org.springframework.test.web.client.match.XpathRequestMatchersTests", "testExists", null, new String[]{"setUp"}, null); }
static public void main18() throws Exception { Driver.main("org.springframework.test.web.client.match.XpathRequestMatchersTests", "testExistsNoMatch", "AssertionError", new String[]{"setUp"}, null); }
static public void main19() throws Exception { Driver.main("org.springframework.test.web.client.match.XpathRequestMatchersTests", "testDoesNotExist", null, new String[]{"setUp"}, null); }
static public void main20() throws Exception { Driver.main("org.springframework.test.web.client.match.XpathRequestMatchersTests", "testDoesNotExistNoMatch", "AssertionError", new String[]{"setUp"}, null); }
static public void main21() throws Exception { Driver.main("org.springframework.test.web.client.match.XpathRequestMatchersTests", "testNodeCount", null, new String[]{"setUp"}, null); }
static public void main22() throws Exception { Driver.main("org.springframework.test.web.client.match.XpathRequestMatchersTests", "testNodeCountNoMatch", "AssertionError", new String[]{"setUp"}, null); }
static public void main23() throws Exception { Driver.main("org.springframework.test.web.client.match.XpathRequestMatchersTests", "testString", null, new String[]{"setUp"}, null); }
static public void main24() throws Exception { Driver.main("org.springframework.test.web.client.match.XpathRequestMatchersTests", "testStringNoMatch", "AssertionError", new String[]{"setUp"}, null); }
static public void main25() throws Exception { Driver.main("org.springframework.test.web.client.match.XpathRequestMatchersTests", "testNumber", null, new String[]{"setUp"}, null); }
static public void main26() throws Exception { Driver.main("org.springframework.test.web.client.match.XpathRequestMatchersTests", "testNumberNoMatch", "AssertionError", new String[]{"setUp"}, null); }
static public void main27() throws Exception { Driver.main("org.springframework.test.web.client.match.XpathRequestMatchersTests", "testBoolean", null, new String[]{"setUp"}, null); }
static public void main28() throws Exception { Driver.main("org.springframework.test.web.client.match.XpathRequestMatchersTests", "testBooleanNoMatch", "AssertionError", new String[]{"setUp"}, null); }
static public void main29() throws Exception { Driver.main("org.springframework.test.web.client.match.ContentRequestMatchersTests", "testContentType", null, new String[]{"setUp"}, null); }
static public void main30() throws Exception { Driver.main("org.springframework.test.web.client.match.ContentRequestMatchersTests", "testContentTypeNoMatch1", "AssertionError", new String[]{"setUp"}, null); }
static public void main31() throws Exception { Driver.main("org.springframework.test.web.client.match.ContentRequestMatchersTests", "testContentTypeNoMatch2", "AssertionError", new String[]{"setUp"}, null); }
static public void main32() throws Exception { Driver.main("org.springframework.test.web.client.match.ContentRequestMatchersTests", "testString", null, new String[]{"setUp"}, null); }
static public void main33() throws Exception { Driver.main("org.springframework.test.web.client.match.ContentRequestMatchersTests", "testStringNoMatch", "AssertionError", new String[]{"setUp"}, null); }
static public void main34() throws Exception { Driver.main("org.springframework.test.web.client.match.ContentRequestMatchersTests", "testBytes", null, new String[]{"setUp"}, null); }
static public void main35() throws Exception { Driver.main("org.springframework.test.web.client.match.ContentRequestMatchersTests", "testBytesNoMatch", "AssertionError", new String[]{"setUp"}, null); }
static public void main36() throws Exception { Driver.main("org.springframework.test.web.client.match.ContentRequestMatchersTests", "testXml", null, new String[]{"setUp"}, null); }
static public void main37() throws Exception { Driver.main("org.springframework.test.web.client.match.ContentRequestMatchersTests", "testXmlNoMatch", "AssertionError", new String[]{"setUp"}, null); }
static public void main38() throws Exception { Driver.main("org.springframework.test.web.client.match.ContentRequestMatchersTests", "testNodeMatcher", null, new String[]{"setUp"}, null); }
static public void main39() throws Exception { Driver.main("org.springframework.test.web.client.match.ContentRequestMatchersTests", "testNodeMatcherNoMatch", "AssertionError", new String[]{"setUp"}, null); }
static public void main40() throws Exception { Driver.main("org.springframework.test.web.client.match.RequestMatchersTests", "requestTo", null, new String[]{"setUp"}, null); }
static public void main41() throws Exception { Driver.main("org.springframework.test.web.client.match.RequestMatchersTests", "requestToNoMatch", "AssertionError", new String[]{"setUp"}, null); }
static public void main42() throws Exception { Driver.main("org.springframework.test.web.client.match.RequestMatchersTests", "requestToContains", null, new String[]{"setUp"}, null); }
static public void main43() throws Exception { Driver.main("org.springframework.test.web.client.match.RequestMatchersTests", "method", null, new String[]{"setUp"}, null); }
static public void main44() throws Exception { Driver.main("org.springframework.test.web.client.match.RequestMatchersTests", "methodNoMatch", "AssertionError", new String[]{"setUp"}, null); }
static public void main45() throws Exception { Driver.main("org.springframework.test.web.client.match.RequestMatchersTests", "header", null, new String[]{"setUp"}, null); }
static public void main46() throws Exception { Driver.main("org.springframework.test.web.client.match.RequestMatchersTests", "headerMissing", "AssertionError", new String[]{"setUp"}, null); }
static public void main47() throws Exception { Driver.main("org.springframework.test.web.client.match.RequestMatchersTests", "headerMissingValue", "AssertionError", new String[]{"setUp"}, null); }
static public void main48() throws Exception { Driver.main("org.springframework.test.web.client.match.RequestMatchersTests", "headerContains", null, new String[]{"setUp"}, null); }
static public void main49() throws Exception { Driver.main("org.springframework.test.web.client.match.RequestMatchersTests", "headerContainsWithMissingHeader", "AssertionError", new String[]{"setUp"}, null); }
static public void main50() throws Exception { Driver.main("org.springframework.test.web.client.match.RequestMatchersTests", "headerContainsWithMissingValue", "AssertionError", new String[]{"setUp"}, null); }
static public void main51() throws Exception { Driver.main("org.springframework.test.web.client.match.RequestMatchersTests", "headers", null, new String[]{"setUp"}, null); }
static public void main52() throws Exception { Driver.main("org.springframework.test.web.client.match.RequestMatchersTests", "headersWithMissingHeader", "AssertionError", new String[]{"setUp"}, null); }
static public void main53() throws Exception { Driver.main("org.springframework.test.web.client.match.RequestMatchersTests", "headersWithMissingValue", "AssertionError", new String[]{"setUp"}, null); }
}
class Driver_httpcomponents_client {
static public void main1() throws Exception { Driver.main("org.apache.hc.client5.http.utils.TesDnsUtils", "testNormalize"); }
static public void main2() throws Exception { Driver.main("org.apache.hc.client5.http.classic.methods.TestHttpOptions", "testMultipleAllows"); }
static public void main3() throws Exception { Driver.main("org.apache.hc.client5.http.classic.methods.TestHttpTrace", "testHttpTraceSetEntity", "IllegalStateException"); }
static public void main4() throws Exception { Driver.main("org.apache.hc.client5.http.protocol.TestRedirectLocation", "testBasics"); }
static public void main5() throws Exception { Driver.main("org.apache.hc.client5.http.auth.TestAuthChallenge", "testAuthChallengeWithValue"); }
static public void main6() throws Exception { Driver.main("org.apache.hc.client5.http.auth.TestAuthChallenge", "testAuthChallengeWithParams"); }
static public void main7() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookieOrigin", "testConstructor"); }
static public void main8() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookieOrigin", "testNullHost", "NullPointerException"); }
static public void main9() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookieOrigin", "testEmptyHost", "IllegalArgumentException"); }
static public void main10() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookieOrigin", "testNegativePort", "IllegalArgumentException"); }
static public void main11() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookieOrigin", "testNullPath", "NullPointerException"); }
static public void main12() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookieOrigin", "testEmptyPath"); }
static public void main13() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookiePathComparator", "testUnequality1"); }
static public void main14() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookiePathComparator", "testUnequality2"); }
static public void main15() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookiePathComparator", "testEquality1"); }
static public void main16() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookiePathComparator", "testEquality2"); }
static public void main17() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookiePathComparator", "testEquality3"); }
static public void main18() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookiePathComparator", "testEquality4"); }
static public void main19() throws Exception { Driver.main("org.apache.hc.client5.http.classic.methods.TestHttpRequestBase", "testBasicProperties"); }
static public void main20() throws Exception { Driver.main("org.apache.hc.client5.http.classic.methods.TestHttpRequestBase", "testEmptyURI"); }
static public void main21() throws Exception { Driver.main("org.apache.hc.client5.http.impl.classic.TestNullBackoffStrategy", "doesNotBackoffForThrowables", null, new String[]{"setUp"}, null); }
static public void main22() throws Exception { Driver.main("org.apache.hc.client5.http.impl.classic.TestNullBackoffStrategy", "doesNotBackoffForResponses", null, new String[]{"setUp"}, null); }
static public void main23() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookiePriorityComparator", "testUnequality", null, new String[]{"setup"}, null); }
static public void main24() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookiePriorityComparator", "testEquality", null, new String[]{"setup"}, null); }
static public void main25() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookiePriorityComparator", "testUnequalityTrailingSlash", null, new String[]{"setup"}, null); }
static public void main26() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookiePriorityComparator", "testEqualityNullPath", null, new String[]{"setup"}, null); }
static public void main27() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookiePriorityComparator", "testEqualitySameLength", null, new String[]{"setup"}, null); }
static public void main28() throws Exception { Driver.main("org.apache.hc.client5.http.cookie.TestCookiePriorityComparator", "testUnequalityCreationDate", null, new String[]{"setup"}, null); }
static public void main29() throws Exception { Driver.main("org.apache.hc.client5.http.entity.mime.TestMultipartContentBody", "testStringBody"); }
static public void main30() throws Exception { Driver.main("org.apache.hc.client5.http.entity.mime.TestMultipartContentBody", "testInputStreamBody"); }
static public void main31() throws Exception { Driver.main("org.apache.hc.client5.http.entity.mime.TestFormBodyPartBuilder", "testBuildBodyPartBasics"); }
static public void main32() throws Exception { Driver.main("org.apache.hc.client5.http.entity.mime.TestFormBodyPartBuilder", "testBuildBodyPartMultipleBuilds"); }
static public void main33() throws Exception { Driver.main("org.apache.hc.client5.http.entity.mime.TestFormBodyPartBuilder", "testBuildBodyPartCustomHeaders"); }
static public void main34() throws Exception { Driver.main("org.apache.hc.client5.http.impl.TestDefaultConnKeepAliveStrategy", "testIllegalResponseArg", "NullPointerException"); }
static public void main35() throws Exception { Driver.main("org.apache.hc.client5.http.impl.TestDefaultConnKeepAliveStrategy", "testNoKeepAliveHeader"); }
static public void main36() throws Exception { Driver.main("org.apache.hc.client5.http.impl.TestDefaultConnKeepAliveStrategy", "testEmptyKeepAliveHeader"); }
static public void main37() throws Exception { Driver.main("org.apache.hc.client5.http.impl.TestDefaultConnKeepAliveStrategy", "testInvalidKeepAliveHeader"); }
static public void main38() throws Exception { Driver.main("org.apache.hc.client5.http.impl.TestDefaultConnKeepAliveStrategy", "testKeepAliveHeader"); }
static public void main39() throws Exception { Driver.main("org.apache.hc.client5.http.impl.classic.TestDefaultBackoffStrategy", "backsOffForSocketTimeouts", null, new String[]{"setUp"}, null); }
static public void main40() throws Exception { Driver.main("org.apache.hc.client5.http.impl.classic.TestDefaultBackoffStrategy", "backsOffForConnectionTimeouts", null, new String[]{"setUp"}, null); }
static public void main41() throws Exception { Driver.main("org.apache.hc.client5.http.impl.classic.TestDefaultBackoffStrategy", "doesNotBackOffForConnectionManagerTimeout", null, new String[]{"setUp"}, null); }
static public void main42() throws Exception { Driver.main("org.apache.hc.client5.http.impl.classic.TestDefaultBackoffStrategy", "backsOffForServiceUnavailable", null, new String[]{"setUp"}, null); }
static public void main43() throws Exception { Driver.main("org.apache.hc.client5.http.impl.classic.TestDefaultBackoffStrategy", "backsOffForTooManyRequests", null, new String[]{"setUp"}, null); }
static public void main44() throws Exception { Driver.main("org.apache.hc.client5.http.impl.classic.TestDefaultBackoffStrategy", "doesNotBackOffForNon429And503StatusCodes", null, new String[]{"setUp"}, null); }
static public void main45() throws Exception { Driver.main("org.apache.hc.client5.http.auth.TestAuthScope", "testBasics"); }
static public void main46() throws Exception { Driver.main("org.apache.hc.client5.http.auth.TestAuthScope", "testByOrigin"); }
static public void main47() throws Exception { Driver.main("org.apache.hc.client5.http.auth.TestAuthScope", "testMixedCaseHostname"); }
static public void main48() throws Exception { Driver.main("org.apache.hc.client5.http.auth.TestAuthScope", "testByOriginMixedCaseHostname"); }
static public void main49() throws Exception { Driver.main("org.apache.hc.client5.http.auth.TestAuthScope", "testBasicsAllOptional"); }
static public void main50() throws Exception { Driver.main("org.apache.hc.client5.http.auth.TestAuthScope", "testScopeMatching"); }
static public void main51() throws Exception { Driver.main("org.apache.hc.client5.http.auth.TestAuthScope", "testEquals"); }
static public void main52() throws Exception { Driver.main("org.apache.hc.client5.http.auth.TestAuthScope", "testHash"); }
}
class Driver_vraptor4 {
static public void main1() throws Exception { Driver.main("br.com.caelum.vraptor.validator.I18nMessageTest", "shouldBeEqualAccordingToMessageCategoryParamsAndSeverity"); }
static public void main2() throws Exception { Driver.main("br.com.caelum.vraptor.interceptor.AcceptsNeedReturnBooleanValidationRuleTest", "shouldVerifyIfAcceptsMethodReturnsVoid", null, new String[]{"setUp"}, null); }
static public void main3() throws Exception { Driver.main("br.com.caelum.vraptor.interceptor.AcceptsNeedReturnBooleanValidationRuleTest", "shouldVerifyIfAcceptsMethodReturnsNonBooleanType", null, new String[]{"setUp"}, null); }
static public void main4() throws Exception { Driver.main("br.com.caelum.vraptor.interceptor.CustomAndInternalAcceptsValidationRuleTest", "mustNotUseInternalAcceptsAndCustomAccepts", null, new String[]{"setUp"}, null); }
static public void main5() throws Exception { Driver.main("br.com.caelum.vraptor.interceptor.CustomAndInternalAcceptsValidationRuleTest", "shouldValidateIfConstainsOnlyInternalAccepts", null, new String[]{"setUp"}, null); }
static public void main6() throws Exception { Driver.main("br.com.caelum.vraptor.interceptor.CustomAndInternalAcceptsValidationRuleTest", "shouldValidateIfConstainsOnlyCustomAccepts", null, new String[]{"setUp"}, null); }
static public void main7() throws Exception { Driver.main("br.com.caelum.vraptor.util.test.MockHttpResultTest", "test", null, new String[]{"setUp"}, null); }
static public void main8() throws Exception { Driver.main("br.com.caelum.vraptor.util.test.MockHttpServletResponseTest", "shouldBeAbleToReturnContentIntoWriteAsString", null, new String[]{"setUp"}, null); }
static public void main9() throws Exception { Driver.main("br.com.caelum.vraptor.util.test.MockHttpServletResponseTest", "shouldBeAbleToReturnResponseStatusCode", null, new String[]{"setUp"}, null); }
static public void main10() throws Exception { Driver.main("br.com.caelum.vraptor.converter.LongConverterTest", "shouldBeAbleToConvertNumbers", null, new String[]{"setup"}, null); }
static public void main11() throws Exception { Driver.main("br.com.caelum.vraptor.converter.LongConverterTest", "shouldComplainAboutInvalidNumber", null, new String[]{"setup"}, null); }
static public void main12() throws Exception { Driver.main("br.com.caelum.vraptor.converter.LongConverterTest", "shouldNotComplainAboutNull", null, new String[]{"setup"}, null); }
static public void main13() throws Exception { Driver.main("br.com.caelum.vraptor.converter.LongConverterTest", "shouldNotComplainAboutEmpty", null, new String[]{"setup"}, null); }
static public void main14() throws Exception { Driver.main("br.com.caelum.vraptor.converter.CharacterConverterTest", "shouldBeAbleToConvertCharacters", null, new String[]{"setup"}, null); }
static public void main15() throws Exception { Driver.main("br.com.caelum.vraptor.converter.CharacterConverterTest", "shouldComplainAboutStringTooBig", null, new String[]{"setup"}, null); }
static public void main16() throws Exception { Driver.main("br.com.caelum.vraptor.converter.CharacterConverterTest", "shouldNotComplainAboutNullAndEmpty", null, new String[]{"setup"}, null); }
static public void main17() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveByteConverterTest", "shouldBeAbleToConvertNumbers", null, new String[]{"setup"}, null); }
static public void main18() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveByteConverterTest", "shouldComplainAboutInvalidNumber", null, new String[]{"setup"}, null); }
static public void main19() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveByteConverterTest", "shouldConvertToZeroWhenNull", null, new String[]{"setup"}, null); }
static public void main20() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveByteConverterTest", "shouldConvertToZeroWhenEmpty", null, new String[]{"setup"}, null); }
static public void main21() throws Exception { Driver.main("br.com.caelum.vraptor.converter.IntegerConverterTest", "shouldBeAbleToConvertNumbers", null, new String[]{"setup"}, null); }
static public void main22() throws Exception { Driver.main("br.com.caelum.vraptor.converter.IntegerConverterTest", "shouldComplainAboutInvalidNumber", null, new String[]{"setup"}, null); }
static public void main23() throws Exception { Driver.main("br.com.caelum.vraptor.converter.IntegerConverterTest", "shouldNotComplainAboutNull", null, new String[]{"setup"}, null); }
static public void main24() throws Exception { Driver.main("br.com.caelum.vraptor.converter.IntegerConverterTest", "shouldNotComplainAboutEmpty", null, new String[]{"setup"}, null); }
static public void main25() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveIntConverterTest", "shouldBeAbleToConvertNumbers", null, new String[]{"setup"}, null); }
static public void main26() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveIntConverterTest", "shouldComplainAboutInvalidNumber", null, new String[]{"setup"}, null); }
static public void main27() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveIntConverterTest", "shouldConvertToZeroWhenNull", null, new String[]{"setup"}, null); }
static public void main28() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveIntConverterTest", "shouldConvertToZeroWhenEmpty", null, new String[]{"setup"}, null); }
static public void main29() throws Exception { Driver.main("br.com.caelum.vraptor.converter.BooleanConverterTest", "shouldBeAbleToConvertTrueAndFalse", null, new String[]{"setup"}, null); }
static public void main30() throws Exception { Driver.main("br.com.caelum.vraptor.converter.BooleanConverterTest", "shouldConvertEmptyToNull", null, new String[]{"setup"}, null); }
static public void main31() throws Exception { Driver.main("br.com.caelum.vraptor.converter.BooleanConverterTest", "shouldNotComplainAboutNull", null, new String[]{"setup"}, null); }
static public void main32() throws Exception { Driver.main("br.com.caelum.vraptor.converter.BooleanConverterTest", "shouldConvertYesNo", null, new String[]{"setup"}, null); }
static public void main33() throws Exception { Driver.main("br.com.caelum.vraptor.converter.BooleanConverterTest", "shouldConvertYN", null, new String[]{"setup"}, null); }
static public void main34() throws Exception { Driver.main("br.com.caelum.vraptor.converter.BooleanConverterTest", "shouldConvertOnOff", null, new String[]{"setup"}, null); }
static public void main35() throws Exception { Driver.main("br.com.caelum.vraptor.converter.BooleanConverterTest", "shouldConvertIgnoringCase", null, new String[]{"setup"}, null); }
static public void main36() throws Exception { Driver.main("br.com.caelum.vraptor.converter.BooleanConverterTest", "shouldThrowExceptionForInvalidString", null, new String[]{"setup"}, null); }
static public void main37() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveLongConverterTest", "shouldBeAbleToConvertNumbers", null, new String[]{"setup"}, null); }
static public void main38() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveLongConverterTest", "shouldComplainAboutInvalidNumber", null, new String[]{"setup"}, null); }
static public void main39() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveLongConverterTest", "shouldConvertToZeroWhenNull", null, new String[]{"setup"}, null); }
static public void main40() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveLongConverterTest", "shouldConvertToZeroWhenEmpty", null, new String[]{"setup"}, null); }
static public void main41() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveCharConverterTest", "shouldBeAbleToConvertNumbers", null, new String[]{"setup"}, null); }
static public void main42() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveCharConverterTest", "shouldComplainAboutInvalidNumber", null, new String[]{"setup"}, null); }
static public void main43() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveCharConverterTest", "shouldConvertToZeroWhenNull", null, new String[]{"setup"}, null); }
static public void main44() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveCharConverterTest", "shouldConvertToZeroWhenEmpty", null, new String[]{"setup"}, null); }
static public void main45() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveBooleanConverterTest", "shouldBeAbleToConvertNumbers", null, new String[]{"setup"}, null); }
static public void main46() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveBooleanConverterTest", "shouldConvertToZeroWhenNull", null, new String[]{"setup"}, null); }
static public void main47() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveBooleanConverterTest", "shouldConvertToZeroWhenEmpty", null, new String[]{"setup"}, null); }
static public void main48() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveBooleanConverterTest", "shouldConvertYesNo", null, new String[]{"setup"}, null); }
static public void main49() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveBooleanConverterTest", "shouldConvertYN", null, new String[]{"setup"}, null); }
static public void main50() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveBooleanConverterTest", "shouldConvertOnOff", null, new String[]{"setup"}, null); }
static public void main51() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveBooleanConverterTest", "shouldConvertIgnoringCase", null, new String[]{"setup"}, null); }
static public void main52() throws Exception { Driver.main("br.com.caelum.vraptor.converter.PrimitiveBooleanConverterTest", "shouldThrowExceptionForInvalidString", null, new String[]{"setup"}, null); }
static public void main53() throws Exception { Driver.main("br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormatTest", "shouldComplainIfThereIsNothingRegistered", null, new String[]{"setup"}, null); }
static public void main54() throws Exception { Driver.main("br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormatTest", "shouldReturnHtmlWhenRequestingAnyContentType", null, new String[]{"setup"}, null); }
static public void main55() throws Exception { Driver.main("br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormatTest", "shouldReturnHtmlWhenAcceptsIsBlankContentType", null, new String[]{"setup"}, null); }
static public void main56() throws Exception { Driver.main("br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormatTest", "shouldReturnHtmlWhenRequestingUnknownAsFirstAndAnyContentType", null, new String[]{"setup"}, null); }
static public void main57() throws Exception { Driver.main("br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormatTest", "testHtml", null, new String[]{"setup"}, null); }
static public void main58() throws Exception { Driver.main("br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormatTest", "testJson", null, new String[]{"setup"}, null); }
static public void main59() throws Exception { Driver.main("br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormatTest", "testJsonWithQualifier", null, new String[]{"setup"}, null); }
static public void main60() throws Exception { Driver.main("br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormatTest", "testNull", null, new String[]{"setup"}, null); }
static public void main61() throws Exception { Driver.main("br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormatTest", "testJsonInAComplexAcceptHeader", null, new String[]{"setup"}, null); }
static public void main62() throws Exception { Driver.main("br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormatTest", "testPrecendenceInAComplexAcceptHeaderHtmlShouldPrevailWhenTied", null, new String[]{"setup"}, null); }
static public void main63() throws Exception { Driver.main("br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormatTest", "testPrecendenceInABizzarreMSIE8AcceptHeader", null, new String[]{"setup"}, null); }
static public void main64() throws Exception { Driver.main("br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormatTest", "testPrecendenceInABizzarreMSIE8AcceptHeaderWithHtml", null, new String[]{"setup"}, null); }
static public void main65() throws Exception { Driver.main("br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormatTest", "testPrecendenceInAComplexAcceptHeaderHtmlShouldPrevailWhenTied2", null, new String[]{"setup"}, null); }
static public void main66() throws Exception { Driver.main("br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormatTest", "testJsonInAComplexAcceptHeaderWithParameters", null, new String[]{"setup"}, null); }
static public void main67() throws Exception { Driver.main("br.com.caelum.vraptor.view.DefaultAcceptHeaderToFormatTest", "testXMLInAComplexAcceptHeaderWithParametersNotOrdered", null, new String[]{"setup"}, null); }
static public void main68() throws Exception { Driver.main("br.com.caelum.vraptor.interceptor.NoInterceptMethodsValidationRuleTest", "shoulThrowExceptionIfInterceptorDontHaveAnyCallableMethod", null, new String[]{"setUp"}, null); }
static public void main69() throws Exception { Driver.main("br.com.caelum.vraptor.interceptor.NoInterceptMethodsValidationRuleTest", "shoulWorksFineIfInterceptorHaveAtLeastOneCallableMethod", null, new String[]{"setUp"}, null); }
}
class Driver_spark {
static public void main1() throws Exception { Driver.main("spark.utils.MimeParseTest", "testBestMatch"); }
static public void main2() throws Exception { Driver.main("spark.utils.MimeParseTest", "testBestMatch_whenSupportedIsLowQualityFactor"); }
static public void main3() throws Exception { Driver.main("spark.utils.ObjectUtilsTest", "testIsEmpty_whenArrayIsEmpty"); }
static public void main4() throws Exception { Driver.main("spark.utils.ObjectUtilsTest", "testIsEmpty_whenArrayIsNotEmpty"); }
static public void main5() throws Exception { Driver.main("spark.utils.CollectionUtilsTest", "testIsEmpty_whenCollectionIsEmpty_thenReturnTrue"); }
static public void main6() throws Exception { Driver.main("spark.utils.CollectionUtilsTest", "testIsEmpty_whenCollectionIsNotEmpty_thenReturnFalse"); }
static public void main7() throws Exception { Driver.main("spark.utils.CollectionUtilsTest", "testIsEmpty_whenCollectionIsNull_thenReturnTrue"); }
static public void main8() throws Exception { Driver.main("spark.utils.CollectionUtilsTest", "testIsNotEmpty_whenCollectionIsEmpty_thenReturnFalse"); }
static public void main9() throws Exception { Driver.main("spark.utils.CollectionUtilsTest", "testIsNotEmpty_whenCollectionIsNotEmpty_thenReturnTrue"); }
static public void main10() throws Exception { Driver.main("spark.utils.CollectionUtilsTest", "testIsNotEmpty_whenCollectionIsNull_thenReturnFalse"); }
static public void main11() throws Exception { Driver.main("spark.utils.SparkUtilsTest", "testConvertRouteToList"); }
static public void main12() throws Exception { Driver.main("spark.utils.SparkUtilsTest", "testIsParam_whenParameterFormattedAsParm"); }
static public void main13() throws Exception { Driver.main("spark.utils.SparkUtilsTest", "testIsParam_whenParameterNotFormattedAsParm"); }
static public void main14() throws Exception { Driver.main("spark.utils.SparkUtilsTest", "testIsSplat_whenParameterIsASplat"); }
static public void main15() throws Exception { Driver.main("spark.utils.SparkUtilsTest", "testIsSplat_whenParameterIsNotASplat"); }
static public void main16() throws Exception { Driver.main("spark.ExceptionMapperTest", "testGetInstance_whenDefaultInstanceIsNull"); }
static public void main17() throws Exception { Driver.main("spark.ExceptionMapperTest", "testGetInstance_whenDefaultInstanceIsNotNull"); }
static public void main18() throws Exception { Driver.main("spark.util.ResourceUtilsTest", "testGetFile_whenURLProtocolIsNotFile_thenThrowFileNotFoundException"); }
static public void main19() throws Exception { Driver.main("spark.util.ResourceUtilsTest", "testGetFile_whenURLProtocolIsFile_thenReturnFileObject"); }
static public void main20() throws Exception { Driver.main("spark.route.RouteEntryTest", "testMatches_BeforeAndAllPaths"); }
static public void main21() throws Exception { Driver.main("spark.route.RouteEntryTest", "testMatches_AfterAndAllPaths"); }
static public void main22() throws Exception { Driver.main("spark.route.RouteEntryTest", "testMatches_NotAllPathsAndDidNotMatchHttpMethod"); }
static public void main23() throws Exception { Driver.main("spark.route.RouteEntryTest", "testMatches_RouteDoesNotEndWithSlash"); }
static public void main24() throws Exception { Driver.main("spark.route.RouteEntryTest", "testMatches_PathDoesNotEndInSlash"); }
static public void main25() throws Exception { Driver.main("spark.route.RouteEntryTest", "testMatches_MatchingPaths"); }
static public void main26() throws Exception { Driver.main("spark.route.RouteEntryTest", "testMatches_WithWildcardOnEntryPath"); }
static public void main27() throws Exception { Driver.main("spark.route.RouteEntryTest", "testMatches_PathsDoNotMatch"); }
static public void main28() throws Exception { Driver.main("spark.route.RouteEntryTest", "testMatches_longRoutePathWildcard"); }
static public void main29() throws Exception { Driver.main("spark.route.HttpMethodTest", "testSupportedHttpMethod"); }
static public void main30() throws Exception { Driver.main("spark.route.HttpMethodTest", "testNotSupportedHttpMethod"); }
static public void main31() throws Exception { Driver.main("spark.RouteImplTest", "testConstructor"); }
static public void main32() throws Exception { Driver.main("spark.RouteImplTest", "testGets_thenReturnGetPathAndGetAcceptTypeSuccessfully"); }
static public void main33() throws Exception { Driver.main("spark.RouteImplTest", "testCreate_whenOutAssignAcceptTypeInTheParameters_thenReturnPathAndAcceptTypeSuccessfully"); }
static public void main34() throws Exception { Driver.main("spark.RouteImplTest", "testCreate_whenAcceptTypeNullValueInTheParameters_thenReturnPathAndAcceptTypeSuccessfully"); }
static public void main35() throws Exception { Driver.main("spark.RouteImplTest", "testRender_whenElementParameterValid_thenReturnValidObject"); }
static public void main36() throws Exception { Driver.main("spark.RouteImplTest", "testRender_whenElementParameterIsNull_thenReturnNull"); }
static public void main37() throws Exception { Driver.main("spark.QueryParamsMapTest", "constructorWithParametersMap"); }
static public void main38() throws Exception { Driver.main("spark.QueryParamsMapTest", "keyToMap"); }
static public void main39() throws Exception { Driver.main("spark.QueryParamsMapTest", "testDifferentTypesForValue"); }
static public void main40() throws Exception { Driver.main("spark.QueryParamsMapTest", "parseKeyShouldParseRootKey"); }
static public void main41() throws Exception { Driver.main("spark.QueryParamsMapTest", "parseKeyShouldParseSubkeys"); }
static public void main42() throws Exception { Driver.main("spark.QueryParamsMapTest", "itShouldbeNullSafe"); }
static public void main43() throws Exception { Driver.main("spark.QueryParamsMapTest", "testConstructor"); }
static public void main44() throws Exception { Driver.main("spark.QueryParamsMapTest", "testToMap"); }
static public void main45() throws Exception { Driver.main("spark.resource.UriPathTest", "canonical"); }
static public void main46() throws Exception { Driver.main("spark.Base64Test", "test_encode"); }
static public void main47() throws Exception { Driver.main("spark.Base64Test", "test_decode"); }
static public void main48() throws Exception { Driver.main("spark.serialization.InputStreamSerializerTest", "testProcess_copiesData"); }
static public void main49() throws Exception { Driver.main("spark.serialization.InputStreamSerializerTest", "testProcess_closesStream"); }
static public void main50() throws Exception { Driver.main("spark.FilterImplTest", "testConstructor", null, new String[]{"setup"}, null); }
static public void main51() throws Exception { Driver.main("spark.FilterImplTest", "testGets_thenReturnGetPathAndGetAcceptTypeSuccessfully", null, new String[]{"setup"}, null); }
static public void main52() throws Exception { Driver.main("spark.FilterImplTest", "testCreate_whenOutAssignAcceptTypeInTheParameters_thenReturnPathAndAcceptTypeSuccessfully", null, new String[]{"setup"}, null); }
static public void main53() throws Exception { Driver.main("spark.FilterImplTest", "testCreate_whenAcceptTypeNullValueInTheParameters_thenReturnPathAndAcceptTypeSuccessfully", null, new String[]{"setup"}, null); }
}
class Driver_hbc {
static public void main1() throws Exception { Driver.main("com.twitter.hbc.ReconnectionManagerTest", "testLinearBackoff"); }
static public void main2() throws Exception { Driver.main("com.twitter.hbc.ReconnectionManagerTest", "testExponentialBackoff"); }
static public void main3() throws Exception { Driver.main("com.twitter.hbc.ReconnectionManagerTest", "testBackoffSwitching"); }
static public void main4() throws Exception { Driver.main("com.twitter.hbc.ReconnectionManagerTest", "testEstimateBackfill"); }
static public void main5() throws Exception { Driver.main("com.twitter.hbc.ReconnectionManagerTest", "testRetries"); }
static public void main6() throws Exception { Driver.main("com.twitter.hbc.StatsReporterTest", "testStatsReporter"); }
static public void main7() throws Exception { Driver.main("com.twitter.hbc.HttpHostsTest", "testExceptionIfBadScheme"); }
static public void main8() throws Exception { Driver.main("com.twitter.hbc.HttpHostsTest", "testIsScrambled"); }
static public void main9() throws Exception { Driver.main("com.twitter.hbc.HttpHostsTest", "testContainsAll"); }
static public void main10() throws Exception { Driver.main("com.twitter.hbc.HttpHostsTest", "testInfiniteIteration"); }
static public void main11() throws Exception { Driver.main("com.twitter.hbc.EndpointTest", "testDefaultToCurrentApiVersion"); }
static public void main12() throws Exception { Driver.main("com.twitter.hbc.EndpointTest", "testCanSetApiVersion"); }
static public void main13() throws Exception { Driver.main("com.twitter.hbc.EndpointTest", "testDefaultParams"); }
static public void main14() throws Exception { Driver.main("com.twitter.hbc.EndpointTest", "testChangeDefaultParamValues"); }
static public void main15() throws Exception {
Driver.main("com.twitter.hbc.EndpointTest", "testStatusesFilterEndpointTest"); }
static public void main16() throws Exception { Driver.main("com.twitter.hbc.EndpointTest", "testEnterpriseStreamingEndpoint"); }
static public void main17() throws Exception { Driver.main("com.twitter.hbc.EndpointTest", "testEnterpriseStreamingEndpointProduct"); }
static public void main18() throws Exception { Driver.main("com.twitter.hbc.EndpointTest", "testEnterpriseReplayStreamingEndpointFormatsDateParamsAndIncludesThem"); }
static public void main19() throws Exception { Driver.main("com.twitter.hbc.EndpointTest", "testBackfillParamOnEnterpriseStreamEndpoint"); }
static public void main20() throws Exception { Driver.main("com.twitter.hbc.EndpointTest", "testLanguages"); }
static public void main21() throws Exception { Driver.main("com.twitter.hbc.EndpointTest", "testFilterLevel"); }
static public void main22() throws Exception { Driver.main("com.twitter.hbc.EndpointTest", "testSiteStreamEndpoint"); }
}
class Driver_fongo {
static public void main1() throws Exception { Driver.main("com.github.fakemongo.impl.index.IndexedListTest", "testAdd", null, new String[]{"setUp"}, null); }
static public void main2() throws Exception { Driver.main("com.github.fakemongo.impl.index.IndexedListTest", "testSizeWithDuplicates", null, new String[]{"setUp"}, null); }
static public void main3() throws Exception { Driver.main("com.github.fakemongo.impl.index.IndexedListTest", "testContains", null, new String[]{"setUp"}, null); }
static public void main4() throws Exception { Driver.main("com.github.fakemongo.impl.index.IndexedListTest", "testContainsWithoutSecondElement", null, new String[]{"setUp"}, null); }
static public void main5() throws Exception { Driver.main("com.github.fakemongo.impl.index.IndexedListTest", "testContainsSame", null, new String[]{"setUp"}, null); }
static public void main6() throws Exception { Driver.main("com.github.fakemongo.impl.index.IndexedListTest", "testRemove", null, new String[]{"setUp"}, null); }
static public void main7() throws Exception { Driver.main("com.github.fakemongo.impl.index.IndexedListTest", "testRemoveSame", null, new String[]{"setUp"}, null); }
static public void main8() throws Exception { Driver.main("com.github.fakemongo.impl.index.IndexedListTest", "testRemoveNotExistedElement", null, new String[]{"setUp"}, null); }
}
public class Luke {
public static void main(String[] args) {
final RunParameters p = new RunParameters();
// Driver_Bukkit, main1, $CP
set(p, args[0], args[1], args[2]);
final Run r = new Run(p);
r.run();
}
private static void set(RunParameters p, String drivername, String methodName, String classpath) {
String ns = "/mnt/batch/tasks/workitems/SUA_tmp_r0_1M7d21h27m24s/job-1/Task1/wd/auto-judge/classes:" + classpath + ":/mnt/batch/tasks/workitems/SUA_tmp_r0_1M7d21h27m24s/job-1/Task1/wd/auto-judge/jbse-0.10.0-SNAPSHOT-shaded.jar";
String[] a = ns.split(":");
p.addUserClasspath(a);
p.setMethodSignature(drivername, "()V", methodName);
p.setDecisionProcedureType(RunParameters.DecisionProcedureType.Z3);
p.setExternalDecisionProcedurePath("/usr/bin/z3");
p.setOutputFileName("/mnt/batch/tasks/workitems/SUA_tmp_r0_1M7d21h27m24s/job-1/Task1/wd/auto-judge/report.txt");
p.setStateFormatMode(RunParameters.StateFormatMode.TEXT);
p.setStepShowMode(RunParameters.StepShowMode.LEAVES);
}
}
| [
"[email protected]"
] | |
c6d745b594a3bd615e268afbb5246e60fd293624 | b8347923813661a5df4230164826685e23a3fcb9 | /PNF_v5_A-3/src/Components_Middle/CSMiddleFilter.java | cfc4af9a8aeb88eaef309fba8296b7303bf432df | [] | no_license | junyanee/2018_Software_Architecture | 74f4a0caaea6a2268d43192112ba0499e5e19745 | cfe757a23576af5a1213c3061cc1aca6e12274ec | refs/heads/main | 2023-05-01T17:50:47.067483 | 2021-05-19T15:07:07 | 2021-05-19T15:07:07 | 356,878,089 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,329 | java | package Components_Middle;
/**
* Copyright(c) 2013 All rights reserved by JU Consulting
*/
import java.io.IOException;
import Framework.GeneralFilter;
/**
* @author Hwi Ahn, Pilsu Jung, Jungho Kim
* @date 2013-08-15
* @version 1.0
* @description 입력값으로 받은 byte들을 아무 기능도 하지 않고 그대로 전송하는 기능을 한다.
*/
public class CSMiddleFilter extends GeneralFilter { // 기능코드
@Override
public void specificComputationForFilter() throws IOException {
int byte_read = 0;
int checkBlank = 4;
int databyte = 0;
int numOfBlank = 0;
int idx = 0;
byte[] buffer = new byte[64];
boolean isCS = false;
try {
while (true) {
while (databyte != '\n' && databyte != -1) {
databyte = in.read();
if (databyte == ' ') {
numOfBlank++;
}
if (databyte != -1) {
buffer[idx++] = (byte) databyte;
}
if (numOfBlank == checkBlank && buffer[idx - 3] == 'C' && buffer[idx - 2] == 'S') {
isCS = true;
}
}
if (isCS == true) {
for (int i = 0; i < idx; i++) {
out.write((char) buffer[i]);
}
isCS = false;
}
if (byte_read == -1) {
return;
}
idx = 0;
numOfBlank = 0;
databyte = '\0';
}
} catch (Exception e) {
closePorts();
e.printStackTrace();
}
}
}
| [
"[email protected]"
] | |
b3a70f13cf6e4a857e3581b3f35fabfdd9340b65 | f8cc02f3b015bafe5245a4bd964e3071a81d0a54 | /app/src/main/java/ibrahim69/com/customkalender/MainActivity.java | 26b994f1da79d8253f202d669eb967b7261b449b | [] | no_license | ibrahim69/customCalendar | 9cdf16708e9530de75ff78dafa87ce1ed22c5282 | e30e7e66fc878fc129716cd5432da2766e0826fa | refs/heads/master | 2020-04-20T05:43:27.672885 | 2019-02-01T08:05:08 | 2019-02-01T08:05:08 | 168,663,283 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,884 | java | package ibrahim69.com.customkalender;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import ibrahim69.com.customkalender.CustomCalendar;
import ibrahim69.com.customkalender.dao.EventData;
import ibrahim69.com.customkalender.dao.dataAboutDate;
import ibrahim69.com.customkalender.utils.CalendarUtils;
import java.util.ArrayList;
import java.util.Random;
public class MainActivity extends AppCompatActivity {
private CustomCalendar customCalendar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
customCalendar = (CustomCalendar) findViewById(R.id.customCalendar);
String[] arr = {"2019-02-10", "2019-02-11", "2019-02-15", "2019-02-16", "2019-02-25"};
for (int i = 0; i < 5; i++) {
int eventCount = 10;
customCalendar.addAnEvent(arr[i], eventCount, getEventDataList(eventCount));
}
}
public ArrayList<EventData> getEventDataList(int count) {
ArrayList<EventData> eventDataList = new ArrayList();
for (int i = 0; i < count; i++) {
EventData dateData = new EventData();
ArrayList<dataAboutDate> dataAboutDates = new ArrayList();
dateData.setSection(CalendarUtils.getNAMES()[new Random().nextInt(CalendarUtils.getNAMES().length)]);
dataAboutDate dataAboutDate = new dataAboutDate();
int index = new Random().nextInt(CalendarUtils.getEVENTS().length);
dataAboutDate.setTitle(CalendarUtils.getEVENTS()[index]);
dataAboutDate.setSubject(CalendarUtils.getEventsDescription()[index]);
dataAboutDates.add(dataAboutDate);
dateData.setData(dataAboutDates);
eventDataList.add(dateData);
}
return eventDataList;
}
}
| [
"[email protected]"
] | |
f1e95350f6c9126d410275516b5c2962306d9742 | c070e1a63401fa6d194b182e1fc9f2b80c4bb330 | /StudentProject/src/com/dxc/project/StudentDAL.java | 83e4f51f55e07f25b723788847397ace428706f7 | [] | no_license | rwagon13/dxc | 666351f265021d11b6e9e71acacbee65c2c2ab7f | 8efa3062a4665531eef11a05d47aef35b0c1ffe5 | refs/heads/master | 2022-12-14T05:27:25.918575 | 2020-08-28T07:01:44 | 2020-08-28T07:01:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,082 | java | package com.dxc.project;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.List;
public class StudentDAL {
static List<Student> studentList;
static {
studentList = new ArrayList<Student>();
}
public String addStudentDal(Student student) {
studentList.add(student);
return "Student Created Successfully...";
}
public List<Student> showStudentDal() {
return studentList;
}
public Student searchStudentDal(int sno) {
Student student = null;
for (Student s : studentList) {
if (s.getSno() == sno) {
student = s;
}
}
return student;
}
public String updateStudentDal(Student studentUpdated) {
String result = "Record Not Found...";
for (Student student : studentList) {
if (student.getSno() == studentUpdated.getSno()) {
student.setName(studentUpdated.getName());
student.setCity(studentUpdated.getCity());
student.setCgp(studentUpdated.getCgp());
result = "Student Record Updated...";
}
}
return result;
}
public String deleteStudentDal(int sno) {
Student studentFound = searchStudentDal(sno);
if (studentFound != null) {
studentList.remove(studentFound);
return "Student Record Deleted...";
} else {
return "Student Record Not Found to Delete...";
}
}
public String writeStudentFileDal() throws IOException {
FileOutputStream fout=new FileOutputStream("e:/dxc/student.txt");
ObjectOutputStream objout = new ObjectOutputStream(fout);
objout.writeObject(studentList);
objout.close();
fout.close();
return "Student Records Stored in File Successfully...";
}
public String readStudentFileDal() throws IOException, ClassNotFoundException {
FileInputStream fin = new FileInputStream("e:/dxc/student.txt");
ObjectInputStream objin = new ObjectInputStream(fin);
studentList = (List<Student>) objin.readObject();
return "Student Records Retrieved from the file...";
}
}
| [
"[email protected]"
] | |
21f1c57d69dd81a175e37f9c593dfca15b8e62eb | 23139e7b2bd372cb854fc56285713138c01eeedd | /src/main/java/com/predictor/prediction/Predictor.java | 8de63148e3b4c847c808f76905047ca2edc11d7e | [] | no_license | crisnicogonzalez/climate-prediction | 304f068f128150f85ce4b1087fa4f83a43f438f9 | bb5f357774258cf38d0e360679c6840b5166558b | refs/heads/master | 2020-04-29T10:10:39.747631 | 2019-03-28T02:35:48 | 2019-03-28T02:35:48 | 176,052,271 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 982 | java | package com.predictor.prediction;
import com.predictor.condition.*;
import com.predictor.universe.SolarSystem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
import static com.google.common.collect.ImmutableList.of;
import static com.predictor.weather.Weather.UNKNOWN;
@Component
public class Predictor {
private List<WeatherCondition> conditions;
private static final String NO_CONDITION_WAS_MET_MSG = "no condition was met";
@Autowired
public Predictor(List<WeatherCondition> conditions) {
this.conditions = conditions;
}
public WeatherPrediction predict(SolarSystem solarSystem, int day){
return conditions.stream()
.filter( c -> c.meetsConditions(solarSystem,day))
.map( c -> c.getPrediction(solarSystem,day))
.findAny()
.orElse(new WeatherPrediction(UNKNOWN));
}
}
| [
"[email protected]"
] | |
d08829ad55992e0cd5a90c44212d8678a5338533 | d23a5cc28a593bac5ca786b80fb9159892241f59 | /web/src/main/java/com/beans/leaveapp/employeegrade/bean/EmployeeGradeManagementBean.java | b73b6c130889ee361115fa9f73089764026a05a3 | [] | no_license | kinmengBGM/bgmhrm | 45aefcb6eecb3f852d6b5f821467605dbe9c709f | ca63bb4990205c4283227139d0bfd0d5e9808728 | refs/heads/master | 2021-01-23T07:03:49.226721 | 2015-05-26T09:47:25 | 2015-05-26T09:47:25 | 20,989,048 | 1 | 3 | null | null | null | null | UTF-8 | Java | false | false | 5,955 | java | package com.beans.leaveapp.employeegrade.bean;
import java.io.Serializable;
import java.util.List;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import org.apache.log4j.Logger;
import org.primefaces.event.SelectEvent;
import com.beans.common.security.users.model.Users;
import com.beans.exceptions.BSLException;
import com.beans.leaveapp.employeegrade.model.EmployeeGrade;
import com.beans.leaveapp.employeegrade.model.EmployeeGradeDataModel;
import com.beans.leaveapp.employeegrade.service.EmployeeGradeNotFound;
import com.beans.leaveapp.employeegrade.service.EmployeeGradeService;
import com.beans.leaveapp.refresh.Refresh;
import com.beans.leaveapp.web.bean.BaseMgmtBean;
public class EmployeeGradeManagementBean extends BaseMgmtBean implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private Logger log = Logger.getLogger(this.getClass());
// EmployeeGradeRepository employeeGradeRepository;
EmployeeGradeService employeeGradeService;
private List<EmployeeGrade> employeeGradeList;
private EmployeeGradeDataModel employeeGradeDataModel;
private EmployeeGrade newEmployeeGrade = new EmployeeGrade();
private EmployeeGrade selectedEmployeeGrade = new EmployeeGrade();
private boolean insertDeleted = false;
private String searchName;
private Users actorUsers;
public Users getActorUsers() {
return actorUsers;
}
public void setActorUsers(Users actorUsers) {
this.actorUsers = actorUsers;
}
public EmployeeGradeService getEmployeeGradeService() {
return employeeGradeService;
}
public EmployeeGrade getNewEmployeeGrade() {
return newEmployeeGrade;
}
public void setNewEmployeeGrade(EmployeeGrade newEmployeeGrade) {
this.newEmployeeGrade = newEmployeeGrade;
}
public EmployeeGrade getSelectedEmployeeGrade() {
return selectedEmployeeGrade;
}
public void setSelectedEmployeeGrade(EmployeeGrade selectedEmployeeGrade) {
this.selectedEmployeeGrade = selectedEmployeeGrade;
}
public boolean isInsertDeleted() {
return insertDeleted;
}
public void setInsertDelete(boolean insertDeleted) {
this.insertDeleted = insertDeleted;
}
public void setEmployeeGradeService(
EmployeeGradeService employeeGradeService) {
this.employeeGradeService = employeeGradeService;
}
public List<EmployeeGrade> getEmployeeGradeList() {
if (employeeGradeList == null || insertDeleted == true) {
try {
employeeGradeList = getEmployeeGradeService().findAll();
} catch (Throwable e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return employeeGradeList;
}
public EmployeeGradeDataModel getEmployeeGradeDataModel() {
if (employeeGradeDataModel == null || insertDeleted == true) {
System.out.println(getEmployeeGradeList().size());
employeeGradeDataModel = new EmployeeGradeDataModel(
getEmployeeGradeList());
}
return employeeGradeDataModel;
}
public void setEmployeeGradeDataModel(
EmployeeGradeDataModel employeeGradeDataModel) {
this.employeeGradeDataModel = employeeGradeDataModel;
}
public void setEmployeeGradeList(List<EmployeeGrade> employeeGradeList) {
this.employeeGradeList = employeeGradeList;
}
public void doCreateEmployeeGrade() throws EmployeeGradeNotFound {
try{
newEmployeeGrade.setDeleted(false);
newEmployeeGrade.setCreatedBy(actorUsers.getUsername());
newEmployeeGrade.setCreationTime(new java.util.Date());
getEmployeeGradeService().create(newEmployeeGrade);
setInsertDelete(true);
newEmployeeGrade = new EmployeeGrade();
new Refresh().refreshPage();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Info",getExcptnMesProperty("info.empgrade.create")));
}catch(BSLException e){
FacesMessage msg = new FacesMessage("Error",getExcptnMesProperty(e.getMessage()));
msg.setSeverity(FacesMessage.SEVERITY_INFO);
FacesContext.getCurrentInstance().addMessage(null, msg);
}
}
public void doUpdateEmployeeGrade() throws EmployeeGradeNotFound {
try {
log.info("New name:" + selectedEmployeeGrade.getName());
log.info("ID: " + selectedEmployeeGrade.getId());
log.info("Username in session : "+ actorUsers.getUsername());
selectedEmployeeGrade.setLastModifiedBy(actorUsers.getUsername());
getEmployeeGradeService().update(selectedEmployeeGrade);
this.setInsertDelete(true);
new Refresh().refreshPage();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Info",getExcptnMesProperty("info.empgrade.update")));
}catch(BSLException e){
FacesMessage msg = new FacesMessage("Error",getExcptnMesProperty(e.getMessage()));
msg.setSeverity(FacesMessage.SEVERITY_INFO);
FacesContext.getCurrentInstance().addMessage(null, msg);
}
}
public void onRowSelect(SelectEvent event) {
setSelectedEmployeeGrade((EmployeeGrade) event.getObject());
FacesMessage msg = new FacesMessage("Employee Grade Selected",
selectedEmployeeGrade.getName());
FacesContext.getCurrentInstance().addMessage(null, msg);
}
public void doDeleteEmployeeGrade() throws Exception, EmployeeGradeNotFound {
try{
getEmployeeGradeService().delete(selectedEmployeeGrade.getId());
setInsertDelete(true);
new Refresh().refreshPage();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Info",getExcptnMesProperty("info.empgrade.delete")));
}catch(BSLException e){
FacesMessage msg = new FacesMessage("Error",getExcptnMesProperty(e.getMessage()));
msg.setSeverity(FacesMessage.SEVERITY_INFO);
FacesContext.getCurrentInstance().addMessage(null, msg);
}
}
public String getSearchName() {
return searchName;
}
public void setSearchName(String searchName) {
this.searchName = searchName;
}
}
| [
"[email protected]"
] | |
7d638a7c370949b67c889d9187df10efa3d97bef | 4e62733f42024b74809fe79d8e08110a5f001ec8 | /TERZO ANNO/MATERIE A SCELTA/Programmazione avanzata/A.A Precedente/Prove pratiche/prg-compiti-2015/2015-09-14/esercizio1/CollegamentoException.java | 61faf29639d094a7d42f4b56362643db7238879a | [] | no_license | Guray00/IngegneriaInformatica | f8f56a310ac7585f105cbf1635240df2d7a43095 | 752ac634bb7f03556fd8587bf5f5a295843a76b9 | refs/heads/master | 2023-08-31T12:23:44.354698 | 2023-08-28T15:19:22 | 2023-08-28T15:19:22 | 234,406,145 | 233 | 80 | null | 2023-07-04T14:02:14 | 2020-01-16T20:31:24 | C++ | UTF-8 | Java | false | false | 199 | java | package esercizio1;
public class CollegamentoException extends RuntimeException {
public CollegamentoException(){
super();
}
public CollegamentoException(String s) {
super(s);
}
}
| [
"[email protected]"
] | |
f197bd6c392255ade726b54b0c33d12cbf2eeba9 | 9914c4e0efaf4177666c2c217158f9ce26e6968c | /src/jp/leafnet/droid/util/CryptoUtil.java | 138435e5b8e0bd3f1d16acd61dbacd2d2e42134e | [] | no_license | ogino/DroidApp | 339a566d74ce6de42f5173675dbb8cf6eacabc85 | 4cab7a0ab718a863ef11bd83daaecdb656771e37 | refs/heads/master | 2021-01-16T19:21:01.536377 | 2011-04-25T02:55:44 | 2011-04-25T02:55:44 | 1,222,557 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,910 | java | package jp.leafnet.droid.util;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import android.content.Context;
public class CryptoUtil {
private static final byte[] KEY_BYTES = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f};
private static final String ALGORISM = "AES/ECB/PKCS5Padding";
private final static String SECRET_KEY = "secret.key";
private static Logger logger = Logger.getLogger(CryptoUtil.class.getPackage().getName());
public static String encodeString(final String source, final SecretKeySpec keySpec) {
logger.setLevel(Level.WARNING);
String encoded = null;
try {
Cipher cipher = Cipher.getInstance(ALGORISM);
cipher.init(Cipher.ENCRYPT_MODE, keySpec);
encoded = StringUtil.encodeBase64(cipher.doFinal(source.getBytes()));
} catch (Exception e) {
logger.log(Level.SEVERE, "CryptoUtil#encodeString exception: " +e.getLocalizedMessage());
}
return encoded;
}
public static String decodeString(final String source, final SecretKeySpec keySpec) {
logger.setLevel(Level.WARNING);
String decoded = null;
try {
Cipher cipher = Cipher.getInstance(ALGORISM);
cipher.init(Cipher.DECRYPT_MODE, keySpec);
decoded = new String(cipher.doFinal(StringUtil.decodeBase64(source)));
} catch (Exception e) {
logger.log(Level.SEVERE, "CryptoUtil#decodeString exception: " + e.getLocalizedMessage());
}
return decoded;
}
public static SecretKeySpec createKeySpec(final Context context) {
SecretKeySpec keySpec = readKeySpec(context);
if (keySpec == null) keySpec = generateKeySpec(context);
return keySpec;
}
private static SecretKeySpec readKeySpec(final Context context) {
SecretKeySpec keySpec = null;
try {
FileInputStream fileStream = context.openFileInput(SECRET_KEY);
ObjectInputStream objectStream = new ObjectInputStream(fileStream);
keySpec = (SecretKeySpec) objectStream.readObject();
} catch (Exception e) {
logger.log(Level.INFO, "CryptoUtil#readKeySpec exception: " + e.getLocalizedMessage());
}
return keySpec;
}
private static SecretKeySpec generateKeySpec(final Context context) {
SecretKeySpec keySpec = null;
try {
keySpec = new SecretKeySpec(KEY_BYTES, 0, 16, "AES");
FileOutputStream fileStream = context.openFileOutput(SECRET_KEY, Context.MODE_PRIVATE);
new FileOutputStream("secret.key", false);
ObjectOutputStream objectStrem = new ObjectOutputStream(fileStream);
objectStrem.writeObject(keySpec);
objectStrem.close();
fileStream.close();
} catch (Exception e) {
logger.log(Level.SEVERE, "CryptoUtil#createKeyPair exception: " +e.getLocalizedMessage());
}
return keySpec;
}
}
| [
"[email protected]"
] | |
240bf7982caa68538f7c8b3cf6a4c9490b93b136 | 9e233e2d41ba0518aacaa070e17885d269a0187e | /src/edu/berkeley/mvz/amp/MaxentService.java | 1dadb51e2096c5337e9d2575e2af511ce642adc7 | [] | no_license | Lassaro/api-maxent-programming | 4846dff40afef0d81e5ffdcf08bb8e12f2bbb40a | 5f89be04f18383f8b80a005ecbea958add3e5406 | refs/heads/master | 2020-12-31T05:09:39.419422 | 2009-07-14T16:41:54 | 2009-07-14T16:41:54 | 56,396,804 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,358 | java | /*
* Copyright 2009 University of California at Berkeley
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package edu.berkeley.mvz.amp;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import density.Getval;
import density.MaxEnt;
import density.tools.RandomSample;
import edu.berkeley.mvz.amp.Layer.LayerProvider;
import edu.berkeley.mvz.amp.Layer.ProjectionSpec;
import edu.berkeley.mvz.amp.MaxentResults.ResultBuilder;
import edu.berkeley.mvz.amp.MaxentRun.Option;
import edu.berkeley.mvz.amp.MaxentRun.RunConfig;
import edu.berkeley.mvz.amp.MaxentRun.RunType;
/**
* This class can be used to execute {@link MaxentRun}s synchronously or
* asynchronously.
*
* Note: This class is a singleton.
*
*/
public enum MaxentService {
INSTANCE;
/**
* This interface allows clients to execute MaxEnt runs asynchronously.
*
*/
public static interface AsyncRunCallback {
/**
* Invoked if the async run fails.
*
* @param t cause of failure
*/
public void onFailure(Throwable t);
/**
* Invoked when a run completes.
*
* @param run the run that completed
* @param results the results
*/
public void onSuccess(MaxentRun run, MaxentResults results);
};
/**
* A class that can be used to encapsulate MaxEnt exceptions.
*
*/
public static class MaxEntException extends Exception {
private static final long serialVersionUID = 7923750259414643302L;
public MaxEntException(Error e) {
super(e);
}
public MaxEntException(Exception e) {
super(e);
}
public MaxEntException(String msg, Exception e) {
super(msg, e);
}
public MaxEntException(Throwable t) {
super(t);
}
}
private static Logger log = Logger.getLogger(MaxentService.class);
/**
* Creates and returns a new background SWD run.
*
* @param n number of background points
* @param layers background layers
* @return background SWD run
*/
public static MaxentRun createSwdRun(int n, List<Layer> layers) {
if (n < 1) {
throw new IllegalArgumentException("n can't be negative");
}
return new RunConfig(RunType.BACKGROUND_SWD).environmentLayers(layers).add(
Option.BACKGROUNDPOINTS, n + "").build();
}
/**
* Creates and returns a new SWD run.
*
* @param samples the samples
* @param layers the layers
* @return SWD run
*/
public static MaxentRun createSwdRun(List<Sample> samples, List<Layer> layers) {
return new RunConfig(RunType.SWD).samples(samples)
.environmentLayers(layers).build();
}
/**
* Executes a MaxEnt run. This method blocks until the run completes or an
* exception is thrown. To run asynchronously, use <code>executeAsync</code>.
*
* @param run the run to execute
* @return results
* @throws MaxEntException
*/
public static MaxentResults execute(MaxentRun run) throws MaxEntException {
if (run == null) {
throw new NullPointerException("The run options were null");
}
long start = System.currentTimeMillis();
MaxentResults results = dispatch(run);
log.info(String.format("%s runtime: %f sec ", run.getType(), (System
.currentTimeMillis() - start) / 1000.0));
return results;
}
/**
* Executes a MaxEnt run asynchronously.
*
* @param run the run to execute
* @param cb the async callback
*/
public static void executeAsync(final MaxentRun run, final AsyncRunCallback cb) {
if (run == null) {
throw new NullPointerException("The run options were null");
}
if (cb == null) {
throw new NullPointerException("The callback was null");
}
final long start = System.currentTimeMillis();
new Thread(new Runnable() {
public void run() {
try {
MaxentResults results = dispatch(run);
cb.onSuccess(run, results);
} catch (MaxEntException e) {
cb.onFailure(e);
}
log.info(String.format("%s runtime: %f sec ", run.getType(), (System
.currentTimeMillis() - start) / 1000.0));
}
}).start();
}
private static String[] backgroundSwdArgv(RunConfig cb, int n,
List<Layer> layers) {
String[] argv = new String[layers.size() + 1];
argv[0] = Integer.toString(n);
int count = 1;
for (Layer l : layers) {
argv[count++] = l.getPath();
}
return argv;
}
private static MaxentResults dispatch(MaxentRun run) throws MaxEntException {
ResultBuilder builder = null;
try {
RunConfig config = new RunConfig(run).add(Option.AUTORUN).add(
Option.INVISIBLE);
// Sets up output directories:
String dir = run.getOption(Option.OUTPUTDIRECTORY);
if (dir != null) {
dir = dir.endsWith(File.separator) ? dir : dir + File.separator;
File root = new File(dir);
if (!root.exists()) {
root.mkdirs();
}
String edir = String.format("%s%s", dir, "EnvLayers");
String pdir = String.format("%s%s", dir, "ProjLayers");
File eDir = new File(edir);
if (eDir.exists()) {
for (File f : eDir.listFiles()) {
f.delete();
}
eDir.delete();
}
eDir.mkdir();
File pDir = new File(pdir);
if (pDir.exists()) {
for (File f : pDir.listFiles()) {
f.delete();
}
pDir.delete();
}
pDir.mkdir();
// Creates symlinks for projection layers:
if (!run.getProjectionSpecs().isEmpty()) {
for (ProjectionSpec spec : run.getProjectionSpecs()) {
// Creates environmental layer symlink:
File d = new File(edir);
if (spec.getEnvrionmentalLayer() != null) {
String path = spec.getEnvrionmentalLayer().getPath();
String link = String.format("ln -s %s %s/%s", path, d.getPath(),
spec.getLayerName());
Runtime.getRuntime().exec(link);
}
// Creates projection layer symlink:
d = new File(pdir);
if (spec.getProjectionLayer() != null) {
String path = spec.getProjectionLayer().getPath();
String link = String.format("ln -s %s %s/%s", path, d.getPath(),
spec.getLayerName());
Runtime.getRuntime().exec(link);
}
}
String d = String.format("%s%s", dir, "ProjLayers");
config.add(Option.PROJECTIONLAYERS, symlinkLayers(d, run
.getProjectionLayers()));
} else {
if (!run.getEnvironmentLayers().isEmpty()) {
String d = String.format("%s%s", dir, "EnvLayers");
config.add(Option.ENVIRONMENTALLAYERS, symlinkLayers(d, run
.getEnvironmentLayers()));
}
if (!run.getProjectionLayers().isEmpty()) {
String d = String.format("%s%s", dir, "ProjLayers");
config.add(Option.PROJECTIONLAYERS, symlinkLayers(d, run
.getProjectionLayers()));
}
}
}
MaxentRun actualRun = config.build();
switch (actualRun.getType()) {
case MODEL:
builder = new ResultBuilder(run.getOption(Option.OUTPUTDIRECTORY));
String replicates = run.getOption(Option.REPLICATES);
if (replicates != null) {
int runCount = Integer.parseInt(replicates);
builder.runCount(runCount);
}
String[] argv = actualRun.asArgv();
String sa = "";
for (String s : argv) {
sa += " " + s;
}
log.info(sa);
MaxEnt.main(argv);
break;
case BACKGROUND_SWD:
builder = new ResultBuilder();
builder.samplesWithData(dispatchBackgroundSwd(actualRun));
break;
case SWD:
builder = new ResultBuilder();
builder.samplesWithData(dispatchSwd(actualRun));
break;
case PROJECTION:
break;
}
return builder.build();
} catch (Exception e) {
throw new MaxEntException(e);
}
}
private static SamplesWithData dispatchBackgroundSwd(MaxentRun run)
throws MaxEntException, IOException {
String value = run.getOption(Option.BACKGROUNDPOINTS);
int n;
try {
n = Integer.parseInt(value);
} catch (Exception e) {
throw new MaxEntException(String.format("%s invalid: %s - %s",
Option.BACKGROUNDPOINTS, value, e), e);
}
// Configures background SWD run:
RunConfig options = new RunConfig(RunType.BACKGROUND_SWD);
String[] argv = backgroundSwdArgv(options, n, run.getEnvironmentLayers());
// Redirects standard output to SWD file:
File swdout = File.createTempFile("background-swd", ".csv");
FileOutputStream fos = new FileOutputStream(swdout);
PrintStream ps = new PrintStream(fos);
System.setOut(ps);
// Dispatches to MaxEnt to get SWD:
RandomSample.main(argv);
System.setOut(System.out);
// Loads data from background SWD file that MaxEnt just created:
final Map<String, Layer> layerNames = new HashMap<String, Layer>();
for (Layer l : run.getEnvironmentLayers()) {
layerNames.put(l.getFilename(), l);
}
return SamplesWithData.fromCsv(swdout.getPath(), new LayerProvider() {
public Layer getLayerByFilename(String filename) {
return layerNames.get(filename);
}
});
}
private static SamplesWithData dispatchSwd(MaxentRun run) throws Exception {
SamplesWithData swd = null;
RunConfig options = new RunConfig(RunType.SWD);
options.add(Option.SAMPLESFILE, Sample.toCsv(run.getSamples(), true));
String[] argv = swdArgv(options, run.getEnvironmentLayers());
File swdout = File.createTempFile("swd", ".csv");
FileOutputStream fos = new FileOutputStream(swdout);
PrintStream ps = new PrintStream(fos);
// Redirects standard output to SWD file:
System.setOut(ps);
// Dispatches to MaxEnt to get SWD:
Getval.main(argv);
// Restores standard output:
System.setOut(System.out);
final Map<String, Layer> layerNames = new HashMap<String, Layer>();
for (Layer l : run.getEnvironmentLayers()) {
layerNames.put(l.getFilename(), l);
}
// Loads SWD file that MaxEnt just created:
swd = SamplesWithData.fromCsv(swdout.getPath(), new LayerProvider() {
public Layer getLayerByFilename(String filename) {
return layerNames.get(filename);
}
});
return swd;
}
private static String[] swdArgv(RunConfig cb, List<Layer> layers) {
String samplesPath = cb.build().getOption(Option.SAMPLESFILE);
String[] argv = new String[layers.size() + 1];
argv[0] = samplesPath;
int count = 1;
for (Layer l : layers) {
argv[count++] = l.getPath();
}
return argv;
}
private static String[] swdArgv(String samplesFile, List<Layer> layers) {
String[] argv = new String[layers.size() + 1];
argv[0] = samplesFile;
int count = 1;
for (Layer l : layers) {
argv[count++] = l.getPath();
}
return argv;
}
private static String symlinkLayers(String dir, Layer layer)
throws IOException {
List<Layer> layers = new ArrayList<Layer>();
layers.add(layer);
return symlinkLayers(dir, layers);
}
private static String symlinkLayers(String dir, List<Layer> layers)
throws IOException {
new File(dir).mkdir();
File d = new File(dir);
for (Layer l : layers) {
String link = String.format("ln -s %s %s/%s", l.getPath(), d.getPath(), l
.getName());
Runtime.getRuntime().exec(link);
}
return d.getPath();
}
} | [
"eightysteele@6ade5a7a-0903-11de-a1f0-819f45317607"
] | eightysteele@6ade5a7a-0903-11de-a1f0-819f45317607 |
16971df479c469819f5985f820bdfda87cb0b403 | f1126ee8b6ac8f02b12ab36e169784b64599de73 | /hw08-0036505665/src/main/java/hr/fer/zemris/java/hw06/shell/commands/CdCommand.java | 2e69963a415b152956b7651f1d7de5e229b58fa1 | [] | no_license | yetra/opjj-18-19 | d8dadf9e787f0d1a786e0d82164216beb48ae6e2 | 32865abc99b51409c0267827cc8d319042155487 | refs/heads/master | 2022-02-15T02:07:05.413471 | 2019-09-13T17:23:42 | 2019-09-13T17:23:42 | 175,476,515 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,817 | java | package hr.fer.zemris.java.hw06.shell.commands;
import hr.fer.zemris.java.hw06.shell.Environment;
import hr.fer.zemris.java.hw06.shell.ShellCommand;
import hr.fer.zemris.java.hw06.shell.ShellStatus;
import hr.fer.zemris.java.hw06.shell.utility.Utility;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.List;
/**
* This class represents the cd command which changes an {@link Environment} object's
* current directory to a given directory.
*
* @author Bruna Dujmović
*
*/
public class CdCommand implements ShellCommand {
/**
* The name of this command.
*/
private static final String NAME = "cd";
/**
* The description of this command.
*/
private static final List<String> DESCRIPTION = List.of(
"cd dir_path\n",
"\tdir_path -- path to the new current directory\n",
"Changes the environment's current directory to the directory specified by dir_path."
);
@Override
public ShellStatus executeCommand(Environment env, String arguments) {
String[] parsed = Utility.parseArguments(arguments);
if (parsed.length != 1) {
env.writeln("Cd accepts one argument, " + parsed.length + " were given.");
return ShellStatus.CONTINUE;
}
try {
Path dirPath = env.getCurrentDirectory().resolve(Paths.get(parsed[0]));
env.setCurrentDirectory(dirPath);
} catch (IllegalArgumentException e) {
env.writeln(e.getMessage());
}
return ShellStatus.CONTINUE;
}
@Override
public String getCommandName() {
return NAME;
}
@Override
public List<String> getCommandDescription() {
return Collections.unmodifiableList(DESCRIPTION);
}
}
| [
"[email protected]"
] | |
ae6621489bc86fcb3529dc6eaf84b0eaa3e1d1c2 | 059eecdbc1e457e32d1580de0f9c9ad188669e0f | /D4S8/개인별/김응철/RollingQueue_1021.java | 8139b25d6b3d33654a04bb80bb49a7a79519f6b1 | [] | no_license | S6-Daejeon4-Study/D4-Algo-Study | eb299233581a938a1f75018a336673aa8697c12f | fb50bae19814bd2ec4a6f193619b5519c19e7661 | refs/heads/main | 2023-08-29T06:17:14.903546 | 2021-10-24T11:31:46 | 2021-10-24T11:31:46 | 413,614,511 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,372 | java | import java.util.LinkedList;
import java.util.Scanner;
public class RollingQueue_1021 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int cnt = 0;
int N = sc.nextInt();// 큐의 크기
int M = sc.nextInt();// 뽑아낼 숫자 갯수
int[] index = new int[M];// 뽑아내고 싶은 숫자의 인덱스 저장
// 1 = removeFirst() 한개
// 2 = pollFirst()하고 addLast()
// 3 = pollLast()하고 addFirst()
LinkedList<Integer> deque = new LinkedList<>();// deque 구현 = indexof를 사용하기 위해 LinkedList로 선언
for (int n = 1; n <= N; n++) {
deque.addLast(n);// deque에 숫자를 순서대로 채움. 인덱스와 일치시키기 위함.
}
for (int m = 0; m < M; m++) {
index[m] = sc.nextInt();// 뽑아낼 숫자의 인덱스를 index 배열에 저장.
}//입력
int m = 0;
while (m < M) {// m개의 숫자를 뽑을 때까지 while문으로 반복
if (deque.peekFirst() == index[m]) {//만약 제일 앞의 숫자가 뽑을 숫자와 일치하면 숫자를 뽑는다.
deque.removeFirst();
m++;// 숫자를 뽑앗을 시 m++. 숫자는 제일 앞에서 밖에 뽑지 않기 때문.
} else {//제일 앞의 숫자가 뽑을 숫자와 일치하지 않으면 2번이나 3번 실시.
if (deque.size() / 2 < deque.indexOf(index[m])) {//뽑을 숫자의 현재 위치가 뒤쪽인지 앞쪽인지 판단하는 if문.
//뽑을 숫자의 현재 인덱스가 deque의 현재 사이즈의 반쪽보다 크면 뒤쪽, 작으면 앞쪽임.
while (!(deque.peekFirst() == index[m])) {//deque의 제일 앞쪽 숫자를 체크하여 뽑을 숫자와 같을때 까지 while문 돌기
deque.addFirst(deque.pollLast());// 만약 뽑을 숫자의 인덱스가 더 크면 3번실행
cnt++;//2번 실행했으니 count 세주기
}
} else {//뽑을 숫자의 현재 위치가가 현재 deque의 정중앙보다 앞쪽일때.
while (!(deque.peekFirst() == index[m])) {//deque의 제일 앞쪽 숫자를 체크하여 뽑을 숫자와 같을때 까지 while문 돌기
deque.addLast(deque.pollFirst());// 만약 뽑을 숫자의 인덱스가 더 작으면 2번실행
cnt++;//3번 실행했으니 count 세주기.
}
}
}
}//while문 반복하면서 cnt를 계속 더해주기
System.out.println(cnt);//cnt 정답 출력.
}
}
| [
"[email protected]"
] | |
01974c85a44f269e3e50d15073698608e9b97a49 | e860e479578281c8497e5287290bd795c6d5c41e | /src/main/java/com/foolself/demo/entity/UserOnline.java | 15bd22f6da28aedc4379f69bc94494fd523434c2 | [] | no_license | foolself/springboot_blog | e27093541e577b107738352648ae4039fc4edd23 | f707996a0951ec2a7812a3d0368d1c0c8919440f | refs/heads/master | 2020-04-04T03:44:46.521838 | 2018-11-03T00:53:33 | 2018-11-03T00:53:33 | 155,724,112 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,081 | java | package com.foolself.demo.entity;
import java.io.Serializable;
import java.util.Date;
public class UserOnline implements Serializable {
private String id;
private String username;
private String host;
private String systemhost;
private String status;
private Date startTimeStamp;
private Date lastAccessTime;
private Long timeout;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public String getSystemhost() {
return systemhost;
}
public void setSystemhost(String systemhost) {
this.systemhost = systemhost;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Date getStartTimeStamp() {
return startTimeStamp;
}
public void setStartTimeStamp(Date startTimeStamp) {
this.startTimeStamp = startTimeStamp;
}
public Date getLastAccessTime() {
return lastAccessTime;
}
public void setLastAccessTime(Date lastAccessTime) {
this.lastAccessTime = lastAccessTime;
}
public Long getTimeout() {
return timeout;
}
public void setTimeout(Long timeout) {
this.timeout = timeout;
}
@Override
public String toString() {
return "UserOnline{" +
"id='" + id + '\'' +
", username='" + username + '\'' +
", host='" + host + '\'' +
", systemhost='" + systemhost + '\'' +
", status='" + status + '\'' +
", startTimeStamp=" + startTimeStamp +
", lastAccessTime=" + lastAccessTime +
", timeout=" + timeout +
'}';
}
}
| [
"[email protected]"
] | |
46eca3344ab9dfd12e4076f0494d7647899e02be | 59d09e2f252152edd2237478fb3c8daf05cf58f1 | /biat/ejbModule/biat/services/TraderServiceRemote.java | 7c5d31116c076a84d0c9715258f12e39c443ad84 | [] | no_license | dalibenayed/biat | b44c427a705e02077b4f93c0ed34eb33649dca16 | 9e50c737e5991c4d3a6b0878f1007f2e321f7a31 | refs/heads/master | 2021-01-22T07:31:39.816656 | 2014-03-26T15:04:29 | 2014-03-26T15:04:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 383 | java | package biat.services;
import java.util.List;
import javax.ejb.Remote;
import biat.domain.Banque;
import biat.domain.Trader;
@Remote
public interface TraderServiceRemote {
public void addTrader(Trader trader);
public void updateBanque(Trader trader);
public void removeBanque(Trader trader);
public Trader findTraderbyId(int id);
public List<Trader> displayalltrader();
}
| [
"[email protected]"
] | |
4a17fedac92868887fffd5f726d748181af40bdf | 42b60c9a24a14bbdad6cef626e2d32e3d0c3181d | /VC/src/VC/Scanner/Scanner.java | d025a425d9293a520d95254388b17877a54aeb96 | [] | no_license | zhangruoxu/COMP9102 | bfe9f7b9ad29470df6d392bf2a7b8b5fef1a1876 | ad90757177576977437384723a8aa546b46befc3 | refs/heads/master | 2021-01-10T18:45:30.165692 | 2015-06-07T05:57:51 | 2015-06-07T05:57:51 | 33,152,657 | 0 | 3 | null | null | null | null | UTF-8 | Java | false | false | 11,217 | java | /**
** Scanner.java
**/
package VC.Scanner;
import VC.ErrorReporter;
public final class Scanner {
private SourceFile sourceFile;
private boolean debug;
private ErrorReporter errorReporter;
private StringBuffer currentSpelling;
private char currentChar;
private SourcePosition sourcePos;
// =========================================================
public Scanner(SourceFile source, ErrorReporter reporter) {
sourceFile = source;
errorReporter = reporter;
currentChar = sourceFile.getNextChar();
debug = false;
sourcePos = new SourcePosition(1, 1, 0);
// you may initialise your counters for line and column numbers here
}
public void enableDebugging() {
debug = true;
}
// accept gets the next character from the source program.
private void accept() {
currentSpelling.append(currentChar);
++sourcePos.charFinish;
currentChar = sourceFile.getNextChar();
// you may save the lexeme of the current token incrementally here
// you may also increment your line and column counters here
}
// inspectChar returns the n-th character after currentChar
// in the input stream.
//
// If there are fewer than nthChar characters between currentChar
// and the end of file marker, SourceFile.eof is returned.
//
// Both currentChar and the current position in the input stream
// are *not* changed. Therefore, a subsequent call to accept()
// will always return the next char after currentChar.
private char inspectChar(int nthChar) {
return sourceFile.inspectChar(nthChar);
}
private int nextToken() {
// Tokens: separators, operators, literals, identifiers and keywords
switch (currentChar) {
// recognize separators and operators
case '(':
accept();
return Token.LPAREN;
case ')':
accept();
return Token.RPAREN;
case '{':
accept();
return Token.LCURLY;
case '}':
accept();
return Token.RCURLY;
case '[':
accept();
return Token.LBRACKET;
case ']':
accept();
return Token.RBRACKET;
case ';':
accept();
return Token.SEMICOLON;
case ',':
accept();
return Token.COMMA;
case '+':
accept();
return Token.PLUS;
case '-':
accept();
return Token.MINUS;
case '*':
accept();
return Token.MULT;
case '/':
accept();
return Token.DIV;
case '<':
accept();
if(currentChar == '=') {
accept();
return Token.LTEQ;
} else {
return Token.LT;
}
case '>':
accept();
if(currentChar == '=') {
accept();
return Token.GTEQ;
} else {
return Token.GT;
}
case '=':
accept();
if(currentChar == '=') {
accept();
return Token.EQEQ;
} else {
return Token.EQ;
}
case '!':
accept();
if(currentChar == '=') {
accept();
return Token.NOTEQ;
} else {
return Token.NOT;
}
case '|':
accept();
if (currentChar == '|') {
accept();
return Token.OROR;
} else {
return Token.ERROR;
}
case '&':
accept();
if(currentChar == '&') {
accept();
return Token.ANDAND;
} else {
return Token.ERROR;
}
// recognize numbers
case '0':case '1':case '2':case '3':case '4':
case '5':case '6':case '7':case '8':case '9':
accept();
while(Character.isDigit(currentChar)) {
accept();
}
// up to here, integer number is recognized
switch(currentChar) {
case '.':
accept();
// up to here, float number like 123. is recognized
switch(currentChar) {
case '0':case '1':case '2':case '3':case '4':
case '5':case '6':case '7':case '8':case '9':
accept();
while(Character.isDigit(currentChar)) {
accept();
// up to here, float number like 12.34 is recognized
}
switch(currentChar) {
case 'E':
case 'e':
return recognizeExp(Token.FLOATLITERAL);
default:
// float number like 12.34 is accepted
return Token.FLOATLITERAL;
}
case 'E':
case 'e':
return recognizeExp(Token.FLOATLITERAL);
default:
// float number like 12. is accepted
return Token.FLOATLITERAL;
}
case 'E':
case 'e':
return recognizeExp(Token.INTLITERAL);
default:
// accept integer number
return Token.INTLITERAL;
}
// in this case, scanner see . for the first time
case '.':
accept();
switch(currentChar) {
case '0':case '1':case '2':case '3':case '4':
case '5':case '6':case '7':case '8':case '9':
accept();
while(Character.isDigit(currentChar)) {
accept();
}
switch(currentChar) {
case 'E':
case 'e':
return recognizeExp(Token.FLOATLITERAL);
default:
return Token.FLOATLITERAL;
}
default:
return Token.ERROR;
}
case '"':
// here recognize string
currentChar = sourceFile.getNextChar();
sourcePos.charFinish++;
while(true) {
switch(currentChar) {
case '\\':
// here recognize escape character
switch(inspectChar(1)) {
case 'b':
// accept back slash
// accept escape character
currentChar = sourceFile.getNextChar();
currentChar = sourceFile.getNextChar();
currentSpelling.append('\b');
sourcePos.charFinish += 2;
break;
case 'f':
currentChar = sourceFile.getNextChar();
currentChar = sourceFile.getNextChar();
currentSpelling.append('\f');
sourcePos.charFinish += 2;
break;
case 'n':
currentChar = sourceFile.getNextChar();
currentChar = sourceFile.getNextChar();
currentSpelling.append('\n');
sourcePos.charFinish += 2;
break;
case 'r':
currentChar = sourceFile.getNextChar();
currentChar = sourceFile.getNextChar();
currentSpelling.append('\r');
sourcePos.charFinish += 2;
break;
case 't':
currentChar = sourceFile.getNextChar();
currentChar = sourceFile.getNextChar();
currentSpelling.append('\t');
sourcePos.charFinish +=2;
break;
case '\'':
currentChar = sourceFile.getNextChar();
currentChar = sourceFile.getNextChar();
currentSpelling.append('\'');
sourcePos.charFinish += 2;
break;
case '\"':
currentChar = sourceFile.getNextChar();
currentChar = sourceFile.getNextChar();
currentSpelling.append('\"');
sourcePos.charFinish += 2;
break;
case '\\':
currentChar = sourceFile.getNextChar();
currentChar = sourceFile.getNextChar();
currentSpelling.append('\\');
sourcePos.charFinish += 2;
break;
default:
// remember beginning position of illegal escape character
// drop slash and illegal escape character
// report error message
currentChar = sourceFile.getNextChar();
sourcePos.charFinish++;
int illegalEscpCharPos = sourcePos.charFinish;
String errorMsg = "\\" + currentChar + ": illegal escape character.";
currentChar = sourceFile.getNextChar();
sourcePos.charFinish++;
errorReporter.reportError(errorMsg, null, new SourcePosition(sourcePos.lineStart, illegalEscpCharPos, sourcePos.charFinish));
}
break;
case '\n':
case SourceFile.eof:
errorReporter.reportError(currentSpelling + ": unterminated string.", null, sourcePos);
return Token.ERROR;
case '"':
// the end of string
currentChar = sourceFile.getNextChar();
sourcePos.charFinish++;
return Token.STRINGLITERAL;
default:
accept();
}
}
case SourceFile.eof:
currentSpelling.append(Token.spell(Token.EOF));
sourcePos.charFinish++;
return Token.EOF;
default:
if(Character.isLetter(currentChar) || currentChar == '_') {
accept();
while(Character.isLetterOrDigit(currentChar) || currentChar == '_') {
accept();
}
return distinguishID();
}
break;
}
accept();
return Token.ERROR;
}
private int distinguishID() {
for(int i = 0; i <= 10; i++) {
if(Token.spell(i).equals(currentSpelling)) {
// accept keyword
return i;
}
}
if("true".contentEquals(currentSpelling) || "false".contentEquals(currentSpelling)) {
return Token.BOOLEANLITERAL;
} else {
// accept common identifier
return Token.ID;
}
}
private int recognizeExp(int currentState) {
// up to here, current char is E or e and it is not accepted
switch(inspectChar(1)) {
case '0':case '1':case '2':case '3':case '4':
case '5':case '6':case '7':case '8':case '9':
// recognize E or e
accept();
while(Character.isDigit(currentChar)) {
accept();
}
return Token.FLOATLITERAL;
case '+':
case '-':
if(Character.isDigit(inspectChar(2))) {
// recognize E or e
accept();
// recognize + or 1
accept();
while(Character.isDigit(currentChar)) {
accept();
}
// here float number like **e+2 is recognized
return Token.FLOATLITERAL;
}
default:
return currentState;
}
}
private void recognizeInComment() {
switch(currentChar) {
case '\t':
currentChar = sourceFile.getNextChar();
// why is that?
sourcePos.charStart += (8 - (sourcePos.charStart - 1) % 8);
break;
case '\n':
currentChar = sourceFile.getNextChar();
sourcePos.charStart = 1;
sourcePos.lineStart++;
break;
default:
currentChar = sourceFile.getNextChar();
sourcePos.charStart++;
break;
}
}
private void skipSpaceAndComments() {
while(true) {
switch(currentChar) {
case '/':
switch(inspectChar(1)) {
case '/':
// ignore first slash
recognizeInComment();
// ignore second slash
recognizeInComment();
while(currentChar != '\n' && currentChar != SourceFile.eof) {
//recognize one-line comment
recognizeInComment();
}
break;
case '*':
// for error message
int comtStartLineNo = sourcePos.lineStart;
int comtStartCharNo = sourcePos.charStart;
// ignore slash
recognizeInComment();
// ignore star
recognizeInComment();
while(true) {
if(currentChar == '*') {
if(inspectChar(1) == '/') {
// ignore star
recognizeInComment();
// ignore slash
recognizeInComment();
// break from loop
break;
} else {
recognizeInComment();
}
} else if(currentChar == SourceFile.eof) {
errorReporter.reportError("Unterminated comment.", null, new SourcePosition(comtStartLineNo, comtStartCharNo, comtStartCharNo));
return;
} else {
recognizeInComment();
}
}
break;
default:
return;
}
break;
case ' ':
case '\t':
case '\n':
recognizeInComment();
break;
default:
// not a comment
return;
}
}
}
public Token getToken() {
Token tok;
int kind;
sourcePos.charStart = sourcePos.charFinish + 1;
// skip white space and comments
skipSpaceAndComments();
sourcePos.lineFinish = sourcePos.lineStart;
sourcePos.charFinish = sourcePos.charStart - 1;
currentSpelling = new StringBuffer("");
// You must record the position of the current token somehow
kind = nextToken();
tok = new Token(kind, currentSpelling.toString(), sourcePos);
// * do not remove these three lines
if (debug) {
System.out.println(tok);
}
return tok;
}
}
| [
"[email protected]"
] | |
f8c56b5b4bc99f64c4e42588150e019afd87cfdb | 4af583c31f7fa7d0d5403791ee4b63515ff02b78 | /complaint-management/src/main/java/com/assignment/pwc/complaintmanagement/entity/user/User.java | 85ec04b7774e7711f8933e5e8576bf35bfae523b | [] | no_license | basilsaleem/pwc-project | bb309804c1542e0c47523929466250fecfbbdd8b | bbf9ba59c326beaa455ece2b4bbddb3f031b3ce0 | refs/heads/main | 2023-06-26T19:36:32.128016 | 2021-07-27T19:20:35 | 2021-07-27T19:20:35 | 389,761,677 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,079 | java | package com.assignment.pwc.complaintmanagement.entity.user;
import com.fasterxml.jackson.annotation.JsonIgnore;
import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
@Entity
public class User implements com.assignment.pwc.complaintmanagement.entity.Entity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
private String password;
@NotBlank
@Column(name = "email")
private String email;
private boolean enabled = true;
@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinTable(
name = "user_roles",
joinColumns = @JoinColumn(name = "user_id"),
inverseJoinColumns = @JoinColumn(name = "role_id")
)
private Set<Role> roles = new HashSet<>();
@Override
public long getId() {
return id;
}
@JsonIgnore
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@JsonIgnore
public Set<Role> getRoles() {
return roles;
}
public void setRoles(Set<Role> roles) {
this.roles = roles;
}
public void addRole(Role role){
this.roles.add(role);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof User)) return false;
User user = (User) o;
return id == user.id &&
enabled == user.enabled &&
Objects.equals(password, user.password) &&
Objects.equals(email, user.email) &&
Objects.equals(roles, user.roles);
}
@Override
public int hashCode() {
return Objects.hash(id, password, email, enabled, roles);
}
@JsonIgnore
public boolean isEnabled() {
return enabled;
}
}
| [
"123"
] | 123 |
046a9b6248172c1f2459b967543bf1fa1f92d4fe | 813aa1b41eb3d028a7713cb4db037301da2cb490 | /InformationRetrieval/src/main/Application.java | 0a7ee96a872149fe1dbd780d4e86d3b6c319d542 | [] | no_license | jakehershman/Efalg | b4281fc08bbd606b2346bbb2971ef69802e972ca | 9a1ad22f1de852db2032bb9efdb92232665fce08 | refs/heads/master | 2020-05-17T05:13:47.739291 | 2013-11-24T09:29:58 | 2013-11-24T09:29:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,244 | java | package main;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.util.HashMap;
import java.util.Map.Entry;
import java.util.SortedSet;
import java.util.TreeSet;
/**
* @author DanielGuerber
* implements a vector space model based search
* through files in the folder texts
*/
public final class Application {
/**
* often used logarithm of 2
*/
private final static double LOG2 = Math.log(2);
/**
* Storage for all data of the files to search
*/
private final HashMap<String, FileData> fileMap = new HashMap<String, FileData>();
/**
* Stores the number of documents a specific token is stored in
*/
private final HashMap<String, Integer> numberOfDocs = new HashMap<String, Integer>();
/**
* Starts the Application, allows the user to put in a query and shows the result.
* @param args not used
* @throws IOException in case of file reading errors
*/
public static void main(String[] args) throws IOException {
Application app = new Application();
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter Query:");
String query = in.readLine();
in.close();
HashMap<String, Double> cosValues = app.search(query);
//Set for calculating rank, same numbers have the same rank, no ranks are skipped
SortedSet<Double> valueSet = new TreeSet<Double>(new ReverseComparator());
valueSet.addAll(cosValues.values());
System.out.println("Dokument \tCos-Wert\tRang");
System.out.println("___________________________________________");
for (Entry<String, Double> file : cosValues.entrySet()) {
System.out.println(String.format("%s\t\t%.2f\t\t%d",
file.getKey(),
file.getValue(),
(valueSet.headSet(file.getValue()).size()+1)));
}
}
/**
* Calculates the values for all documents to be prepared fo a search.
* @throws IOException in case of file reading errors
*/
public Application() throws IOException {
readFilesAndIndexWords();
calculateDocumentVectors();
}
/**
* reads in all files in the texts folder and calculates the word indexes.
* @throws IOException in case of file reading errors
*/
private void readFilesAndIndexWords() throws IOException {
File folder = new File("texts");
for (File f : folder.listFiles()) {
//Directories are ignored
if (!f.isDirectory()) {
String filename = f.getName();
FileData fd = new FileData();
String fileText = new String(Files.readAllBytes(f.toPath()), "utf-8");
String[] tokens = Tokenizer.tokenize(fileText);
for (String word : tokens) {
if (!word.isEmpty()) {
if (fd.wordCount.containsKey(word)) {
fd.wordCount.put(word, fd.wordCount.get(word)+1);
} else {
fd.wordCount.put(word, 1);
if (numberOfDocs.containsKey(word)) {
numberOfDocs.put(word, numberOfDocs.get(word)+1);
} else {
numberOfDocs.put(word, 1);
}
}
}
fileMap.put(filename, fd);
}
}
}
}
/**
* Calculates the vector values for each document.
*/
private void calculateDocumentVectors() {
for (Entry<String, FileData> file : fileMap.entrySet()) {
double absoluteVector = 0;
for (Entry<String, Integer> docNumber : numberOfDocs.entrySet()) {
double TF;
Integer wordCount = file.getValue().wordCount.get(docNumber.getKey());
if (wordCount!=null)
TF = (Math.log(wordCount) / LOG2) + 1;
else
TF = 0;
double IDF = Math.log(fileMap.size()/(double) docNumber.getValue()) / LOG2;
double vector = IDF * TF;
file.getValue().vector.put(docNumber.getKey(), vector);
absoluteVector += vector * vector;
}
file.getValue().magnitude = Math.sqrt(absoluteVector);
}
}
/**
* Searches the documents for the query.
* @param query Search query
* @return Map of filenames and cos-values
*/
public HashMap<String, Double> search(String query) {
return getCosValues(getSearchVector(query));
}
/**
* Parses the query into a SearchVector
* @param query Query to parse
* @return SearchVector for query
*/
private SearchVector getSearchVector(String query) {
SearchVector searchVector = new SearchVector();
HashMap<String, Integer> wordCount = new HashMap<String, Integer>();
String[] searchTokens = Tokenizer.tokenize(query);
for (String token : searchTokens) {
if (!token.isEmpty()) {
//If token is in all or no Documents it is ignored to prevent NaN values
if (numberOfDocs.containsKey(token) && numberOfDocs.get(token) < fileMap.size()) {
if (wordCount.containsKey(token)) {
wordCount.put(token, wordCount.get(token)+1);
} else {
wordCount.put(token, 1);
}
} else {
if (!numberOfDocs.containsKey(token))
System.err.println("Token " + token + " does not apear in any file and is ignored!");
else
System.err.println("Token " + token + " apears in all files and is ignored!");
}
}
}
double absoluteVector = 0;
for (Entry<String, Integer> wc : wordCount.entrySet()) {
double TF;
TF = (Math.log(wc.getValue()) / LOG2)+1;
double IDF = Math.log(fileMap.size()/(double) numberOfDocs.get(wc.getKey())) / LOG2;
double vector = IDF * TF;
searchVector.vectorData.put(wc.getKey(), vector);
absoluteVector += vector * vector;
}
searchVector.magnitude = Math.sqrt(absoluteVector);
return searchVector;
}
/**
* Calculates the cos-values for all files with the given Searchvector
* @param searchVector preprocessed SearchVector
* @return Map of filenames and cos-values
*/
private HashMap<String, Double> getCosValues(SearchVector searchVector) {
HashMap<String, Double> cosValues = new HashMap<String, Double>();
for (Entry<String, FileData> file : fileMap.entrySet()) {
double wordValue = 0;
double combinedMagnitude = searchVector.magnitude*file.getValue().magnitude;
for (Entry<String, Double> word : searchVector.vectorData.entrySet()) {
wordValue += (word.getValue() * file.getValue().vector.get(word.getKey())) / combinedMagnitude;
}
cosValues.put(file.getKey(), wordValue );
}
return cosValues;
}
}
| [
"[email protected]"
] | |
c0288fb3715578310bf43eb6414e64eb66b5d8d5 | 70a4cbf4094ec5ef9028b7bd702d909ad8593bc9 | /src/com/marketing/mail/usecase/marketing_theo_bai_viet/ExtractMailByFeed.java | 63a5612cb9f1d7ecd4fe17166b96eea2c06e39ec | [] | no_license | lvt100191/EmailMarketing | 38e3f0ffab18a342fbb62a1785caccd2ae18952f | 67bcdce600efaf35a6a59d69f14f172bf9e36ce0 | refs/heads/master | 2021-09-01T06:17:05.425499 | 2017-12-25T08:47:35 | 2017-12-25T08:47:35 | 105,964,426 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,700 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.marketing.mail.usecase.marketing_theo_bai_viet;
import com.marketing.db.FeedEntityDao;
import com.marketing.db.FeedMailDao;
import com.marketing.db.MailBlockDao;
import com.marketing.db.MailDao;
import com.marketing.entity.FeedEntity;
import com.marketing.entity.FeedMail;
import com.marketing.entity.Mail;
import com.marketing.entity.MailBlock;
import com.marketing.facebook.dto.Comment;
import com.marketing.facebook.action.FanPageAction;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
*
* @author TUNGLV
*/
//tu cac bai viet thu thap duoc thuc hien thu thap email tu cac binh luan
public class ExtractMailByFeed {
//tham so truyen vao
private static String token = "EAACEdEose0cBADeL9xvjhJPZBK4ACSRHBBBzCu9q8LarT0KXxvEqHaBd8aYORzbB2AwD1gZA1XGCAROkc0vGsxDLOfz6sOMPKty50VAkh9ILW5fpmZCMBvLKjK20kgOcmwE0cEZAx6D2AgzZADZClxVW2ZCTKZAc8t9LwfHgyFE72Twlbl7TI44FgIZCAJ3ZBUOg4ZD";
//so luong ban ghi lay ra tu bang tbl_feed
private static String numFeed = "1000";
public static void main(String[] args) throws Exception {
FanPageAction fanPageAction = new FanPageAction();
//lay danh sach bai viet tu bang tbl_feed theo so luong truyen vao
ArrayList<FeedEntity> lstFeed = FeedEntityDao.getListFeedEntity(numFeed);
//lay danh sach binh luan theo bai dang
String mail = null;
for (FeedEntity f : lstFeed) {
ArrayList<Comment> comments = fanPageAction.getComments(token, f.getIdFeed());
for (Comment c : comments) {
//lay noi dung binh luan
String comment = c.getContentComment();
//chi thu thap gmail
if (comment.contains("@gmail.com")) {
Matcher m = Pattern.compile("[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+").matcher(comment);
while (m.find()) {
try {
mail = m.group();
char end = mail.charAt(mail.length() - 1);
if (end == '.') {
mail = mail.substring(0, mail.length() - 1);
}
//kiem tra dieu kien truoc khi insert vao db
//truong hop mail ko bi chan va mail chua co trong
//bang tbl_mail
if (!checkMailBlock(mail)) {
//kiem tra mail đã tồn tại trong bảng tbl_mail
Mail mailDB = MailDao.getByEmail(mail);
if (mailDB == null) {
//khoi tao doi tuong mail
Mail email = initMail(mail);
//insert vao bang tbl_mail
MailDao.insert(email);
//kiem tra cap idTblFeed - idTblMail da ton hay chua
Mail mailDto = MailDao.getByEmail(mail);
if (!checkIdTblFeedIdTblMail(f.getId(), mailDto.getId())) {
FeedMail fm = initFeedMail(f.getId(), mailDto.getId());
//insert vao bang tbl_feed_mail
FeedMailDao.insert(fm);
}
} else {//truong hop mail da ton tai trong tbl_mail chua ton tai trong tbl_feed_mail
if (!checkIdTblFeedIdTblMail(f.getId(), mailDB.getId())) {
//insert vao bang tbl_feed_mail
FeedMail fm = initFeedMail(f.getId(), mailDB.getId());
//insert vao bang tbl_feed_mail
FeedMailDao.insert(fm);
}
}
}
} catch (Exception e) {
System.out.println("Exception: "+e.getMessage());
}
}
}
}
}
System.out.println(" -----*****-----**********************---------------------*****----");
System.out.println(" -----*****-----CHUONG TRINH ExtractMailByFeed KET THUC!---*****----");
System.out.println(" -----*****-----**********************---------------------*****----");
}
//check dia chi mail co bi chan hay chua
//false: mail chua ton tai
//true: mail da ton tai
private static boolean checkMailBlock(String mail) throws Exception {
//ko insert mail đã tồn tại trong danh sách mail chặn tbl_mail_block
MailBlock mailBlock = MailBlockDao.getByEmail(mail);
if (mailBlock != null) {
return true;
}
return false;
}
private static Mail initMail(String mail) {
Mail email = new Mail();
email.setEmail(mail.toLowerCase());
Date d = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
String dateCreate = sdf.format(d);
email.setCreateDate(dateCreate);
email.setStatus(Mail.STATUS_INSERT);
return email;
}
//kiem tra cap IdTblFeed IdTblMail da ton tai hay chua
//true: da ton tai
//false: chua ton tai
private static boolean checkIdTblFeedIdTblMail(int idTblFeed, int idTblMail) throws Exception {
FeedMail fm = FeedMailDao.getByIdTblFeedIdTblMail(idTblFeed, idTblMail);
if (fm != null) {
return true;
}
return false;
}
private static FeedMail initFeedMail(int idTblFeed, int idTblMail) {
FeedMail fm = new FeedMail();
fm.setIdTblFeed(idTblFeed);
fm.setIdTblMail(idTblMail);
Date d = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
String dateCreate = sdf.format(d);
fm.setCreateDate(dateCreate);
fm.setStatus(FeedMail.STATUS_INSERT);
return fm;
}
}
| [
"[email protected]"
] | |
1fef23944acfddf244e4606b52b787b796396535 | fe53abcb379446f9857365f37d8382df63beb473 | /myjava/src/myjava/IdenticalBT.java | 2f2ab28f784d3898f7094d7b8d79300eca710411 | [] | no_license | spandey1296/CipherSchoolsDS | 3e222bc439ab895d4eafad20cde41e72b843a89b | 7704e6b9a327c13b98a6ae71ee6dc42f6e554159 | refs/heads/master | 2023-08-23T22:00:38.973434 | 2021-10-08T07:34:08 | 2021-10-08T07:34:08 | 414,888,882 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 927 | java | package myjava;
class Node{
int data;
Node left;
Node right;
Node(int data){
this.data=data;
left=null;
right=null;
}
}
public class IdenticalBT {
Node root;
IdenticalBT(){
root=null;
}
IdenticalBT(int data){
root=new Node(data);
}
public static void main(String args[]) {
IdenticalBT s=new IdenticalBT(2);
s.root.left=new Node(3);
s.root.right=new Node(5);
s.root.left.right=new Node(9);
s.root.right.left=new Node(7);
IdenticalBT s1=new IdenticalBT(2);
s1.root.left=new Node(3);
s1.root.right=new Node(5);
s1.root.left.right=new Node(9);
s1.root.right.left=new Node(7);
System.out.println(s.isIdentical(s.root,s1.root));
}
boolean isIdentical(Node root1,Node root2) {
if(root1==null&&root2==null)
return true;
if(root1==null||root2==null)
return false;
return root1.data==root2.data && isIdentical(root1.left,root2.left) && isIdentical(root1.right,root2.right);
}
}
| [
"[email protected]"
] | |
309b81200e95f1ee79d7a3f33a50c37d3d015666 | 3971130bb2057e05621bdabc88e0ad29608fcfd6 | /src/main/java/io/swagger/client/ApiCallback.java | 26fe161529ae268906d9a9104a86ec629c1ca44a | [] | no_license | portocred/contrato-api-sdk-java | a44a8899cc720822c15e8aab9f911bbe3076e107 | a3d22eed91fef829137cbe642994159ada2d3655 | refs/heads/master | 2020-03-11T04:52:42.090109 | 2018-04-16T18:22:56 | 2018-04-16T18:22:56 | 129,787,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,791 | java | /*
* Gestão de Contratos
* API de Gestão de Contratos.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client;
import java.io.IOException;
import java.util.Map;
import java.util.List;
/**
* Callback for asynchronous API call.
*
* @param <T> The return type
*/
public interface ApiCallback<T> {
/**
* This is called when the API call fails.
*
* @param e The exception causing the failure
* @param statusCode Status code of the response if available, otherwise it would be 0
* @param responseHeaders Headers of the response if available, otherwise it would be null
*/
void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders);
/**
* This is called when the API call succeeded.
*
* @param result The result deserialized from response
* @param statusCode Status code of the response
* @param responseHeaders Headers of the response
*/
void onSuccess(T result, int statusCode, Map<String, List<String>> responseHeaders);
/**
* This is called when the API upload processing.
*
* @param bytesWritten bytes Written
* @param contentLength content length of request body
* @param done write end
*/
void onUploadProgress(long bytesWritten, long contentLength, boolean done);
/**
* This is called when the API downlond processing.
*
* @param bytesRead bytes Read
* @param contentLength content lenngth of the response
* @param done Read end
*/
void onDownloadProgress(long bytesRead, long contentLength, boolean done);
}
| [
"[email protected]"
] | |
0245b2d2409c78a78e5d635e3bcb46899cb0065a | 9e317238ccb5fd12aaf08aaf41ca269a9792d545 | /producer/src/main/java/io/pivotal/producer/users/UserRepository.java | 0d51171b58e655f7bc61b6422eef516b9bc948be | [] | no_license | dugancathal/consumer-driven-contracts-example | 89ad63aec03799e61c57a1d4d131d8e9d53ffe7a | 15ffa2d662dfe87c196b1f1b750f8ec669252504 | refs/heads/master | 2021-01-12T07:41:01.114951 | 2017-01-05T15:43:01 | 2017-01-05T15:52:55 | 76,997,359 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 310 | java | package io.pivotal.producer.users;
import org.springframework.stereotype.Repository;
import java.util.List;
import static java.util.Arrays.asList;
@Repository
public class UserRepository {
public List<User> getAll() {
return asList(
new User("4", "Bertha Jones")
);
}
}
| [
"[email protected]"
] | |
e2571f454fca7672aca5ff57b7ccf49c4b71a5b0 | 4aa9beb0c15cd2faadce920d653bea2e9c3cb9b3 | /third-integration/devCloud/src/main/java/nl/sri/devCloud/service/IVUserStoryTaskCardService.java | 5902e5943f13ef835bba354e47f54489b1ace077 | [
"Apache-2.0"
] | permissive | songdi676/paas-admin | ac8cba2b020593f46e239b7d2b515223d1c1f472 | cccf3c8b6a367d3d3bb96ffd9aa034dfb9abf3f7 | refs/heads/master | 2022-12-04T22:11:22.295183 | 2020-08-18T02:31:26 | 2020-08-18T02:31:26 | 277,461,170 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 318 | java | package nl.sri.devCloud.service;
import nl.sri.devCloud.entity.VUserStoryTaskCard;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* VIEW 服务类
* </p>
*
* @author wurunxiang
* @since 2020-07-21
*/
public interface IVUserStoryTaskCardService extends IService<VUserStoryTaskCard> {
}
| [
"[email protected]"
] | |
4022fe5632b9c213a654a07c7d88005db54ce276 | dbd5f45c18f496ccf633e5a6fd386d38a423aba6 | /src/jp/katahirado/android/tsubunomi/activity/SearchTimelineActivity.java | bf3aad8835f3bb602a32ad7dcd5004bdbef174f3 | [
"MIT",
"Apache-2.0"
] | permissive | katahirado/tsubunomi | ef7a0c0c02e3886c641a4c0b42fb6417bbeb2221 | 46dc7f15105a903b5890591e0c914b1fbba8a10a | refs/heads/master | 2020-06-08T20:45:58.194704 | 2012-12-02T06:22:43 | 2012-12-02T06:22:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,053 | java | package jp.katahirado.android.tsubunomi.activity;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.SpannableStringBuilder;
import android.view.*;
import android.view.inputmethod.InputMethodManager;
import android.widget.*;
import jp.katahirado.android.tsubunomi.Const;
import jp.katahirado.android.tsubunomi.R;
import jp.katahirado.android.tsubunomi.SharedManager;
import jp.katahirado.android.tsubunomi.TweetManager;
import jp.katahirado.android.tsubunomi.adapter.TweetListAdapter;
import jp.katahirado.android.tsubunomi.dao.DBOpenHelper;
import jp.katahirado.android.tsubunomi.dao.SearchWordDao;
import jp.katahirado.android.tsubunomi.dialog.StatusDialog;
import jp.katahirado.android.tsubunomi.task.SearchTimelineTask;
import twitter4j.Query;
import twitter4j.Status;
import java.util.ArrayList;
/**
* Created with IntelliJ IDEA.
* Author: yuichi_katahira
*/
public class SearchTimelineActivity extends Activity
implements View.OnClickListener, AdapterView.OnItemClickListener {
private AutoCompleteTextView searchText;
private ListView listView;
private TweetManager tweetManager;
private ArrayAdapter<String> wordAdapter;
private ArrayList<String> doubleWordList;
private String query = "";
private SharedManager sharedManager;
private SearchWordDao searchWordDao;
private TweetListAdapter tweetListAdapter;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.searchtimeline);
setTitle(getString(R.string.app_name) + " : Search");
listView = (ListView) findViewById(R.id.search_list);
searchText = (AutoCompleteTextView) findViewById(R.id.search_text);
Button searchButton = (Button) findViewById(R.id.search_button);
sharedManager = new SharedManager(getSharedPreferences(Const.PREFERENCE_NAME, MODE_PRIVATE));
tweetManager = new TweetManager(sharedManager);
searchWordDao = new SearchWordDao(new DBOpenHelper(this).getWritableDatabase());
setWordAdapter();
searchButton.setOnClickListener(this);
listView.setOnItemClickListener(this);
listView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
hideIME();
return false;
}
});
String receiveHash = getIntent().getStringExtra(Const.HASH);
if (receiveHash != null) {
query = receiveHash;
getSearchTimelineTask();
}
}
@Override
protected void onResume() {
super.onResume();
setWordAdapter();
}
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
Status status = tweetListAdapter.getItem(position);
new StatusDialog(this, sharedManager, tweetManager, status).show();
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.search_button:
SpannableStringBuilder builder = (SpannableStringBuilder) searchText.getText();
query = builder.toString();
getSearchTimelineTask();
break;
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater menuInflater = getMenuInflater();
menuInflater.inflate(R.menu.search_timeline_menu, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_search_timeline_refresh:
getSearchTimelineTask();
break;
case R.id.menu_search_timeline_to_user_timeline:
startActivity(new Intent(this, UserTimelineActivity.class));
break;
case R.id.menu_search_word_list:
startActivity(new Intent(this, SearchWordsActivity.class));
break;
}
return super.onOptionsItemSelected(item);
}
private void setWordAdapter() {
ArrayList<String> wordList = searchWordDao.all();
doubleWordList = searchWordDao.all();
wordAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, wordList);
searchText.setAdapter(wordAdapter);
}
private void getSearchTimelineTask() {
if (query.length() == 0) {
return;
}
if (wordAdapter.getPosition(query) == -1) {
wordAdapter.add(query);
doubleWordList.add(query);
searchWordDao.insert(query);
}
ArrayList<Status> statusList = new ArrayList<Status>();
TweetListAdapter listAdapter = new TweetListAdapter(this, statusList);
SearchTimelineTask task = new SearchTimelineTask(this, tweetManager, listAdapter);
task.execute(buildQuery(query));
}
private Query buildQuery(String s) {
Query q = new Query();
String lang = "";
String[] queryParams = s.split("&");
if (queryParams.length > 1 && queryParams[1].startsWith("lang")) {
lang = queryParams[1].split("=")[1];
}
q.setQuery(queryParams[0]);
if (!lang.equals("")) {
q.setLang(lang);
}
return q;
}
public void setSearchListAdapter(TweetListAdapter adapter, String q) {
tweetListAdapter = adapter;
listView.setAdapter(tweetListAdapter);
hideIME();
searchText.setText("");
listView.requestFocus();
setTitle(getString(R.string.app_name) + " : Search : " + q);
}
private void hideIME() {
InputMethodManager manager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
manager.hideSoftInputFromWindow(searchText.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
}
} | [
"[email protected]"
] | |
2d2eb309b54ad25b452d278ed2ff038c01e023a0 | e16c7787cfdb29af8f3400400bef771f60d2e68a | /src/原型模式/Mail.java | 6b7b674263f7690ad526e056567a9dec0660b742 | [] | no_license | zFitness/design-pattern | 6b1afe14343bfc63542cd225f34721edbcff2b72 | 4c5273183329f7e077d31e0d46c1702a8a6b14fe | refs/heads/main | 2023-03-16T16:04:49.208986 | 2021-02-19T08:22:31 | 2021-02-19T08:22:31 | 336,443,977 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,598 | java | package 原型模式;
/**
* @author zheng
* @description TODO
* @date 2021/1/31
*/
public class Mail implements Cloneable {
@Override
public Mail clone() {
Mail mail = null;
try {
mail = (Mail) super.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return mail;
}
/**
* 收件人
*/
private String receiver;
/**
* 邮件名称
*/
private String subject;
/**
* 称谓
*/
private String appellation;
/**
* 邮件内容
*/
private String context;
/**
* 邮件的尾部
*/
private String tail;
public Mail(AdvTemplate advTemplate) {
this.context = advTemplate.getAdvContext();
this.subject = advTemplate.getAdvSubject();
}
public String getReceiver() {
return receiver;
}
public void setReceiver(String receiver) {
this.receiver = receiver;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getAppellation() {
return appellation;
}
public void setAppellation(String appellation) {
this.appellation = appellation;
}
public String getContext() {
return context;
}
public void setContext(String context) {
this.context = context;
}
public String getTail() {
return tail;
}
public void setTail(String tail) {
this.tail = tail;
}
}
| [
"[email protected]"
] | |
d10739d54f216dad59f78e599a88c42b35a411e2 | 0294d6faf6638b8f9c92a71b83f90bf3859f49b4 | /lib-common/src/main/java/com/mango/utils/RequestCode.java | cfdc2a516c5ef611fd0a07382dd86e48f8c8ab7b | [] | no_license | valderFields/JustRecordAndroid | b1b3dda301fc1b1b7cffe374797dc3cfb7369c9e | b871166838bbf750a2f90abb954d53659c27d9b0 | refs/heads/master | 2020-03-18T18:31:27.971520 | 2018-06-14T01:15:34 | 2018-06-14T01:15:34 | 135,098,420 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 196 | java | package com.mango.utils;
/**
* Created by Administrator on 2018/3/29 0029.
*/
public class RequestCode {
//webview 访问资源管理
public static final int WEB_FILE_CHOOSER = 100;
}
| [
"[email protected]"
] | |
66fe4ca6f3453be65046b3068271d5528548054d | 66bd90eb45af394611998859f4526dfedbb2c989 | /src/main/java/com/ethan/crmsystem/auth/SecurityUser.java | 646780fb657ba5ed300c54cf62510852a42fb72c | [] | no_license | Ethanchen2698/crm-system | 16f3e8f9c77af4162c8fe4a0467b120ab6fde3d4 | 111f3bc26e675d16cf46068783f8a6ebdf52ae5c | refs/heads/master | 2023-04-02T11:02:12.371352 | 2021-04-04T08:01:26 | 2021-04-04T08:01:26 | 221,251,985 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,635 | java | /**
* wesoft.com Inc.
* Copyright (c) 2005-2016 All Rights Reserved.
*/
package com.ethan.crmsystem.auth;
import com.ethan.crmsystem.infra.domain.User;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.core.userdetails.UserDetails;
import java.util.Collection;
import java.util.Objects;
/**
* @author <a href="mailto:[email protected]">chencq</a>
* @version $Id: SecurityUser.java, 2016/11/23 16:32 $
*/
public class SecurityUser extends User implements UserDetails {
private boolean accountNonExpired = true;
private boolean accountNonLocked = true;
private boolean credentialsNonExpired = true;
private boolean enabled = true;
public SecurityUser(User user) {
super(user);
}
@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
return AuthorityUtils.commaSeparatedStringToAuthorityList(",");
}
@Override
public String getUsername() {
return this.getLoginName();
}
@Override
public boolean isAccountNonExpired() {
return this.accountNonExpired;
}
@Override
public boolean isAccountNonLocked() {
return this.accountNonLocked;
}
@Override
public boolean isCredentialsNonExpired() {
return this.credentialsNonExpired;
}
@Override
public boolean isEnabled() {
return this.enabled;
}
public void setAccountNonExpired(boolean accountNonExpired) {
this.accountNonExpired = accountNonExpired;
}
public void setAccountNonLocked(boolean accountNonLocked) {
this.accountNonLocked = accountNonLocked;
}
public void setCredentialsNonExpired(boolean credentialsNonExpired) {
this.credentialsNonExpired = credentialsNonExpired;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
@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;
SecurityUser that = (SecurityUser) o;
return accountNonExpired == that.accountNonExpired && accountNonLocked == that.accountNonLocked
&& credentialsNonExpired == that.credentialsNonExpired && enabled == that.enabled;
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), accountNonExpired, accountNonLocked, credentialsNonExpired,
enabled);
}
}
| [
"[email protected]"
] | |
9e212bb1f72146d710e2ca38c716a58a9fd35e4e | bbf85a5246c4d0cd27ab351accc8b290767e6de3 | /src/RandPermut.java | 967a1d58aa17159185b9108237ba73bd1e6bbf43 | [] | no_license | njlarsson/javautil | 37664f79bc996135fd0c84614fb396690b4c9f1d | 5379ebcc37895030a60eb191df885d0ad312edcb | refs/heads/master | 2021-06-09T19:56:52.702037 | 2021-03-12T12:35:41 | 2021-03-12T12:35:41 | 1,649,283 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 694 | java | import java.util.Random;
/**
* Program that produces a series of N random numbers between 0 and N-1.
*/
public class RandPermut {
public static void main(String[] args) {
int n = Integer.parseInt(args[0]);
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = i;
}
Random random = new Random();
for (int m = n; m > 1; m--) {
int i = (random.nextInt() & Integer.MAX_VALUE) % m;
int j = m-1;
int t = a[j]; a[j] = a[i]; a[i] = t;
}
for (int i = 0; i < n; i++) {
System.out.print(a[i] + " ");
}
System.out.println();
}
}
| [
"[email protected]"
] | |
da18941da4b72ffc61b118730c89159755666859 | 37bc004c71c94b2be17bc220fb3daaacae0a6e77 | /Project XII/PracticeIt/Chapter1/PoolPuzzle.java | 34e3af60c4fb2bd7b630c4a8115716dfe4c1993e | [] | no_license | bbogush72/Bee007BasicJava | 69ee060c0322728cfdefa9b29922000323450f3a | b671753a179eede7daaecf5f5ee1e04e8139277b | refs/heads/master | 2022-04-23T16:41:31.229518 | 2020-03-15T00:20:08 | 2020-03-15T00:20:08 | 164,767,738 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 643 | java | package Chapter1;
public class PoolPuzzle {
public static void main(String[] args) {
// TODO Auto-generated method stub
int x = 0 ;
while ( x<4 ) {
x++;
if ( x>3 ) {
System.out.print("annoys");
System.out.println(" ");
}
if ( x>3 ) {
System.out.print("an");
System.out.print(" oyster");
}
if ( x == 1 ) {
System.out.print("a");
System.out.print(" ");
System.out.print("n");
System.out.print("oise");
}
// if ( ) {
// }
System.out.println("");
}
}
}
| [
"[email protected]"
] | |
ba55d111242ace9f09b589d1e49936c3cf9fe237 | b82cf70174a8a7cb0079af8f64352a11023a2d2b | /movierental.jpa/src/main/java/ch/fhnw/edu/rental/gui/MovieRentalMappers.java | f6eb4a48f3fda9df7abafec8d569c906f6d1c133 | [] | no_license | bananenhoschi/eaf | 63f3d1b240a1c711590fa4d5f021548182e51359 | 285f655e14f043d3b9519147335d5b5099fb0f3a | refs/heads/master | 2020-03-29T02:28:29.529657 | 2019-01-24T19:08:02 | 2019-01-24T19:08:02 | 149,438,613 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,844 | java | package ch.fhnw.edu.rental.gui;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.LinkedList;
import java.util.List;
public class MovieRentalMappers {
private BusinessLogic services;
public MovieRentalMappers(BusinessLogic services) {
this.services = services;
}
public Object[][] getUserListAsObject() {
final List<Object[]> users = new LinkedList<Object[]>();
services.visitUsers(
new BusinessLogic.UserVisitor() {
@Override
public void visit(Long id, String lastName, String firstName) {
users.add(new Object[]{id, lastName, firstName});
}
}
);
return users.toArray(new Object[][]{});
}
public Object[][] getMovieListAsObject(final boolean rented) {
final List<Object[]> movies = new LinkedList<Object[]>();
services.visitMovies(
new BusinessLogic.MovieVisitor() {
@Override
public void visit(Long id, String title, LocalDate releaseDate, boolean isRented, String priceCategory) {
if (rented == isRented)
movies.add(new Object[]{id, title, releaseDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")), isRented, priceCategory});
}
}
);
return movies.toArray(new Object[][]{});
}
public Object[][] getMovieListAsObject() {
final List<Object[]> movies = new LinkedList<Object[]>();
services.visitMovies(
new BusinessLogic.MovieVisitor() {
@Override
public void visit(Long id, String title, LocalDate releaseDate, boolean isRented, String priceCategory) {
movies.add(new Object[]{id, title, releaseDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")), isRented, priceCategory});
}
}
);
return movies.toArray(new Object[][]{});
}
public Object[][] getRentalListAsObject() {
final List<Object[]> rentals = new LinkedList<Object[]>();
services.visitRentals(
new BusinessLogic.RentalVisitor() {
@Override
public void visit(Long id, int rentalDays, LocalDate rentalDate,
String lastName, String firstName, String movieTitle,
int remainingDays, double rentalFee) {
rentals.add(new Object[]{
id, rentalDays, rentalDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")),
lastName, firstName, movieTitle, remainingDays, rentalFee
});
}
}
);
return rentals.toArray(new Object[][]{});
}
public Object[][] getRentalListAsObjectForUser(Long userId) {
final List<Object[]> rentals = new LinkedList<Object[]>();
services.visitRentalsOfUser(userId,
new BusinessLogic.RentalVisitor() {
@Override
public void visit(Long id, int rentalDays, LocalDate rentalDate,
String lastName, String firstName, String movieTitle,
int remainingDays, double rentalFee) {
rentals.add(new Object[]{
id, rentalDays, rentalDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")),
movieTitle, remainingDays, rentalFee
});
}
}
);
return rentals.toArray(new Object[][]{});
}
}
| [
"[email protected]"
] | |
ffcf41ef52e119ca6bb96818fc34e87b709821f1 | f8bc61bab2cb850e6a7528b0595814d439b14949 | /src/SortDriver.java | 95d13966b64994da38810e5562bb603aa6dfeb7b | [] | no_license | brp76/DS_Lab8 | d6df338359f5feba31aa47e79ba1034e0010b6d0 | ef4a515c43e53ed6119ef9bd78dbbd2c8d15e37b | refs/heads/master | 2021-01-10T12:54:57.515362 | 2016-03-19T20:29:38 | 2016-03-19T20:29:38 | 54,150,410 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,679 | java | import java.util.*;
import java.io.*;
/**
* A class for generating statistical information about the basis sort performance.
*
* @author Charles Hoot
* @version 4.0
*/
public class SortDriver
{
public static void main(String args[])
{
int arraySize;
int trials;
Integer data[];
//CREATE THE INSTANCE OF THE INSTRUMENTED SORT CLASS HERE
SortArrayInstrumented sai = new SortArrayInstrumented();
System.out.println("What size arrays should be used?");
arraySize = getInt(" It should be an integer value greater than or equal to 1.");
// MODIFY THE FOLLOWING TO GET THE NUMBER OF TRIALS AND LOOP
trials = getInt("How many trials?");
for (int i = 0; i < trials; i++) {
data = generateRandomArray(arraySize);
//System.out.println("The array is: " + getString(data));
sai.shellSort(data, arraySize);
//System.out.println("The sorted array is: " + getString(data));
}
// ADD CODE TO REPORT THE NUMBER OF COMPARISONS
System.out.println(" Comparison made: "+sai.getComparisons());
System.out.println(" Total: "+sai.getTotalComparisons());
System.out.println(" Min: "+sai.getMinComparisons());
long avg = (sai.getTotalComparisons())/trials;
System.out.println(" Avg: "+avg);
System.out.println(" Max: "+sai.getMaxComparisons());
}
/**
* Generate an array of random integer values. The values will be between 0 and size.
*
* @param size The size of the array to generate.
* @return The array of integers.
*/
private static Integer[] generateRandomArray(int size)
{
Integer result[] = new Integer[size];
Random generator = new Random();
for(int i = 0; i< size; i++)
{
int value = generator.nextInt(size);
result[i] = new Integer(value);
}
return result;
}
/**
* A displayable representation of an array of Objects where toString is
* applied on each object in the array
*
* @param data The array to display.
* @return A printable string.
*/
private static String getString(Object [] data)
{
String result = new String("[ ");
for(int i = 0; i< data.length; i++)
{
result = result + data[i].toString() + " ";
}
result = result + "]";
return result;
}
/**
* Get an integer value
*
* @return An integer.
*/
private static int getInt(String rangePrompt)
{
Scanner input;
int result = 10; //default value is 10
try
{
input = new Scanner(System.in);
System.out.println(rangePrompt);
result = input.nextInt();
}
catch(NumberFormatException e)
{
System.out.println("Could not convert input to an integer");
System.out.println(e.getMessage());
System.out.println("Will use 10 as the default value");
}
catch(Exception e)
{
System.out.println("There was an error with System.in");
System.out.println(e.getMessage());
System.out.println("Will use 10 as the default value");
}
return result;
}
}
| [
"[email protected]"
] | |
df2d1c1349ead0ae469c9ec709af13d2a134c379 | 6441b675324748a651590fbc047b0283bb9bca04 | /hanheartmgr/src/java/phis/nu/his/ts/hanheartmgr/maintinqrmgt/MaintInqrMgtImpl.java | 32b314545a971e96b973a176907f278ba16ba3e5 | [] | no_license | Chochanghyun/hanheartmgr | 00f76fe877b0a118f1be460df5431e47a13da7dd | d8792393bf730583935546837ef5b4f1a9fb7739 | refs/heads/master | 2020-07-02T01:43:30.714334 | 2019-08-09T02:44:25 | 2019-08-09T02:44:25 | 201,375,515 | 0 | 0 | null | null | null | null | UHC | Java | false | false | 826 | java | package phis.nu.his.ts.hanheartmgr.maintinqrmgt;
import phis.nu.his.ts.hanheartmgr.maintinqrmgt.dao.MaintInqrDAO;
import phis.nuframe.context.ContextAwareService;
import phis.nuframe.exception.UserException;
import phis.nuframe.vo.ValueObject;
public class MaintInqrMgtImpl extends ContextAwareService implements MaintInqrMgt {
private MaintInqrDAO maintInqrDAO = null;
public void setMaintInqrDAO(MaintInqrDAO dao) {
this.maintInqrDAO = dao;
}
@Override
public ValueObject getBscd(ValueObject pVO) {
ValueObject getVO = maintInqrDAO.getBscd(pVO);
return getVO;
}
@Override
public ValueObject getDeptTree(ValueObject pVO) {
ValueObject getVO = maintInqrDAO.getDeptTree(pVO);
if (getVO.size() == 0) {
throw new UserException("데이터가 없습니다ㅎㅎㅈㅅ;");
}
return getVO;
}
}
| [
"[email protected]"
] | |
99c5d9fd941dce1a82921aa8199656ef3d6aeb6a | 8e155bc4b781d3624deebfdaf7a72c2981afba35 | /src/place/client/text/ConsoleApplication.java | cf132f1aa488eb28168f5d50bc4618d50bd83d88 | [] | no_license | lpp2901/place | 26b4ca2c2b9f566236525320669fcedf9d830467 | da7a4b916021e1c5948cbe8310afa355f8583ffb | refs/heads/master | 2020-08-29T16:13:11.051629 | 2019-10-28T16:05:21 | 2019-10-28T16:05:21 | 218,087,165 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,733 | java | package place.client.text;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
/**
* A class to do console-based user interaction in a manner similar to
* how JavaFX does window-based interaction.
* This class is to be inherited by any console application.
* When {@link #launch(Class,String[])} is called with the subclass object, an
* instance of the given class is created and the argument array is saved.
* (There must be a default constructor.)
* The subclass's {@link #go(Scanner, PrintWriter) start} method
* is called in a separate thread, causing
* {@link #go(Scanner, PrintWriter) start} to return immediately.
* This method is supplied with a Scanner and Writer connected to
* a console (terminal).
* The subclass may optionally override {@link #init() init} and
* {@link #stop() stop} to do additional setup and teardown.
* {@link #go(Scanner, PrintWriter)} (Scanner, PrintWriter) start} runs
* after {@link #init() init}. After the
* {@link #go(Scanner, PrintWriter)} (Scanner, PrintWriter) start} method
* returns, {@link #stop() stop} is executed.
*
* @author James Heliotis
*/
public abstract class ConsoleApplication {
private String[] cmdLineArgs;
private Thread eventThread;
/**
* Run a console application.
* <ol>
* <li>An instance of a ConsoleApplication subclass is created.</li>
* <li>The class's default constructor is run.</li>
* <li>The subclass's {@link #init() init} method is run.</li>
* <li>A {@link Scanner Scanner} and
* {@link java.io.Writer Writer} are created and connected to a
* text console (currently stdin and stdout).</li>
* <li>A new thread is spawned. It calls the subclass's
* {@link #go(Scanner, PrintWriter)} method
* with the {@link Scanner} and
* {@link java.io.Writer} as arguments.</li>
* <li>(At this point the {@code launch} method returns.)</li>
* <li>When the {@link #go(Scanner, PrintWriter)} method
* returns the subclass's {@link #stop() stop} method is run.</li>
* </ol>
*
* @param ptuiClass the class object that refers to the class to
* be instantiated
*/
public static void launch(
Class< ? extends ConsoleApplication > ptuiClass
) {
launch( ptuiClass, new String[ 0 ] );
}
/**
* Run a console application, with command line arguments.
* <ol>
* <li>An instance of a ConsoleApplication subclass is created.</li>
* <li>The passed in string arguments are copied and saved.</li>
* <li>The class's default constructor is run.</li>
* <li>The subclass's {@link #init() init} method is run.</li>
* <li>A {@link Scanner Scanner} and
* {@link java.io.Writer Writer} are created and connected to a
* text console (currently stdin and stdout).</li>
* <li>A new thread is spawned. It calls the subclass's
* {@link #go(Scanner, PrintWriter)} method
* with the {@link Scanner} and
* {@link java.io.Writer} as arguments.</li>
* <li>(At this point the {@code launch} method returns.)</li>
* <li>When the {@link #go(Scanner, PrintWriter)} method
* returns the subclass's {@link #stop() stop} method is run.</li>
* </ol>
*
* @param ptuiClass the class object that refers to the class to
* be instantiated
* @param args the array of strings from the command line
*/
public static void launch(
Class< ? extends ConsoleApplication > ptuiClass,
String[] args
) {
try {
ConsoleApplication ptuiApp = ptuiClass.newInstance();
ptuiApp.cmdLineArgs = Arrays.copyOf( args, args.length );
try {
ptuiApp.init();
ptuiApp.eventThread = new Thread( new Runner( ptuiApp ) );
ptuiApp.eventThread.start();
ptuiApp.eventThread.join();
}
catch( InterruptedException ie ) {
System.err.println( "Console event thread interrupted" );
}
finally {
ptuiApp.stop();
}
}
catch( InstantiationException ie ) {
System.err.println( "Can't instantiate Console App:" );
System.err.println( ie.getMessage() );
}
catch( IllegalAccessException iae ) {
System.err.println( iae.getMessage() );
}
}
private static class Runner implements Runnable {
private final ConsoleApplication ptuiApp;
public Runner( ConsoleApplication ptuiApp ) { this.ptuiApp = ptuiApp; }
public void run() {
// We don't put the PrintWriter in try-with-resources because
// we don't want it to be closed. The Scanner can close.
PrintWriter out = null;
try ( Scanner consoleIn = new Scanner( System.in ) ) {
do {
try {
out = new PrintWriter(
new OutputStreamWriter( System.out ), true );
ptuiApp.go( consoleIn, out );
out = null;
}
catch( Exception e ) {
e.printStackTrace();
if ( out != null ) {
out.println( "\nRESTARTING...\n" );
}
}
} while ( out != null );
}
}
}
/**
* Fetch the application's command line arguments
* @return the string array that was passed to launch, if any, or else
* an empty array
*/
public List< String > getArguments() {
return Arrays.asList( this.cmdLineArgs );
}
/**
* A do-nothing setup method that can be overwritten by subclasses
* when necessary
*/
public void init() {}
/**
* The method that is expected to run the main loop of the console
* application, prompting the user for text input and displaying
* text output. It is named differently than
* {@link javafx.application.Application#start(javafx.stage.Stage)}
* to emphasize that this method can keep executing (looping,
* probably) as long as the application is running.
*
* @param consoleIn the source of the user input
* @param consoleOut the destination where text output should be printed
*/
public abstract void go( Scanner consoleIn, PrintWriter consoleOut );
/**
* A do-nothing teardown method that can be overwritten by subclasses
* when necessary.
*/
public void stop() {}
}
| [
"[email protected]"
] | |
fe87e33df9ba944e4cbac996510ed8dd97f82452 | c34d14cdc74b092dbd82013e6fe78aee9cd7d9e6 | /求最大递增序列/Main.java | 19de744c7baa964439a60a94f8a4e9cbf1e54449 | [] | no_license | DyLanCao/arithmetic | 40471930683892c8c44f970ed0b26f2d5edd6ac9 | 94a1e55383a8b1b19fc315c343d423a8c48f553e | refs/heads/master | 2021-06-14T06:47:42.473699 | 2017-02-06T05:00:19 | 2017-02-06T05:00:19 | 114,609,613 | 1 | 0 | null | 2017-12-18T07:31:49 | 2017-12-18T07:31:48 | null | GB18030 | Java | false | false | 1,424 | java | package 求最大递增序列;
public class Main {
public int[] list(int[] array){
if(array == null || array.length == 0){
return null;
}
//求出DP数组
int[] dp = getDp(array);
//得出存储递增数组的结果数组
for(int i =0;i<dp.length;i++){
System.out.print(dp[i]+" ");
}
int[] result = getList(array,dp);
return result;
}
//获取到DP数组的值,每一位中存在递增元素的个数。
public int[] getDp(int[] array){
int[] dp = new int[array.length];
for(int i=0;i<array.length;i++){
dp[i] = 1;
for(int j=0;j<i;j++){
if(array[j] < array[i]){
dp[i] = Math.max(dp[j] + 1,dp[i]);
}
}
}
return dp;
}
public int[] getList(int[]array,int[]dp){
int index = 0;
int length = 0;
//找出当前DP数组中递增数最大元素。
for(int i=0;i<dp.length;i++){
if(dp[i] > length){
length = dp[i];
index = i;
}
}
//找出递增的数组存储到结果数组中去
int[] result = new int[length];
result[--length] = array[index];
for(int i = index;i>=0;i--){
if(array[i] < array[index] && dp[i] == dp[index]-1){
result[--length] = array[i];
index = i;
}
}
return result;
}
public static void main(String[] args){
Main m = new Main();
int[] array = {1,5,3,7,9};
int[] result = m.list(array);
System.out.println();
for(int i=0;i<result.length;i++){
System.out.print(result[i]+" ");
}
}
}
| [
"[email protected]"
] | |
ca2f1d69c491e7878b079aab05fac53f88c5f3f7 | 1901f8c70e60ebcbea8c0a231f765c2b9519d998 | /instrumentation/jms/src/main/java/brave/jms/PropertyFilter.java | 1632616106b034acd1d2336ba6358ae68d68e6f9 | [
"Apache-2.0"
] | permissive | joviqiao/brave | 125988b14a60127f322d3e34618beadd2ac85158 | 7058c49e7d63327097da73b1720d1a8cd6ace088 | refs/heads/master | 2020-03-28T15:47:38.632759 | 2018-09-13T05:57:25 | 2018-09-13T10:14:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,602 | java | package brave.jms;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Set;
import javax.jms.JMSException;
import javax.jms.JMSProducer;
import javax.jms.Message;
enum PropertyFilter {
MESSAGE {
/**
* This implies copying properties because the JMS spec says you can't write properties until
* {@link Message#clearProperties()} has been called.
*
* <p> See https://docs.oracle.com/javaee/6/api/javax/jms/Message.html
*/
@Override void filterProperties(Object object, Set<String> namesToClear) {
Message message = (Message) object;
ArrayList<Object> retainedProperties = messagePropertiesBuffer();
try {
doFilterProperties(message, namesToClear, retainedProperties);
} catch (JMSException e) {
// don't die on wonky exception
} finally {
retainedProperties.clear(); // ensure no object references are held due to JMS exceptions
}
}
},
JMS_PRODUCER {
@Override void filterProperties(Object object, Set<String> namesToClear) {
JMSProducer jmsProducer = (JMSProducer) object;
ArrayList<Object> retainedProperties = messagePropertiesBuffer();
try {
doFilterProperties(jmsProducer, namesToClear, retainedProperties);
} finally {
retainedProperties.clear(); // ensure no object references are held due to JMS exceptions
}
}
};
abstract void filterProperties(Object message, Set<String> namesToClear);
static void doFilterProperties(
Message message, Set<String> namesToClear, ArrayList<Object> retainedProperties
) throws JMSException {
Enumeration<?> names = message.getPropertyNames();
while (names.hasMoreElements()) {
String name = (String) names.nextElement();
Object value = message.getObjectProperty(name);
if (!namesToClear.contains(name) && value != null) {
retainedProperties.add(name);
retainedProperties.add(value);
}
}
// redo the properties to keep
message.clearProperties();
for (int i = 0, length = retainedProperties.size(); i < length; i += 2) {
message.setObjectProperty(
retainedProperties.get(i).toString(),
retainedProperties.get(i + 1)
);
}
}
static void doFilterProperties(JMSProducer producer, Set<String> namesToClear,
ArrayList<Object> retainedProperties) {
for (String name : producer.getPropertyNames()) {
Object value = producer.getObjectProperty(name);
if (!namesToClear.contains(name) && value != null) {
retainedProperties.add(name);
retainedProperties.add(value);
}
}
// a producer doesn't need to mark things mutable via clearProperties
if (producer.getPropertyNames().size() == retainedProperties.size()) return;
// redo the properties to keep
producer.clearProperties();
for (int i = 0, length = retainedProperties.size(); i < length; i += 2) {
producer.setProperty(
retainedProperties.get(i).toString(),
retainedProperties.get(i + 1)
);
}
}
static final ThreadLocal<ArrayList<Object>> MESSAGE_PROPERTIES_BUFFER = new ThreadLocal<>();
/** Also use pair indexing for temporary message properties: (name, value). */
static ArrayList<Object> messagePropertiesBuffer() {
ArrayList<Object> messagePropertiesBuffer = MESSAGE_PROPERTIES_BUFFER.get();
if (messagePropertiesBuffer == null) {
messagePropertiesBuffer = new ArrayList<>();
MESSAGE_PROPERTIES_BUFFER.set(messagePropertiesBuffer);
}
return messagePropertiesBuffer;
}
}
| [
"[email protected]"
] | |
222f568bf0882b08919012b091c25e63a2ae5b62 | e03d1b484f6ff672ac4006decd1a45e9a52b78f5 | /src/application/Lexeme.java | 9718bd1fd666dc66571f3db499f81d425de1c07f | [] | no_license | markarenillo/LOLCODE-Interpreter | ba0a16a916234fb9b69a7cf10c65e72b1c825fb3 | c4cc2b671b0e2e0e47d4d18586eb631858efa14e | refs/heads/main | 2023-05-14T06:04:46.992586 | 2021-06-04T05:39:39 | 2021-06-04T05:39:39 | 373,732,077 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,067 | java | package application;
import java.util.ArrayList;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
//Lexeme contains list of lexemes and tokens to be used in Lexeme Table
public class Lexeme {
private static ObservableList<Word> lexemeList;
private static ArrayList<Word> tokenStream;
public Lexeme(){
lexemeList = FXCollections.observableArrayList();
tokenStream = new ArrayList<Word>();
}
//add word to list
void add(Word word) {
lexemeList.add(word);
}
//add word to token stream
void addToTokStr(Word word) {
tokenStream.add(word);
}
//return list
static ObservableList<Word> getList() {
return lexemeList;
}
//get tokenStream
ArrayList<Word> getTokens(){
return tokenStream;
}
//check if word is already added in the lexemelist
boolean checker(Word word) {
for (Word w : lexemeList) {
if(w.getValue1().equals(word.getValue1()) && w.getValue2().equals(word.getValue2())) {
return true;
}
}
return false;
}
} | [
"[email protected]"
] | |
a7ac6906191f7147755c006f181072511aea709e | 9633ae58c95c83abffa9b3b7b71c6ff737bf3f54 | /app/src/main/java/com/examples/coolweather/MainActivity.java | 1ec42fb108a56f3a77c3d530da7e08e08186e55e | [
"Apache-2.0"
] | permissive | douzujun/coolweather | b5786e930e73e947d4736a16f2c2e297fce064ef | 8d7a715491d6a5072ec477b1ef99fa1f7275891f | refs/heads/master | 2021-06-16T04:34:01.909359 | 2017-04-23T03:47:19 | 2017-04-23T03:47:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 337 | java | package com.examples.coolweather;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
| [
"[email protected]"
] | |
09553aa2b95914c727a0c4d938e70900513aac0c | 8ab902d3bdaaa70c33f47ea90c9ce190eae2a764 | /gmall-publisher/src/main/java/com/yang/gmall/service/ProductStatsService.java | 0dacb1510006b0a78c1288259142e8c8365262f1 | [] | no_license | phil-yang-lover/flink_project | 817bf7c238bf7894346edc5126319c7c7a373e10 | adc41093bdf485ecec3e73b1cb72b0d8b91deb8c | refs/heads/master | 2023-08-06T23:36:55.095076 | 2021-10-01T04:28:45 | 2021-10-01T04:28:45 | 412,324,999 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 481 | java | package com.yang.gmall.service;
import com.yang.gmall.beans.ProductStats;
import java.math.BigDecimal;
import java.util.List;
/**
* @Author: TODO philver-yang
* @Date: TODO 2021/5/3
* @Time: TODO 19:37
* @Description: TODO :
*/
public interface ProductStatsService {
public BigDecimal getGMV(Integer date);
List<ProductStats> getProductStatsByTrademark(Integer date,Integer limit);
List<ProductStats> getProductStatsByCategroy3(Integer date,Integer limit);
}
| [
"[email protected]"
] | |
77299471f09f0f5aa86f9d879abcfa2e1713b550 | 27cccf684f643478f5d63c6925edf643bd5f0aac | /TCC1/src/main/java/beans/IndexBeanUsuario.java | e58f3bddef530e6122b278470672f6b59d629025 | [] | no_license | graziilay/projetoHugo | 29264edf4373b3eaffc0c507e7d64c3f9bbda2cc | 1c1f70a0c42759502328e6afb77ffcba9a780a6c | refs/heads/master | 2020-03-27T21:57:01.420995 | 2018-09-03T11:49:36 | 2018-09-03T11:49:36 | 147,189,977 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,277 | java | package beans;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.inject.Inject;
import javax.inject.Named;
import entidades.Usuario;
import servicos.ServiceDacException;
import servicos.UsuarioServices;
@Named
@SessionScoped
public class IndexBeanUsuario {
@Inject
private UsuarioServices service;
private List<Usuario> usuarios;
private Usuario usuario;
public List<Usuario> getUsuarios() {
return usuarios;
}
public void setUsuarios(List<Usuario> usuarios) {
this.usuarios = usuarios;
}
public void setService(UsuarioServices service) {
this.service = service;
}
public Usuario getUsuario() {
return usuario;
}
public UsuarioServices getService() {
return service;
}
public void setUsuario(Usuario usuario) {
this.usuario = usuario;
}
public void adicionarUsu() throws ServiceDacException {
service.save(usuario);
usuarios = service.list();
usuario = new Usuario();
}
public void editarUsu() throws ServiceDacException {
service.update(usuario);
}
public void removerUsu() throws ServiceDacException {
service.delete(usuario);
}
public IndexBeanUsuario() {
usuario = new Usuario();
}
}
| [
"Aluno@DESKTOP-LDNVJ6K"
] | Aluno@DESKTOP-LDNVJ6K |
19b281e592376f24647b10330d7691353fcefc88 | 3aa123425ea71d88f5ff44213a4319c06ed79d08 | /custom-context/src/main/java/com/bandonleon/appcontext/context/CustomContext.java | b9f38e1b055c99ca0743d59a4a9bf6c2135e7a29 | [] | no_license | dombhuphaibool/AppContext | 56033ffb77e6599e50142b804e8ff27e51c93d33 | d42500c9e4494ce0675080ce148dac9140fa6d95 | refs/heads/master | 2021-01-01T05:20:54.402135 | 2016-05-30T19:19:21 | 2016-05-30T19:19:21 | 58,649,892 | 0 | 0 | null | 2016-05-30T19:19:22 | 2016-05-12T14:41:19 | Java | UTF-8 | Java | false | false | 12,832 | java | package com.bandonleon.appcontext.context;
import android.content.Context;
import android.content.ContextWrapper;
import android.os.Handler;
import android.support.annotation.MainThread;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
/**
* Created by dombhuphaibool on 5/10/16.
*/
@MainThread
public class CustomContext extends ContextWrapper implements ResourceCreationListener {
/**
* When calling waitForResources(), the caller must provide a ResourcesListener.
* When all requested resources are ready, onResourcesReady() will be invoked.
* If an error occurs, onResourcesError() will be invoked. The return value indicates
* whether the CustomContext should recover and ignore the error. It also gives the
* caller a chance to inquiry the state of the CustomContext before returning from
* onResroucesError().
*/
public interface ResourcesListener {
void onResourcesReady(@ResourceTypes int resources);
boolean onResourcesError(String error);
}
/**
* A description of managed resources. Clients should modify ResourceType and ResourceTypes
* annotations to include all candidates of managed resources. The description contains
* a method for creating the managed resource as well as indicating whether the creation
* should be done on the main thread or a worker thread.
*/
public interface ResourceDescription {
@ResourceType int getId();
boolean useMainThreadForCreation();
@NonNull Object create();
}
/**
* CustomContext core code
*/
private ExecutorService mTaskExecutor;
private Handler mMainHandler;
private Map<Integer, ContextResource> mResources;
private @ResourceTypes int mResourcesReady;
public CustomContext(Context baseContext) {
super(baseContext);
// TODO: Specify a ThreadFactory to customize the thread name
mTaskExecutor = Executors.newCachedThreadPool();
mMainHandler = new Handler(getMainLooper());
mResources = new HashMap<>();
mResourcesReady = 0;
}
/**
* addResource() - This method must be called to add all possible managed resources
*
* @param description - A resource description
*/
public void addResource(@NonNull ResourceDescription description) {
@ResourceType int id = description.getId();
if (!validateDescriptionId(id)) {
throw new IllegalStateException("ResourceDesctiption has invalid id. Id must contain only one bit set.");
} else if (mResources.containsKey(id)) {
throw new IllegalStateException("ResourceDescription with id: " + description.getId() + " already exists");
} else if (mResources.size() >= Integer.SIZE) {
throw new IllegalStateException("No more ResourceDescription can be added. Maximum capacity of " + Integer.SIZE + " has been reached.");
}
mResources.put(id, new ContextResource(description));
}
/**
* getResourceDescription()
*
* @param type
* @return The resource description of a given resource type
*/
public @NonNull ResourceDescription getResourceDescription(@ResourceType int type) {
return getContextResource(type).getDescription();
}
/**
* getResource()
*
* @param type
* @return The manage resource of a given resource type
*/
public @Nullable Object getResource(@ResourceType int type) {
return getContextResource(type).getResource();
}
/**
* waitForResources() - Waits for all the requested resources to be created. Calls back
* on the ResourcesListener interface.
*
* @param resources
* @param listener
*/
public void waitForResources(@ResourceTypes int resources, @NonNull ResourcesListener listener) {
waitForResources(resources, listener, false);
}
/**
* waitForResources() - Waits for all the requested resources to be created. Calls back
* on the ResourcesListener interface.
*
* @param resources
* @param listener
* @param throwOnError
*/
public void waitForResources(@ResourceTypes int resources, @NonNull ResourcesListener listener, boolean throwOnError) {
/*
* If all resources are ready, call listener.onResourcesReady() right away,
* otherwise call ensureResouresAreReady(). ensureResouresAreReady() will return the
* number of resources that needs to be created. If this number is equal to zero, it means
* that our bookkeping is off and there was some internal error. i.e., mResourcesReady flag
* doesn't properly match the state of resources that are ready.
*/
if ((mResourcesReady & resources) == resources) {
listener.onResourcesReady(resources);
} else if (ensureResouresAreReady(resources, listener) == 0) {
String errorStr = "Internal Error! mResourcesReady does not match the actual state of resources";
if (throwOnError) {
throw new RuntimeException(errorStr);
} else {
boolean recoverFromError = listener.onResourcesError(errorStr);
if (recoverFromError) {
mResourcesReady |= resources;
}
}
}
}
@Override
public void onResourceCreated(@ResourceType int type) {
mResourcesReady |= type;
}
/**
*
* @param id
* @return true if id has only one bit set, otherwise false
*/
private boolean validateDescriptionId(@ResourceType int id) {
int idAsInt = (int) id;
return (idAsInt > 0) && (idAsInt == (idAsInt & -idAsInt));
}
private @NonNull ContextResource getContextResource(@ResourceType int type) {
if (!mResources.containsKey(type)) {
throw new IllegalStateException("ResourceDescription with id: " + type + " does not exist. Did you forget to call addResource()?");
}
return mResources.get(type);
}
private int ensureResouresAreReady(@ResourceTypes final int resources, @NonNull final ResourcesListener listener) {
final List<ContextResource> resourcesToCreate = new ArrayList<>();
// TODO: We can probably use Java 8 streaming api to filter what we need here...
for (ContextResource contextResource : mResources.values()) {
@ResourceTypes int id = contextResource.getDescription().getId();
if ((resources & id) == id && contextResource.getResource() == null) {
resourcesToCreate.add(contextResource);
}
}
// List resourcesToCreate contains all resources that we need to create
int numResourcesToCreate = resourcesToCreate.size();
final CountDownLatch resourcesCreatedSignal = new CountDownLatch(numResourcesToCreate);
for (ContextResource contextResource : resourcesToCreate) {
contextResource.recreate(mMainHandler, mTaskExecutor, resourcesCreatedSignal, listener, this);
}
mTaskExecutor.submit(new Runnable() {
@Override
public void run() {
try {
resourcesCreatedSignal.await();
} catch (InterruptedException ex) {
// TODO: Do we need to do something else here?
listener.onResourcesError("Fatal error! InterruptedException caught while waiting for resources creation to finish");
}
// All the resources have been created, notify on the main thread
mMainHandler.post(new Runnable() {
@Override
public void run() {
listener.onResourcesReady(resources);
}
});
}
});
return numResourcesToCreate;
}
/**
*
* @param type
*/
public void recreateResourceOnMainThread(@ResourceType int type) {
if (!mResources.containsKey(type)) {
throw new IllegalStateException("ResourceDescription with id: " + type + " does not exist. Did you forget to call addResource()?");
}
mResources.get(type).recreateOnMainThread(this);
}
/**
*
*/
private static class ContextResource {
private final ResourceDescription mDescription;
private Object mResource;
private Future<Object> mCreationTask;
private List<CountDownLatch> mWaiters;
public ContextResource(@NonNull ResourceDescription desc) {
mDescription = desc;
mResource = null;
mCreationTask = null;
mWaiters = null;
}
private void recreateOnMainThread(@NonNull ResourceCreationListener listener) {
mResource = mDescription.create();
listener.onResourceCreated(mDescription.getId());
}
private void recreate(@NonNull final Handler mainHandler,
@NonNull ExecutorService taskExecutor,
@NonNull final CountDownLatch resourcesCreatedSignal,
@NonNull final ResourcesListener resourcesListener,
@NonNull final ResourceCreationListener creationListener) {
if (isCreationInProgress()) {
addWaiter(resourcesCreatedSignal);
return;
}
if (mDescription.useMainThreadForCreation()) {
recreateOnMainThread(creationListener);
resourcesCreatedSignal.countDown();
} else {
mResource = null;
mCreationTask = taskExecutor.submit(new Callable<Object>() {
@Override
public Object call() throws Exception {
Object resource = mDescription.create();
mainHandler.post(new Runnable() {
@Override
public void run() {
completeCreationFromWorkerThread(resourcesCreatedSignal, resourcesListener, creationListener);
}
});
return resource;
}
});
}
}
private @NonNull ResourceDescription getDescription() {
return mDescription;
}
private @Nullable Object getResource() {
return mResource;
}
private boolean isCreationInProgress() {
return mCreationTask != null;
}
private void addWaiter(@NonNull CountDownLatch waiter) {
if (mWaiters == null) {
mWaiters = new ArrayList<>();
}
mWaiters.add(waiter);
}
/**
* This method should only be called if the resource was created on the worker thread
*
* @param resourcesCreatedSignal
* @param resourcesListener
* @param creationListener
*/
private void completeCreationFromWorkerThread(
@NonNull CountDownLatch resourcesCreatedSignal,
@NonNull ResourcesListener resourcesListener,
@NonNull ResourceCreationListener creationListener) {
if (mCreationTask == null) {
throw new IllegalStateException("Cannot call completeCreationFromWorkerThread when there's no pending task");
}
try {
mResource = mCreationTask.get();
creationListener.onResourceCreated(mDescription.getId());
} catch (InterruptedException interruptedEx) {
resourcesListener.onResourcesError("Fatal Error! InterruptedException caught while trying to retrieve newly created resource");
} catch (ExecutionException executionEx) {
resourcesListener.onResourcesError("Fatal Error! ExecutionException caught while trying to retrieve newly created resource");
} finally {
mCreationTask = null;
if (mWaiters != null) {
for (CountDownLatch waiter : mWaiters) {
waiter.countDown();
}
mWaiters.clear();
mWaiters = null;
}
resourcesCreatedSignal.countDown();
}
}
}
}
| [
"[email protected]"
] | |
bf8bae542d19e8a763c4a522094ee95f4f57bdfd | 47be6c0f4859f2ee228f7ac0deddca488096bfe0 | /JeuDeGestioinDeRessourcesEtDOuvriers/src/buildings/data/LBatiment.java | 2152d1764cb88cbb84261b9da909f60d65960ebf | [] | no_license | istrk33/game | 4846bb1975b20ab93b0e7058271a8b07c8802d50 | 98e8d29e6d9d882c130be9e4823d2098d45253ef | refs/heads/master | 2023-02-10T18:17:21.454220 | 2021-01-02T19:29:24 | 2021-01-02T19:29:24 | 326,254,546 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,156 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package buildings.data;
import PlateauDeJeu.Cellule;
import javafx.scene.paint.Color;
import javafx.scene.canvas.Canvas;
/**
*
* @author isoyturk
*/
public class LBatiment extends Batiment {
private final String l = "l";
private final int lignesPourDessinerBatiments = 3;
private final int colonnesPourDessinerBatiments = 2;
private String[][] tableauCases = new String[colonnesPourDessinerBatiments][lignesPourDessinerBatiments];
/**
* constructeur d'un lblock
*
* @param nomBatiment
* @param nombreDeBatiment
* @param prix
* @param consoNRJ
* @param prodMatériaux
* @param prodNRJ
* @param action
* @param charBat
*/
public LBatiment(String nomBatiment, int nombreDeBatiment, int prix, int consoNRJ, int prodMatériaux, int prodNRJ, String action, String charBat) {
super(nomBatiment, nombreDeBatiment, prix, consoNRJ, prodMatériaux, prodNRJ, action, charBat);
batPos1 = new Case[colonnesPourDessinerBatiments][lignesPourDessinerBatiments];
batPos1[0][0] = new Case(0, 0, l, "hautgauche");
batPos1[0][1] = new Case(0, 1, l, "milieugauche");
batPos1[0][2] = new Case(0, 2, l, "basgauche");
batPos1[1][2] = new Case(1, 2, l, "basdroite");
batPos2 = new Case[lignesPourDessinerBatiments][colonnesPourDessinerBatiments];
batPos3 = new Case[colonnesPourDessinerBatiments][lignesPourDessinerBatiments];
batPos4 = new Case[lignesPourDessinerBatiments][colonnesPourDessinerBatiments];
tableauCases[0][0] = "l";
tableauCases[0][1] = "l";
tableauCases[0][2] = "l";
tableauCases[1][0] = "n";
tableauCases[1][1] = "n";
tableauCases[1][2] = "l";
directionBatiment = "UN";
batPosDefaut = batPos1;
}
/**
* récupérer le string du batiment
*
* @return
*/
public String getStrBatiment() {
return l;
}
/**
* dessiner le batiment dans la main
*
* @param deckJoueur
* @param posX
* @param posY
*/
public void dessinerBatiment(Canvas deckJoueur, int posX, int posY) {
for (int i = 0; i < colonnesPourDessinerBatiments; i++) {
for (int j = 0; j < lignesPourDessinerBatiments; j++) {
if ("l".equals(tableauCases[i][j])) {
Cellule c = new Cellule();
c.dessinerCelluleSansOuvrier(deckJoueur, posX + (c.recupTailleCote() + 1) * i, posY + (c.recupTailleCote() + 1) * j, Color.BLACK, Color.CRIMSON);
}
}
}
}
/**
* pivoter le batiment
*
* @return
*/
@Override
public Case[][] pivoterBatiment() {
switch (directionBatiment) {
case "UN":
if (batPos4[0][0].getX() + colonnesPourDessinerBatiments <= maxX && batPos4[0][0].getY() + lignesPourDessinerBatiments <= maxY) {
batPos1[0][0] = new Case(batPos4[0][0].getX(), batPos4[0][0].getY(), l, "hautgauche");
batPos1[0][1] = new Case(batPos4[0][0].getX(), batPos4[0][0].getY() + 1, l, "milieugauche");
batPos1[0][2] = new Case(batPos4[0][0].getX(), batPos4[0][0].getY() + 2, l, "basgauche");
batPos1[1][2] = new Case(batPos4[0][0].getX() + 1, batPos4[0][0].getY() + 2, l, "basdroite");
batPosDefaut = batPos1;
} else {
System.out.println("Sortie du tableau");
}
break;
case "DEUX":
if (batPos1[0][0].getX() + lignesPourDessinerBatiments <= maxX && batPos1[0][0].getY() + colonnesPourDessinerBatiments <= maxY) {
batPos2[2][0] = new Case(batPos1[0][0].getX() + 2, batPos1[0][0].getY(), l, "hautdroite");
batPos2[2][1] = new Case(batPos1[0][0].getX() + 2, batPos1[0][0].getY() + 1, l, "basdroite");
batPos2[1][1] = new Case(batPos1[0][0].getX() + 1, batPos1[0][0].getY() + 1, l, "basmilieu");
batPos2[0][1] = new Case(batPos1[0][0].getX(), batPos1[0][0].getY() + 1, l, "basgauche");
batPosDefaut = batPos2;
} else {
System.out.println("Sortie du tableau");
}
break;
case "TROIS":
if (batPos2[0][1].getX() + colonnesPourDessinerBatiments <= maxX && batPos2[2][0].getY() + lignesPourDessinerBatiments <= maxY) {
batPos3[0][0] = new Case(batPos2[0][1].getX(), batPos2[0][1].getY() - 1, l, "hautgauche");
batPos3[1][0] = new Case(batPos2[0][1].getX() + 1, batPos2[0][1].getY() - 1, l, "hautdroite");
batPos3[1][1] = new Case(batPos2[0][1].getX() + 1, batPos2[0][1].getY(), l, "milieudroite");
batPos3[1][2] = new Case(batPos2[0][1].getX() + 1, batPos2[0][1].getY() + 1, l, "basdroite");
batPosDefaut = batPos3;
} else {
System.out.println("Sortie du tableau");
}
break;
case "QUATRE":
if (batPos3[0][0].getX() + lignesPourDessinerBatiments <= maxX && batPos3[0][0].getY() + colonnesPourDessinerBatiments <= maxY) {
batPos4[0][0] = new Case(batPos3[0][0].getX(), batPos3[0][0].getY(), l, "hautgauche");
batPos4[0][1] = new Case(batPos3[0][0].getX(), batPos3[0][0].getY() + 1, l, "basgauche");
batPos4[1][0] = new Case(batPos3[0][0].getX() + 1, batPos3[0][0].getY(), l, "hautmilieu");
batPos4[2][0] = new Case(batPos3[0][0].getX() + 2, batPos3[0][0].getY(), l, "hautdroite");
batPosDefaut = batPos4;
} else {
System.out.println("Sortie du tableau");
}
break;
}
return batPosDefaut;
}
}
| [
"[email protected]"
] | |
8bc2ccdd9798ffd768cf91dbd28dc64268a41829 | 41012195cead3e03546d013975b9116f8fdb3e88 | /IBM Proactive Technology Online/AuthoringToolWebServer/src/Managers/ConsoleLogger.java | 25a279915362a340745cb83134ff50a26909ac80 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ishkin/Proton | 061dd9126ba930c469eaa4a4259590bda635c265 | a605af7a9803c78f193944dd931e066d9a9912ed | refs/heads/master | 2023-05-01T14:07:55.352742 | 2022-04-25T08:57:25 | 2022-04-25T08:57:25 | 18,063,698 | 24 | 27 | null | 2023-04-15T18:30:06 | 2014-03-24T13:38:17 | JavaScript | UTF-8 | Java | false | false | 942 | java | /*******************************************************************************
* Copyright 2014 IBM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package Managers;
import java.util.Date;
public class ConsoleLogger implements ILogger {
@Override
public void log(String log) {
System.out.println(new Date().toString() + " - " + log);
}
}
| [
"[email protected]"
] | |
f1521b36f12df8cd0bead2bd904d57226fdf545f | db532abf1c8af7ee55f7ddc1bdd32dfe044d15f3 | /yeowoori/WebContent/WEB-INF/jspwork/org/apache/jsp/WEB_002dINF/views/board/homeBoard_jsp.java | 11e61353d8d2287051a88f4aec6ee5596ca8f3c7 | [] | no_license | kwang-sub/team | d908191a9dd89d4d77d5094309e9de170145e2aa | 9ebb2280dae5e71f96b8a5db66ec586920f82bf4 | refs/heads/master | 2023-06-14T02:55:08.537573 | 2021-07-08T14:59:47 | 2021-07-08T14:59:47 | 380,100,375 | 0 | 0 | null | 2021-07-08T14:59:48 | 2021-06-25T02:15:12 | Java | UTF-8 | Java | false | false | 97,659 | java | /*
* Generated by the Jasper component of Apache Tomcat
* Version: Apache Tomcat/8.5.66
* Generated at: 2021-07-08 13:23:24 UTC
* Note: The last modified time of this file was set to
* the last modified time of the source file after
* generation to assist with modification tracking.
*/
package org.apache.jsp.WEB_002dINF.views.board;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
public final class homeBoard_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent,
org.apache.jasper.runtime.JspSourceImports {
private static org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_0;
private static org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_1;
static {
_jspx_fnmap_0= org.apache.jasper.runtime.ProtectedFunctionMapper.getMapForFunction("fn:length", org.apache.taglibs.standard.functions.Functions.class, "length", new Class[] {java.lang.Object.class});
_jspx_fnmap_1= org.apache.jasper.runtime.ProtectedFunctionMapper.getMapForFunction("fn:substring", org.apache.taglibs.standard.functions.Functions.class, "substring", new Class[] {java.lang.String.class, int.class, int.class});
}
private static final javax.servlet.jsp.JspFactory _jspxFactory =
javax.servlet.jsp.JspFactory.getDefaultFactory();
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
static {
_jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(3);
_jspx_dependants.put("/WEB-INF/lib/taglibs-standard-impl-1.2.5.jar", Long.valueOf(1623371898000L));
_jspx_dependants.put("jar:file:/Users/macbook/git/team/yeowoori/WebContent/WEB-INF/lib/taglibs-standard-impl-1.2.5.jar!/META-INF/fn.tld", Long.valueOf(1425946270000L));
_jspx_dependants.put("jar:file:/Users/macbook/git/team/yeowoori/WebContent/WEB-INF/lib/taglibs-standard-impl-1.2.5.jar!/META-INF/c.tld", Long.valueOf(1425946270000L));
}
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
static {
_jspx_imports_packages = new java.util.HashSet<>();
_jspx_imports_packages.add("javax.servlet");
_jspx_imports_packages.add("javax.servlet.http");
_jspx_imports_packages.add("javax.servlet.jsp");
_jspx_imports_classes = null;
}
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fscope_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fif_0026_005ftest;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody;
private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems;
private volatile javax.el.ExpressionFactory _el_expressionfactory;
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
return _jspx_dependants;
}
public java.util.Set<java.lang.String> getPackageImports() {
return _jspx_imports_packages;
}
public java.util.Set<java.lang.String> getClassImports() {
return _jspx_imports_classes;
}
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
if (_el_expressionfactory == null) {
synchronized (this) {
if (_el_expressionfactory == null) {
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
}
}
}
return _el_expressionfactory;
}
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
if (_jsp_instancemanager == null) {
synchronized (this) {
if (_jsp_instancemanager == null) {
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
}
}
}
return _jsp_instancemanager;
}
public void _jspInit() {
_005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fscope_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
}
public void _jspDestroy() {
_005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fscope_005fnobody.release();
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.release();
_005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody.release();
_005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.release();
}
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
throws java.io.IOException, javax.servlet.ServletException {
final java.lang.String _jspx_method = request.getMethod();
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET, POST or HEAD. Jasper also permits OPTIONS");
return;
}
final javax.servlet.jsp.PageContext pageContext;
javax.servlet.http.HttpSession session = null;
final javax.servlet.ServletContext application;
final javax.servlet.ServletConfig config;
javax.servlet.jsp.JspWriter out = null;
final java.lang.Object page = this;
javax.servlet.jsp.JspWriter _jspx_out = null;
javax.servlet.jsp.PageContext _jspx_page_context = null;
try {
response.setContentType("text/html; charset=UTF-8");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\n");
out.write("\n");
out.write(" \n");
out.write(" \n");
if (_jspx_meth_c_005fset_005f0(_jspx_page_context))
return;
out.write("\n");
out.write(" \n");
out.write("<!DOCTYPE html>\n");
out.write("<html lang=\"ko\">\n");
out.write("<head>\n");
out.write(" <meta charset=\"UTF-8\">\n");
out.write(" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n");
out.write(" <title>여기우리, 여행우리</title>\n");
out.write("</head>\n");
out.write("<body>\n");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "/WEB-INF/views/common/header.jsp", out, false);
out.write("\n");
out.write(" <style>\n");
out.write(" .bg-img{\n");
out.write(" position: absolute;\n");
out.write(" top: 0;\n");
out.write(" left: 0;\n");
out.write(" background-color: #777;\n");
out.write(" width: 70%;\n");
out.write(" height: 60%;\n");
out.write(" margin-top: 2rem;\n");
out.write(" margin-left: 15%;\n");
out.write(" background-position: center;\n");
out.write(" background-repeat: no-repeat;\n");
out.write(" background-size: cover;\n");
out.write(" }\n");
out.write(" /* Carousel base class */\n");
out.write(" .carousel {\n");
out.write(" margin-bottom: 4rem;\n");
out.write(" }\n");
out.write(" /* Since positioning the image, we need to help out the caption */\n");
out.write(" .carousel-caption {\n");
out.write(" bottom: 3rem;\n");
out.write(" z-index: 10;\n");
out.write(" }\n");
out.write(" /* Declare heights because of positioning of img element */\n");
out.write(" .carousel-item {\n");
out.write(" height: 32rem;\n");
out.write(" }\n");
out.write(" .carousel-item > img {\n");
out.write(" position: absolute;\n");
out.write(" top: 0;\n");
out.write(" left: 0;\n");
out.write(" min-width: 100%;\n");
out.write(" height: 32rem;\n");
out.write(" }\n");
out.write("\n");
out.write(" .carousel-control-next,\n");
out.write(" .carousel-control-prev {\n");
out.write(" filter: invert(40%);\n");
out.write(" }\n");
out.write("\n");
out.write(" .notice-bar{\n");
out.write(" background-color:#f8f8f8; \n");
out.write(" height: 30px;\n");
out.write(" margin-bottom: 10px;\n");
out.write(" }\n");
out.write(" .notice-content{\n");
out.write(" line-height: 2;\n");
out.write(" text-align: center;\n");
out.write(" white-space: no-wrap;\n");
out.write(" overflow : hidden;\n");
out.write(" height: 30px;\n");
out.write(" }\n");
out.write(" .notice-content > a{\n");
out.write(" color: black;\n");
out.write(" }\n");
out.write(" .main-board{\n");
out.write(" max-width: 100%;\n");
out.write(" margin-bottom: 10px;\n");
out.write(" }\n");
out.write(" .more{\n");
out.write(" width: 70px; height: 25px;\n");
out.write(" background-color: #eee;\n");
out.write(" border-radius: 5px;\n");
out.write(" line-height: 1.8;\n");
out.write(" text-align: center;\n");
out.write(" float: right;\n");
out.write(" color: grey;\n");
out.write(" font-size: 14px;\n");
out.write(" margin-right: 10px;\n");
out.write(" }\n");
out.write("\n");
out.write(" @media (min-width: 40em) {\n");
out.write(" .carousel-caption p {\n");
out.write(" margin-bottom: 1.25rem;\n");
out.write(" font-size: 1.25rem;\n");
out.write(" line-height: 1.4;\n");
out.write(" }\n");
out.write(" }\n");
out.write(" .overflow{\n");
out.write(" height: 120px;\n");
out.write(" white-space: no-wrap;\n");
out.write(" overflow : hidden;\n");
out.write(" \n");
out.write(" }\n");
out.write(" \n");
out.write(" </style>\n");
out.write(" \n");
out.write(" ");
if (_jspx_meth_c_005fif_005f0(_jspx_page_context))
return;
out.write("\n");
out.write(" \n");
out.write(" <div style=\"padding: 10px;\"></div>\n");
out.write(" <h6 style=\"padding-left: 8%; margin-bottom: 20px; display:inline-block;\">여행 인기 게시글</h6>\n");
out.write(" <a href=\"");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath }", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("/board/list?type=1");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${area}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("\" style=\"color:grey; float:right; margin-right:100px;\">여행 게시글 더보기</a>\n");
out.write("\n");
out.write(" <div id=\"myCarousel\" class=\"carousel slide\" data-ride=\"carousel\">\n");
out.write(" <ol class=\"carousel-indicators\">\n");
out.write(" <li data-target=\"#myCarousel\" data-slide-to=\"0\" class=\"active\"></li>\n");
out.write(" <li data-target=\"#myCarousel\" data-slide-to=\"1\"></li>\n");
out.write(" <li data-target=\"#myCarousel\" data-slide-to=\"2\"></li>\n");
out.write(" </ol>\n");
out.write(" <div class=\"carousel-inner\">\n");
out.write(" <div class=\"carousel-item active\">\n");
out.write(" <svg class=\"bd-placeholder-img\" width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\" : \" preserveAspectRatio=\"xMidYMid slice\" focusable=\"false\"><title> </title><rect width=\"100%\" height=\"100%\" fill=\"#f8f8f8\"/><text x=\"50%\" y=\"50%\" fill=\"#777\" dy=\".3em\"> </text></svg>\n");
out.write(" <div class=\"container\">\n");
out.write(" <a href=\"board/view?no=");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${boardList[0].boardNo}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("&cp=1&type=1");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${area}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("\">\n");
out.write(" <div class=\"bg-img\" style=\"background-image: url(");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write('/');
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${boardList[0].filePath[0]}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${boardList[0].fileName[0]}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write(");\"></div>\n");
out.write(" <div class=\"carousel-caption text-left overflow\">\n");
out.write(" <h3 style=\"color: black;\">");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${boardList[0].boardTitle }", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("</h3>\n");
out.write(" ");
if (_jspx_meth_c_005fset_005f2(_jspx_page_context))
return;
out.write("\n");
out.write(" <p style=\"color: black;\">\n");
out.write(" \n");
out.write(" ");
if (_jspx_meth_c_005fif_005f1(_jspx_page_context))
return;
out.write("\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f2(_jspx_page_context))
return;
out.write("\n");
out.write(" \n");
out.write(" </p>\n");
out.write(" </div>\n");
out.write(" </a>\n");
out.write(" </div>\n");
out.write(" </div>\n");
out.write(" <div class=\"carousel-item\">\n");
out.write(" <svg class=\"bd-placeholder-img\" width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\" : \" preserveAspectRatio=\"xMidYMid slice\" focusable=\"false\"><title> </title><rect width=\"100%\" height=\"100%\" fill=\"#f8f8f8\"/><text x=\"50%\" y=\"50%\" fill=\"#777\" dy=\".3em\"> </text></svg>\n");
out.write(" \n");
out.write(" <div class=\"container\">\n");
out.write(" <a href=\"board/view?no=");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${boardList[1].boardNo}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("&cp=1&type=1");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${area}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("\">\n");
out.write(" <div class=\"bg-img\" style=\"background-image: url(");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write('/');
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${boardList[1].filePath[0]}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${boardList[1].fileName[0]}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write(");\"></div>\n");
out.write(" <div class=\"carousel-caption text-left overflow\">\n");
out.write(" <h3 style=\"color: black;\">");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${boardList[1].boardTitle }", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("</h3>\n");
out.write(" ");
if (_jspx_meth_c_005fset_005f3(_jspx_page_context))
return;
out.write("\n");
out.write(" <p style=\"color: black;\">\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f3(_jspx_page_context))
return;
out.write("\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f4(_jspx_page_context))
return;
out.write("\n");
out.write(" </p>\n");
out.write(" </div>\n");
out.write(" </a>\n");
out.write(" </div>\n");
out.write(" </div>\n");
out.write(" <div class=\"carousel-item\">\n");
out.write(" <svg class=\"bd-placeholder-img\" width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\" : \" preserveAspectRatio=\"xMidYMid slice\" focusable=\"false\"><title> </title><rect width=\"100%\" height=\"100%\" fill=\"#f8f8f8\"/><text x=\"50%\" y=\"50%\" fill=\"#777\" dy=\".3em\"> </text></svg>\n");
out.write(" \n");
out.write(" <div class=\"container\">\n");
out.write(" <a href=\"board/view?no=");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${boardList[2].boardNo}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("&cp=1&type=1");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${area}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("\">\n");
out.write(" <div class=\"bg-img\" style=\"background-image: url(");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write('/');
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${boardList[2].filePath[0]}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${boardList[2].fileName[0]}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write(");\"></div>\n");
out.write(" <div class=\"carousel-caption text-left overflow\">\n");
out.write(" <h3 style=\"color: black;\">");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${boardList[2].boardTitle }", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("</h3>\n");
out.write(" ");
if (_jspx_meth_c_005fset_005f4(_jspx_page_context))
return;
out.write("\n");
out.write(" <p style=\"color: black;\">\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f5(_jspx_page_context))
return;
out.write("\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f6(_jspx_page_context))
return;
out.write("\n");
out.write(" </p>\n");
out.write(" </div>\n");
out.write(" </a>\n");
out.write(" </div>\n");
out.write(" </div>\n");
out.write(" <a class=\"carousel-control-prev\" href=\"#myCarousel\" role=\"button\" data-slide=\"prev\">\n");
out.write(" <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n");
out.write(" <span class=\"sr-only\">Previous</span>\n");
out.write(" </a>\n");
out.write(" <a class=\"carousel-control-next\" href=\"#myCarousel\" role=\"button\" data-slide=\"next\">\n");
out.write(" <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n");
out.write(" <span class=\"sr-only\">Next</span>\n");
out.write(" </a>\n");
out.write(" </div>\n");
out.write(" </div>\n");
out.write("\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f7(_jspx_page_context))
return;
out.write("\n");
out.write("\n");
out.write(" \n");
out.write(" <div style=\"padding: 30px;\"></div>\n");
out.write(" <div class=\"container\">\n");
out.write(" <div class=\"row\">\n");
out.write(" <div class=\"col-sm\">\n");
out.write(" <div class=\"main-board\">\n");
out.write(" <h6 style=\"margin-left:10px; margin-bottom: 10px; display: inline-block;\">질문</h6>\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f10(_jspx_page_context))
return;
out.write("\n");
out.write(" </div>\n");
out.write(" <ul class=\"list-group\">\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f11(_jspx_page_context))
return;
out.write("\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f14(_jspx_page_context))
return;
out.write("\n");
out.write(" </ul>\n");
out.write(" </div>\n");
out.write(" <div style=\"padding : 20px;\"></div>\n");
out.write(" <div class=\"col-sm\">\n");
out.write(" <div class=\"main-board\">\n");
out.write(" <h6 style=\"margin-left:10px; margin-bottom: 10px; display: inline-block;\">같이 떠나요</h6>\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f15(_jspx_page_context))
return;
out.write("\n");
out.write(" </div>\n");
out.write(" <ul class=\"list-group\">\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f16(_jspx_page_context))
return;
out.write("\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f19(_jspx_page_context))
return;
out.write("\n");
out.write(" </ul>\n");
out.write(" </div>\n");
out.write(" </div>\n");
out.write(" </div>\n");
out.write(" <div style=\"padding:40px;\"></div>\n");
out.write("\n");
out.write(" \n");
out.write(" \n");
out.write(" \n");
out.write(" ");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "/WEB-INF/views/common/footer.jsp", out, false);
out.write("\n");
out.write("</body>\n");
out.write("</html>\n");
out.write(" \n");
out.write(" \n");
} catch (java.lang.Throwable t) {
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
try {
if (response.isCommitted()) {
out.flush();
} else {
out.clearBuffer();
}
} catch (java.io.IOException e) {}
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
else throw new ServletException(t);
}
} finally {
_jspxFactory.releasePageContext(_jspx_page_context);
}
}
private boolean _jspx_meth_c_005fset_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:set
org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_005fset_005f0 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fscope_005fnobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class);
boolean _jspx_th_c_005fset_005f0_reused = false;
try {
_jspx_th_c_005fset_005f0.setPageContext(_jspx_page_context);
_jspx_th_c_005fset_005f0.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(6,0) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fset_005f0.setVar("contextPath");
// /WEB-INF/views/board/homeBoard.jsp(6,0) name = scope type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fset_005f0.setScope("application");
// /WEB-INF/views/board/homeBoard.jsp(6,0) name = value type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null
_jspx_th_c_005fset_005f0.setValue(new org.apache.jasper.el.JspValueExpression("/WEB-INF/views/board/homeBoard.jsp(6,0) '${pageContext.servletContext.contextPath }'",_jsp_getExpressionFactory().createValueExpression(_jspx_page_context.getELContext(),"${pageContext.servletContext.contextPath }",java.lang.Object.class)).getValue(_jspx_page_context.getELContext()));
int _jspx_eval_c_005fset_005f0 = _jspx_th_c_005fset_005f0.doStartTag();
if (_jspx_th_c_005fset_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fscope_005fnobody.reuse(_jspx_th_c_005fset_005f0);
_jspx_th_c_005fset_005f0_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fset_005f0, _jsp_getInstanceManager(), _jspx_th_c_005fset_005f0_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f0_reused = false;
try {
_jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f0.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(105,4) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f0.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${!empty param.area }", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null)).booleanValue());
int _jspx_eval_c_005fif_005f0 = _jspx_th_c_005fif_005f0.doStartTag();
if (_jspx_eval_c_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write('\n');
out.write(' ');
if (_jspx_meth_c_005fset_005f1(_jspx_th_c_005fif_005f0, _jspx_page_context))
return true;
out.write(" \n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f0.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
_jspx_th_c_005fif_005f0_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f0, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f0_reused);
}
return false;
}
private boolean _jspx_meth_c_005fset_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fif_005f0, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:set
org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_005fset_005f1 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class);
boolean _jspx_th_c_005fset_005f1_reused = false;
try {
_jspx_th_c_005fset_005f1.setPageContext(_jspx_page_context);
_jspx_th_c_005fset_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f0);
// /WEB-INF/views/board/homeBoard.jsp(106,1) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fset_005f1.setVar("area");
// /WEB-INF/views/board/homeBoard.jsp(106,1) name = value type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null
_jspx_th_c_005fset_005f1.setValue(new org.apache.jasper.el.JspValueExpression("/WEB-INF/views/board/homeBoard.jsp(106,1) '&area=${param.area}'",_jsp_getExpressionFactory().createValueExpression(_jspx_page_context.getELContext(),"&area=${param.area}",java.lang.Object.class)).getValue(_jspx_page_context.getELContext()));
int _jspx_eval_c_005fset_005f1 = _jspx_th_c_005fset_005f1.doStartTag();
if (_jspx_th_c_005fset_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody.reuse(_jspx_th_c_005fset_005f1);
_jspx_th_c_005fset_005f1_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fset_005f1, _jsp_getInstanceManager(), _jspx_th_c_005fset_005f1_reused);
}
return false;
}
private boolean _jspx_meth_c_005fset_005f2(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:set
org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_005fset_005f2 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class);
boolean _jspx_th_c_005fset_005f2_reused = false;
try {
_jspx_th_c_005fset_005f2.setPageContext(_jspx_page_context);
_jspx_th_c_005fset_005f2.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(127,21) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fset_005f2.setVar("boardContent");
// /WEB-INF/views/board/homeBoard.jsp(127,21) name = value type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null
_jspx_th_c_005fset_005f2.setValue(new org.apache.jasper.el.JspValueExpression("/WEB-INF/views/board/homeBoard.jsp(127,21) '${boardList[0].boardContent }'",_jsp_getExpressionFactory().createValueExpression(_jspx_page_context.getELContext(),"${boardList[0].boardContent }",java.lang.Object.class)).getValue(_jspx_page_context.getELContext()));
int _jspx_eval_c_005fset_005f2 = _jspx_th_c_005fset_005f2.doStartTag();
if (_jspx_th_c_005fset_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody.reuse(_jspx_th_c_005fset_005f2);
_jspx_th_c_005fset_005f2_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fset_005f2, _jsp_getInstanceManager(), _jspx_th_c_005fset_005f2_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f1(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f1 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f1_reused = false;
try {
_jspx_th_c_005fif_005f1.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f1.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(130,21) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f1.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:length(boardContent) < 101 }", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_0)).booleanValue());
int _jspx_eval_c_005fif_005f1 = _jspx_th_c_005fif_005f1.doStartTag();
if (_jspx_eval_c_005fif_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" ");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${boardContent}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f1.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1);
_jspx_th_c_005fif_005f1_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f1, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f1_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f2(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f2 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f2_reused = false;
try {
_jspx_th_c_005fif_005f2.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f2.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(133,21) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f2.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:length(boardContent) > 100}", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_0)).booleanValue());
int _jspx_eval_c_005fif_005f2 = _jspx_th_c_005fif_005f2.doStartTag();
if (_jspx_eval_c_005fif_005f2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" ");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:substring(boardContent,0,100) }", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_1));
out.write("...\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f2.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f2);
_jspx_th_c_005fif_005f2_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f2, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f2_reused);
}
return false;
}
private boolean _jspx_meth_c_005fset_005f3(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:set
org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_005fset_005f3 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class);
boolean _jspx_th_c_005fset_005f3_reused = false;
try {
_jspx_th_c_005fset_005f3.setPageContext(_jspx_page_context);
_jspx_th_c_005fset_005f3.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(150,20) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fset_005f3.setVar("boardContent");
// /WEB-INF/views/board/homeBoard.jsp(150,20) name = value type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null
_jspx_th_c_005fset_005f3.setValue(new org.apache.jasper.el.JspValueExpression("/WEB-INF/views/board/homeBoard.jsp(150,20) '${boardList[1].boardContent }'",_jsp_getExpressionFactory().createValueExpression(_jspx_page_context.getELContext(),"${boardList[1].boardContent }",java.lang.Object.class)).getValue(_jspx_page_context.getELContext()));
int _jspx_eval_c_005fset_005f3 = _jspx_th_c_005fset_005f3.doStartTag();
if (_jspx_th_c_005fset_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody.reuse(_jspx_th_c_005fset_005f3);
_jspx_th_c_005fset_005f3_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fset_005f3, _jsp_getInstanceManager(), _jspx_th_c_005fset_005f3_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f3(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f3 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f3_reused = false;
try {
_jspx_th_c_005fif_005f3.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f3.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(152,20) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f3.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:length(boardContent) < 101 }", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_0)).booleanValue());
int _jspx_eval_c_005fif_005f3 = _jspx_th_c_005fif_005f3.doStartTag();
if (_jspx_eval_c_005fif_005f3 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" ");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${boardContent}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f3.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f3);
_jspx_th_c_005fif_005f3_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f3, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f3_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f4(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f4 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f4_reused = false;
try {
_jspx_th_c_005fif_005f4.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f4.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(155,20) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f4.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:length(boardContent) > 100}", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_0)).booleanValue());
int _jspx_eval_c_005fif_005f4 = _jspx_th_c_005fif_005f4.doStartTag();
if (_jspx_eval_c_005fif_005f4 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" ");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:substring(boardContent,0,100) }", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_1));
out.write("...\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f4.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f4);
_jspx_th_c_005fif_005f4_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f4, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f4_reused);
}
return false;
}
private boolean _jspx_meth_c_005fset_005f4(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:set
org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_005fset_005f4 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class);
boolean _jspx_th_c_005fset_005f4_reused = false;
try {
_jspx_th_c_005fset_005f4.setPageContext(_jspx_page_context);
_jspx_th_c_005fset_005f4.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(171,20) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fset_005f4.setVar("boardContent");
// /WEB-INF/views/board/homeBoard.jsp(171,20) name = value type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null
_jspx_th_c_005fset_005f4.setValue(new org.apache.jasper.el.JspValueExpression("/WEB-INF/views/board/homeBoard.jsp(171,20) '${boardList[2].boardContent }'",_jsp_getExpressionFactory().createValueExpression(_jspx_page_context.getELContext(),"${boardList[2].boardContent }",java.lang.Object.class)).getValue(_jspx_page_context.getELContext()));
int _jspx_eval_c_005fset_005f4 = _jspx_th_c_005fset_005f4.doStartTag();
if (_jspx_th_c_005fset_005f4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody.reuse(_jspx_th_c_005fset_005f4);
_jspx_th_c_005fset_005f4_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fset_005f4, _jsp_getInstanceManager(), _jspx_th_c_005fset_005f4_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f5(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f5 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f5_reused = false;
try {
_jspx_th_c_005fif_005f5.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f5.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(173,20) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f5.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:length(boardContent) < 101 }", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_0)).booleanValue());
int _jspx_eval_c_005fif_005f5 = _jspx_th_c_005fif_005f5.doStartTag();
if (_jspx_eval_c_005fif_005f5 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" ");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${boardContent}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f5.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f5.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f5);
_jspx_th_c_005fif_005f5_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f5, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f5_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f6(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f6 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f6_reused = false;
try {
_jspx_th_c_005fif_005f6.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f6.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(176,20) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f6.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:length(boardContent) > 100}", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_0)).booleanValue());
int _jspx_eval_c_005fif_005f6 = _jspx_th_c_005fif_005f6.doStartTag();
if (_jspx_eval_c_005fif_005f6 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" ");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:substring(boardContent,0,100) }", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_1));
out.write("...\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f6.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f6.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f6);
_jspx_th_c_005fif_005f6_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f6, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f6_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f7(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f7 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f7_reused = false;
try {
_jspx_th_c_005fif_005f7.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f7.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(195,1) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f7.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${!empty noticeList }", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null)).booleanValue());
int _jspx_eval_c_005fif_005f7 = _jspx_th_c_005fif_005f7.doStartTag();
if (_jspx_eval_c_005fif_005f7 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write('\n');
out.write(' ');
if (_jspx_meth_c_005fforEach_005f0(_jspx_th_c_005fif_005f7, _jspx_page_context))
return true;
out.write('\n');
out.write(' ');
int evalDoAfterBody = _jspx_th_c_005fif_005f7.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f7.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f7);
_jspx_th_c_005fif_005f7_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f7, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f7_reused);
}
return false;
}
private boolean _jspx_meth_c_005fforEach_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fif_005f7, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:forEach
org.apache.taglibs.standard.tag.rt.core.ForEachTag _jspx_th_c_005fforEach_005f0 = (org.apache.taglibs.standard.tag.rt.core.ForEachTag) _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.get(org.apache.taglibs.standard.tag.rt.core.ForEachTag.class);
boolean _jspx_th_c_005fforEach_005f0_reused = false;
try {
_jspx_th_c_005fforEach_005f0.setPageContext(_jspx_page_context);
_jspx_th_c_005fforEach_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f7);
// /WEB-INF/views/board/homeBoard.jsp(196,1) name = items type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null
_jspx_th_c_005fforEach_005f0.setItems(new org.apache.jasper.el.JspValueExpression("/WEB-INF/views/board/homeBoard.jsp(196,1) '${noticeList}'",_jsp_getExpressionFactory().createValueExpression(_jspx_page_context.getELContext(),"${noticeList}",java.lang.Object.class)).getValue(_jspx_page_context.getELContext()));
// /WEB-INF/views/board/homeBoard.jsp(196,1) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fforEach_005f0.setVar("notice");
int[] _jspx_push_body_count_c_005fforEach_005f0 = new int[] { 0 };
try {
int _jspx_eval_c_005fforEach_005f0 = _jspx_th_c_005fforEach_005f0.doStartTag();
if (_jspx_eval_c_005fforEach_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" <div class=\"notice-bar\">\n");
out.write(" <div class=\"notice-content\">\n");
out.write(" <a href=\"");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("/board/list4?type=4\">\n");
out.write(" <img src=\"");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath }", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("/resources/img/megaphone.png\" style=\"width:20px\">\n");
out.write(" <span style=\"padding-left: 10px;\">\n");
out.write(" <b>");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${notice.noticeTitle}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("</b> \n");
out.write(" ");
if (_jspx_meth_c_005fif_005f8(_jspx_th_c_005fforEach_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f9(_jspx_th_c_005fforEach_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0))
return true;
out.write("\n");
out.write(" </span>\n");
out.write(" </a>\n");
out.write(" </div>\n");
out.write(" </div>\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fforEach_005f0.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fforEach_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
} catch (java.lang.Throwable _jspx_exception) {
while (_jspx_push_body_count_c_005fforEach_005f0[0]-- > 0)
out = _jspx_page_context.popBody();
_jspx_th_c_005fforEach_005f0.doCatch(_jspx_exception);
} finally {
_jspx_th_c_005fforEach_005f0.doFinally();
}
_005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.reuse(_jspx_th_c_005fforEach_005f0);
_jspx_th_c_005fforEach_005f0_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fforEach_005f0, _jsp_getInstanceManager(), _jspx_th_c_005fforEach_005f0_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f8(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f0, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f8 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f8_reused = false;
try {
_jspx_th_c_005fif_005f8.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f8.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f0);
// /WEB-INF/views/board/homeBoard.jsp(203,6) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f8.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:length(notice.noticeContent) > 20}", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_0)).booleanValue());
int _jspx_eval_c_005fif_005f8 = _jspx_th_c_005fif_005f8.doStartTag();
if (_jspx_eval_c_005fif_005f8 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" ");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:substring(notice.noticeContent,0,20) }", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_1));
out.write("...\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f8.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f8.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f8);
_jspx_th_c_005fif_005f8_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f8, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f8_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f9(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f0, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f9 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f9_reused = false;
try {
_jspx_th_c_005fif_005f9.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f9.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f0);
// /WEB-INF/views/board/homeBoard.jsp(206,6) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f9.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:length(notice.noticeContent) < 21}", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_0)).booleanValue());
int _jspx_eval_c_005fif_005f9 = _jspx_th_c_005fif_005f9.doStartTag();
if (_jspx_eval_c_005fif_005f9 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" ");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${notice.noticeContent}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f9.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f9.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f9);
_jspx_th_c_005fif_005f9_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f9, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f9_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f10(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f10 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f10_reused = false;
try {
_jspx_th_c_005fif_005f10.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f10.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(223,25) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f10.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${!empty qBoardList }", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null)).booleanValue());
int _jspx_eval_c_005fif_005f10 = _jspx_th_c_005fif_005f10.doStartTag();
if (_jspx_eval_c_005fif_005f10 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" <a class=\"more\" href=\"");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("/board/list2?type=2");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${area}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("\">더보기</a>\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f10.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f10.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f10);
_jspx_th_c_005fif_005f10_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f10, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f10_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f11(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f11 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f11_reused = false;
try {
_jspx_th_c_005fif_005f11.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f11.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(228,20) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f11.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${!empty qBoardList }", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null)).booleanValue());
int _jspx_eval_c_005fif_005f11 = _jspx_th_c_005fif_005f11.doStartTag();
if (_jspx_eval_c_005fif_005f11 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" ");
if (_jspx_meth_c_005fforEach_005f1(_jspx_th_c_005fif_005f11, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f11.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f11.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f11);
_jspx_th_c_005fif_005f11_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f11, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f11_reused);
}
return false;
}
private boolean _jspx_meth_c_005fforEach_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fif_005f11, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:forEach
org.apache.taglibs.standard.tag.rt.core.ForEachTag _jspx_th_c_005fforEach_005f1 = (org.apache.taglibs.standard.tag.rt.core.ForEachTag) _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.get(org.apache.taglibs.standard.tag.rt.core.ForEachTag.class);
boolean _jspx_th_c_005fforEach_005f1_reused = false;
try {
_jspx_th_c_005fforEach_005f1.setPageContext(_jspx_page_context);
_jspx_th_c_005fforEach_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f11);
// /WEB-INF/views/board/homeBoard.jsp(229,24) name = items type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null
_jspx_th_c_005fforEach_005f1.setItems(new org.apache.jasper.el.JspValueExpression("/WEB-INF/views/board/homeBoard.jsp(229,24) '#{qBoardList}'",_jsp_getExpressionFactory().createValueExpression(_jspx_page_context.getELContext(),"#{qBoardList}",java.lang.Object.class)));
// /WEB-INF/views/board/homeBoard.jsp(229,24) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fforEach_005f1.setVar("qboard");
int[] _jspx_push_body_count_c_005fforEach_005f1 = new int[] { 0 };
try {
int _jspx_eval_c_005fforEach_005f1 = _jspx_th_c_005fforEach_005f1.doStartTag();
if (_jspx_eval_c_005fforEach_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" \n");
out.write(" <li class=\"list-group-item\"><a href=\"board/view?no=");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${qboard.boardNo}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("&cp=1&type=2");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${area}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("\">\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f12(_jspx_th_c_005fforEach_005f1, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f1))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f13(_jspx_th_c_005fforEach_005f1, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f1))
return true;
out.write("\n");
out.write(" </a></li>\n");
out.write(" \n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fforEach_005f1.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fforEach_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
} catch (java.lang.Throwable _jspx_exception) {
while (_jspx_push_body_count_c_005fforEach_005f1[0]-- > 0)
out = _jspx_page_context.popBody();
_jspx_th_c_005fforEach_005f1.doCatch(_jspx_exception);
} finally {
_jspx_th_c_005fforEach_005f1.doFinally();
}
_005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.reuse(_jspx_th_c_005fforEach_005f1);
_jspx_th_c_005fforEach_005f1_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fforEach_005f1, _jsp_getInstanceManager(), _jspx_th_c_005fforEach_005f1_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f12(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f1, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f1)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f12 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f12_reused = false;
try {
_jspx_th_c_005fif_005f12.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f12.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f1);
// /WEB-INF/views/board/homeBoard.jsp(232,21) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f12.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:length(qboard.boardTitle) <21 }", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_0)).booleanValue());
int _jspx_eval_c_005fif_005f12 = _jspx_th_c_005fif_005f12.doStartTag();
if (_jspx_eval_c_005fif_005f12 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" ");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${qboard.boardTitle}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f12.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f12.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f12);
_jspx_th_c_005fif_005f12_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f12, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f12_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f13(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f1, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f1)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f13 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f13_reused = false;
try {
_jspx_th_c_005fif_005f13.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f13.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f1);
// /WEB-INF/views/board/homeBoard.jsp(235,21) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f13.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:length(qboard.boardTitle) > 20}", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_0)).booleanValue());
int _jspx_eval_c_005fif_005f13 = _jspx_th_c_005fif_005f13.doStartTag();
if (_jspx_eval_c_005fif_005f13 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" ");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:substring(qboard.boardTitle,0,20) }", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_1));
out.write("...\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f13.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f13.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f13);
_jspx_th_c_005fif_005f13_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f13, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f13_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f14(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f14 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f14_reused = false;
try {
_jspx_th_c_005fif_005f14.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f14.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(242,20) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f14.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${empty qBoardList }", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null)).booleanValue());
int _jspx_eval_c_005fif_005f14 = _jspx_th_c_005fif_005f14.doStartTag();
if (_jspx_eval_c_005fif_005f14 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" <li class=\"list-group-item\">등록된 게시글이 없습니다.</li>\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f14.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f14.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f14);
_jspx_th_c_005fif_005f14_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f14, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f14_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f15(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f15 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f15_reused = false;
try {
_jspx_th_c_005fif_005f15.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f15.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(251,25) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f15.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${!empty withBoardList }", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null)).booleanValue());
int _jspx_eval_c_005fif_005f15 = _jspx_th_c_005fif_005f15.doStartTag();
if (_jspx_eval_c_005fif_005f15 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" <a class=\"more\" href=\"");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("/board/list3?type=3");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${area}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("\">더보기</a> \n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f15.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f15.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f15);
_jspx_th_c_005fif_005f15_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f15, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f15_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f16(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f16 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f16_reused = false;
try {
_jspx_th_c_005fif_005f16.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f16.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(256,20) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f16.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${!empty withBoardList }", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null)).booleanValue());
int _jspx_eval_c_005fif_005f16 = _jspx_th_c_005fif_005f16.doStartTag();
if (_jspx_eval_c_005fif_005f16 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" ");
if (_jspx_meth_c_005fforEach_005f2(_jspx_th_c_005fif_005f16, _jspx_page_context))
return true;
out.write("\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f16.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f16.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f16);
_jspx_th_c_005fif_005f16_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f16, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f16_reused);
}
return false;
}
private boolean _jspx_meth_c_005fforEach_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fif_005f16, javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:forEach
org.apache.taglibs.standard.tag.rt.core.ForEachTag _jspx_th_c_005fforEach_005f2 = (org.apache.taglibs.standard.tag.rt.core.ForEachTag) _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.get(org.apache.taglibs.standard.tag.rt.core.ForEachTag.class);
boolean _jspx_th_c_005fforEach_005f2_reused = false;
try {
_jspx_th_c_005fforEach_005f2.setPageContext(_jspx_page_context);
_jspx_th_c_005fforEach_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f16);
// /WEB-INF/views/board/homeBoard.jsp(257,24) name = items type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null
_jspx_th_c_005fforEach_005f2.setItems(new org.apache.jasper.el.JspValueExpression("/WEB-INF/views/board/homeBoard.jsp(257,24) '#{withBoardList}'",_jsp_getExpressionFactory().createValueExpression(_jspx_page_context.getELContext(),"#{withBoardList}",java.lang.Object.class)));
// /WEB-INF/views/board/homeBoard.jsp(257,24) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fforEach_005f2.setVar("withBoard");
int[] _jspx_push_body_count_c_005fforEach_005f2 = new int[] { 0 };
try {
int _jspx_eval_c_005fforEach_005f2 = _jspx_th_c_005fforEach_005f2.doStartTag();
if (_jspx_eval_c_005fforEach_005f2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" \n");
out.write(" <li class=\"list-group-item\"><a href=\"board/view?no=");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${withBoard.boardNo}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("&cp=1&type=3");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${area}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("\">\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f17(_jspx_th_c_005fforEach_005f2, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f2))
return true;
out.write("\n");
out.write(" ");
if (_jspx_meth_c_005fif_005f18(_jspx_th_c_005fforEach_005f2, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f2))
return true;
out.write("\n");
out.write(" </a></li>\n");
out.write(" \n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fforEach_005f2.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fforEach_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
} catch (java.lang.Throwable _jspx_exception) {
while (_jspx_push_body_count_c_005fforEach_005f2[0]-- > 0)
out = _jspx_page_context.popBody();
_jspx_th_c_005fforEach_005f2.doCatch(_jspx_exception);
} finally {
_jspx_th_c_005fforEach_005f2.doFinally();
}
_005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.reuse(_jspx_th_c_005fforEach_005f2);
_jspx_th_c_005fforEach_005f2_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fforEach_005f2, _jsp_getInstanceManager(), _jspx_th_c_005fforEach_005f2_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f17(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f2, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f2)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f17 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f17_reused = false;
try {
_jspx_th_c_005fif_005f17.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f17.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f2);
// /WEB-INF/views/board/homeBoard.jsp(260,6) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f17.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:length(withBoard.boardTitle) <21 }", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_0)).booleanValue());
int _jspx_eval_c_005fif_005f17 = _jspx_th_c_005fif_005f17.doStartTag();
if (_jspx_eval_c_005fif_005f17 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" ");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${withBoard.boardTitle}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
out.write("\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f17.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f17.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f17);
_jspx_th_c_005fif_005f17_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f17, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f17_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f18(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f2, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f2)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f18 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f18_reused = false;
try {
_jspx_th_c_005fif_005f18.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f18.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f2);
// /WEB-INF/views/board/homeBoard.jsp(263,21) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f18.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:length(withBoard.boardTitle) > 20}", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_0)).booleanValue());
int _jspx_eval_c_005fif_005f18 = _jspx_th_c_005fif_005f18.doStartTag();
if (_jspx_eval_c_005fif_005f18 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" ");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:substring(withBoard.boardTitle,0,20) }", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_1));
out.write("...\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f18.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f18.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f18);
_jspx_th_c_005fif_005f18_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f18, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f18_reused);
}
return false;
}
private boolean _jspx_meth_c_005fif_005f19(javax.servlet.jsp.PageContext _jspx_page_context)
throws java.lang.Throwable {
javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
// c:if
org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f19 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
boolean _jspx_th_c_005fif_005f19_reused = false;
try {
_jspx_th_c_005fif_005f19.setPageContext(_jspx_page_context);
_jspx_th_c_005fif_005f19.setParent(null);
// /WEB-INF/views/board/homeBoard.jsp(270,20) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
_jspx_th_c_005fif_005f19.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${empty withBoardList }", boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null)).booleanValue());
int _jspx_eval_c_005fif_005f19 = _jspx_th_c_005fif_005f19.doStartTag();
if (_jspx_eval_c_005fif_005f19 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
out.write("\n");
out.write(" <li class=\"list-group-item\">등록된 게시글이 없습니다.</li>\n");
out.write(" ");
int evalDoAfterBody = _jspx_th_c_005fif_005f19.doAfterBody();
if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
break;
} while (true);
}
if (_jspx_th_c_005fif_005f19.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
return true;
}
_005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f19);
_jspx_th_c_005fif_005f19_reused = true;
} finally {
org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fif_005f19, _jsp_getInstanceManager(), _jspx_th_c_005fif_005f19_reused);
}
return false;
}
}
| [
"[email protected]"
] | |
d12c2f3dff35367424c2739bb7c3b44ff2fcbe78 | c0e7521a2fd6691a913b87aa1c64ce72297762db | /caotuan-admin-web/src/main/java/cn/ly/caotuan/admin/web/security/model/AuthUserFactory.java | 6e70e8880188adc2c55637b5dd846f7628a02978 | [] | no_license | liuyi19911202/dubbo | 3b72037116ad4c700bb70562a166f04c9a5b24e3 | 0cd4389e8b72d047fa8ef02b85f9cd87386ef95d | refs/heads/master | 2020-04-05T07:09:30.318897 | 2018-11-08T09:14:32 | 2018-11-08T09:14:32 | 156,665,308 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,099 | java | package cn.ly.caotuan.admin.web.security.model;
import java.util.List;
import java.util.stream.Collectors;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import cn.ly.common.utils.StringHelper;
import cn.ly.system.api.entity.SysMenu;
import cn.ly.system.api.entity.SysRole;
import cn.ly.system.api.entity.SysUser;
/**
* 用户工厂
* @ClassName: AuthUserFactory
* @author liuyi
* @date 2018年8月13日
*/
public final class AuthUserFactory {
private AuthUserFactory() {
}
/**
* Create auth user.
*
* @param user the user
* @return the auth user
*/
public static AuthUser create(SysUser user) {
AuthUser authUser = new AuthUser(user.getId());
authUser.setLoginName(user.getLoginName());
authUser.setName(user.getName());
authUser.setEmail(user.getEmail());
authUser.setPhone(user.getPhone());
authUser.setMobile(user.getMobile());
authUser.setPassword(user.getPassword());
authUser.setEnabled(user.getEnabled());
authUser.setAuthorities(mapToGrantedAuthorities(user.getRoles(), user.getMenus()));
return authUser;
}
/**
* 权限转换
*
* @param sysRoles 角色列表
* @param sysMenus 菜单列表
* @return 权限列表
*/
private static List<SimpleGrantedAuthority> mapToGrantedAuthorities(List<SysRole> sysRoles, List<SysMenu> sysMenus) {
List<SimpleGrantedAuthority> authorities =
sysRoles.stream().filter(SysRole::getEnabled)
.map(sysRole -> new SimpleGrantedAuthority(sysRole.getName())).collect(Collectors.toList());
// 添加基于Permission的权限信息
sysMenus.stream().filter(menu -> StringHelper.isNotBlank(menu.getPermission())).forEach(menu -> {
// 添加基于Permission的权限信息
for (String permission : StringHelper.split(menu.getPermission(), ",")) {
authorities.add(new SimpleGrantedAuthority(permission));
}
});
return authorities;
}
}
| [
"[email protected]"
] | |
72090fc2f3c39db4fca1bf6066807c7db5e45bf3 | a159c7e8dae94914ed254ecbb0fffed9550d3263 | /app/src/main/java/pubcoding/org/shot/adapter/SpinnerAdapter.java | efb1f98688b9d77dde1c3f88cca69a4e31af8f28 | [
"MIT"
] | permissive | MarcoAlessandroRiggio/Shot | cf6c20a750b71bebf1df5bbc15aa46cef4b177b6 | 2e193d96fa30e06d7e1af2f96c8a2f19ff2b8bb2 | refs/heads/master | 2021-07-07T04:50:42.410150 | 2019-01-04T11:30:55 | 2019-01-04T11:30:55 | 136,019,738 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 673 | java | package pubcoding.org.shot.adapter;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import pubcoding.org.shot.R;
public class SpinnerAdapter extends ShotterAdapter {
public SpinnerAdapter(Context context) {
super(context);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View vi = convertView;
if (vi == null)
vi = getInflater().inflate(R.layout.spinner_row, null);
TextView text = vi.findViewById(R.id.text);
text.setText(getElements().get(position).getName());
return vi;
}
}
| [
"[email protected]"
] | |
3d6f454368ed9d8d8d3e1090a52a92746af4cfd9 | e4e8c2f84ef1867b9a7e3e047f43ed7daf4c5f10 | /platforms/android/app/src/main/java/com/tns/gen/java/lang/Object_transitions_256_36_AnimationListenerImpl.java | 5053200efce52cbb5f6fff05968baba190debf52 | [
"Apache-2.0"
] | permissive | GraemeRombough/HRGO | 3e22846967935cbcecb7a1c93f09ea8a7e30261e | bb7ef2ddfa97ac191337bc665a7ef2a52af78b85 | refs/heads/master | 2023-01-28T14:30:12.894824 | 2019-09-26T12:39:54 | 2019-09-26T12:39:54 | 161,099,583 | 0 | 0 | Apache-2.0 | 2023-01-04T19:25:03 | 2018-12-10T01:28:04 | JavaScript | UTF-8 | Java | false | false | 2,136 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
* This class was automatically generated by the
* static binding generator from the resources it found.
* Please do not modify by hand.
*/
package com.tns.gen.java.lang;
public class Object_transitions_256_36_AnimationListenerImpl extends java.lang.Object
implements com.tns.NativeScriptHashCodeProvider, android.animation.Animator.AnimatorListener {
public Object_transitions_256_36_AnimationListenerImpl() {
super();
com.tns.Runtime.initInstance(this);
}
public void onAnimationStart(android.animation.Animator param_0) {
java.lang.Object[] args = new java.lang.Object[1];
args[0] = param_0;
com.tns.Runtime.callJSMethod(this, "onAnimationStart", void.class, args);
}
public void onAnimationEnd(android.animation.Animator param_0) {
java.lang.Object[] args = new java.lang.Object[1];
args[0] = param_0;
com.tns.Runtime.callJSMethod(this, "onAnimationEnd", void.class, args);
}
public void onAnimationCancel(android.animation.Animator param_0) {
java.lang.Object[] args = new java.lang.Object[1];
args[0] = param_0;
com.tns.Runtime.callJSMethod(this, "onAnimationCancel", void.class, args);
}
public void onAnimationRepeat(android.animation.Animator param_0) {
java.lang.Object[] args = new java.lang.Object[1];
args[0] = param_0;
com.tns.Runtime.callJSMethod(this, "onAnimationRepeat", void.class, args);
}
public void onAnimationStart(android.animation.Animator param_0, boolean param_1) {
java.lang.Object[] args = new java.lang.Object[2];
args[0] = param_0;
args[1] = param_1;
com.tns.Runtime.callJSMethod(this, "onAnimationStart", void.class, args);
}
public void onAnimationEnd(android.animation.Animator param_0, boolean param_1) {
java.lang.Object[] args = new java.lang.Object[2];
args[0] = param_0;
args[1] = param_1;
com.tns.Runtime.callJSMethod(this, "onAnimationEnd", void.class, args);
}
public int hashCode__super() {
return super.hashCode();
}
public boolean equals__super(java.lang.Object other) {
return super.equals(other);
}
}
| [
"[email protected]"
] | |
0c6a98888d6f7c803c52948ce45c0eabd44a9aa3 | 129f58086770fc74c171e9c1edfd63b4257210f3 | /src/testcases/CWE690_NULL_Deref_From_Return/CWE690_NULL_Deref_From_Return__Class_StringBuilder_75a.java | e7894a509450c649f1534cb98bd8c5fee4ea8fca | [] | no_license | glopezGitHub/Android23 | 1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba | 6215d0684c4fbdc7217ccfbedfccfca69824cc5e | refs/heads/master | 2023-03-07T15:14:59.447795 | 2023-02-06T13:59:49 | 2023-02-06T13:59:49 | 6,856,387 | 0 | 3 | null | 2023-02-06T18:38:17 | 2012-11-25T22:04:23 | Java | UTF-8 | Java | false | false | 6,194 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE690_NULL_Deref_From_Return__Class_StringBuilder_75a.java
Label Definition File: CWE690_NULL_Deref_From_Return__Class.label.xml
Template File: sources-sinks-75a.tmpl.java
*/
/*
* @description
* CWE: 690 Unchecked return value is null, leading to a null pointer dereference.
* BadSource: Use a custom method which may return null
* GoodSource: Use a custom method that never returns null
* Sinks: trim
* GoodSink: Check data for null before calling trim()
* BadSink : Call trim() on possibly null object
* Flow Variant: 75 Data flow: data passed in a serialized object from one method to another in different source files in the same package
*
* */
package testcases.CWE690_NULL_Deref_From_Return;
import testcasesupport.*;
import java.io.ByteArrayOutputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.sql.*;
import javax.servlet.http.*;
public class CWE690_NULL_Deref_From_Return__Class_StringBuilder_75a extends AbstractTestCase
{
public void bad() throws Throwable
{
StringBuilder data;
/* POTENTIAL FLAW: Call getStringBuilderBad(), which may return null */
data = CWE690_NULL_Deref_From_Return__Class_Helper.getStringBuilderBad();
// serialize data to a byte array
ByteArrayOutputStream baos = null;
ObjectOutput out = null;
try {
baos = new ByteArrayOutputStream() ;
out = new ObjectOutputStream(baos) ;
out.writeObject(data);
byte[] data_serialized = baos.toByteArray();
(new CWE690_NULL_Deref_From_Return__Class_StringBuilder_75b()).bad_sink(data_serialized );
}
catch (IOException e)
{
IO.logger.log(Level.WARNING, "IOException in serialization", e);
}
finally {
// clean up stream writing objects
try {
if (out != null)
{
out.close();
}
}
catch (IOException ioe)
{
IO.logger.log(Level.WARNING, "Error closing ObjectOutputStream", ioe);
}
try {
if (baos != null)
{
baos.close();
}
}
catch (IOException ioe)
{
IO.logger.log(Level.WARNING, "Error closing ByteArrayOutputStream", ioe);
}
}
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* goodG2B() - use GoodSource and BadSink */
private void goodG2B() throws Throwable
{
StringBuilder data;
/* FIX: call getStringBuilderGood(), which will never return null */
data = CWE690_NULL_Deref_From_Return__Class_Helper.getStringBuilderGood();
// serialize data to a byte array
ByteArrayOutputStream baos = null;
ObjectOutput out = null;
try {
baos = new ByteArrayOutputStream() ;
out = new ObjectOutputStream(baos) ;
out.writeObject(data);
byte[] data_serialized = baos.toByteArray();
(new CWE690_NULL_Deref_From_Return__Class_StringBuilder_75b()).goodG2B_sink(data_serialized );
}
catch (IOException e)
{
IO.logger.log(Level.WARNING, "IOException in serialization", e);
}
finally {
// clean up stream writing objects
try {
if (out != null)
{
out.close();
}
}
catch (IOException ioe)
{
IO.logger.log(Level.WARNING, "Error closing ObjectOutputStream", ioe);
}
try {
if (baos != null)
{
baos.close();
}
}
catch (IOException ioe)
{
IO.logger.log(Level.WARNING, "Error closing ByteArrayOutputStream", ioe);
}
}
}
/* goodB2G() - use BadSource and GoodSink */
private void goodB2G() throws Throwable
{
StringBuilder data;
/* POTENTIAL FLAW: Call getStringBuilderBad(), which may return null */
data = CWE690_NULL_Deref_From_Return__Class_Helper.getStringBuilderBad();
// serialize data to a byte array
ByteArrayOutputStream baos = null;
ObjectOutput out = null;
try {
baos = new ByteArrayOutputStream() ;
out = new ObjectOutputStream(baos) ;
out.writeObject(data);
byte[] data_serialized = baos.toByteArray();
(new CWE690_NULL_Deref_From_Return__Class_StringBuilder_75b()).goodB2G_sink(data_serialized );
}
catch (IOException e)
{
IO.logger.log(Level.WARNING, "IOException in serialization", e);
}
finally {
// clean up stream writing objects
try {
if (out != null)
{
out.close();
}
}
catch (IOException ioe)
{
IO.logger.log(Level.WARNING, "Error closing ObjectOutputStream", ioe);
}
try {
if (baos != null)
{
baos.close();
}
}
catch (IOException ioe)
{
IO.logger.log(Level.WARNING, "Error closing ByteArrayOutputStream", ioe);
}
}
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"[email protected]"
] | |
a347773aff8510096d6c64e5b2f92ac6482ef77d | d1452be2fe9440deaa8576ef2f7439c616cae6f8 | /src/main/java/dik/jhipster/library/web/rest/errors/FieldErrorVM.java | ef467d8867e0e71f0667a2e8aaa01a800cee8850 | [] | no_license | realcorwin/jhipster-library-application | 47131a2e91be1c50600f3b597562c4c0b023ddd9 | d954e681cdd7fa47a4135b7402a56aeba2ccd52e | refs/heads/master | 2020-05-19T01:43:46.102550 | 2019-05-03T15:52:07 | 2019-05-03T15:52:07 | 184,763,923 | 1 | 0 | null | 2019-05-03T15:52:08 | 2019-05-03T13:54:05 | Java | UTF-8 | Java | false | false | 652 | java | package dik.jhipster.library.web.rest.errors;
import java.io.Serializable;
public class FieldErrorVM implements Serializable {
private static final long serialVersionUID = 1L;
private final String objectName;
private final String field;
private final String message;
public FieldErrorVM(String dto, String field, String message) {
this.objectName = dto;
this.field = field;
this.message = message;
}
public String getObjectName() {
return objectName;
}
public String getField() {
return field;
}
public String getMessage() {
return message;
}
}
| [
"[email protected]"
] | |
c037ada24b7d25437a1bae1efb0b7333dd554685 | b7ee39f72a709b6074a363ab23b872f1798eb436 | /Model/src/main/java/model/dao/BinaryDataDAOImpl.java | 3ce34f0314522eb546d9862d57e7334d89498c01 | [] | no_license | PartTimeHackerman/DeepStocks | ec0e6cc86a296a169f34686f38fcac9578592e9d | 44c8f9507d5ed06072c60c44d3e3b68d84e90791 | refs/heads/master | 2021-03-27T09:30:33.945978 | 2017-08-10T12:48:55 | 2017-08-10T12:48:55 | 79,068,735 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,018 | java | package model.dao;
import model.data.BinaryData;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import javax.persistence.EntityManagerFactory;
@Repository
public class BinaryDataDAOImpl {
private final SessionFactory sessionFactory;
@Autowired
public BinaryDataDAOImpl(EntityManagerFactory entityManagerFactory) {
sessionFactory = entityManagerFactory.unwrap(SessionFactory.class);
}
public BinaryData load(Long id) {
Session session = sessionFactory.openSession();
session.beginTransaction();
BinaryData activeSymbol = session.find(BinaryData.class, id);
session.getTransaction().commit();
session.close();
return activeSymbol;
}
public void save(BinaryData activeSymbol) {
Session session = sessionFactory.openSession();
session.beginTransaction();
session.merge(activeSymbol);
session.getTransaction().commit();
session.close();
}
}
| [
"[email protected]"
] | |
06281d886346be7e2717a2614c82731006e81eee | c3e7c334157700df4ec139697779625b30721dc1 | /src/main/java/es/mityc/firmaJava/ts/TSValidator.java | ddb380f717578b843aabaf8a1e8260213c0aeb5e | [] | no_license | zylklab/MITyCLibTSA-sinadura | 502b6505532434beb978ef85b4ab52e56826b0b3 | eb1704260f92d044cfaf159bf6f62a1d9d61e386 | refs/heads/develop | 2020-03-24T14:24:05.009031 | 2018-08-11T13:35:16 | 2018-08-11T13:35:16 | 142,767,687 | 0 | 1 | null | 2018-08-11T12:57:44 | 2018-07-29T14:26:19 | Java | UTF-8 | Java | false | false | 6,042 | java | /**
* LICENCIA LGPL:
*
* Esta librería es Software Libre; Usted puede redistribuirlo y/o modificarlo
* bajo los términos de la GNU Lesser General Public License (LGPL)
* tal y como ha sido publicada por la Free Software Foundation; o
* bien la versión 2.1 de la Licencia, o (a su elección) cualquier versión posterior.
*
* Esta librería se distribuye con la esperanza de que sea útil, pero SIN NINGUNA
* GARANTÍA; tampoco las implícitas garantías de MERCANTILIDAD o ADECUACIÓN A UN
* PROPÓSITO PARTICULAR. Consulte la GNU Lesser General Public License (LGPL) para más
* detalles
*
* Usted debe recibir una copia de la GNU Lesser General Public License (LGPL)
* junto con esta librería; si no es así, escriba a la Free Software Foundation Inc.
* 51 Franklin Street, 5º Piso, Boston, MA 02110-1301, USA.
*
*/
package es.mityc.firmaJava.ts;
import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.cert.CertStore;
import java.security.cert.CertStoreException;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
import java.text.SimpleDateFormat;
import java.util.Collection;
import javax.security.auth.x500.X500Principal;
import org.bouncycastle.asn1.x509.GeneralName;
import org.bouncycastle.asn1.x509.X509Name;
import org.bouncycastle.cms.CMSException;
import org.bouncycastle.cms.CMSSignedData;
import org.bouncycastle.tsp.GenTimeAccuracy;
import org.bouncycastle.tsp.TSPException;
import org.bouncycastle.tsp.TimeStampResponse;
import org.bouncycastle.tsp.TimeStampToken;
import org.bouncycastle.tsp.TimeStampTokenInfo;
/**
* <p>Clase encargada de validar sellos de tiempo.</p>
*
* @author Ministerio de Industria, Turismo y Comercio
* @version 1.0
*/
public class TSValidator {
/**
* <p>Este método valida el Sello de Tiempo.</p>
* @param binarioaSellar fichero binario a validar
* @param sellodeTiempo El Sello de Tiempo se ingresa en formato binario
* @return TSValidacion Valores TSA
* @throws NoSuchAlgorithmException
* @throws TSPException
* @throws IOException
* @throws NoSuchProviderException
* @throws CertStoreException
* @throws TSClienteError
*/
public static TSValidacion validarSelloTiempo(final byte[] binarioaSellar, final byte[] sellodeTiempo)
throws NoSuchAlgorithmException,
TSPException,
IOException,
NoSuchProviderException,
CertStoreException, TSClienteError {
// Set permitidos = new HashSet(Arrays.asList(TSPAlgoritmos.getValoresPermitidos()));
// si el algoritmo pasado no es permitido o es nulo se usa el algortimo por defecto
TimeStampToken tst = null;
TSValidacion tsv = new TSValidacion();
try {
tst = new TimeStampToken(new CMSSignedData(sellodeTiempo));
} catch (CMSException e) {
// Intenta obtenerlo como una timestamResp
try {
TimeStampResponse tsr = new TimeStampResponse(sellodeTiempo);
tst = tsr.getTimeStampToken();
if (tst == null) {
throw new TSClienteError(I18n.getResource(ConstantesTSA.LIBRERIA_TSA_ERROR_2));
}
} catch (TSPException ex) {
throw new TSClienteError(I18n.getResource(ConstantesTSA.LIBRERIA_TSA_ERROR_2));
} catch (IOException ex) {
throw new TSClienteError(I18n.getResource(ConstantesTSA.LIBRERIA_TSA_ERROR_2));
}
}
tsv.setTst(tst);
TimeStampTokenInfo tokenInfo = tst.getTimeStampInfo();
MessageDigest resumen = TSPAlgoritmos.getDigest(tokenInfo.getMessageImprintAlgOID());
if (resumen == null) {
tsv.setRespuesta(false);
return tsv;
}
resumen.update(binarioaSellar);
if (MessageDigest.isEqual(resumen.digest(), tst.getTimeStampInfo().getMessageImprintDigest())) {
//TimeStampTokenInfo tokenInfo = tst.getTimeStampInfo();
SimpleDateFormat formato = new SimpleDateFormat(ConstantesTSA.FORMATO_FECHA);
tsv.setFecha(formato.format(tokenInfo.getGenTime()));
tsv.setFechaDate(tokenInfo.getGenTime());
GenTimeAccuracy precision = tokenInfo.getGenTimeAccuracy();
tsv.setPrecision(precision);
long accuLong = 0;
if (precision != null) {
accuLong = (precision.getMicros() * 1L)
+ (precision.getMillis() * 1000L)
+ (precision.getSeconds() * 1000000L);
}
tsv.setPrecisionLong(accuLong);
tsv.setSello(tokenInfo.getSerialNumber());
tsv.setFirmaDigest(new String(Base64Coder.encode(tokenInfo.getMessageImprintDigest())));
tsv.setRespuesta(true);
tsv.setSelloAlg(tokenInfo.getMessageImprintAlgOID());
// Obtiene el nombre del firmante del sello
// Intenta extraer información de los certificados firmantes contenidos en el token
X500Principal signer = null;
GeneralName gn = tokenInfo.getTsa();
if (gn != null) {
// Si es del tipo X500 lo transforma
if (gn.getTagNo() == 4) {
signer = new X500Principal(X509Name.getInstance(gn.getName()).getEncoded());
}
}
// si el token no indica el nombre del firmante, intenta extraerlo por el certificado
if (signer == null) {
try {
CertStore cs = tst.getCertificatesAndCRLs("Collection", null);
Collection<? extends Certificate> certs = cs.getCertificates(null);
if (certs.size() > 0) {
Certificate cert = certs.iterator().next();
if (cert instanceof X509Certificate) {
signer = ((X509Certificate) cert).getSubjectX500Principal();
}
}
} catch (NoSuchAlgorithmException ex) {
} catch (NoSuchProviderException ex) {
} catch (CMSException ex) {
} catch (CertStoreException ex) {
}
}
tsv.setEmisor(signer);
} else {
tsv.setRespuesta(false);
}
return tsv;
}
}
| [
"[email protected]"
] | |
11300518fe6bba80939c70169a26e6c89a7818c9 | eb6a6b4049cabdd4c14736ae36bdb2dd8489fb53 | /sandbox/swt/src/main/java/org/suggs/sandbox/swt/treesntables/tableviewer/PlayerViewer.java | 233b2e5b53f64133cce4a2df2e1798fe577ed2a6 | [
"Apache-2.0"
] | permissive | suggitpe/java-gui | cb256451c125e1cc1351fd0fc54cfdc24848ff38 | 349d716736020d8af0561161e08bfe993210afec | refs/heads/master | 2020-06-02T19:13:25.241908 | 2019-04-29T06:41:33 | 2019-04-29T06:41:33 | 3,492,021 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,530 | java | /*
* PlayerViewer.java created on 2 Dec 2008 19:23:55 by suggitpe for project SandBox - SWT
*
*/
package org.suggs.sandbox.swt.treesntables.tableviewer;
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* TODO Write javadoc for PlayerViewer
*
* @author suggitpe
* @version 1.0 2 Dec 2008
*/
public class PlayerViewer extends ApplicationWindow {
private static final Logger LOG = LoggerFactory.getLogger( PlayerViewer.class );
/**
* Constructs a new instance.
*/
public PlayerViewer() {
super( null );
}
/**
* Run the shell and GUI within
*/
public void run() {
setBlockOnOpen( true );
open();
LOG.debug( "finished" );
Display.getCurrent().dispose();
}
/**
* @see org.eclipse.jface.window.ApplicationWindow#configureShell(org.eclipse.swt.widgets.Shell)
*/
@Override
protected void configureShell( Shell shell ) {
super.configureShell( shell );
shell.setText( "Player Viewer" );
shell.setSize( 400, 600 );
}
/**
* Here we just set up the table and set it to work with the rest of the GUI.
*
* @see org.eclipse.jface.window.Window#createContents(org.eclipse.swt.widgets.Composite)
*/
@Override
protected Control createContents( Composite parent ) {
Composite comp = new Composite( parent, SWT.NONE );
comp.setLayout( new GridLayout( 1, false ) );
final Table table = new Table( comp, SWT.BORDER | SWT.FULL_SELECTION );
table.setToolTipText( "Team player data" );
table.setLinesVisible( true );
table.setHeaderVisible( true );
TableLayout tLay = new TableLayout();
tLay.addColumnData( new ColumnWeightData( 20 ) );
tLay.addColumnData( new ColumnWeightData( 20 ) );
tLay.addColumnData( new ColumnWeightData( 20 ) );
tLay.addColumnData( new ColumnWeightData( 20 ) );
tLay.addColumnData( new ColumnWeightData( 20 ) );
new TableColumn( table, SWT.LEFT ).setText( "Firstname" );
new TableColumn( table, SWT.LEFT ).setText( "Lastname" );
new TableColumn( table, SWT.LEFT ).setText( "Points" );
new TableColumn( table, SWT.LEFT ).setText( "Rebounds" );
new TableColumn( table, SWT.LEFT ).setText( "Assists" );
table.setLayout( tLay );
table.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
final TableViewer tv = new TableViewer( table );
tv.setContentProvider( new PlayerViewerContentProvider() );
tv.setLabelProvider( new PlayerViewerLabelProvider() );
tv.setInput( PlayerTableModel.createTeam() );
return comp;
}
/**
* Starter for 10!!!!
*
* @param args
*/
public static void main( String[] args ) {
new PlayerViewer().run();
}
}
| [
"[email protected]"
] | |
0911853ad21fe2b09606d078d26f93c86c16f8dd | 8f913daf0dcaa63101a75a5e3dbf7a48dc8a6518 | /bizcore/WEB-INF/hfgw_core_src/com/doublechaintech/hfgw/candidatecontainer/CandidateContainer.java | 994091e6be9843eecdd1d4a190ca68f2040e4b7e | [] | no_license | doublechaintech/hfgw-biz-suite | e09c10ccdcc5dc85ff4753f0902f8f75f80c3a3b | 201a3ff6f46ed347b288c2b5512adeb8ec584e49 | refs/heads/master | 2021-07-08T23:37:06.886710 | 2020-04-03T05:34:07 | 2020-04-03T05:34:07 | 222,888,857 | 0 | 0 | null | 2021-01-05T17:10:18 | 2019-11-20T08:33:41 | Java | UTF-8 | Java | false | false | 10,587 | java |
package com.doublechaintech.hfgw.candidatecontainer;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import java.math.BigDecimal;
import com.terapico.caf.DateTime;
import com.doublechaintech.hfgw.BaseEntity;
import com.doublechaintech.hfgw.SmartList;
import com.doublechaintech.hfgw.KeyValuePair;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.doublechaintech.hfgw.candidateelement.CandidateElement;
@JsonSerialize(using = CandidateContainerSerializer.class)
public class CandidateContainer extends BaseEntity implements java.io.Serializable{
public static final String ID_PROPERTY = "id" ;
public static final String NAME_PROPERTY = "name" ;
public static final String VERSION_PROPERTY = "version" ;
public static final String CANDIDATE_ELEMENT_LIST = "candidateElementList";
public static final String INTERNAL_TYPE="CandidateContainer";
public String getInternalType(){
return INTERNAL_TYPE;
}
public String getDisplayName(){
String displayName = getName();
if(displayName!=null){
return displayName;
}
return super.getDisplayName();
}
private static final long serialVersionUID = 1L;
protected String mId ;
protected String mName ;
protected int mVersion ;
protected SmartList<CandidateElement> mCandidateElementList;
public CandidateContainer(){
// lazy load for all the properties
}
public static CandidateContainer withId(String id){
CandidateContainer candidateContainer = new CandidateContainer();
candidateContainer.setId(id);
candidateContainer.setVersion(Integer.MAX_VALUE);
return candidateContainer;
}
public static CandidateContainer refById(String id){
return withId(id);
}
// disconnect from all, 中文就是一了百了,跟所有一切尘世断绝往来藏身于茫茫数据海洋
public void clearFromAll(){
this.changed = true;
}
//Support for changing the property
public void changeProperty(String property, String newValueExpr) {
if(NAME_PROPERTY.equals(property)){
changeNameProperty(newValueExpr);
}
}
protected void changeNameProperty(String newValueExpr){
String oldValue = getName();
String newValue = parseString(newValueExpr);
if(equalsString(oldValue , newValue)){
return;//they can be both null, or exact the same object, this is much faster than equals function
}
//they are surely different each other
updateName(newValue);
this.onChangeProperty(NAME_PROPERTY, oldValue, newValue);
return;
}
public Object propertyOf(String property) {
if(NAME_PROPERTY.equals(property)){
return getName();
}
if(CANDIDATE_ELEMENT_LIST.equals(property)){
List<BaseEntity> list = getCandidateElementList().stream().map(item->item).collect(Collectors.toList());
return list;
}
//other property not include here
return super.propertyOf(property);
}
public void setId(String id){
this.mId = trimString(id);;
}
public String getId(){
return this.mId;
}
public CandidateContainer updateId(String id){
this.mId = trimString(id);;
this.changed = true;
return this;
}
public void mergeId(String id){
if(id != null) { setId(id);}
}
public void setName(String name){
this.mName = trimString(name);;
}
public String getName(){
return this.mName;
}
public CandidateContainer updateName(String name){
this.mName = trimString(name);;
this.changed = true;
return this;
}
public void mergeName(String name){
if(name != null) { setName(name);}
}
public void setVersion(int version){
this.mVersion = version;;
}
public int getVersion(){
return this.mVersion;
}
public CandidateContainer updateVersion(int version){
this.mVersion = version;;
this.changed = true;
return this;
}
public void mergeVersion(int version){
setVersion(version);
}
public SmartList<CandidateElement> getCandidateElementList(){
if(this.mCandidateElementList == null){
this.mCandidateElementList = new SmartList<CandidateElement>();
this.mCandidateElementList.setListInternalName (CANDIDATE_ELEMENT_LIST );
//有名字,便于做权限控制
}
return this.mCandidateElementList;
}
public void setCandidateElementList(SmartList<CandidateElement> candidateElementList){
for( CandidateElement candidateElement:candidateElementList){
candidateElement.setContainer(this);
}
this.mCandidateElementList = candidateElementList;
this.mCandidateElementList.setListInternalName (CANDIDATE_ELEMENT_LIST );
}
public void addCandidateElement(CandidateElement candidateElement){
candidateElement.setContainer(this);
getCandidateElementList().add(candidateElement);
}
public void addCandidateElementList(SmartList<CandidateElement> candidateElementList){
for( CandidateElement candidateElement:candidateElementList){
candidateElement.setContainer(this);
}
getCandidateElementList().addAll(candidateElementList);
}
public void mergeCandidateElementList(SmartList<CandidateElement> candidateElementList){
if(candidateElementList==null){
return;
}
if(candidateElementList.isEmpty()){
return;
}
addCandidateElementList( candidateElementList );
}
public CandidateElement removeCandidateElement(CandidateElement candidateElementIndex){
int index = getCandidateElementList().indexOf(candidateElementIndex);
if(index < 0){
String message = "CandidateElement("+candidateElementIndex.getId()+") with version='"+candidateElementIndex.getVersion()+"' NOT found!";
throw new IllegalStateException(message);
}
CandidateElement candidateElement = getCandidateElementList().get(index);
// candidateElement.clearContainer(); //disconnect with Container
candidateElement.clearFromAll(); //disconnect with Container
boolean result = getCandidateElementList().planToRemove(candidateElement);
if(!result){
String message = "CandidateElement("+candidateElementIndex.getId()+") with version='"+candidateElementIndex.getVersion()+"' NOT found!";
throw new IllegalStateException(message);
}
return candidateElement;
}
//断舍离
public void breakWithCandidateElement(CandidateElement candidateElement){
if(candidateElement == null){
return;
}
candidateElement.setContainer(null);
//getCandidateElementList().remove();
}
public boolean hasCandidateElement(CandidateElement candidateElement){
return getCandidateElementList().contains(candidateElement);
}
public void copyCandidateElementFrom(CandidateElement candidateElement) {
CandidateElement candidateElementInList = findTheCandidateElement(candidateElement);
CandidateElement newCandidateElement = new CandidateElement();
candidateElementInList.copyTo(newCandidateElement);
newCandidateElement.setVersion(0);//will trigger copy
getCandidateElementList().add(newCandidateElement);
addItemToFlexiableObject(COPIED_CHILD, newCandidateElement);
}
public CandidateElement findTheCandidateElement(CandidateElement candidateElement){
int index = getCandidateElementList().indexOf(candidateElement);
//The input parameter must have the same id and version number.
if(index < 0){
String message = "CandidateElement("+candidateElement.getId()+") with version='"+candidateElement.getVersion()+"' NOT found!";
throw new IllegalStateException(message);
}
return getCandidateElementList().get(index);
//Performance issue when using LinkedList, but it is almost an ArrayList for sure!
}
public void cleanUpCandidateElementList(){
getCandidateElementList().clear();
}
public void collectRefercences(BaseEntity owner, List<BaseEntity> entityList, String internalType){
}
public List<BaseEntity> collectRefercencesFromLists(String internalType){
List<BaseEntity> entityList = new ArrayList<BaseEntity>();
collectFromList(this, entityList, getCandidateElementList(), internalType);
return entityList;
}
public List<SmartList<?>> getAllRelatedLists() {
List<SmartList<?>> listOfList = new ArrayList<SmartList<?>>();
listOfList.add( getCandidateElementList());
return listOfList;
}
public List<KeyValuePair> keyValuePairOf(){
List<KeyValuePair> result = super.keyValuePairOf();
appendKeyValuePair(result, ID_PROPERTY, getId());
appendKeyValuePair(result, NAME_PROPERTY, getName());
appendKeyValuePair(result, VERSION_PROPERTY, getVersion());
appendKeyValuePair(result, CANDIDATE_ELEMENT_LIST, getCandidateElementList());
if(!getCandidateElementList().isEmpty()){
appendKeyValuePair(result, "candidateElementCount", getCandidateElementList().getTotalCount());
appendKeyValuePair(result, "candidateElementCurrentPageNumber", getCandidateElementList().getCurrentPageNumber());
}
return result;
}
public BaseEntity copyTo(BaseEntity baseDest){
if(baseDest instanceof CandidateContainer){
CandidateContainer dest =(CandidateContainer)baseDest;
dest.setId(getId());
dest.setName(getName());
dest.setVersion(getVersion());
dest.setCandidateElementList(getCandidateElementList());
}
super.copyTo(baseDest);
return baseDest;
}
public BaseEntity mergeDataTo(BaseEntity baseDest){
if(baseDest instanceof CandidateContainer){
CandidateContainer dest =(CandidateContainer)baseDest;
dest.mergeId(getId());
dest.mergeName(getName());
dest.mergeVersion(getVersion());
dest.mergeCandidateElementList(getCandidateElementList());
}
super.copyTo(baseDest);
return baseDest;
}
public BaseEntity mergePrimitiveDataTo(BaseEntity baseDest){
if(baseDest instanceof CandidateContainer){
CandidateContainer dest =(CandidateContainer)baseDest;
dest.mergeId(getId());
dest.mergeName(getName());
dest.mergeVersion(getVersion());
}
return baseDest;
}
public String toString(){
StringBuilder stringBuilder=new StringBuilder(128);
stringBuilder.append("CandidateContainer{");
stringBuilder.append("\tid='"+getId()+"';");
stringBuilder.append("\tname='"+getName()+"';");
stringBuilder.append("\tversion='"+getVersion()+"';");
stringBuilder.append("}");
return stringBuilder.toString();
}
//provide number calculation function
}
| [
"[email protected]"
] | |
057f9db2400aec6f1fe1a679badb25862b0cad21 | dadeb31cd13c59f6008b184280f4d904ab49aa4c | /src/senai/comjpa/dao/jpa/ClienteJPADAO.java | 84f53269d10704cc6c4790894e7528b5221f517b | [] | no_license | jeronimoflima/JPA | f93239b06180d9b4be056218cdf9f218b5812eec | 52d6c43705ea73e9c1d54bff042f31ed0c10953a | refs/heads/master | 2021-01-17T07:30:18.777902 | 2017-05-27T00:33:16 | 2017-05-27T00:33:16 | 83,729,935 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 605 | java | package senai.comjpa.dao.jpa;
import java.util.List;
import javax.persistence.Query;
import senai.comjpa.dao.ClienteDAO;
import senai.comjpa.pojo.Cliente;
public class ClienteJPADAO extends JPAAbstract implements ClienteDAO{
/*
@Override
public Cliente buscarPorId(int id) {
String hql = "select c from Cliente c where id = " + id;
Query query = super.getQuery(hql);
List list = query.getResultList();
for(Object object : list){
return((Cliente) object);
}
return null;
}*/
@Override
public String getEntityName(){
return "Cliente";
}
}
| [
"[email protected]"
] | |
e79c7a738d7a677ee90ca540188890936c60d1e9 | 5ed31bc890e353fdedd008367c3214a3a2239786 | /src/main/java/com/learn/SpringBoot_Jpa/organization/dao/UserDeptRepository.java | 6a555cc7d6398f326cf5ec20440719c44b8d9612 | [] | no_license | suopovate/LearnSpringBoot | 96ce795d2fc4cc789c85e35c695aa64ec99c8649 | fde3eac64a8cbf6603dfbbdaf567f5db5d30392f | refs/heads/master | 2022-06-30T23:32:42.095755 | 2019-05-23T02:46:09 | 2019-05-23T02:46:09 | 145,663,934 | 0 | 0 | null | 2022-06-21T00:53:32 | 2018-08-22T06:08:37 | JavaScript | UTF-8 | Java | false | false | 545 | java | package com.learn.SpringBoot_Jpa.organization.dao;
import com.learn.SpringBoot_Jpa.organization.pojo.MultiplePrimaryKey.User_Dept_Key;
import com.learn.SpringBoot_Jpa.organization.pojo.relation.User_Dept_Relation;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
@Repository
public interface UserDeptRepository extends CrudRepository<User_Dept_Relation, User_Dept_Key> {
void deleteByDeptId( String deptId);
}
| [
"[email protected]"
] | |
430776185070ef986f60d5ac0de7c7edcba58160 | a6e80c27d3a7ff464e4b9046af679ae017432fcb | /src/com/ishan/java/designpatterns/factory/simplefactory/idiom/right/CheesePizza.java | 7bf4d1fb0141ae26f3170f7c5ca6ead171f83fb5 | [
"MIT"
] | permissive | ishansoni22/design-patterns | 27d297584df86f979d627d274575b19ac1a4a2b6 | 13a961fa92acc3cdeacc62a3581c7e371e1004a0 | refs/heads/master | 2020-09-13T16:09:59.582666 | 2020-02-21T04:56:51 | 2020-02-21T04:56:51 | 222,837,332 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 463 | java | package com.ishan.java.designpatterns.factory.simplefactory.idiom.right;
public class CheesePizza implements Pizza {
@Override
public void prepare() {
System.out.println("Prepare Cheese Pizza");
}
@Override
public void bake() {
System.out.println("Bake Cheese Pizza");
}
@Override
public void cut() {
System.out.println("Cut Cheese Pizza");
}
@Override
public void box() {
System.out.println("Box Cheese Pizza");
}
}
| [
"[email protected]"
] | |
b6561df15c68152d868ed48ef79f16715ef2939e | b7dc8a88e6bcf87ba32ee46c771f3205e771c2d6 | /mall-mbg/src/main/java/com/mawoz/mall/mapper/PmsProductLadderMapper.java | 1f03ee339ee2058aae457484245a0eea87426d9a | [
"Apache-2.0"
] | permissive | mefangyuan/mall | 02ff7db3283df492b38af3e50ed2ab89a9379a6a | 9e2b5ed88517674ed0e014e46d9e1c7d07a7c1c4 | refs/heads/master | 2023-07-04T14:55:22.999847 | 2021-08-14T03:04:37 | 2021-08-14T03:04:37 | 395,854,638 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 983 | java | package com.mawoz.mall.mapper;
import com.mawoz.mall.model.PmsProductLadder;
import com.mawoz.mall.model.PmsProductLadderExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PmsProductLadderMapper {
long countByExample(PmsProductLadderExample example);
int deleteByExample(PmsProductLadderExample example);
int deleteByPrimaryKey(Long id);
int insert(PmsProductLadder record);
int insertSelective(PmsProductLadder record);
List<PmsProductLadder> selectByExample(PmsProductLadderExample example);
PmsProductLadder selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") PmsProductLadder record, @Param("example") PmsProductLadderExample example);
int updateByExample(@Param("record") PmsProductLadder record, @Param("example") PmsProductLadderExample example);
int updateByPrimaryKeySelective(PmsProductLadder record);
int updateByPrimaryKey(PmsProductLadder record);
} | [
"[email protected]"
] | |
fa2980a1a9b3bcb5b9fbd32428dbec645a4de57d | 03fef498c9eec19d21ea52f2170ef8f5a40ce45e | /2018011849박재현/PlayerManagement/KLeague.java | d03bb8daaebfc14d40921988b44333b8977aeabc | [] | no_license | PJaeHyeon/ParkManagementSystem | 3e628e9192046643ba483b75d9c2e5dcc775bd61 | 50658514d3ea2791a0b064f2659deb72015015e5 | refs/heads/main | 2023-05-28T03:40:39.366786 | 2021-06-14T13:30:17 | 2021-06-14T13:30:17 | 345,894,906 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 497 | java | package PlayerManagement;
import java.util.Scanner;
public class KLeague extends Player implements PlayerInput{
public KLeague(PlayerKind kind) {
super(kind);
}
public void getUserInput(Scanner input) {
setPlayerNum(input);
setPlayerName(input);
setPlayerTeam(input);
setPlayerSal(input);
}
public void printInfo() {
String pkind = getKindString();
System.out.println("League :"+ pkind +", Name :" + name + ", Number:"+number+", Team:"+team+", Salary:"+sal);
}
}
| [
"[email protected]"
] | |
8cbef061edd4f892d973cdbd0814b93dec02f0b1 | 17fce5c2653389976ebcef65c33b5c840bc26ced | /docs/a3c/1/a3c/A3CTenhouDense.java | af739023f2c09e0c220c502646caee3aea450fab | [] | no_license | fulltopic/Dp4jPractice | 539ce5ae22f5ed8cabc6177b96f412217ecd8d0e | 23d20c2582b5b0060592cdc77525e241904c3eef | refs/heads/master | 2022-10-17T23:46:04.160504 | 2020-01-24T08:18:52 | 2020-01-24T08:18:52 | 125,544,998 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,629 | java | package rl.dqn.reinforcement.dqn.nn.a3c;
import org.deeplearning4j.nn.api.OptimizationAlgorithm;
import org.deeplearning4j.nn.conf.ComputationGraphConfiguration;
import org.deeplearning4j.nn.conf.InputPreProcessor;
import org.deeplearning4j.nn.conf.NeuralNetConfiguration;
import org.deeplearning4j.nn.conf.Updater;
import org.deeplearning4j.nn.conf.inputs.InputType;
import org.deeplearning4j.nn.conf.layers.DenseLayer;
import org.deeplearning4j.nn.conf.layers.LSTM;
import org.deeplearning4j.nn.conf.layers.OutputLayer;
import org.deeplearning4j.nn.conf.layers.RnnOutputLayer;
import org.deeplearning4j.nn.graph.ComputationGraph;
import org.deeplearning4j.nn.weights.WeightInit;
import org.deeplearning4j.optimize.listeners.ScoreIterationListener;
import org.deeplearning4j.rl4j.learning.async.AsyncThread;
import org.deeplearning4j.rl4j.learning.async.a3c.discrete.A3CDiscrete;
import org.deeplearning4j.rl4j.learning.async.a3c.discrete.A3CThreadDiscrete;
import org.deeplearning4j.rl4j.mdp.MDP;
import org.deeplearning4j.rl4j.network.ac.ActorCriticCompGraph;
import org.deeplearning4j.rl4j.network.ac.ActorCriticFactoryCompGraphStdDense;
import org.deeplearning4j.rl4j.network.ac.ActorCriticLoss;
import org.deeplearning4j.rl4j.network.ac.IActorCritic;
import org.deeplearning4j.rl4j.policy.ACPolicy;
import org.deeplearning4j.rl4j.policy.Policy;
import org.deeplearning4j.rl4j.space.DiscreteSpace;
import org.deeplearning4j.rl4j.util.Constants;
import org.deeplearning4j.rl4j.util.DataManager;
import org.deeplearning4j.util.ModelSerializer;
import org.nd4j.linalg.activations.Activation;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;
import org.nd4j.linalg.learning.config.Adam;
import org.nd4j.linalg.lossfunctions.LossFunctions;
import rl.dqn.reinforcement.dqn.config.DqnSettings;
import rl.dqn.reinforcement.dqn.nn.TenhouArray;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class A3CTenhouDense extends A3CDiscrete<rl.dqn.reinforcement.dqn.nn.TenhouArray> {
static Logger StaticLogger = LoggerFactory.getLogger(A3CTenhouDense.class + "static");
Logger logger = LoggerFactory.getLogger(A3CTenhouDense.class);
private ACPolicy tenhouPolicy = null;
private int saveCounter = 0;
public static ComputationGraph CreateComputeGraph(ActorCriticFactoryCompGraphStdDense.Configuration netConf, int numInputs, int numOutputs) {
ComputationGraphConfiguration.GraphBuilder confB =
new NeuralNetConfiguration.Builder().seed(Constants.NEURAL_NET_SEED).iterations(1)
.optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT)
.learningRate(netConf.getLearningRate())
//.updater(Updater.NESTEROVS).momentum(0.9)
// .updater(Updater.RMSPROP).rmsDecay(conf.getRmsDecay())
.updater(netConf.getUpdater() != null ? netConf.getUpdater() : new Adam())
.weightInit(WeightInit.XAVIER)
.regularization(netConf.getL2() > 0)
.l2(netConf.getL2()).graphBuilder()
.setInputTypes(netConf.isUseLSTM() ? InputType.recurrent(numInputs)
: InputType.feedForward(numInputs)).addInputs("input")
.addLayer("0", new DenseLayer.Builder().nIn(numInputs)
.nOut(netConf.getNumHiddenNodes()).activation(Activation.RELU).build(),
"input");
for (int i = 1; i < netConf.getNumLayer(); i++) {
confB.addLayer(i + "", new DenseLayer.Builder().nIn(netConf.getNumHiddenNodes()).nOut(netConf.getNumHiddenNodes())
.activation(Activation.RELU).build(), (i - 1) + "");
}
if (netConf.isUseLSTM()) {
confB.addLayer(netConf.getNumLayer() + "", new LSTM.Builder().activation(Activation.TANH)
.nOut(netConf.getNumHiddenNodes()).build(), (netConf.getNumLayer() - 1) + "");
confB.addLayer("value", new RnnOutputLayer.Builder(LossFunctions.LossFunction.MSE).activation(Activation.IDENTITY)
.nOut(1).build(), netConf.getNumLayer() + "");
confB.addLayer("softmax", new RnnOutputLayer.Builder(new ActorCriticLoss()).activation(Activation.SOFTMAX)
.nOut(numOutputs).build(), netConf.getNumLayer() + "");
} else {
confB.addLayer("value", new OutputLayer.Builder(LossFunctions.LossFunction.MSE).activation(Activation.IDENTITY)
.nOut(1).build(), (netConf.getNumLayer() - 1) + "");
confB.addLayer("softmax", new OutputLayer.Builder(new ActorCriticLoss()).activation(Activation.SOFTMAX)
.nOut(numOutputs).build(), (netConf.getNumLayer() - 1) + "");
}
confB.setOutputs("value", "softmax");
confB.inputPreProcessor("0", new TenhouInputPreProcessor());
// Map<String, InputPreProcessor> processorMap = confB.getInputPreProcessors();
// for (Map.Entry<String, InputPreProcessor> entry: processorMap.entrySet()) {
// System.out.println(entry.getKey() + ": " + entry.getValue().getClass());
// }
ComputationGraphConfiguration cgconf = confB.pretrain(false).backprop(true).build();
ComputationGraph model = new ComputationGraph(cgconf);
model.init();
return model;
}
public static ActorCriticCompGraph CreateActorCritic(ActorCriticFactoryCompGraphStdDense.Configuration netConf, int numInputs, int numOutputs) {
ComputationGraph model = CreateComputeGraph(netConf, numInputs, numOutputs);
// model.init();
if (netConf.getListeners() != null) {
model.setListeners(netConf.getListeners());
} else {
model.setListeners(new ScoreIterationListener(Constants.NEURAL_NET_ITERATION_LISTENER));
}
return new ActorCriticCompGraph(model);
}
public static ActorCriticCompGraph LoadActorCritic(String modelFilePath, ActorCriticFactoryCompGraphStdDense.Configuration netConf, int numInputs, int numOutputs) throws Exception{
ComputationGraph newModel = CreateComputeGraph(netConf, numInputs, numOutputs);
ComputationGraph model = ModelSerializer.restoreComputationGraph(modelFilePath);
for (String key: newModel.paramTable().keySet()) {
System.out.println("Key " + key);
}
for (String key: model.paramTable().keySet()) {
System.out.println("Import Key " + key);
}
for (String key: newModel.paramTable().keySet()) {
if (!model.paramTable().containsKey(key)) {
StaticLogger.error("Does not contains layer " + key);
throw new Exception("Not the same model, missing " + key);
}else {
StaticLogger.info("Found layer " + key);
}
}
model.init();
if (netConf.getListeners() != null) {
model.setListeners(netConf.getListeners());
} else {
model.setListeners(new ScoreIterationListener(Constants.NEURAL_NET_ITERATION_LISTENER));
}
return new ActorCriticCompGraph(model);
}
public static ActorCriticCompGraph ImportActorCritic(String modelFilePath, ActorCriticFactoryCompGraphStdDense.Configuration netConf, int numInputs, int numOutputs) throws Exception {
ComputationGraph importModel = ModelSerializer.restoreComputationGraph(modelFilePath);
ComputationGraph newModel = CreateComputeGraph(netConf, numInputs, numOutputs);
Map<String, INDArray> paramTable = importModel.paramTable();
Map<String, INDArray> newParamTable = newModel.paramTable();
newModel.init();
for (String key: paramTable.keySet()) {
StaticLogger.info("Load param for " + key);
if (newParamTable.containsKey(key)) {
StaticLogger.info("Set params for " + key);
newModel.setParam(key, paramTable.get(key));
}
}
// newModel.setUpdater(importModel.getUpdater());
if (netConf.getListeners() != null) {
newModel.setListeners(netConf.getListeners());
} else {
newModel.setListeners(new ScoreIterationListener(Constants.NEURAL_NET_ITERATION_LISTENER));
}
return new ActorCriticCompGraph(newModel);
}
public A3CTenhouDense(MDP<TenhouArray, Integer, DiscreteSpace> mdp, A3CConfiguration conf,
DataManager dataManager, IActorCritic actorCritic) {
super(mdp, actorCritic, conf, dataManager);
this.tenhouPolicy = new ACTenhouPolicy(actorCritic);
}
public ACPolicy getPolicy() {
return tenhouPolicy;
}
protected AsyncThread newThread(int i) {
return new A3CTenhouThreadDiscrete(mdp.newInstance(), getAsyncGlobal(), getConfiguration(), i, getDataManager());
}
public void train() {
try {
logger.info("AsyncLearning training starting.");
launchThreads();
//this is simply for stat purposes
getDataManager().writeInfo(this);
synchronized (this) {
while (!isTrainingComplete() && getAsyncGlobal().isRunning()) {
// getPolicy().play(getMdp(), getHistoryProcessor());
// getDataManager().writeInfo(this);
logger.info("---------------------> Wait 60000");
wait(60000);
saveCounter ++;
if (saveCounter >= DqnSettings.UpdateTillSave()) {
saveCounter = 0;
String fileName = DqnSettings.ModelFileName() + System.currentTimeMillis();
logger.info("Writing model into " + fileName);
this.getNeuralNet().save(fileName);
}
}
}
} catch (Exception e) {
logger.error("Training failed " + e);
e.printStackTrace();
}
}
public void launchThreads() {
startGlobalThread();
for (int i = 0; i < getConfiguration().getNumThread(); i++) {
Thread t = newThread(i);
Nd4j.getAffinityManager().attachThreadToDevice(t,
(i + 1) % Nd4j.getAffinityManager().getNumberOfDevices());
t.start();
}
logger.info("Threads launched");
}
}
| [
"[email protected]"
] | |
169e2ff0624377a259d965f3dba9048ef376d039 | ba079b6661335753516e2b96c01b418359310c35 | /app/src/test/java/nullwarp/popmusicianslist/ExampleUnitTest.java | 4f9530479d0db718c1c1f2868b4c1f51ac3e0916 | [
"Apache-2.0"
] | permissive | qoob/YaMobilizationTask0 | bc1b640844e54c1c8023f14e1a66171853c2b82a | 3366d49ec31d07e15f5680a3afd3cfac84e4baf4 | refs/heads/master | 2021-01-01T04:40:53.411207 | 2016-04-23T13:02:50 | 2016-04-23T13:02:50 | 56,917,497 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 329 | java | package nullwarp.popmusicianslist;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
/**
* 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);
}
} | [
"[email protected]"
] | |
ebb275bb99b977977ceeac55bff311b01c98dc2e | ff64d4e96b74bf84ceae54c63da78fbf9278af91 | /jmsSource/src/main/java/io/vantiq/extsrc/jmsSource/JMSMain.java | 6a749846070c7e5a9c99f03411c342658c6507d8 | [
"MIT",
"Apache-2.0"
] | permissive | jangocheng/vantiq-extension-sources | 526e0d493a37eb9db63996efcb01e7f8bef5eb07 | 3653d137fa3b69710f3784389a1055746c22a8e1 | refs/heads/master | 2020-11-26T05:01:43.254162 | 2019-12-11T21:42:07 | 2019-12-11T21:42:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,605 | java | /*
* Copyright (c) 2019 Vantiq, Inc.
*
* All rights reserved.
*
* SPDX: MIT
*/
package io.vantiq.extsrc.jmsSource;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The main class of this program. It connects to sources using the specified configuration. All sources must belong to
* the same VANTIQ Server & Namespace (i.e. same authtoken). Options are in a file where each option has its own line,
* and is in the form {@code property=value} with no quotes required for Strings. Options are:
* <ul>
* <li>{@code authToken}: Required. The authentication token to connect with. These can be obtained from the
* namespace admin.
* <li>{@code sources}: Required. A comma separated list of the sources to which you wish to connect. Whitespace
* around each name will be removed when read.
* <li>{@code targetServer}: Required. The Vantiq server hosting the sources.
* </ul>
*/
public class JMSMain {
static final Logger log = LoggerFactory.getLogger(JMSMain.class);
static List<JMSCore> sources;
static String authToken;
static String targetVantiqServer;
// Exit Error Codes
static final int NO_AUTH_EXIT = 1;
static final int NO_SOURCE_EXIT = 2;
static final int NO_SERVER_EXIT = 3;
static final int NO_CONFIG_EXIT = 4;
/**
* Connects to the Vantiq source and starts polling for data. Exits when all sources are done running.
* @param args Should be either null or the first argument as a config file
*/
public static void main(String[] args) {
Properties config = null;
if (args == null || args.length < 1) {
config = obtainServerConfig("server.config");
} else if (args != null && args.length == 1) {
config = obtainServerConfig(args[0]);
} else {
log.error("Wrong number of arguments\n" + "Usage: <yourProgramInvocation> [localConfigFile]");
exit(NO_CONFIG_EXIT);
}
sources = createSources(config);
startSources(sources);
// Can leave now because the threads created by the sources' WebSocket connections will keep the JVM alive
}
/**
* Starts every source, giving each up to 10 seconds to connect. Starts them in new threads so they don't block.
* @param sources The list of sources which should be started.
*/
private static void startSources(List<JMSCore> sources) {
for (JMSCore source : sources) {
// Starting in threads so they can all connect at once
new Thread( () -> {source.start(10);} ).start();;
}
}
/**
* Turn the given configuration file into a {@link Map}.
*
* @param fileName The name of the configuration file holding the server configuration.
* @return The properties specified in the file.
*/
static Properties obtainServerConfig(String fileName) {
File configFile = new File(fileName);
Properties properties = new Properties();
try {
properties.load(new FileReader(fileName));
} catch (IOException e) {
throw new RuntimeException("Could not find valid server configuration file. Expected location: '"
+ configFile.getAbsolutePath() + "'", e);
} catch (Exception e) {
throw new RuntimeException("Error occurred when trying to read the server configuration file. "
+ "Please ensure it is formatted properly.", e);
}
return properties;
}
/**
* Sets up the defaults for the server based on the configuration file
*
* @param config The Properties obtained from the configuration file
*/
static List<JMSCore> createSources(Properties config) {
authToken = config.getProperty("authToken");
if (authToken == null) {
log.error("No valid authentication token in server settings");
log.error("Exiting...");
exit(NO_AUTH_EXIT);
}
String sourceStr = config.getProperty("sources");
if (sourceStr == null || sourceStr.equals("")) {
log.error("No sources in server settings");
log.error("Exiting...");
exit(NO_SOURCE_EXIT);
}
targetVantiqServer = config.getProperty("targetServer");
if (targetVantiqServer == null || targetVantiqServer.equals("")) {
log.error("No server URL specified in server settings");
log.error("Exiting...");
exit(NO_SERVER_EXIT);
}
// Obtain potentially multiple sources from a comma delimited string of sources
String[] sourceNames = sourceStr.split(",");
sources = new ArrayList<>();
for (String sourceName : sourceNames) {
sourceName = sourceName.trim(); // remove any spacing from the name
JMSCore source;
source = new JMSCore(sourceName, authToken, targetVantiqServer);
sources.add(source);
}
return sources;
}
/**
* Closes all sources then orders the JVM to exit
* @param code The exit code
*/
public static void exit(int code) {
if (sources != null) {
for (JMSCore source : sources) {
source.stop();
}
}
System.exit(code);
}
}
| [
"[email protected]"
] | |
1ac5d175b95b76ec4f4bb2d209009a896b3fc84c | 119082baa446c1c5b1558c17cf13231bd30480f3 | /app/src/test/java/com/tae/stringexpresion/PresenterTest.java | 9a7780ba5384c8fba8ef215d90f5bd01b48be9a2 | [] | no_license | epalaciosTAE/StringExpression | 3810c85e3f1b0406b512d749d0d6837569aaa8d7 | d9afdb346a17a7b4e9b4828a0e1cc61a6f9050ed | refs/heads/master | 2020-12-24T20:15:30.229384 | 2016-04-26T11:52:34 | 2016-04-26T11:52:34 | 57,123,707 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,353 | java | package com.tae.stringexpresion;
import org.junit.Before;
import org.junit.Test;
import java.lang.reflect.Method;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
/**
* Created by Eduardo on 26/04/2016.
*/
public class PresenterTest {
private static String METHOD_CALCULATE = "calculate";
private static String METHOD_MATCH = "match";
private PresenterImpl presenter;
private Method calculate, match;
private Class matchType;
private Class[] caculateTypes;
private String[] calculateParams;
@Before
public void setUp()throws Exception{
presenter = new PresenterImpl();
caculateTypes = new Class[3];
caculateTypes[0] = String.class;
caculateTypes[1] = String.class;
caculateTypes[2] = String.class;
calculate = presenter.getClass().getDeclaredMethod(METHOD_CALCULATE, caculateTypes);
calculate.setAccessible(true);
calculateParams = new String[3];
matchType = Matcher.class;
match = presenter.getClass().getDeclaredMethod(METHOD_MATCH, matchType);
match.setAccessible(true);
}
@Test
public void presenter_ShouldBeInitialize() throws Exception {
assertNotNull(presenter);
}
@Test
public void match_ShouldMatch() throws Exception {
String input = "5+5";
Pattern number = Pattern.compile("([0-9]*)");
Pattern operator = Pattern.compile("([-+*/])");
Matcher matcherNumber = number.matcher(input);
Matcher matcherOperator = operator.matcher(input);
List<String> numList = (List<String>) match.invoke(presenter, matcherNumber);
assertTrue(numList.size() > 0);
List<String> opList = (List<String>) match.invoke(presenter, matcherOperator);
assertTrue(opList.size() > 0);
}
@Test
public void calculate_ShouldReturnSumValue() throws Exception {
calculateParams[0] = "5.5";
calculateParams[1] = "5";
calculateParams[2] = "+";
double result = (double) calculate.invoke(presenter, calculateParams);
assertThat(result, is(equalTo(10.5)));
}
@Test
public void calculate_ShouldReturnSubstactionValue() throws Exception {
calculateParams[0] = "5";
calculateParams[1] = "5";
calculateParams[2] = "-";
double result = (double) calculate.invoke(presenter, calculateParams);
assertThat(result, is(equalTo(0.0)));
}
@Test
public void calculate_ShouldReturnMultiplicationValue() throws Exception {
calculateParams[0] = "5";
calculateParams[1] = "5";
calculateParams[2] = "*";
double result = (double) calculate.invoke(presenter, calculateParams);
assertThat(result, is(equalTo(25.0)));
}
@Test
public void calculate_ShouldReturnDivisionValue() throws Exception {
calculateParams[0] = "25";
calculateParams[1] = "5";
calculateParams[2] = "/";
double result = (double) calculate.invoke(presenter, calculateParams);
assertThat(result, is(equalTo(5.0)));
}
}
| [
"[email protected]"
] | |
3a8a37220400a930dbe8946dbbfc69afb6caec6c | c232f9a6b6e6841a3f3db61d5b717922bbfa7069 | /EasyBuyProject/src/com/duan/m/dao/impl/ECommDaoImpl.java | 2727f5b7e4f5d37590bb9731db9305a22dd66808 | [] | no_license | duanqingxx/HgRepository | bd4e48f4e88e6478b6938ce7b2528dc3cfa4cd0d | 05bb00feb9eb622d0437cff81ce0b74511f6190f | refs/heads/master | 2020-04-27T20:59:37.659510 | 2019-03-09T12:28:42 | 2019-03-09T12:28:42 | 174,679,398 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,074 | java | package com.duan.m.dao.impl;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import com.duan.m.dao.ECommDao;
import com.duan.m.entity.EComment;
import com.duan.m.utils.BaseDao;
public class ECommDaoImpl implements ECommDao {
private Connection conn=null;
public ECommDaoImpl(Connection conn){
this.conn=conn;
}
@Override
public int selectCommCount() {
int count=0;
String sql="select count(1) count from easybuy_comment";
PreparedStatement ptm=null;
ResultSet rs=null;
try {
ptm=conn.prepareStatement(sql);
rs=ptm.executeQuery();
if(rs.next()) count=rs.getInt("count");
} catch (SQLException e) {
System.out.println("selectCommCount error");
}finally {
BaseDao.close(null, ptm, rs);
}
return count;
}
@Override
public List<EComment> selectCommList(int start, int end) {
List<EComment> list=new ArrayList<EComment>();
String sql="SELECT T2.ec_id,T2.ec_content,T2.ec_create_time,"
+" T2.ec_reply,T2.ec_reply_time,T2.ec_nick_name"
+" FROM(SELECT ROWNUM rw,T1.* FROM"
+" (SELECT * FROM EASYBUY_COMMENT ORDER BY EC_CREATE_TIME DESC)t1"
+" WHERE ROWNUM<=?)t2"
+" WHERE T2.rw>=?";
PreparedStatement ptm=null;
ResultSet rs=null;
try {
ptm=conn.prepareStatement(sql);
ptm.setInt(1, end);
ptm.setInt(2, start);
rs=ptm.executeQuery();
while(rs.next()){
EComment comment=new EComment();
comment.setEc_id(rs.getInt("ec_id"));
comment.setEc_content(rs.getString("ec_content"));
comment.setEc_create_time(rs.getTimestamp("ec_create_time"));
comment.setEc_reply(rs.getString("ec_reply"));
comment.setEc_reply_time(rs.getTimestamp("ec_reply_time"));
comment.setEc_nick_name(rs.getString("ec_nick_name"));
list.add(comment);
}
} catch (SQLException e) {
System.out.println("selectCommList error");
}finally {
BaseDao.close(null, ptm, rs);
}
return list;
}
@Override
public int selectMaxId() {
int maxid=0;
String sql="select max(ec_id) maxid from easybuy_comment";
PreparedStatement ptm=null;
ResultSet rs=null;
try {
ptm=conn.prepareStatement(sql);
rs=ptm.executeQuery();
if(rs.next()) maxid=rs.getInt("maxid");
} catch (SQLException e) {
System.out.println("selectMaxId error");
}finally {
BaseDao.close(null, ptm, rs);
}
return maxid;
}
@Override
public boolean insertComm(EComment comment) {
boolean b=false;
String sql="INSERT INTO EASYBUY_COMMENT"
+ " (EC_ID,EC_CONTENT,EC_CREATE_TIME,EC_NICK_NAME)"
+ " VALUES(?,?,?,?)";
PreparedStatement ptm=null;
try {
ptm=conn.prepareStatement(sql);
ptm.setInt(1, comment.getEc_id());
ptm.setString(2, comment.getEc_content());
ptm.setTimestamp(3, comment.getEc_create_time());
ptm.setString(4, comment.getEc_nick_name());
int i=ptm.executeUpdate();
if(i>0) b=true;
} catch (SQLException e) {
System.out.println("insertComm error");
}finally {
BaseDao.close(null, ptm, null);
}
return b;
}
@Override
public boolean deleteComm(int ec_id) {
boolean b=false;
String sql="delete from easybuy_comment where ec_id=?";
PreparedStatement ptm=null;
try {
ptm=conn.prepareStatement(sql);
ptm.setInt(1, ec_id);
int i=ptm.executeUpdate();
if(i>0) b=true;
} catch (SQLException e) {
System.out.println("deleteComm error");
}finally {
BaseDao.close(null, ptm, null);
}
return b;
}
@Override
public boolean updateComm(EComment comment) {
boolean b=false;
String sql="update easybuy_comment set ec_reply=?,"
+ " ec_reply_time=?"
+ " where ec_id=?";
PreparedStatement ptm=null;
try {
ptm=conn.prepareStatement(sql);
ptm.setString(1, comment.getEc_reply());
ptm.setTimestamp(2, comment.getEc_reply_time());
ptm.setInt(3, comment.getEc_id());
int i=ptm.executeUpdate();
if(i>0) b=true;
} catch (SQLException e) {
System.out.println("updateComm error");
}finally {
BaseDao.close(null, ptm, null);
}
return b;
}
}
| [
"[email protected]"
] | |
5397b262ea473613913c8ab9444c1614eefa8807 | a1e0706bf1bc83919654b4517730c9aed6499355 | /protobuf/protoeditor-core/gen/com/intellij/protobuf/lang/psi/impl/PbMethodOptionsImpl.java | e3a005cf4282d7e4a3ea0940a4fc7e82ba21ef33 | [] | no_license | JetBrains/intellij-plugins | af734c74c10e124011679e3c7307b63d794da76d | f6723228208bfbdd49df463046055ea20659b519 | refs/heads/master | 2023-08-23T02:59:46.681310 | 2023-08-22T13:35:06 | 2023-08-22T15:23:46 | 5,453,324 | 2,018 | 1,202 | null | 2023-09-13T10:51:36 | 2012-08-17T14:31:20 | Java | UTF-8 | Java | false | true | 1,335 | java | // This is a generated file. Not intended for manual editing.
package com.intellij.protobuf.lang.psi.impl;
import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiElementVisitor;
import com.intellij.psi.util.PsiTreeUtil;
import static com.intellij.protobuf.lang.psi.PbTypes.*;
import com.intellij.protobuf.lang.psi.*;
import com.intellij.protobuf.lang.psi.util.PbPsiImplUtil;
import static com.intellij.protobuf.lang.psi.ProtoTokenTypes.*;
public class PbMethodOptionsImpl extends PbElementBase implements PbMethodOptions {
public PbMethodOptionsImpl(ASTNode node) {
super(node);
}
public void accept(@NotNull PbVisitor visitor) {
visitor.visitMethodOptions(this);
}
@Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof PbVisitor) accept((PbVisitor)visitor);
else super.accept(visitor);
}
@Override
@NotNull
public List<PbOptionStatement> getOptionStatements() {
return PsiTreeUtil.getChildrenOfTypeAsList(this, PbOptionStatement.class);
}
@Override
@NotNull
public PsiElement getStart() {
return notNullChild(findChildByType(LBRACE));
}
@Override
@Nullable
public PsiElement getEnd() {
return findChildByType(RBRACE);
}
}
| [
"[email protected]"
] | |
08b174105ff62f0f41d342f1de78aa75bcca7796 | 9c42a9293ab7337289eb2169528e983230cd1c9c | /3 sem/homework1/task1/hw1t1/src/hw1t1/TreeIterator.java | 4477055f7629a81eb88c6ebcc3ade141fc3ffb33 | [] | no_license | SabinaIdrisova/Homeworks | 6a43d20177a8f0d9a8cb8b956e65d511d44981eb | af42a020c9ec5c6698a2d274673bca8d8be5750d | refs/heads/master | 2021-01-10T20:28:48.749387 | 2013-05-28T20:42:39 | 2013-05-28T20:42:39 | 3,575,009 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,224 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package hw1t1;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.Stack;
/**
*
* @param <T>
* @author 1
*/
public class TreeIterator<T> implements Iterator<T> {
/**
*
* @param tree
*/
public TreeIterator(Tree tree) {
this.current = tree.getRoot();
stack.push(current);
}
@Override
public boolean hasNext() {
return current != null;
}
@Override
public T next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
current = stack.pop();
T value = (T) current.getValue();
if (current.getRight() != null) {
stack.push(current.getRight());
}
if (current.getLeft() != null) {
stack.push(current.getLeft());
}
if (stack.empty()) {
current = null;
}
return value;
}
@Override
public void remove() {
throw new UnsupportedOperationException("Not supported yet.");
}
private Node current;
private Stack<Node> stack = new Stack<>();
}
| [
"[email protected]"
] | |
deb51ad0cfb0dd714f353797abcd4afa2d55ef53 | c6a0f71bc10963e445360392fafc1506cc470404 | /pride-jaxb/trunk/pride-jaxb-model/src/main/java/uk/ac/ebi/pride/jaxb/model/Data.java | 3044ecf451fa8e703385d4fd52ab088d0f2f52f0 | [] | no_license | PRIDE-Toolsuite/old-pride-toolsuite | 2d93fcef247a42343b661c9e3bf6310389e924fb | cac6b82d51b177eabc2c475c2c0e276aa485fd67 | refs/heads/master | 2021-01-17T05:56:19.073023 | 2015-03-02T09:59:23 | 2015-03-02T09:59:23 | 33,008,557 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,734 | java |
package uk.ac.ebi.pride.jaxb.model;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* The structure into which base64-encoded binary data go
*
* <p>Java class for dataType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="dataType">
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
* <attribute name="precision" use="required">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="32"/>
* <enumeration value="64"/>
* </restriction>
* </simpleType>
* </attribute>
* <attribute name="endian" use="required">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="big"/>
* <enumeration value="little"/>
* </restriction>
* </simpleType>
* </attribute>
* <attribute name="length" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "dataType", propOrder = {
"value"
})
public class Data
implements Serializable, PrideXmlObject
{
private final static long serialVersionUID = 100L;
@XmlValue
protected byte[] value;
@XmlAttribute(required = true)
protected String precision;
@XmlAttribute(required = true)
protected String endian;
@XmlAttribute(required = true)
protected int length;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* byte[]
*/
public byte[] getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* byte[]
*/
public void setValue(byte[] value) {
this.value = ((byte[]) value);
}
/**
* Gets the value of the precision property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPrecision() {
return precision;
}
/**
* Sets the value of the precision property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPrecision(String value) {
this.precision = value;
}
/**
* Gets the value of the endian property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getEndian() {
return endian;
}
/**
* Sets the value of the endian property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setEndian(String value) {
this.endian = value;
}
/**
* Gets the value of the length property.
*
*/
public int getLength() {
return length;
}
/**
* Sets the value of the length property.
*
*/
public void setLength(int value) {
this.length = value;
}
}
| [
"[email protected]"
] | |
432b2faed2598aa930bbdb3c4d1bfbedf640ea20 | 6e893cacd170cfcb45d5a74b947eaf7ab6a21ac3 | /android/app/src/main/java/com/multiscreen_app/MainApplication.java | d46847b1732cc33097c97b8d784b18bcff96608d | [
"MIT"
] | permissive | Elektro1776/Saturday_lesson_RN-day03 | ad0e31b75563ae93ae3da1c9ec90006f9d7502ea | 65ca2537de6abeaa3a2acfb6f65f6dc5a3a97546 | refs/heads/master | 2021-05-16T09:13:15.066544 | 2017-09-21T19:02:27 | 2017-09-21T19:02:27 | 104,379,035 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 963 | java | package com.multiscreen_app;
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
import java.util.Arrays;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage()
);
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
}
| [
"[email protected]"
] | |
630a001c230aa31328af879d201645717a514675 | b695b66b753bdb77da8c5b719d082b42ac716443 | /src/com/factory/Sedan.java | 9fda91c67b2e472d069d53914e7cda673e970895 | [] | no_license | pumaranikar/JavaDS | a0441762106d9aca7429f2d33d74e4bc22e6035c | be381481c953844d8aa8a263d5e4847034fe6bd0 | refs/heads/master | 2021-01-10T04:40:06.842081 | 2016-08-25T13:41:09 | 2016-08-25T13:41:09 | 43,795,585 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 253 | java | package com.factory;
public class Sedan extends Cars{
@Override
public String getName() {
// TODO Auto-generated method stub
return "Sedan";
}
@Override
public String getColor() {
// TODO Auto-generated method stub
return "White";
}
}
| [
"[email protected]"
] | |
f776d67a2474aa77fbfbc38eb126f23805ad2781 | 02f363a8e59eec4f7f6e1403a30408644fea9d76 | /src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java | f981dd6edc01ab47f4be629ae298c574930f4469 | [
"Apache-2.0"
] | permissive | liudebin/zero-springframework | 43a7dee3569f38b6e62b36b45270b4259b3e8148 | dcb6b11b1a17bd4f934527edccf8d1dc8ff4fb4f | refs/heads/master | 2021-07-04T10:55:36.695965 | 2019-03-21T08:21:13 | 2019-03-21T08:21:13 | 107,293,540 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,623 | java | /*
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.support;
import org.springframework.lang.Nullable;
import org.springframework.util.PatternMatchUtils;
import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
/**
* Pointcut bean for simple method name matches, as alternative to regexp patterns.
* Does not handle overloaded methods: all methods with a given name will be eligible.
*
* @author Juergen Hoeller
* @author Rod Johnson
* @author Rob Harrop
* @since 11.02.2004
* @see #isMatch
*/
@SuppressWarnings("serial")
public class NameMatchMethodPointcut extends StaticMethodMatcherPointcut implements Serializable {
private List<String> mappedNames = new LinkedList<>();
/**
* Convenience method when we have only a single method name to match.
* Use either this method or {@code setMappedNames}, not both.
* @see #setMappedNames
*/
public void setMappedName(String mappedName) {
setMappedNames(mappedName);
}
/**
* Set the method names defining methods to match.
* Matching will be the union of all these; if any match,
* the pointcut matches.
*/
public void setMappedNames(@Nullable String... mappedNames) {
this.mappedNames = new LinkedList<>();
if (mappedNames != null) {
this.mappedNames.addAll(Arrays.asList(mappedNames));
}
}
/**
* Add another eligible method name, in addition to those already named.
* Like the set methods, this method is for use when configuring proxies,
* before a proxy is used.
* <p><b>NB:</b> This method does not work after the proxy is in
* use, as advice chains will be cached.
* @param name name of the additional method that will match
* @return this pointcut to allow for multiple additions in one line
*/
public NameMatchMethodPointcut addMethodName(String name) {
this.mappedNames.add(name);
return this;
}
@Override
public boolean matches(Method method, @Nullable Class<?> targetClass) {
for (String mappedName : this.mappedNames) {
if (mappedName.equals(method.getName()) || isMatch(method.getName(), mappedName)) {
return true;
}
}
return false;
}
/**
* Return if the given method name matches the mapped name.
* <p>The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches,
* as well as direct equality. Can be overridden in subclasses.
* @param methodName the method name of the class
* @param mappedName the name in the descriptor
* @return if the names match
* @see org.springframework.util.PatternMatchUtils#simpleMatch(String, String)
*/
protected boolean isMatch(String methodName, String mappedName) {
return PatternMatchUtils.simpleMatch(mappedName, methodName);
}
@Override
public boolean equals(Object other) {
return (this == other || (other instanceof NameMatchMethodPointcut &&
this.mappedNames.equals(((NameMatchMethodPointcut) other).mappedNames)));
}
@Override
public int hashCode() {
return this.mappedNames.hashCode();
}
}
| [
"[email protected]"
] | |
991e3f833c9094f63241c876fc6bf66b458b12d1 | eb6097f4924e8a2e03f40dbd01cd73465a7175b7 | /chatcommon/src/main/java/com/crazymakercircle/cocurrent/FutureTaskScheduler.java | 8edc7c42419434d7ce869c5941718dfadc92ccbd | [] | no_license | J-doIt/Java-high-concurrency-core-Programming-Volume-2-source-code-master | 8ae4ba6abce791a2505c946ca032ad52ad3c23b7 | e28307d5c71e2d2d568329135dfff9d67a4faf7e | refs/heads/main | 2023-09-01T09:27:02.546020 | 2021-10-14T15:41:29 | 2021-10-14T15:41:29 | 417,183,435 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,239 | java | /**
* Created by 尼恩 at 疯狂创客圈
*/
package com.crazymakercircle.cocurrent;
import org.apache.log4j.Logger;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class FutureTaskScheduler extends Thread
{
private final Logger logger = Logger.getLogger(this.getClass());
private ConcurrentLinkedQueue<ExecuteTask> executeTaskQueue =
new ConcurrentLinkedQueue<ExecuteTask>();// 任务队列
private long sleepTime = 200;// 线程休眠时间
private ExecutorService pool = Executors.newFixedThreadPool(20);
private static FutureTaskScheduler inst = new FutureTaskScheduler();
private FutureTaskScheduler()
{
this.start();
}
/**
* 添加任务
*
* @param executeTask
*/
public static void add(ExecuteTask executeTask)
{
inst.executeTaskQueue.add(executeTask);
}
@Override
public void run()
{
while (true)
{
handleTask();// 处理任务
threadSleep(sleepTime);
}
}
private void threadSleep(long time)
{
try
{
sleep(time);
} catch (InterruptedException e)
{
logger.error(e);
}
}
/**
* 处理任务队列,检查其中是否有任务
*/
private void handleTask()
{
try
{
ExecuteTask executeTask;
while (executeTaskQueue.peek() != null)
{
executeTask = executeTaskQueue.poll();
handleTask(executeTask);
}
} catch (Exception e)
{
logger.error(e);
}
}
/**
* 执行任务操作
*
* @param executeTask
*/
private void handleTask(ExecuteTask executeTask)
{
pool.execute(new ExecuteRunnable(executeTask));
}
class ExecuteRunnable implements Runnable
{
ExecuteTask executeTask;
ExecuteRunnable(ExecuteTask executeTask)
{
this.executeTask = executeTask;
}
public void run()
{
executeTask.execute();
}
}
}
| [
"[email protected]"
] | |
6311d10204b0a5a212b5a70ac2c700b3412a1d20 | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module0186/src/java/module0186/a/IFoo1.java | 95bc0d061eb088f8420aa8073da81b277d96a8d7 | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 817 | java | package module0186.a;
import java.rmi.*;
import java.nio.file.*;
import java.sql.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see java.util.logging.Filter
* @see java.util.zip.Deflater
* @see javax.annotation.processing.Completion
*/
@SuppressWarnings("all")
public interface IFoo1<N> extends module0186.a.IFoo0<N> {
javax.lang.model.AnnotatedConstruct f0 = null;
javax.management.Attribute f1 = null;
javax.naming.directory.DirContext f2 = null;
String getName();
void setName(String s);
N get();
void set(N e);
}
| [
"[email protected]"
] | |
d893edf4082f7c6fe451732b67f68a47f56a47a7 | f66d9b2564a84e344e21e122971c9344a3c7c6ca | /appops.platform.client/src/main/java/in/appops/client/common/contactmodel/ContactSelectorModel.java | 4731b4c66519d70f0da995073e8f92546a7ca506 | [] | no_license | aino-gautam/Deprecated_AppOpsClient | b52334d4410cbba32618aef2968314581ff7a90e | 9f98b9fa6636f466d8ed0a81b6f5d6aa445e1f27 | refs/heads/master | 2020-03-30T14:23:59.471498 | 2013-04-04T11:56:25 | 2013-04-04T11:56:25 | 8,153,517 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,862 | java | package in.appops.client.common.contactmodel;
import java.util.HashMap;
import java.util.Map;
import com.google.gwt.user.client.rpc.AsyncCallback;
import in.appops.client.common.core.EntityListModel;
import in.appops.client.common.event.AppUtils;
import in.appops.client.common.event.SelectionEvent;
import in.appops.platform.bindings.web.gwt.dispatch.client.action.DispatchAsync;
import in.appops.platform.bindings.web.gwt.dispatch.client.action.StandardAction;
import in.appops.platform.bindings.web.gwt.dispatch.client.action.StandardDispatchAsync;
import in.appops.platform.bindings.web.gwt.dispatch.client.action.exception.DefaultExceptionHandler;
import in.appops.platform.core.entity.Entity;
import in.appops.platform.core.entity.query.Query;
import in.appops.platform.core.operation.Result;
import in.appops.platform.core.util.EntityList;
public class ContactSelectorModel extends EntityListModel {
private boolean isNearByContact;
private boolean isYourContact;
private boolean isContactKnown;
private final DefaultExceptionHandler exceptionHandler = new DefaultExceptionHandler();
private final DispatchAsync dispatch = new StandardDispatchAsync(exceptionHandler);
private EntityList entityList;
public EntityList getEntityList() {
return entityList;
}
public void setEntityList(EntityList entityList) {
this.entityList = entityList;
}
public ContactSelectorModel(Query query, String operatioName, int noOfEntities) {
setQueryToBind(query);
setOperationNameToBind(operatioName);
setNoOfEntities(noOfEntities);
}
public boolean isNearByContact() {
return isNearByContact;
}
public void setNearByContact(boolean isNearByContact) {
this.isNearByContact = isNearByContact;
}
public boolean isYourContact() {
return isYourContact;
}
public void setYourContact(boolean isYourContact) {
this.isYourContact = isYourContact;
}
public boolean isContactKnown() {
return isContactKnown;
}
public void setContactKnown(boolean isContactKnown) {
this.isContactKnown = isContactKnown;
}
public void fetchContactEntityList() {
Query query = getQueryToBind();
Map parameterMap = new HashMap();
parameterMap.put("query", query);
StandardAction action = new StandardAction(EntityList.class, "contact.ContactService.getEntityList", parameterMap);
dispatch.execute(action, new AsyncCallback<Result>() {
@Override
public void onFailure(Throwable caught) {
caught.printStackTrace();
}
@Override
public void onSuccess(Result result) {
EntityList contactList = (EntityList) result.getOperationResult();
setEntityList(contactList);
SelectionEvent selectionEvent = new SelectionEvent();
selectionEvent.setEventType(SelectionEvent.DATARECEIVED);
selectionEvent.setEventData(getEntityList());
AppUtils.EVENT_BUS.fireEvent(selectionEvent);
}
});
}
}
| [
"[email protected]"
] | |
5201d40b9920c19e30aea00d9dda3dbca94b093c | 78008c231f8c19e3588929fd11881b141b8195c9 | /src/main/java/com/hh/leetcode/array/FindDuplicate.java | 85631f560482845baa2e03d86a3efaf41843c716 | [] | no_license | LeslieHao/leetcode | c190077f8c794c0b202f2f0c0778b8fd0dc17f66 | 5f8c0596d12c1a57fbd2655383c2680345ee2acd | refs/heads/master | 2023-06-30T17:28:08.185504 | 2022-07-20T15:11:50 | 2022-07-20T15:11:50 | 145,954,296 | 0 | 0 | null | 2023-06-14T22:46:57 | 2018-08-24T06:53:22 | Java | UTF-8 | Java | false | false | 1,572 | java | package com.hh.leetcode.array;
/**
* 287. 寻找重复数
* 给定一个包含 n + 1 个整数的数组 nums ,其数字都在 [1, n] 范围内(包括 1 和 n),可知至少存在一个重复的整数。
*
* 假设 nums 只有 一个重复的整数 ,返回 这个重复的数 。
*
* 你设计的解决方案必须 不修改 数组 nums 且只用常量级 O(1) 的额外空间。
*
*
*
* 示例 1:
*
* 输入:nums = [1,3,4,2,2]
* 输出:2
* 示例 2:
*
* 输入:nums = [3,1,3,4,2]
* 输出:3
*
*
* 提示:
*
* 1 <= n <= 105
* nums.length == n + 1
* 1 <= nums[i] <= n
* nums 中 只有一个整数 出现 两次或多次 ,其余整数均只出现 一次
*
* @author HaoHao
* @date 2022/7/19 10:28 下午
*/
public class FindDuplicate {
public static void main(String[] args) {
FindDuplicate test = new FindDuplicate();
System.out.println(test.findDuplicate(new int[]{1, 2, 3, 4, 2, 2}));
}
/**
* 0->1
* 1->3
* 2->4
* 3->2
* 4->2
*
* 0-1-3-2-4-2
*
* @param nums
* @return
*/
public int findDuplicate(int[] nums) {
// 构造环形链表
int fast = 0;
int slow = 0;
slow = nums[slow];
fast = nums[nums[fast]];
while (slow != fast) {
slow = nums[slow];
fast = nums[nums[fast]];
}
// 相遇之后
fast = 0;
while (slow != fast) {
slow = nums[slow];
fast = nums[fast];
}
return slow;
}
}
| [
"[email protected]"
] | |
47fde758dc8e221c29ac333e2e835d6bcca9a8c4 | bbfa10447923afaa66762909100857b232540041 | /src/com/timelineauction/fragments/HomeFragment.java | 21f18199fd76f1320a9ef913d19931753769d216 | [] | no_license | schidler/TimelineAuction | 2acb76bda9a61dae3fa3daa0878efda8e470181a | 13791ab1a876da925f19a7249d0785ea74b4b713 | refs/heads/master | 2021-01-17T03:42:15.898845 | 2012-11-15T03:10:10 | 2012-11-15T03:10:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,959 | java | package com.timelineauction.fragments;
import java.util.ArrayList;
import java.util.HashMap;
import com.timelineauction.activities.DetailActivity;
import com.timelineauction.activities.MainActivity;
import com.timelineauction.activities.R;
import com.timelineauction.activities.R.string;
import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.TextView;
import android.widget.Toast;
public class HomeFragment extends Fragment {
private String[][] data = new String[][] {
{ " Apple iPod shuffle", "5min", "14.5$" },
{ " Apple iPod shuffle", "13min", "14.5$" },
{ " Apple iPod shuffle", "23min", "14.5$" },
{ " Apple iPod shuffle", "40min", "14.5$" },
{ " Apple iPod shuffle", "40min", "14.5$" },
{ " Apple iPod shuffle", "40min", "14.5$" },
{ " Apple iPod shuffle", "40min", "14.5$" } };
private String[] keys = { "product_image", "product_title",
"product_time_left", "product_current_bid" };
private int[] identies = { R.id.product_image, R.id.product_title,
R.id.product_time_left, R.id.product_current_bid };
private ArrayList<HashMap<String, String>> producListData = new ArrayList<HashMap<String, String>>();
private SimpleAdapter simpleAdapter = null;
private ListView productListView = null;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_home, container, false);
this.productListView = (ListView) view
.findViewById(R.id.home_product_list);
for (int i = 0; i < this.data.length; i++) {
HashMap<String, String> map = new HashMap<String, String>();
map.put("product_image", String.valueOf(R.drawable.product));
map.put("product_title", data[i][0]);
map.put("product_time_left", data[i][1]);
map.put("product_current_bid", data[i][2]);
this.producListData.add(map);
}
this.simpleAdapter = new SimpleAdapter(super.getActivity().getBaseContext(),
this.producListData, R.layout.product_list, this.keys,
this.identies);
this.productListView.setAdapter(this.simpleAdapter);
this.productListView
.setOnItemClickListener(new ProductListViewOnItemClickListener());
return view;
}
private class ProductListViewOnItemClickListener implements
OnItemClickListener {
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
Intent intent = new
Intent(HomeFragment.this.getActivity().getApplicationContext(),
DetailActivity.class);
startActivity(intent);
// Toast.makeText(HomeFragment.this.getActivity()
// .getApplicationContext(), position + ":" + id,
// Toast.LENGTH_LONG);
}
}
}
| [
"[email protected]"
] | |
849a9541300d78f6f7720991d0158f37e6c32557 | bb144a9a3691eda39cf72954c32371b62a87cf34 | /src/weekthree/tuesday/inheritence/GenericDoctor.java | 7617cbf3e329b3860cfdb59084dd0fd249d96460 | [] | no_license | RobertWatkin/GatesHeadCollege | 6ef500031c1013d30edb3887ed531a80fac3c928 | 90a77338da41248c4ebb0ea5e06ba3d2135f2cef | refs/heads/master | 2022-02-28T20:40:23.370215 | 2019-10-14T09:18:39 | 2019-10-14T09:18:39 | 214,985,406 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 306 | java | package weekthree.tuesday.inheritence;
public class GenericDoctor{
String doctorType;
String[] patients;
public GenericDoctor(){
doctorType = "Generic Doctor";
}
private void treatPatient(){
System.out.println("The " + doctorType + " has treat the patient");
}
}
| [
"[email protected]"
] | |
f2532d61413e92a5da201d22d1f5b83cd698bbe1 | 532da3ed5c171ad1f1f7db846299abf2b9f5332d | /cloud-consumer-order80/src/main/java/com/wangq/springcloud/lb/MyLoadBalancer.java | 3a898e9b476929ccc157cdbff23296a38a284c04 | [] | no_license | wangq-oukei/springcloud2020 | be65eae2a139b5e4922f7b73ef4415b8a9c01c31 | 6116f9fcf256fad513b431c632a18a474bd6c9cc | refs/heads/master | 2023-02-10T13:18:35.006114 | 2021-01-03T13:56:27 | 2021-01-03T13:56:27 | 322,820,471 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 296 | java | package com.wangq.springcloud.lb;
import org.springframework.cloud.client.ServiceInstance;
import java.util.List;
/**
* @author songdan
* @Description
* @create 2020-12-21 11:32
*/
public interface MyLoadBalancer {
ServiceInstance instances(List<ServiceInstance> serviceInstances);
}
| [
"[email protected]"
] | |
ea99d30edb30f1d5e81a3600ea760b7e339f4280 | 829efcdfd6dceca456f10e2e0ae6e85d8efde558 | /Project Files/Database Work/B+ Tree Setup/src/main/java/edu/berkeley/cs186/database/index/BPlusTree.java | 261f0900a304655fe7e921c96a8cfd31afa6a9af | [] | no_license | samrstarks/projects | b1d0097c4cdd7360a0af87265e5cf3bb19cfa5c8 | 6ab42ddef968972ed366b95e280c6ad8c69d7c2b | refs/heads/master | 2021-09-01T12:20:12.957190 | 2017-12-27T00:16:11 | 2017-12-27T00:16:11 | 115,442,874 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 14,326 | java | package edu.berkeley.cs186.database.index;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Optional;
import com.sun.javafx.image.ByteToBytePixelConverter;
import com.sun.org.apache.regexp.internal.RE;
import edu.berkeley.cs186.database.common.Pair;
import edu.berkeley.cs186.database.databox.DataBox;
import edu.berkeley.cs186.database.databox.Type;
import edu.berkeley.cs186.database.io.Page;
import edu.berkeley.cs186.database.io.PageAllocator;
import edu.berkeley.cs186.database.table.RecordId;
/**
* A persistent B+ tree.
*
* // Create an order 2, integer-valued B+ tree that is persisted in tree.txt.
* BPlusTree tree = new BPlusTree("tree.txt", Type.intType(), 2);
*
* // Insert some values into the tree.
* tree.put(new IntDataBox(0), new RecordId(0, (short) 0));
* tree.put(new IntDataBox(1), new RecordId(1, (short) 1));
* tree.put(new IntDataBox(2), new RecordId(2, (short) 2));
*
* // Get some values out of the tree.
* tree.get(new IntDataBox(0)); // Optional.of(RecordId(0, 0))
* tree.get(new IntDataBox(1)); // Optional.of(RecordId(1, 1))
* tree.get(new IntDataBox(2)); // Optional.of(RecordId(2, 2))
* tree.get(new IntDataBox(3)); // Optional.empty();
*
* // Iterate over the record ids in the tree.
* tree.scanEqual(new IntDataBox(2)); // [(2, 2)]
* tree.scanAll(); // [(0, 0), (1, 1), (2, 2)]
* tree.scanGreaterEqual(new IntDataBox(1)); // [(1, 1), (2, 2)]
*
* // Remove some elements from the tree.
* tree.get(new IntDataBox(0)); // Optional.of(RecordId(0, 0))
* tree.remove(new IntDataBox(0));
* tree.get(new IntDataBox(0)); // Optional.empty()
*
* // Load the tree from disk.
* BPlusTree fromDisk = new BPlusTree("tree.txt");
*
* // All the values are still there.
* fromDisk.get(new IntDataBox(0)); // Optional.empty()
* fromDisk.get(new IntDataBox(1)); // Optional.of(RecordId(1, 1))
* fromDisk.get(new IntDataBox(2)); // Optional.of(RecordId(2, 2))
*/
public class BPlusTree {
public static final String FILENAME_PREFIX = "db";
public static final String FILENAME_EXTENSION = ".index";
private BPlusTreeMetadata metadata;
private Page headerPage;
private BPlusNode root;
// Constructors ////////////////////////////////////////////////////////////
/**
* Construct a new B+ tree which is serialized into the file `filename`,
* stores keys of type `keySchema`, and has order `order`. For example,
* `new BPlusTree("tree.txt", Type.intType(), 2)` constructs a B+ tree that
* is serialized to "tree.txt", that maps integers to record ids, and that
* has order 2.
*
* If the specified order is so large that a single node cannot fit on a
* single page, then a BPlusTree exception is thrown. If you want to have
* maximally full B+ tree nodes, then use the BPlusTree.maxOrder function
* to get the appropriate order.
*
* We reserve the first page (i.e. page number 0) of the file for a header
* page which contains:
*
* - the key schema of the tree,
* - the order of the tree, and
* - the page number of the root of the tree.
*
* All other pages are serializations of inner and leaf nodes. See
* writeHeader for details.
*/
public BPlusTree(String filename, Type keySchema, int order)
throws BPlusTreeException {
// Sanity checks.
if (order < 0) {
String msg = String.format(
"You cannot construct a B+ tree with negative order %d.",
order);
throw new BPlusTreeException(msg);
}
int maxOrder = BPlusTree.maxOrder(Page.pageSize, keySchema);
if (order > maxOrder) {
String msg = String.format(
"You cannot construct a B+ tree with order %d greater than the " +
"max order %d.",
order, maxOrder);
throw new BPlusTreeException(msg);
}
// Initialize the page allocator.
PageAllocator allocator = new PageAllocator(filename, true /* wipe */);
this.metadata = new BPlusTreeMetadata(allocator, keySchema, order);
// Allocate the header page.
int headerPageNum = allocator.allocPage();
assert(headerPageNum == 0);
this.headerPage = allocator.fetchPage(headerPageNum);
// Construct the root.
List<DataBox> keys = new ArrayList<>();
List<RecordId> rids = new ArrayList<>();
Optional<Integer> rightSibling = Optional.empty();
this.root = new LeafNode(this.metadata, keys, rids, rightSibling);
// Initialize the header page.
writeHeader(headerPage.getByteBuffer());
}
/** Read a B+ tree that was previously serialized to filename. */
public BPlusTree(String filename) {
PageAllocator allocator = new PageAllocator(filename, false);
this.headerPage = allocator.fetchPage(0);
ByteBuffer buf = headerPage.getByteBuffer();
Type keyschema = Type.fromBytes(buf);
Integer order = buf.getInt();
Integer page_num = buf.getInt();
this.metadata = new BPlusTreeMetadata(allocator, keyschema, order);
this.root = BPlusNode.fromBytes(this.metadata, page_num);
}
// Core API ////////////////////////////////////////////////////////////////
/**
* Returns the value associated with `key`.
*
* // Create a B+ tree and insert a single value into it.
* BPlusTree tree = new BPlusTree("t.txt", Type.intType(), 4);
* DataBox key = new IntDataBox(42);
* RecordId rid = new RecordId(0, (short) 0);
* tree.put(key, rid);
*
* // Get the value we put and also try to get a value we never put.
* tree.get(key); // Optional.of(rid)
* tree.get(new IntDataBox(100)); // Optional.empty()
*/
public Optional<RecordId> get(DataBox key) {
typecheck(key);
return this.root.get(key).getKey(key);
}
/**
* scanEqual(k) is equivalent to get(k) except that it returns an iterator
* instead of an Optional. That is, if get(k) returns Optional.empty(),
* then scanEqual(k) returns an empty iterator. If get(k) returns
* Optional.of(rid) for some rid, then scanEqual(k) returns an iterator
* over rid.
*/
public Iterator<RecordId> scanEqual(DataBox key) {
typecheck(key);
Optional<RecordId> rid = get(key);
if (rid.isPresent()) {
ArrayList<RecordId> l = new ArrayList<>();
l.add(rid.get());
return l.iterator();
} else {
return new ArrayList<RecordId>().iterator();
}
}
/**
* Returns an iterator over all the RecordIds stored in the B+ tree in
* ascending order of their corresponding keys.
*
* // Create a B+ tree and insert some values into it.
* BPlusTree tree = new BPlusTree("t.txt", Type.intType(), 4);
* tree.put(new IntDataBox(2), new RecordId(2, (short) 2));
* tree.put(new IntDataBox(5), new RecordId(5, (short) 5));
* tree.put(new IntDataBox(4), new RecordId(4, (short) 4));
* tree.put(new IntDataBox(1), new RecordId(1, (short) 1));
* tree.put(new IntDataBox(3), new RecordId(3, (short) 3));
*
* Iterator<RecordId> iter = tree.scanAll();
* iter.next(); // RecordId(1, 1)
* iter.next(); // RecordId(2, 2)
* iter.next(); // RecordId(3, 3)
* iter.next(); // RecordId(4, 4)
* iter.next(); // RecordId(5, 5)
* iter.next(); // NoSuchElementException
*
* Note that you CAN NOT materialize all record ids in memory and then
* return an iterator over them. Your iterator must lazily scan over the
* leaves of the B+ tree. Solutions that materialize all record ids in
* memory will receive 0 points.
*/
public Iterator<RecordId> scanAll() {
return new BPlusTreeIterator(this.root);
}
/**
* Returns an iterator over all the RecordIds stored in the B+ tree that
* are greater than or equal to `key`. RecordIds are returned in ascending
* of their corresponding keys.
*
* // Create a B+ tree and insert some values into it.
* BPlusTree tree = new BPlusTree("t.txt", Type.intType(), 4);
* tree.put(new IntDataBox(2), new RecordId(2, (short) 2));
* tree.put(new IntDataBox(5), new RecordId(5, (short) 5));
* tree.put(new IntDataBox(4), new RecordId(4, (short) 4));
* tree.put(new IntDataBox(1), new RecordId(1, (short) 1));
* tree.put(new IntDataBox(3), new RecordId(3, (short) 3));
*
* Iterator<RecordId> iter = tree.scanGreaterEqual(new IntDataBox(3));
* iter.next(); // RecordId(3, 3)
* iter.next(); // RecordId(4, 4)
* iter.next(); // RecordId(5, 5)
* iter.next(); // NoSuchElementException
*
* Note that you CAN NOT materialize all record ids in memory and then
* return an iterator over them. Your iterator must lazily scan over the
* leaves of the B+ tree. Solutions that materialize all record ids in
* memory will receive 0 points.
*/
public Iterator<RecordId> scanGreaterEqual(DataBox key) {
typecheck(key);
return new BPlusTreeIterator(this.root, key);
}
/**
* Inserts a (key, rid) pair into a B+ tree. If the key already exists in
* the B+ tree, then the pair is not inserted and an exception is raised.
*
* BPlusTree tree = new BPlusTree("t.txt", Type.intType(), 4);
* DataBox key = new IntDataBox(42);
* RecordId rid = new RecordId(42, (short) 42);
* tree.put(key, rid); // Sucess :)
* tree.put(key, rid); // BPlusTreeException :(
*/
public void put(DataBox key, RecordId rid) throws BPlusTreeException {
typecheck(key);
Optional<Pair<DataBox, Integer>> putted = this.root.put(key, rid);
if (putted.isPresent()) {
List<Integer> children = new ArrayList<Integer>();
children.add(this.root.getPage().getPageNum());
children.add(putted.get().getSecond());
List<DataBox> keys = new ArrayList<DataBox>();
keys.add(putted.get().getFirst());
this.root = new InnerNode(this.metadata, keys, children);
writeHeader(headerPage.getByteBuffer());
}
}
/**
* Deletes a (key, rid) pair from a B+ tree.
*
* BPlusTree tree = new BPlusTree("t.txt", Type.intType(), 4);
* DataBox key = new IntDataBox(42);
* RecordId rid = new RecordId(42, (short) 42);
*
* tree.put(key, rid);
* tree.get(key); // Optional.of(rid)
* tree.remove(key);
* tree.get(key); // Optional.empty()
*/
public void remove(DataBox key) {
typecheck(key);
this.root.remove(key);
}
// Helpers /////////////////////////////////////////////////////////////////
/**
* Returns a sexp representation of this tree. See BPlusNode.toSexp for
* more information.
*/
public String toSexp() {
return root.toSexp();
}
/**
* Debugging large B+ trees is hard. To make it a bit easier, we can print
* out a B+ tree as a DOT file which we can then convert into a nice
* picture of the B+ tree. tree.toDot() returns the contents of DOT file
* which illustrates the B+ tree. The details of the file itself is not at
* all important, just know that if you call tree.toDot() and save the
* output to a file called tree.dot, then you can run this command
*
* dot -T pdf tree.dot -o tree.pdf
*
* to create a PDF of the tree.
*/
public String toDot() {
List<String> strings = new ArrayList<>();
strings.add("digraph g {" );
strings.add(" node [shape=record, height=0.1];");
strings.add(root.toDot());
strings.add("}");
return String.join("\n", strings);
}
/**
* Returns the largest number d such that the serialization of a LeafNode
* with 2d entries and an InnerNode with 2d keys will fit on a single page
* of size `pageSizeInBytes`.
*/
public static int maxOrder(int pageSizeInBytes, Type keySchema) {
int leafOrder = LeafNode.maxOrder(pageSizeInBytes, keySchema);
int innerOrder = InnerNode.maxOrder(pageSizeInBytes, keySchema);
return Math.min(leafOrder, innerOrder);
}
/** Returns the number of pages used to serialize the tree. */
public int getNumPages() {
return metadata.getAllocator().getNumPages();
}
/** Serializes the header page to buf. */
private void writeHeader(ByteBuffer buf) {
buf.put(metadata.getKeySchema().toBytes());
buf.putInt(metadata.getOrder());
buf.putInt(root.getPage().getPageNum());
}
private void typecheck(DataBox key) {
Type t = metadata.getKeySchema();
if (!key.type().equals(t)) {
String msg = String.format("DataBox %s is not of type %s", key, t);
throw new IllegalArgumentException(msg);
}
}
// Iterator ////////////////////////////////////////////////////////////////
private class BPlusTreeIterator implements Iterator<RecordId> {
// TODO(hw2): Add whatever fields and constructors you want here.
BPlusNode root;
LeafNode leaf;
Iterator<RecordId> rids;
public BPlusTreeIterator(BPlusNode root, DataBox key) {
this.root = root;
this.leaf = root.get(key);
this.rids = leaf.scanGreaterEqual(key);
}
public BPlusTreeIterator(BPlusNode root) {
this.root = root;
this.leaf = root.getLeftmostLeaf();
this.rids = leaf.scanAll();
}
@Override
public boolean hasNext() {
if (!rids.hasNext() && leaf.getRightSibling().isPresent()) {
return true;
} else {
return rids.hasNext();
}
}
@Override
public RecordId next() {
if (!rids.hasNext() && leaf.getRightSibling().isPresent()) {
this.leaf = leaf.getRightSibling().get();
this.rids = leaf.scanAll();
return this.rids.next();
} else {
return rids.next();
}
}
}
}
| [
"[email protected]"
] | |
89690a08074cbcfc247765fd15c6aeff71b04012 | 854836e7b405f61ff4715c14985c7b818ddb51d9 | /src/java/controller/LivroController.java | 1030bdd299af21098ce6e3042eafa3512dac79db | [] | no_license | pablo-moraes/Biblionew-Project | a6c983a7568abb0fd07394416a645ca899afec8e | a3f43b526e481156b53e7ee7c35ebc5e22397b3d | refs/heads/main | 2023-07-27T22:56:00.065964 | 2021-09-11T14:58:51 | 2021-09-11T14:58:51 | 405,388,379 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,825 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package controller;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(name = "LivroController", urlPatterns = {"/livro_register"})
public class LivroController extends HttpServlet {
// <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 {
}
/**
* 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 {
}
/**
* Returns a short description of the servlet.
*
* @return a String containing servlet description
*/
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}
| [
"[email protected]"
] | |
8b695afbc5e8794d22f5ea434f7737e8425fbaa2 | 5ca258bc0fe84352ca73ed8e78f7b7bf4b881d81 | /app/src/main/java/com/example/hrishikesh/paper/FeedbackActivity.java | 4824bf78414dce9657c31c11d1308800229d860d | [] | no_license | crazyDevelopers44/Paper-1 | b864d3e36ddf979cd51f2da02de40d0189a6aefd | 73ffffb0e1d3b42e258d35f0fe2f747c39585333 | refs/heads/master | 2021-08-30T09:56:27.696268 | 2017-12-17T10:35:19 | 2017-12-17T10:35:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,100 | java | package com.example.hrishikesh.paper;
import android.graphics.Typeface;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class FeedbackActivity extends AppCompatActivity {
TextView note;
EditText feedback;
Button submit;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_feedback);
note = (TextView)findViewById(R.id.tv_feedback);
feedback = (EditText)findViewById(R.id.edt_feedback);
submit = (Button)findViewById(R.id.btn_submit_feedback);
Typeface face1 = Typeface.createFromAsset(getAssets(),"fonts/CenturyGothic.ttf");
note.setTypeface(face1);
Typeface face2 = Typeface.createFromAsset(getAssets(),"fonts/CenturyGothic.ttf");
feedback.setTypeface(face2);
Typeface face3 = Typeface.createFromAsset(getAssets(),"fonts/CenturyGothic.ttf");
submit.setTypeface(face3);
}
}
| [
"[email protected]"
] | |
b2f18890a3712cf6861cf1ced0cc56550bbd4a44 | 4b8c16bb7ddd6f77e87374709c42a4aa675cc2d0 | /src/nehe/Lesson06.java | f7d3b767452119cd4dea5a74ba69c5918790dece | [
"MIT"
] | permissive | thebetaprogrammer/jogl | 52766f456d1b4147149d1ddb379a7915b9298eea | 061038fb5cc7c418fe12bd7a1f2357847fb47a71 | refs/heads/master | 2021-02-28T02:50:46.332063 | 2019-09-21T15:49:20 | 2019-09-21T15:49:20 | 245,655,689 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,825 | java | package nehe.Lesson06;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.DisplayMode;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Point;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File;
import java.io.IOException;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLEventListener;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
import javax.media.opengl.glu.GLU;
import javax.swing.AbstractAction;
import javax.swing.ActionMap;
import javax.swing.InputMap;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.KeyStroke;
import com.jogamp.opengl.util.FPSAnimator;
import com.jogamp.opengl.util.texture.Texture;
import com.jogamp.opengl.util.texture.TextureIO;
public class Render implements GLEventListener {
private static GraphicsEnvironment graphicsEnviorment;
private static boolean isFullScreen = false;
public static DisplayMode dm, dm_old;
private static Dimension xgraphic;
private static Point point = new Point(0, 0);
private GLU glu = new GLU();
private float xrot, yrot,zrot;
private int texture;
@Override
public void display(GLAutoDrawable drawable) {
// TODO Auto-generated method stub
final GL2 gl = drawable.getGL().getGL2();
gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT); // Clear The Screen And The Depth Buffer
gl.glLoadIdentity(); // Reset The View
gl.glTranslatef(0f, 0f, -5.0f);
gl.glRotatef(xrot, 1.0f, 0.0f, 0.0f);
gl.glRotatef(yrot, 0.0f, 1.0f, 0.0f);
gl.glRotatef(zrot, 0.0f, 0.0f, 1.0f);
gl.glBindTexture(GL2.GL_TEXTURE_2D, texture);
gl.glBegin(GL2.GL_QUADS);
// Front Face
gl.glTexCoord2f(0.0f, 0.0f); gl.glVertex3f(-1.0f, -1.0f, 1.0f);
gl.glTexCoord2f(1.0f, 0.0f); gl.glVertex3f( 1.0f, -1.0f, 1.0f);
gl.glTexCoord2f(1.0f, 1.0f); gl.glVertex3f( 1.0f, 1.0f, 1.0f);
gl.glTexCoord2f(0.0f, 1.0f); gl.glVertex3f(-1.0f, 1.0f, 1.0f);
// Back Face
gl.glTexCoord2f(1.0f, 0.0f); gl.glVertex3f(-1.0f, -1.0f, -1.0f);
gl.glTexCoord2f(1.0f, 1.0f); gl.glVertex3f(-1.0f, 1.0f, -1.0f);
gl.glTexCoord2f(0.0f, 1.0f); gl.glVertex3f( 1.0f, 1.0f, -1.0f);
gl.glTexCoord2f(0.0f, 0.0f); gl.glVertex3f( 1.0f, -1.0f, -1.0f);
// Top Face
gl.glTexCoord2f(0.0f, 1.0f); gl.glVertex3f(-1.0f, 1.0f, -1.0f);
gl.glTexCoord2f(0.0f, 0.0f); gl.glVertex3f(-1.0f, 1.0f, 1.0f);
gl.glTexCoord2f(1.0f, 0.0f); gl.glVertex3f( 1.0f, 1.0f, 1.0f);
gl.glTexCoord2f(1.0f, 1.0f); gl.glVertex3f( 1.0f, 1.0f, -1.0f);
// Bottom Face
gl.glTexCoord2f(1.0f, 1.0f); gl.glVertex3f(-1.0f, -1.0f, -1.0f);
gl.glTexCoord2f(0.0f, 1.0f); gl.glVertex3f( 1.0f, -1.0f, -1.0f);
gl.glTexCoord2f(0.0f, 0.0f); gl.glVertex3f( 1.0f, -1.0f, 1.0f);
gl.glTexCoord2f(1.0f, 0.0f); gl.glVertex3f(-1.0f, -1.0f, 1.0f);
// Right face
gl.glTexCoord2f(1.0f, 0.0f); gl.glVertex3f( 1.0f, -1.0f, -1.0f);
gl.glTexCoord2f(1.0f, 1.0f); gl.glVertex3f( 1.0f, 1.0f, -1.0f);
gl.glTexCoord2f(0.0f, 1.0f); gl.glVertex3f( 1.0f, 1.0f, 1.0f);
gl.glTexCoord2f(0.0f, 0.0f); gl.glVertex3f( 1.0f, -1.0f, 1.0f);
// Left Face
gl.glTexCoord2f(0.0f, 0.0f); gl.glVertex3f(-1.0f, -1.0f, -1.0f);
gl.glTexCoord2f(1.0f, 0.0f); gl.glVertex3f(-1.0f, -1.0f, 1.0f);
gl.glTexCoord2f(1.0f, 1.0f); gl.glVertex3f(-1.0f, 1.0f, 1.0f);
gl.glTexCoord2f(0.0f, 1.0f); gl.glVertex3f(-1.0f, 1.0f, -1.0f);
gl.glEnd();
gl.glFlush();
xrot+=.3f;
yrot+=.2f;
zrot+=.4;
}
@Override
public void dispose(GLAutoDrawable drawable) {
// TODO Auto-generated method stub
}
@Override
public void init(GLAutoDrawable drawable) {
final GL2 gl = drawable.getGL().getGL2();
gl.glShadeModel(GL2.GL_SMOOTH);
gl.glClearColor(0f, 0f, 0f, 0f);
gl.glClearDepth(1.0f);
gl.glEnable(GL2.GL_DEPTH_TEST);
gl.glDepthFunc(GL2.GL_LEQUAL);
gl.glHint(GL2.GL_PERSPECTIVE_CORRECTION_HINT, GL2.GL_NICEST);
gl.glEnable(GL2.GL_TEXTURE_2D);
try{
File im = new File("data/NeHE.png");
Texture t = TextureIO.newTexture(im, true);
texture= t.getTextureObject(gl);
}catch(IOException e){
e.printStackTrace();
}
}
@Override
public void reshape(GLAutoDrawable drawable, int x, int y, int width,
int height) {
// TODO Auto-generated method stub
final GL2 gl = drawable.getGL().getGL2();
if(height <=0)
height =1;
final float h = (float) width / (float) height;
gl.glViewport(0, 0, width, height);
gl.glMatrixMode(GL2.GL_PROJECTION);
gl.glLoadIdentity();
glu.gluPerspective(45.0f, h, 1.0, 20.0);
gl.glMatrixMode(GL2.GL_MODELVIEW);
gl.glLoadIdentity();
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
// setUp open GL version 2
final GLProfile profile = GLProfile.get(GLProfile.GL2);
GLCapabilities capabilities = new GLCapabilities(profile);
// The canvas
final GLCanvas glcanvas = new GLCanvas(capabilities);
Render r = new Render();
glcanvas.addGLEventListener(r);
glcanvas.setSize(400, 400);
final FPSAnimator animator = new FPSAnimator(glcanvas, 300,true );
final JFrame frame = new JFrame ("nehe: Lesson 6");
frame.getContentPane().add(glcanvas);
//Shutdown
frame.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
if(animator.isStarted())
animator.stop();
System.exit(0);
}
});
frame.setSize(frame.getContentPane().getPreferredSize());
/**
* Centers the screen on start up
*
*/
graphicsEnviorment = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] devices = graphicsEnviorment.getScreenDevices();
dm_old = devices[0].getDisplayMode();
dm = dm_old;
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
int windowX = Math.max(0, (screenSize.width - frame.getWidth()) / 2);
int windowY = Math.max(0, (screenSize.height - frame.getHeight()) / 2);
frame.setLocation(windowX, windowY);
/**
*
*/
frame.setVisible(true);
/*
* Time to add Button Control
*/
JPanel p = new JPanel();
p.setPreferredSize(new Dimension(0,0));
frame.add(p, BorderLayout.SOUTH);
keyBindings(p, frame, r);
animator.start();
}
private static void keyBindings(JPanel p, final JFrame frame, final Render r) {
ActionMap actionMap = p.getActionMap();
InputMap inputMap = p.getInputMap();
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), "F1");
actionMap.put("F1", new AbstractAction(){
/**
*
*/
private static final long serialVersionUID = -6576101918414437189L;
@Override
public void actionPerformed(ActionEvent drawable) {
// TODO Auto-generated method stub
fullScreen(frame);
}});
}
protected static void fullScreen(JFrame f) {
// TODO Auto-generated method stub
if(!isFullScreen){
f.dispose();
f.setUndecorated(true);
f.setVisible(true);
f.setResizable(false);
xgraphic = f.getSize();
point = f.getLocation();
f.setLocation(0, 0);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
f.setSize((int) screenSize.getWidth(), (int) screenSize.getHeight());
isFullScreen=true;
}else{
f.dispose();
f.setUndecorated(false);
f.setResizable(true);
f.setLocation(point);
f.setSize(xgraphic);
f.setVisible(true);
isFullScreen =false;
}
}
} | [
"[email protected]"
] | |
fb37415991f8ef50fdce955a1d599d24b59799ef | fbf07d16051651db52d4c66e3842719861d2922b | /com/max/idea/Main.java | d8520e2f449df315dbc340bfa452fa280ab8a758 | [] | no_license | F0rchy/MyList_v2 | 60fcaad1c593fc17443322380d40bfb4f89ede0a | e51c435c58d99de63e1bdb61b620cee964cbdadc | refs/heads/main | 2022-12-30T11:18:57.557897 | 2020-10-15T10:58:15 | 2020-10-15T10:58:15 | 303,786,199 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,984 | java | package com.max.idea;
public class Main {
public static void main(String[] args) {
//-----------------------------------------------------------Integer----------------------------------------------------
// MyList<Integer> list = new MyList<> ((a, b) -> {
// if(((int)a.getValue() - (int)b.getValue()) > 0) {
// return 1;
// }
// else if (((int)a.getValue() - (int)b.getValue()) < 0) {
// return -1;
// }
// else {
// return 0;
// }
// });
// Randomizer.randomInt(list, 5);
// System.out.println(list.toString());
// list.sort();
// System.out.println(list.toString());
//-----------------------------------------------------------Double-----------------------------------------------------
// MyList<Double> list = new MyList<> ((a, b) -> {
// if(((double)a.getValue() - (double)b.getValue()) > 0) {
// return 1;
// }
// else if (((double)a.getValue() - (double)b.getValue()) < 0) {
// return -1;
// }
// else {
// return 0;
// }
// });
// Randomizer.randomDouble(list, 5);
// System.out.println(list.toString());
// list.sort();
// System.out.println(list.toString());
//-----------------------------------------------------------String-----------------------------------------------------
MyList<String> list = new MyList<> ((a, b) -> {
if((a.hashCode() - b.hashCode()) > 0) {
return 1;
}
else if ((a.hashCode() - b.hashCode()) < 0) {
return -1;
}
else {
return 0;
}
});
Randomizer.randomString(list, 5, 5);
System.out.println(list.toString());
list.sort();
System.out.println(list.toString());
}
} | [
"[email protected]"
] | |
98f5e1a1142ce20cc77f10da74220ae7d926d395 | bfccd713bcafd13cc3396a90e6cfa2736d6a9c6d | /src/main/java/com/endava/training/dp/adapter/MediaType.java | 6877fe9dff7fa9ab9c58b12a5be051c7322373ea | [] | no_license | bogdanbenga/designpatterns | bf6ed634571f862dec39f7cb62a2e47106e0002a | 1cf72da604c9ec2dd2ab1777c3760ee61c943bc8 | refs/heads/master | 2021-01-03T10:47:16.873880 | 2020-02-27T12:39:12 | 2020-02-27T12:39:12 | 240,047,136 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 166 | java | package com.endava.training.dp.adapter;
/**
* @author Bogdan Benga <[email protected]></>
*/
public enum MediaType {
MP3,
MP4,
M4A,
WAV;
}
| [
"[email protected]"
] | |
131108d18ae7f507703440925d5decd88718fb78 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_c75d99b8cbcc5662a5ed58ec346d4bdfb3f4f7a7/LexBIGServiceManagerImpl/2_c75d99b8cbcc5662a5ed58ec346d4bdfb3f4f7a7_LexBIGServiceManagerImpl_s.java | 90f409d9dc3cc3cf44b8f3a78999323aefc56bbc | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 11,294 | java | /*
* Copyright: (c) 2004-2009 Mayo Foundation for Medical Education and
* Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
* triple-shield Mayo logo are trademarks and service marks of MFMER.
*
* Except as contained in the copyright notice above, or as used to identify
* MFMER as the author of this software, the trade names, trademarks, service
* marks, or product names of the copyright holder shall not be used in
* advertising, promotion or otherwise in connection with this software without
* prior written authorization of the copyright holder.
*
* Licensed under the Eclipse Public License, Version 1.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.eclipse.org/legal/epl-v10.html
*
*/
package org.LexGrid.LexBIG.Impl;
import java.util.Date;
import org.LexGrid.LexBIG.DataModel.Collections.ExtensionDescriptionList;
import org.LexGrid.LexBIG.DataModel.Core.AbsoluteCodingSchemeVersionReference;
import org.LexGrid.LexBIG.DataModel.Core.types.CodingSchemeVersionStatus;
import org.LexGrid.LexBIG.DataModel.InterfaceElements.ExtensionDescription;
import org.LexGrid.LexBIG.Exceptions.LBException;
import org.LexGrid.LexBIG.Exceptions.LBInvocationException;
import org.LexGrid.LexBIG.Exceptions.LBParameterException;
import org.LexGrid.LexBIG.Extensions.ExtensionRegistry;
import org.LexGrid.LexBIG.Extensions.Export.Exporter;
import org.LexGrid.LexBIG.Extensions.Index.Index;
import org.LexGrid.LexBIG.Extensions.Load.Loader;
import org.LexGrid.LexBIG.Impl.Extensions.ExtensionRegistryImpl;
import org.LexGrid.LexBIG.Impl.loaders.metadata.BaseMetaDataLoader;
import org.LexGrid.LexBIG.LexBIGService.LexBIGServiceManager;
import org.LexGrid.LexBIG.Utility.logging.LgLoggerIF;
import org.LexGrid.annotations.LgAdminFunction;
import org.lexevs.locator.LexEvsServiceLocator;
import org.lexevs.logging.LoggerFactory;
import org.lexevs.registry.model.RegistryEntry;
import org.lexevs.registry.service.Registry;
import org.lexevs.system.ResourceManager;
import org.lexevs.system.service.SystemResourceService;
/**
* This class implements the LexBigServiceManager.
*
* @author <A HREF="mailto:[email protected]">Dan Armbrust</A>
* @author <A HREF="mailto:[email protected]">Jesse Erdmann</A>
* @author <A HREF="mailto:[email protected]">Thomas Johnson</A>
* @version subversion $Revision: $ checked in on $Date: $
*/
public class LexBIGServiceManagerImpl implements LexBIGServiceManager {
private static final long serialVersionUID = -546654153157636317L;
private SystemResourceService systemResourceService = LexEvsServiceLocator.getInstance().getSystemResourceService();
private Registry registry = LexEvsServiceLocator.getInstance().getRegistry();
private LgLoggerIF getLogger() {
return LoggerFactory.getLogger();
}
/*
* (non-Javadoc)
*
* @see
* org.LexGrid.LexBIG.LexBIGService.LexBigServiceManager#setVersionTag(org
* .LexGrid.LexBIG.DataModel.Core.AbsoluteCodingSchemeVersionReference,
* java.lang.String)
*/
@LgAdminFunction
public void setVersionTag(AbsoluteCodingSchemeVersionReference codingSchemeVersion, String tag)
throws LBInvocationException, LBParameterException {
getLogger().logMethod(new Object[] { codingSchemeVersion, tag });
systemResourceService.updateCodingSchemeResourceTag(codingSchemeVersion, tag);
}
/*
* (non-Javadoc)
*
* @seeorg.LexGrid.LexBIG.LexBIGService.LexBigServiceManager#
* activateCodingSchemeVersion
* (org.LexGrid.LexBIG.DataModel.Core.AbsoluteCodingSchemeVersionReference)
*/
@LgAdminFunction
public void activateCodingSchemeVersion(AbsoluteCodingSchemeVersionReference codingSchemeVersion)
throws LBInvocationException, LBParameterException {
getLogger().logMethod(new Object[] { codingSchemeVersion });
systemResourceService.updateCodingSchemeResourceStatus(codingSchemeVersion, CodingSchemeVersionStatus.ACTIVE);
}
/*
* (non-Javadoc)
*
* @seeorg.LexGrid.LexBIG.LexBIGService.LexBigServiceManager#
* deactivateCodingSchemeVersion
* (org.LexGrid.LexBIG.DataModel.Core.AbsoluteCodingSchemeVersionReference,
* java.lang.String)
*/
@LgAdminFunction
public void deactivateCodingSchemeVersion(AbsoluteCodingSchemeVersionReference codingSchemeVersion, Date date)
throws LBInvocationException, LBParameterException {
getLogger().logMethod(new Object[] { codingSchemeVersion });
systemResourceService.updateCodingSchemeResourceStatus(codingSchemeVersion, CodingSchemeVersionStatus.INACTIVE);
}
/*
* (non-Javadoc)
*
* @seeorg.LexGrid.LexBIG.LexBIGService.LexBigServiceManager#
* removeCodingSchemeVersion
* (org.LexGrid.LexBIG.DataModel.Core.AbsoluteCodingSchemeVersionReference)
*/
@LgAdminFunction
public void removeCodingSchemeVersion(AbsoluteCodingSchemeVersionReference codingSchemeVersionReference)
throws LBParameterException, LBInvocationException {
getLogger().logMethod(new Object[] { codingSchemeVersionReference });
RegistryEntry entry = registry.getCodingSchemeEntry(codingSchemeVersionReference);
if (entry == null) {
throw new LBParameterException("The specified coding scheme is not a registered coding scheme",
codingSchemeVersionReference.getCodingSchemeURN() + " - " +
codingSchemeVersionReference.getCodingSchemeVersion());
} else if (entry.getStatus() == CodingSchemeVersionStatus.ACTIVE.toString()) {
throw new LBParameterException("You cannot remove a 'ACTIVE' coding scheme.");
}
// must be marked as inactive or pending. Do the delete.
systemResourceService.removeCodingSchemeResourceFromSystem(
codingSchemeVersionReference.getCodingSchemeURN(),
codingSchemeVersionReference.getCodingSchemeVersion());
}
@LgAdminFunction
public void removeHistoryService(String codingScheme) throws LBParameterException, LBInvocationException {
getLogger().logMethod(new Object[] { codingScheme });
String urn;
try {
urn = ResourceManager.instance().getURNForExternalCodingSchemeName(codingScheme);
} catch (LBParameterException e) {
// this means that no coding scheme that was loaded could map to a
// URN - but
// we could still work right iff they provided a urn as the coding
// scheme.
urn = codingScheme;
}
ResourceManager.instance().removeHistoryService(urn);
}
public ExtensionDescriptionList getLoadExtensions() {
getLogger().logMethod(new Object[] {});
return ExtensionRegistryImpl.instance().getLoadExtensions();
}
@LgAdminFunction
public Index getIndex(String name) throws LBParameterException, LBInvocationException {
getLogger().logMethod(new Object[] { name });
try {
ClassLoader temp = LexEvsServiceLocator.getInstance().getSystemResourceService().getClassLoader();
ExtensionDescription ed = ExtensionRegistryImpl.instance().getIndexExtension(name);
if (ed == null) {
throw new LBParameterException("No indexer is available for ", "loaderName", name);
}
return (Index) temp.loadClass(ed.getExtensionClass()).newInstance();
} catch (Exception e) {
String id = getLogger().error("Error getting index " + name, e);
throw new LBInvocationException("Unexpected error getting index for " + name, id);
}
}
public ExtensionDescriptionList getIndexExtensions() {
getLogger().logMethod(new Object[] {});
return ExtensionRegistryImpl.instance().getIndexExtensions();
}
@LgAdminFunction
public Loader getLoader(String name) throws LBParameterException, LBInvocationException {
getLogger().logMethod(new Object[] { name });
try {
ClassLoader temp = LexEvsServiceLocator.getInstance().getSystemResourceService().getClassLoader();
ExtensionDescription ed = ExtensionRegistryImpl.instance().getLoadExtension(name);
if (ed == null) {
throw new LBParameterException("No loader is available for ", "loaderName", name);
}
return (Loader) temp.loadClass(ed.getExtensionClass()).newInstance();
}
catch (Exception e) {
String id = getLogger().error("Error getting loader " + name, e);
throw new LBInvocationException("Unexpected error getting loader for " + name, id);
}
}
public ExtensionRegistry getExtensionRegistry() {
getLogger().logMethod(new Object[] {});
return ExtensionRegistryImpl.instance();
}
public ExtensionDescriptionList getExportExtensions() {
getLogger().logMethod(new Object[] {});
return ExtensionRegistryImpl.instance().getExportExtensions();
}
public Exporter getExporter(String name) throws LBException {
getLogger().logMethod(new Object[] { name });
try {
ClassLoader temp = LexEvsServiceLocator.getInstance().getSystemResourceService().getClassLoader();
ExtensionDescription ed = ExtensionRegistryImpl.instance().getExportExtension(name);
if (ed == null) {
throw new LBParameterException("No exporter is available for ", "exporterName", name);
}
return (Exporter) temp.loadClass(ed.getExtensionClass()).newInstance();
}
catch (Exception e) {
String id = getLogger().error("Error getting exporter " + name, e);
throw new LBInvocationException("Unexpected error getting exporter for " + name, id);
}
}
@LgAdminFunction
public void removeCodingSchemeVersionMetaData(AbsoluteCodingSchemeVersionReference codingSchemeVersion)
throws LBException {
getLogger().logMethod(new Object[] { codingSchemeVersion });
if (codingSchemeVersion == null || codingSchemeVersion.getCodingSchemeURN() == null
|| codingSchemeVersion.getCodingSchemeURN().length() == 0
|| codingSchemeVersion.getCodingSchemeVersion() == null
|| codingSchemeVersion.getCodingSchemeVersion().length() == 0) {
throw new LBParameterException("The coding scheme URN and version must be supplied.");
}
try {
BaseMetaDataLoader.removeMeta(codingSchemeVersion.getCodingSchemeURN(), codingSchemeVersion
.getCodingSchemeVersion());
} catch (Exception e) {
String id = getLogger().error("Problem removing metadata", e);
throw new LBInvocationException("Unexpected error removing metadata", id);
}
}
}
| [
"[email protected]"
] | |
674aa25e9b806db7e58948a06f6410977bf4a8da | 3bd909f5587961a3b915c70fe4db680da0e5dd98 | /org.muml.pim.pattern.diagram/src/org/muml/pim/pattern/diagram/parsers/ConnectorQualityOfServiceAssumptionsLabelExpressionLabelParser5008.java | 74ae6fb41655e9709dc96ac0c662ebc99476b860 | [] | no_license | fraunhofer-iem/mechatronicuml-pim | 00f38c53503629f21b002da7a16f00562f78d121 | ec9bed1f82447ada20686fc78ad26500b0f0c458 | refs/heads/origin/master | 2022-12-19T19:02:26.971811 | 2018-10-19T14:52:16 | 2018-10-19T14:52:16 | 269,042,510 | 0 | 0 | null | 2020-10-13T22:32:01 | 2020-06-03T09:14:16 | Java | UTF-8 | Java | false | false | 4,053 | java | package org.muml.pim.pattern.diagram.parsers;
import java.util.Collections;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.transaction.util.TransactionUtil;
import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
import org.eclipse.gmf.tooling.runtime.parsers.ExpressionLabelParserBase;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.muml.core.common.gmf.ocl.ActivePivotOclTrackerFactory;
import org.muml.pim.pattern.diagram.expressions.MumlOCLFactory;
import org.muml.pim.protocol.ProtocolPackage;
/**
* @generated
*/
public class ConnectorQualityOfServiceAssumptionsLabelExpressionLabelParser5008 extends ExpressionLabelParserBase {
/**
* @generated
*/
public ConnectorQualityOfServiceAssumptionsLabelExpressionLabelParser5008() {
super(new ActivePivotOclTrackerFactory());
}
/**
* @generated
*/
@Override
protected String getExpressionBody() {
return MumlOCLFactory
.getExpression(17, ProtocolPackage.eINSTANCE.getConnectorQualityOfServiceAssumptions(), null).body();
}
/**
* @generated
*/
public String getEditString(IAdaptable element, int flags) {
return getPrintString(element, flags);
}
/**
* @generated
*/
public IParserEditStatus isValidEditString(IAdaptable element, String editString) {
return ParserEditStatus.EDITABLE_STATUS;
}
/**
* @generated
*/
public ICommand getParseCommand(IAdaptable element, final String newString, int flags) {
final EObject target = (EObject) element.getAdapter(EObject.class);
if (!validateValues(target, newString)) {
return UnexecutableCommand.INSTANCE;
}
TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(target);
if (editingDomain == null) {
return UnexecutableCommand.INSTANCE;
}
IFile affectedFile = WorkspaceSynchronizer.getFile(target.eResource());
return new AbstractTransactionalCommand(editingDomain, "Set Values", //$NON-NLS-1$
affectedFile == null ? null : Collections.singletonList(affectedFile)) {
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
return new CommandResult(updateValues(target, newString));
}
};
}
/**
* @generated
*/
public IContentAssistProcessor getCompletionProcessor(IAdaptable element) {
return null;
}
/**
* @generated
*/
protected boolean validateValues(EObject target, String newString) {
// TODO implement as needed
return true;
}
/**
* @generated
*/
protected IStatus updateValues(EObject target, String newString) throws ExecutionException {
// TODO implement this method
// DO NOT FORGET to remove @generated tag or mark method @generated NOT
throw new ExecutionException("Please implement parsing and value modification");
}
/**
* @generated
*/
//
//protected void initializeEnvironment(java.util.Map<java.lang.String, org.eclipse.emf.ecore.EClassifier> typeEnv,
// java.util.Map<java.lang.String, java.lang.Object> env, org.eclipse.emf.ecore.EObject context) {
// // CAUTION: This is never called, because of newest GMF template changes according OCL-Tracking make it impossible to access the OCL object!
// // TODO: See MUML #516
//}
//
}
| [
"[email protected]"
] | |
2184237b58d89c1f8ff7e06285596ed028f1819e | d1e72e02276ba5080bf79769582f47b20cb1ade8 | /retrofittest/src/main/java/com/yema/retrofittest/utils/UpdateDialog.java | a893a5193695d3113aefabb3d959adc18bc9c710 | [] | no_license | liang979zhang/MyTestLibrary | d2d6f0eed87cf865bfa5809317a739d40be8c9ee | 698a8c94d60de185393d8eb64275862fa57da952 | refs/heads/master | 2020-04-09T23:37:21.697263 | 2019-06-20T14:48:22 | 2019-06-20T14:48:22 | 160,661,955 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,281 | java | //package com.yema.retrofittest.utils;
//
//import android.app.Dialog;
//import android.content.Context;
//import android.os.Bundle;
//import android.view.View;
//import android.widget.LinearLayout;
//import android.widget.TextView;
//
//import com.yatoooon.screenadaptation.ScreenAdapterTools;
//import com.yemast.road.witconstructionsite.R;
//
//import butterknife.BindView;
//import butterknife.ButterKnife;
//import butterknife.OnClick;
//
//public class UpdateDialog extends Dialog {
//
// @BindView(R.id.tv_dialog_title)
// TextView tvDialogTitle;
// @BindView(R.id.tv_dialog_cancel)
// TextView tvDialogCancel;
// @BindView(R.id.tv_dialog_comfirm)
// TextView tvDialogComfirm;
// @BindView(R.id.layout_btns)
// LinearLayout layoutBtns;
// @BindView(R.id.ll_f_update)
// LinearLayout llFUpdate;
// private Context context;
// private ClickListenerInterface clickListenerInterface;
// private DownLoadInfo updateBean;
//
//
// public UpdateDialog(Context context, DownLoadInfo updateBean) {
// super(context, R.style.dialog);
// this.context = context;
// this.updateBean = updateBean;
// }
//
//
// @Override
// protected void onCreate(Bundle savedInstanceState) {
// super.onCreate(savedInstanceState);
// setContentView(R.layout.dialog_update);
// ButterKnife.bind(this);
// ScreenAdapterTools.getInstance().loadView(getWindow().getDecorView());
// tvDialogTitle.setText(updateBean.getDescription());
//
// }
//
//
// public void setClicklistener(ClickListenerInterface clickListenerInterface) {
// this.clickListenerInterface = clickListenerInterface;
// }
//
// @OnClick({R.id.tv_dialog_cancel, R.id.tv_dialog_comfirm, R.id.ll_f_update})
// public void onViewClicked(View view) {
// switch (view.getId()) {
// case R.id.tv_dialog_cancel:
// clickListenerInterface.cancel();
// break;
// case R.id.tv_dialog_comfirm:
// case R.id.ll_f_update:
// clickListenerInterface.doConfirm();
// break;
// }
// }
//
//
// public interface ClickListenerInterface {
//
// void doConfirm();
//
// void cancel();
//
// }
//
//}
| [
"[email protected]"
] | |
f6c48428083fda42c9a617624bb9cbf01b89e45d | a9e74f1f418071a8d0aab9b9681648de7cc5ca26 | /JSP/JDBC-WEB/src/member/Emp.java | 3598b0ca3231c5b54df9d941bbd26e87cb6e304c | [] | no_license | kytsaaa6/bitcampjn201904 | cb687cf58582d87aae457588e18201453058413d | 8285bdbd283607e7fdc85c5e388b353e6937447e | refs/heads/master | 2020-05-28T07:37:31.082261 | 2019-10-08T02:50:48 | 2019-10-08T02:50:48 | 188,924,136 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 431 | java | package member;
public class Emp {
private int empno;
private String ename;
private String job;
public String getJob() {
return job;
}
public void setJob(String job) {
this.job = job;
}
public int getEmpno() {
return empno;
}
public void setEmpno(int empno) {
this.empno = empno;
}
public String getEname() {
return ename;
}
public void setEname(String ename) {
this.ename = ename;
}
}
| [
"[email protected]"
] | |
dc2a57b7a4249260b0f29aeb69c9f83653e72259 | 420297b370202c8a5d012d66de495411c7576647 | /app/src/main/java/com/example/kkali/kannadakali/SwaragaluAdapter.java | e93e830563782302bb776d4bb17458f3a98d9327 | [] | no_license | infiniteoverflow/Kannada-Kali-App | f0fa0957a30aa430dd6f69b2553b820507fe4f7c | 94fe80dc6ae649af2126109f5ba190696d49979d | refs/heads/master | 2020-03-31T07:42:54.728361 | 2019-03-12T01:49:50 | 2019-03-12T01:49:50 | 152,032,238 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,510 | java | package com.example.kkali.kannadakali;
import android.app.Activity;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.util.ArrayList;
public class SwaragaluAdapter extends ArrayAdapter<Swaragalu> {
private static final String LOG_TAG = SwaragaluAdapter.class.getSimpleName();
SwaragaluAdapter(Activity context, ArrayList<Swaragalu> swaragalu)
{
super(context,0,swaragalu);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View listItemView = convertView;
if(listItemView==null)
{
listItemView = LayoutInflater.from(getContext()).inflate(R.layout.list_view2,parent,false);
}
Swaragalu setOfalphaWords = getItem(position);
TextView nameTextView = (TextView) listItemView.findViewById(R.id.alphaWords);
nameTextView.setText(setOfalphaWords.getAlphaWords());
ImageView icon = (ImageView) listItemView.findViewById(R.id.alphabetImage);
icon.setImageResource(setOfalphaWords.getImageId());
LinearLayout layoutColor = (LinearLayout) listItemView.findViewById(R.id.linearLayoutColorSwaragalu);
layoutColor.setBackgroundColor(Color.parseColor(setOfalphaWords.getColor()));
return listItemView;
}
}
| [
"[email protected]"
] | |
74d96eb02fb1e889481f2df98af66df7f67aef11 | 9134a3921cefb40d11aa0dca776aac750bd39f24 | /fastfds/fastfds_algorithm/src/main/java/de/metanome/algorithms/fastfds/AlgorithmGroup2FastFD14Kerne.java | 06cfc4ba461ef553fadf99f95a008c307754c427 | [
"Apache-2.0"
] | permissive | HPI-Information-Systems/metanome-algorithms | 63e869172fafb5f4687dd938b3b9abe06f80c1a7 | 54383fc2d6df31d42687179dba6284330b01e6f9 | refs/heads/master | 2023-05-27T07:58:35.471828 | 2022-06-15T11:42:43 | 2022-06-15T11:42:43 | 113,425,021 | 50 | 30 | Apache-2.0 | 2023-05-15T15:03:00 | 2017-12-07T08:44:16 | Java | UTF-8 | Java | false | false | 1,473 | java | package de.metanome.algorithms.fastfds;
import de.metanome.algorithm_integration.AlgorithmConfigurationException;
import de.metanome.algorithm_integration.AlgorithmExecutionException;
import de.metanome.algorithm_integration.input.RelationalInputGenerator;
import de.metanome.algorithms.fastfds.fastfds_helper.AlgorithmMetaGroup2;
public class AlgorithmGroup2FastFD14Kerne extends AlgorithmMetaGroup2 {
@Override
protected void buildSpecs() {
// TODO Auto-generated method stub
}
@Override
protected void executeAlgorithm() throws AlgorithmConfigurationException, AlgorithmExecutionException {
Object opti = this.configurationRequirements.get(AlgorithmMetaGroup2.USE_OPTIMIZATIONS_TAG);
int numberOfThreads = 14;
if (opti != null && (Boolean) opti) {
// TODO: evtl. müssen wir hier noch mehr machen
numberOfThreads = Runtime.getRuntime().availableProcessors();
}
Object input = this.configurationRequirements.get(AlgorithmMetaGroup2.INPUT_TAG);
if (input == null) {
throw new AlgorithmConfigurationException("No input defined");
}
FastFD ffd = new FastFD(numberOfThreads, this.fdrr);
ffd.execute(((RelationalInputGenerator) input).generateNewCopy());
}
@Override
public String getAuthors() {
return FastFD.getAuthorName();
}
@Override
public String getDescription() {
return FastFD.getDescriptionText();
}
}
| [
"[email protected]"
] | |
57180d8974dac1729c07b7afd920dcf112c68dbd | f04e10e55cbd0db07c850b5fbf2e5e682af6eb67 | /mt-shop-parent/mt-shop-service-impl/mt-shop-service-weixin/src/main/java/com/mayikt/api/member/service/weixin/mp/handler/LogHandler.java | d91381b5a076c806352506b57fcc22ca8c7655dd | [] | no_license | wangjin123456/dsxm | 6fb963670124db7843221e19eff01efe7f6db304 | 81988cc2b1bdf0aaf8cfaa0348156c0bbd1f2982 | refs/heads/master | 2023-02-20T20:10:27.259825 | 2021-01-24T07:48:32 | 2021-01-24T07:48:32 | 317,731,893 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 901 | java | package com.mayikt.api.member.service.weixin.mp.handler;
import com.mayikt.api.member.service.weixin.mp.utils.JsonUtils;
import me.chanjar.weixin.common.session.WxSessionManager;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
import org.springframework.stereotype.Component;
import java.util.Map;
/**
* @author Binary Wang(https://github.com/binarywang)
*/
@Component
public class LogHandler extends AbstractHandler {
@Override
public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage,
Map<String, Object> context, WxMpService wxMpService,
WxSessionManager sessionManager) {
this.logger.info("\n接收到请求消息,内容:{}", JsonUtils.toJson(wxMessage));
return null;
}
}
| [
"[email protected]"
] | |
7091f8aba91c3469bfa32c9e051c86000ca9d37f | ac75ef7ce08d1acbabf651f01d50b6c1c90a0c7d | /yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/mq/message/permission/RoleRefreshMessage.java | 8078cab476b2234f35030f5fbc17f376f4e3b6f4 | [
"LicenseRef-scancode-unknown-license-reference",
"MulanPSL-1.0",
"LicenseRef-scancode-mulanpsl-1.0-en"
] | permissive | yydo/onemall | ac16ef4e72fc8b8452ed19b118b6a5fd84de9a05 | 7c27fd28b4d001fd038cbfc9729bd1fbeeba26d3 | refs/heads/master | 2022-09-15T00:38:30.584862 | 2022-08-27T06:00:37 | 2022-08-27T06:00:37 | 196,519,053 | 0 | 0 | null | 2019-07-12T06:10:29 | 2019-07-12T06:10:27 | null | UTF-8 | Java | false | false | 492 | java | package cn.iocoder.yudao.module.system.mq.message.permission;
import lombok.Data;
import org.springframework.cloud.bus.event.RemoteApplicationEvent;
/**
* 角色数据刷新 Message
*
* @author 芋道源码
*/
@Data
public class RoleRefreshMessage extends RemoteApplicationEvent {
public RoleRefreshMessage() {
}
public RoleRefreshMessage(Object source, String originService, String destinationService) {
super(source, originService, destinationService);
}
}
| [
"[email protected]"
] | |
36a5ed27d340e93e2a68ea47a5213ebc20c9ab08 | ce77e96fd0700902315f1928e89296cf82db4c25 | /src/test/book/chapter4/RopeSwing.java | f17bbad98c08e542b6583a00064849608c2d5730 | [] | no_license | Dawidjuve/OCA_Exam | 06de1f44befe7a5cbfc3b77cbd9db9d76e5b69e4 | e53b9700d2b5dac2ea986c967d9aed1d09fbdd14 | refs/heads/master | 2022-02-16T23:17:22.318440 | 2019-08-20T21:16:41 | 2019-08-20T21:16:41 | 197,795,834 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Java | false | false | 470 | java | package test.book.chapter4;
//4 błędy kompilacji: linie 7, 15,16,20
//public class RopeSwing {
// private static final String leftRope;
// private static final String rightRope;
// private static final String bench;
// private static final String name = "name";
//
// static {
// leftRope = "left";
// rightRope = "right";
// }
// static {
// name = "name";
// rightRope = "right";
// }
//
// public static void main(String[] args) {
// bench = "bench";
// }
//} | [
"[email protected]"
] | |
63fc47e6d3538ad3bc8a9a83c330f77a2da6813c | 8b555b5aaae482c75da4a6b542a3c449b129e79c | /cms-model/src/main/java/com/bsb/cms/model/po/content/ContContentBody.java | e8accd479a1217bc5501c526526e6edaf107df7f | [] | no_license | shukeshukebeitabeita/cms | 9307e9715ec6c2532c2c1ac65d5ed2ae3bb5b228 | 2e37f0d70eeffb07975bea60c8993a1c6564a8ae | refs/heads/master | 2021-01-17T09:50:36.046474 | 2017-10-26T06:44:56 | 2017-10-26T06:44:56 | 21,338,025 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,629 | java | package com.bsb.cms.model.po.content;
import java.io.Serializable;
/**
* 详细内容对象
* @author hongjian.liu
* @version 1.0.0 2014-6-25
* @since 1.0
*/
public class ContContentBody implements Serializable {
/**
*
*/
private static final long serialVersionUID = -2068631243863047618L;
private Long bodyId;
private Long contentId;
private String extAttrBody;
private String contentBody;
/**
* @return the bodyId
*/
public Long getBodyId() {
return bodyId;
}
/**
* @param bodyId the bodyId to set
*/
public void setBodyId(Long bodyId) {
this.bodyId = bodyId;
}
public Long getContentId() {
return contentId;
}
public void setContentId(Long contentId) {
this.contentId = contentId;
}
/**
* @param body
*/
public ContContentBody(String body) {
super();
this.contentBody = body;
}
/**
*
*/
public ContContentBody() {
super();
}
/**
* @param extAttrBody
* @param body
*/
public ContContentBody(String extAttrBody, String body) {
super();
this.extAttrBody = extAttrBody;
this.contentBody = body;
}
public String getExtAttrBody() {
return extAttrBody;
}
public void setExtAttrBody(String extAttrBody) {
this.extAttrBody = extAttrBody == null ? null : extAttrBody.trim();
}
public String getContentBody() {
return contentBody;
}
public void setContentBody(String contentBody) {
this.contentBody = contentBody == null ? null : contentBody.trim();
}
} | [
"[email protected]"
] | |
94afec1f42fd439ed4e4262c240843b628c2886a | 829944c4ab9e783b1127fbcfdec5980d26e9aafa | /src/main/java/com/hamlet/COVID_19/NoConnection.java | 69d63608d92320a41598a46b51f176da3b74d466 | [] | no_license | MarsadRasheed/COVID-19 | 170b11b53d171c7713bc78cd74236fcf08e031cc | 087f3d244db6e8f1d6af34e2c709473fbbb2f952 | refs/heads/master | 2022-11-10T06:22:51.320267 | 2020-06-25T17:42:37 | 2020-06-25T17:42:37 | 274,977,008 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 342 | java | package com.hamlet.COVID_19;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class NoConnection extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_no_connection);
}
}
| [
"[email protected]"
] | |
ce2f9ccda1cdfb62682eba140ef5917db95ab042 | 14d1721d22aebc1c28efb35611bbd1e85ebd4e63 | /TeammateWebManagement/src/java/database/service/DeleteAdvertiseController.java | cdc04f816984110bcc5734aa6dbdf41440937cb7 | [] | no_license | Panyaprach/Project-I-Teammate | 2b2a754cb27b7d302b56a02e47807c67503f8c44 | 7d75f9620957ad9ad2a69cdcf9c642fc32d8e882 | refs/heads/master | 2020-12-30T23:10:55.934223 | 2017-05-14T23:30:05 | 2017-05-14T23:30:05 | 80,600,308 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,091 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package database.service;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
/**
*
* @author Spanp
*/
@WebServlet(name = "DeleteAdvertiseController", urlPatterns = {"/DeleteAdvertiseController"})
public class DeleteAdvertiseController 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()) {
HttpSession session = request.getSession(true);
int id = Integer.parseInt(request.getParameter("id"));
try {
Advertise ads = new Advertise();
ads.deleteAdvertise(id);
} catch (Exception e) {
e.printStackTrace();
}
RequestDispatcher rd = request.getRequestDispatcher("AdvertiseController");
rd.forward(request, response);
}
}
// <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>
}
| [
"[email protected]"
] | |
ff6c39db65f438f1dc229d69dfa26be65dabb7bc | 3cd4c9fd240a2dd4df57c441472488dede774aa2 | /src/main/java/practice/TestDeadLock.java | 6dea57d62de3118f6f075a85f11dd28db8a889f7 | [] | no_license | xuzhenkang/JavaSE | a751d510d7f0f81984bf08e79381a166ef359182 | f417678a32a7f55e24ca7473f8289bfd19cd095c | refs/heads/master | 2020-12-31T07:14:58.295756 | 2019-03-05T15:42:31 | 2019-03-05T15:42:31 | 86,571,470 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 804 | java | package practice;
public class TestDeadLock {
private static String s1 = "筷子左";
private static String s2 = "筷子右";
public static void main(String[] args) {
new Thread() {
@Override
public void run() {
while (true) {
synchronized (s1) {
System.out.println(getName() + "获取" + s1 + "等待" + s2);
synchronized (s2) {
System.out.println(getName() + "拿到" + s2 + "开吃");
}
}
}
}
}.start();
new Thread() {
@Override
public void run() {
while (true) {
synchronized (s2) {
System.out.println(getName() + "获取" + s2 + "等待" + s1);
synchronized (s1) {
System.out.println(getName() + "拿到" + s1 + "开吃");
}
}
}
}
}.start();
}
}
| [
"[email protected]"
] | |
59147005829c36b83713ec5171dec7fa06b9304b | 50510258d82d7bbcd9f95ac23b9d839aace31a74 | /Lesson08-Generics/src/com/company/Main.java | 01c53497c86d3ef7e60c9a4f943eff89c4f70ee5 | [] | no_license | Shirahzilber12/hackeru_java | 4f08909754146a4ada300c2754889b9f026c5b2c | e8544d2669cba8d92aa9177853a26fa39001da80 | refs/heads/master | 2021-01-12T10:40:09.682622 | 2017-03-09T10:50:00 | 2017-03-09T10:50:00 | 81,721,721 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,526 | java | package com.company;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
private static final byte ASCII_9 =57 ;
private static final byte ASCII_0 =48 ;
public static void main(String[] args) throws IOException {
// write your code here
BufferedReader bufferedReader =
new BufferedReader(new InputStreamReader(System.in));
System.out.println("please enter :");
String a = bufferedReader.readLine();
System.out.println(isInt(a));
toInt(a);
}
public static boolean isInt(String num) {
if (num == null || num.length() == 0)
return false;
byte[] numByte = num.getBytes();
int length = numByte.length;
int i=0,sign;
if (numByte[0] == 45) {
i = 1;
//sign = -1;
}
for (; i < length; ) {
if ((numByte[i] >= ASCII_0) && (numByte[i] <= ASCII_9))
i++;
else
return false;
}
return true;
}
public static void toInt(String a) {
byte[] numByte = a.getBytes();
int sum = 0;
int length = numByte.length;
int i=0,sign=1;
if (numByte[0] == 45) {
i = 1;
sign = -1;
}
for (; i < length; i++) {
// char c = (char) sBytes[i];
sum = sum * 10 + (numByte[i] - 48);
}
System.out.println(sum*sign);
}
}
| [
"[email protected]"
] | |
4cf16da0d50b507c0429263f31aa246be8fd683a | b91d853bf655d45723d69bfcc5921b0a994cb21e | /src/main/java/dto/MovieDto.java | 39d561a95c676fc95bbe1ce1cfb0c248adf7af42 | [] | no_license | gabelorenzo/mapstruct-lombok-demo | bec98136848f20a05c975a373190669421c73a54 | 27babc2ea7c3129589f9636d8113441610629a87 | refs/heads/master | 2023-02-22T02:22:01.964467 | 2021-01-27T06:11:20 | 2021-01-27T06:11:20 | 332,367,939 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 490 | java | package dto;
import lombok.*;
import types.Language;
import types.Rating;
import java.math.BigDecimal;
@Value
public class MovieDto {
// Fields are similar to the entity fields - MapStruct can automatically map these
String title;
BigDecimal budget;
String synopsis;
Rating rating;
Language[] supportedLanguages;
// Fields below will need to be mapped explicitly
DirectorDto director;
String releaseDate;
String country;
int runtimeMinutes;
}
| [
"[email protected]"
] | |
8f190ab6369c67292d05a0c6aba00084ed359fc1 | 4c5c9613e88a2cea6cec4f3587405ae1e02221af | /src/main/java/org/fixtrading/timpani/securitydef/messages/SecurityDefinitionRequest.java | 7585b917ba4b8f9dcbe84296d8c3aae9ff16ed8a | [
"Apache-2.0"
] | permissive | FIXTradingCommunity/timpani | f384d166837ccfd1bd462c187b3995d9f2958b73 | b65ebf671b47a8d13ad968e3a0aa369117323854 | refs/heads/master | 2022-06-03T01:24:58.000290 | 2022-05-23T13:20:04 | 2022-05-23T13:20:04 | 56,801,916 | 9 | 2 | Apache-2.0 | 2022-05-23T13:20:05 | 2016-04-21T19:57:17 | Java | UTF-8 | Java | false | false | 612 | java | package org.fixtrading.timpani.securitydef.messages;
public interface SecurityDefinitionRequest extends Message {
String getCfiCode();
String getMarketID();
String getMarketSegmentID();
String getProduct();
// tag 207
String getSecurityExchange();
// tag 1151
String getSecurityGroup();
String getSecurityReqID();
SecurityRequestType getSecurityRequestType();
String getSecurityType();
SubscriptionRequestType getSubscriptionRequestType();
String getSymbol();
String getTradingSessionID();
String getTradingSessionSubID();
void setCfiCode(String cfiCode);
}
| [
"[email protected]"
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.