blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
e3981ebf8ad2cd1dffcc26858c1375814c8d06a2
9fceda30d9d65c726c35047799582563019fd16e
/app/src/main/java/weathermap/com/weathermap/Weather.java
37b31819c63f10be900faf84194e2392bc6e0dae
[]
no_license
Mhain/WeatherMap_android
2bdf9e35474e2dafa145ec23ba88d4a810fb7e54
d08a6cbd706b898ace98c3d453e759ce709f1731
refs/heads/master
2020-05-22T18:30:54.189689
2019-05-13T18:19:24
2019-05-13T18:19:24
186,473,102
0
0
null
null
null
null
UTF-8
Java
false
false
1,616
java
package weathermap.com.weathermap; import android.os.AsyncTask; import org.json.JSONException; import org.json.JSONObject; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; public class Weather extends AsyncTask<String,Void,String> { String result; @Override protected String doInBackground(String... urls) { result = ""; URL link; HttpURLConnection myConnection = null; try { link=new URL(urls[0]); myConnection = (HttpURLConnection)link.openConnection(); InputStream in = myConnection.getInputStream(); InputStreamReader myStreamReader =new InputStreamReader(in); int data =myStreamReader.read(); while (data != -1){ char current = (char) data; result += current; data = myStreamReader.read(); } return result; }catch (Exception e){ e.printStackTrace(); } return null; } @Override protected void onPostExecute(String s) { super.onPostExecute(s); try { JSONObject myObject = new JSONObject(result); JSONObject main = new JSONObject(myObject.getString("main")); String tempreture = main.getString("temp"); String placeName = myObject.getString("name"); MainActivity.place.setText(placeName); MainActivity.temp.setText(tempreture); } catch (JSONException e) { e.printStackTrace(); } } }
[ "mhain1995@gmail.com" ]
mhain1995@gmail.com
fbe32dbd4bc31df19afdbc7d3c7a2c585e950caf
cc656598786e056f0f7fc0b2868e0b589750d9d5
/src/main/java/com/nsk/vxs/config/LoggingAspectConfiguration.java
62e15e25e074e2d49eaef184e03ef3255e7acff9
[]
no_license
sendilkumarn/voxxeddays-2017-blog-demo
85b97fc1e5e1c77bbdff81683ba0912170aa94c2
a3224167a98132405536cb1dbcb81a6eb7e78a9e
refs/heads/master
2021-01-23T11:21:31.180296
2017-06-02T06:22:03
2017-06-02T06:22:03
93,133,936
1
0
null
null
null
null
UTF-8
Java
false
false
484
java
package com.nsk.vxs.config; import com.nsk.vxs.aop.logging.LoggingAspect; import io.github.jhipster.config.JHipsterConstants; import org.springframework.context.annotation.*; import org.springframework.core.env.Environment; @Configuration @EnableAspectJAutoProxy public class LoggingAspectConfiguration { @Bean @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) public LoggingAspect loggingAspect(Environment env) { return new LoggingAspect(env); } }
[ "sendilkumarn@live.com" ]
sendilkumarn@live.com
1cefc47a001d47c8f09aa76c80e9c97b3df3f861
f6cb132b079e1d17c61c4999afdf5dd6fd183479
/src/main/java/com/zking/erp/base/utils/StringUtils.java
dd3637065085dd2b53bb1e609639c2c004b04c08
[]
no_license
1729979349/erp
e8812d92f04fb1b7eb2776a6d47de98ce6654edd
7e5351b256848672129217eaf6519f8cfb503ce0
refs/heads/master
2023-02-22T09:32:49.323136
2021-01-20T13:31:38
2021-01-20T13:31:38
328,337,278
0
0
null
null
null
null
UTF-8
Java
false
false
634
java
package com.zking.erp.base.utils; public class StringUtils { // 私有的构造方法,保护此类不能在外部实例化 private StringUtils() { } /** * 如果字符串等于null或去空格后等于"",则返回true,否则返回false * * @param s * @return */ public static boolean isBlank(String s) { boolean b = false; if (null == s || s.trim().equals("")) { b = true; } return b; } /** * 如果字符串不等于null或去空格后不等于"",则返回true,否则返回false * * @param s * @return */ public static boolean isNotBlank(String s) { return !isBlank(s); } }
[ "1729979349@qq.com" ]
1729979349@qq.com
e808317431aa1edaa594dda9e5869f3a70eb5818
dffa585d761344ae1baeec3e6bacf4d93cdc004f
/cbs-api/src/main/java/com/jaagro/cbs/api/model/TechConsultImagesExample.java
067ffa03da7d6b9c9144b56847d07081e19c9669
[]
no_license
jaagro/cbs
f13510d1d71b0218b6abd0673070da06589e0ae7
0b31a91587dfdbe2ab1ffd7addd33911a4495f51
refs/heads/master
2020-04-30T06:25:07.119310
2019-04-08T09:55:42
2019-04-08T09:55:42
176,651,228
0
0
null
2019-04-17T10:02:31
2019-03-20T04:10:11
Java
UTF-8
Java
false
false
16,730
java
package com.jaagro.cbs.api.model; import java.io.Serializable; import java.util.ArrayList; import java.util.Date; import java.util.List; public class TechConsultImagesExample implements Serializable { protected String orderByClause; protected boolean distinct; protected List<Criteria> oredCriteria; private static final long serialVersionUID = 1L; private Integer limit; private Integer offset; public TechConsultImagesExample() { oredCriteria = new ArrayList<Criteria>(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List<Criteria> getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } public void setLimit(Integer limit) { this.limit = limit; } public Integer getLimit() { return limit; } public void setOffset(Integer offset) { this.offset = offset; } public Integer getOffset() { return offset; } protected abstract static class GeneratedCriteria implements Serializable { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); } public boolean isValid() { return criteria.size() > 0; } public List<Criterion> getAllCriteria() { return criteria; } public List<Criterion> getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } public Criteria andIdEqualTo(Integer value) { addCriterion("id =", value, "id"); return (Criteria) this; } public Criteria andIdNotEqualTo(Integer value) { addCriterion("id <>", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThan(Integer value) { addCriterion("id >", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThanOrEqualTo(Integer value) { addCriterion("id >=", value, "id"); return (Criteria) this; } public Criteria andIdLessThan(Integer value) { addCriterion("id <", value, "id"); return (Criteria) this; } public Criteria andIdLessThanOrEqualTo(Integer value) { addCriterion("id <=", value, "id"); return (Criteria) this; } public Criteria andIdIn(List<Integer> values) { addCriterion("id in", values, "id"); return (Criteria) this; } public Criteria andIdNotIn(List<Integer> values) { addCriterion("id not in", values, "id"); return (Criteria) this; } public Criteria andIdBetween(Integer value1, Integer value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } public Criteria andIdNotBetween(Integer value1, Integer value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } public Criteria andTechConsultRecordIdIsNull() { addCriterion("tech_consult_record_id is null"); return (Criteria) this; } public Criteria andTechConsultRecordIdIsNotNull() { addCriterion("tech_consult_record_id is not null"); return (Criteria) this; } public Criteria andTechConsultRecordIdEqualTo(Integer value) { addCriterion("tech_consult_record_id =", value, "techConsultRecordId"); return (Criteria) this; } public Criteria andTechConsultRecordIdNotEqualTo(Integer value) { addCriterion("tech_consult_record_id <>", value, "techConsultRecordId"); return (Criteria) this; } public Criteria andTechConsultRecordIdGreaterThan(Integer value) { addCriterion("tech_consult_record_id >", value, "techConsultRecordId"); return (Criteria) this; } public Criteria andTechConsultRecordIdGreaterThanOrEqualTo(Integer value) { addCriterion("tech_consult_record_id >=", value, "techConsultRecordId"); return (Criteria) this; } public Criteria andTechConsultRecordIdLessThan(Integer value) { addCriterion("tech_consult_record_id <", value, "techConsultRecordId"); return (Criteria) this; } public Criteria andTechConsultRecordIdLessThanOrEqualTo(Integer value) { addCriterion("tech_consult_record_id <=", value, "techConsultRecordId"); return (Criteria) this; } public Criteria andTechConsultRecordIdIn(List<Integer> values) { addCriterion("tech_consult_record_id in", values, "techConsultRecordId"); return (Criteria) this; } public Criteria andTechConsultRecordIdNotIn(List<Integer> values) { addCriterion("tech_consult_record_id not in", values, "techConsultRecordId"); return (Criteria) this; } public Criteria andTechConsultRecordIdBetween(Integer value1, Integer value2) { addCriterion("tech_consult_record_id between", value1, value2, "techConsultRecordId"); return (Criteria) this; } public Criteria andTechConsultRecordIdNotBetween(Integer value1, Integer value2) { addCriterion("tech_consult_record_id not between", value1, value2, "techConsultRecordId"); return (Criteria) this; } public Criteria andImageUrlIsNull() { addCriterion("image_url is null"); return (Criteria) this; } public Criteria andImageUrlIsNotNull() { addCriterion("image_url is not null"); return (Criteria) this; } public Criteria andImageUrlEqualTo(String value) { addCriterion("image_url =", value, "imageUrl"); return (Criteria) this; } public Criteria andImageUrlNotEqualTo(String value) { addCriterion("image_url <>", value, "imageUrl"); return (Criteria) this; } public Criteria andImageUrlGreaterThan(String value) { addCriterion("image_url >", value, "imageUrl"); return (Criteria) this; } public Criteria andImageUrlGreaterThanOrEqualTo(String value) { addCriterion("image_url >=", value, "imageUrl"); return (Criteria) this; } public Criteria andImageUrlLessThan(String value) { addCriterion("image_url <", value, "imageUrl"); return (Criteria) this; } public Criteria andImageUrlLessThanOrEqualTo(String value) { addCriterion("image_url <=", value, "imageUrl"); return (Criteria) this; } public Criteria andImageUrlLike(String value) { addCriterion("image_url like", value, "imageUrl"); return (Criteria) this; } public Criteria andImageUrlNotLike(String value) { addCriterion("image_url not like", value, "imageUrl"); return (Criteria) this; } public Criteria andImageUrlIn(List<String> values) { addCriterion("image_url in", values, "imageUrl"); return (Criteria) this; } public Criteria andImageUrlNotIn(List<String> values) { addCriterion("image_url not in", values, "imageUrl"); return (Criteria) this; } public Criteria andImageUrlBetween(String value1, String value2) { addCriterion("image_url between", value1, value2, "imageUrl"); return (Criteria) this; } public Criteria andImageUrlNotBetween(String value1, String value2) { addCriterion("image_url not between", value1, value2, "imageUrl"); return (Criteria) this; } public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; } public Criteria andCreateTimeIsNotNull() { addCriterion("create_time is not null"); return (Criteria) this; } public Criteria andCreateTimeEqualTo(Date value) { addCriterion("create_time =", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotEqualTo(Date value) { addCriterion("create_time <>", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThan(Date value) { addCriterion("create_time >", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { addCriterion("create_time >=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThan(Date value) { addCriterion("create_time <", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThanOrEqualTo(Date value) { addCriterion("create_time <=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeIn(List<Date> values) { addCriterion("create_time in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotIn(List<Date> values) { addCriterion("create_time not in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeBetween(Date value1, Date value2) { addCriterion("create_time between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotBetween(Date value1, Date value2) { addCriterion("create_time not between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andCreateUserIdIsNull() { addCriterion("create_user_id is null"); return (Criteria) this; } public Criteria andCreateUserIdIsNotNull() { addCriterion("create_user_id is not null"); return (Criteria) this; } public Criteria andCreateUserIdEqualTo(Integer value) { addCriterion("create_user_id =", value, "createUserId"); return (Criteria) this; } public Criteria andCreateUserIdNotEqualTo(Integer value) { addCriterion("create_user_id <>", value, "createUserId"); return (Criteria) this; } public Criteria andCreateUserIdGreaterThan(Integer value) { addCriterion("create_user_id >", value, "createUserId"); return (Criteria) this; } public Criteria andCreateUserIdGreaterThanOrEqualTo(Integer value) { addCriterion("create_user_id >=", value, "createUserId"); return (Criteria) this; } public Criteria andCreateUserIdLessThan(Integer value) { addCriterion("create_user_id <", value, "createUserId"); return (Criteria) this; } public Criteria andCreateUserIdLessThanOrEqualTo(Integer value) { addCriterion("create_user_id <=", value, "createUserId"); return (Criteria) this; } public Criteria andCreateUserIdIn(List<Integer> values) { addCriterion("create_user_id in", values, "createUserId"); return (Criteria) this; } public Criteria andCreateUserIdNotIn(List<Integer> values) { addCriterion("create_user_id not in", values, "createUserId"); return (Criteria) this; } public Criteria andCreateUserIdBetween(Integer value1, Integer value2) { addCriterion("create_user_id between", value1, value2, "createUserId"); return (Criteria) this; } public Criteria andCreateUserIdNotBetween(Integer value1, Integer value2) { addCriterion("create_user_id not between", value1, value2, "createUserId"); return (Criteria) this; } } public static class Criteria extends GeneratedCriteria implements Serializable { protected Criteria() { super(); } } public static class Criterion implements Serializable { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List<?>) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } }
[ "yoga330356233@126.com" ]
yoga330356233@126.com
9b27e3ec87163c909ec29576860a978efdf52b47
3ef8d594ca7588e9b28af6a846f86348238fb7bb
/Tasks/lesson_17/by/yurachel/task_1/entity/books/Book.java
f1a209dcd7c984b86d1a6c1f08357a52b1323819
[]
no_license
YuryFarshyniou/TMS-1101_2021
add0fbf0be2e27efba892421a931d37a497ebf67
9b4ab09427991f5d7566515a6587c81f4463392f
refs/heads/main
2023-07-15T16:34:03.290473
2021-08-18T07:49:41
2021-08-18T07:49:41
328,982,915
0
0
null
null
null
null
UTF-8
Java
false
false
2,982
java
package tasks.lesson_17.by.yurachel.task_1.entity.books; import java.util.List; import java.util.Objects; public class Book { private String bookName; private List<Author> authors; private Genre genre; private int price; private int numberOfPages; private boolean forTakingHome; private boolean wasItTakenAway; public List<Author> getAuthors() { return authors; } public void setAuthors(List<Author> authors) { this.authors = authors; } public String getBookName() { return bookName; } public Genre getGenre() { return genre; } public int getPrice() { return price; } public void setPrice(int price) { this.price = price; } public int getNumberOfPages() { return numberOfPages; } public void setBookName(String bookName) { this.bookName = bookName; } public void setGenre(Genre genre) { this.genre = genre; } public void setNumberOfPages(int numberOfPages) { this.numberOfPages = numberOfPages; } public boolean isForTakingHome() { return forTakingHome; } public void setForTakingHome(boolean forTakingHome) { this.forTakingHome = forTakingHome; } public boolean isWasItTakenAway() { return wasItTakenAway; } public void setWasItTakenAway(boolean wasItTakenAway) { this.wasItTakenAway = wasItTakenAway; } public Book() { } public Book(String bookName, List<Author> authors, Genre genre, int price, int numberOfPages, boolean forTakingHome) { this.bookName = bookName; this.authors = authors; this.genre = genre; this.price = price; this.numberOfPages = numberOfPages; this.forTakingHome = forTakingHome; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Book book = (Book) o; return price == book.price && numberOfPages == book.numberOfPages && Objects.equals(bookName, book.bookName) && Objects.equals(authors, book.authors) && genre == book.genre; } @Override public int hashCode() { return Objects.hash(bookName, authors, genre, price, numberOfPages); } @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(""); for (int i = 0; i < authors.size(); i++) { if (authors.size() > 1 && i != authors.size() - 1) { stringBuilder.append(authors.get(i)).append(","); } else { stringBuilder.append(authors.get(i)); } } return "BookName: " + bookName + ", Authors: " + stringBuilder + ", Genre " + genre + ", Price: " + price + "$, NumberOfPages: " + numberOfPages + ", For taking home: " + forTakingHome; } }
[ "yurachel5@rambler.ru" ]
yurachel5@rambler.ru
a90bd0c541223e65668024e466ce85dbff87f0fe
6e87bc8489693576cba79d3583800dc2bfb983b7
/server/src/main/java/org/openapitools/model/TextPersonNameAnnotationRequest.java
6e10c74be0bf158dbde4dd542b8288d9982e4d3d
[ "Apache-2.0" ]
permissive
ymnliu/mayo-phi-java-nlpsandbox
550ffdb6420d6f6178f7e9822a77e535ac7497dd
7b3e8535b3a2c93cf93522672403d69243d6ee07
refs/heads/main
2023-09-05T15:40:33.842694
2021-11-23T16:17:22
2021-11-23T16:17:22
431,164,322
1
0
null
null
null
null
UTF-8
Java
false
false
2,112
java
package org.openapitools.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Note; import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; /** * A request to annotate person names in a clinical note */ @ApiModel(description = "A request to annotate person names in a clinical note") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-08-11T13:52:26.252409-07:00[America/Los_Angeles]") public class TextPersonNameAnnotationRequest { @JsonProperty("note") private Note note; public TextPersonNameAnnotationRequest note(Note note) { this.note = note; return this; } /** * Get note * @return note */ @ApiModelProperty(required = true, value = "") @NotNull @Valid public Note getNote() { return note; } public void setNote(Note note) { this.note = note; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TextPersonNameAnnotationRequest textPersonNameAnnotationRequest = (TextPersonNameAnnotationRequest) o; return Objects.equals(this.note, textPersonNameAnnotationRequest.note); } @Override public int hashCode() { return Objects.hash(note); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TextPersonNameAnnotationRequest {\n"); sb.append(" note: ").append(toIndentedString(note)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "ymnliu@hotmail.com" ]
ymnliu@hotmail.com
637bfca1639ca63d9d6aa26289bd44eab00206d2
edcaae97b5aa06e3646611bbede6c89e65ea3d15
/Uploadable.java
32c9162c5ae523124484f9abede2857d9a2f86e9
[]
no_license
verhas/commentOrNotToComment
f7170757f1fa84a89f4510e61f2e91aba0b28e2a
7ee7f96bbf5d820fdd3667ecfe96aab302b9a12e
refs/heads/master
2016-09-01T23:27:49.391607
2013-04-07T00:51:37
2013-04-07T00:51:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
64
java
package stock; public interface Uploadable { void upload(); }
[ "Peter_Verhas@epam.com" ]
Peter_Verhas@epam.com
18474fdb176d67074d6c86fd9dc48d94816be7a2
afc0862fb3b6968658e032a5e1b6d26a0eb36cb4
/Rental_Wheels/src/cust_sel.java
ca484a7d52b6a7a60bca4d4c8a25051e05251d41
[]
no_license
RnabSanyal/Rental-Wheels
9f3a14d8b73a28022f32d1d240a6d9e6f205b994
d842261d75aacf0fb7d10091b19550ee8968cedb
refs/heads/master
2021-01-23T05:50:42.304207
2017-09-05T12:46:50
2017-09-05T12:46:50
102,470,131
0
0
null
null
null
null
UTF-8
Java
false
false
8,578
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. */ /** * * @author RNV */ import java.awt.Toolkit; import java.awt.event.WindowEvent; import AppPackage.*; import javax.swing.ImageIcon; public class cust_sel extends javax.swing.JFrame { /** * Creates new form cust_sel */ public cust_sel() { initComponents(); } public void close(){ WindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING); Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { back = new javax.swing.JButton(); butt2 = new javax.swing.JLabel(); butt1 = new javax.swing.JLabel(); bg = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setMaximumSize(new java.awt.Dimension(800, 520)); setMinimumSize(new java.awt.Dimension(800, 520)); setUndecorated(true); setPreferredSize(new java.awt.Dimension(800, 520)); setSize(new java.awt.Dimension(800, 520)); getContentPane().setLayout(null); back.setFont(new java.awt.Font("Raleway SemiBold", 0, 14)); // NOI18N back.setText("Back"); back.setBorder(null); back.setBorderPainted(false); back.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { backActionPerformed(evt); } }); getContentPane().add(back); back.setBounds(40, 470, 100, 30); butt2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/old_cust.png"))); // NOI18N butt2.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { butt2MouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { butt2MouseExited(evt); } public void mousePressed(java.awt.event.MouseEvent evt) { butt2MousePressed(evt); } public void mouseReleased(java.awt.event.MouseEvent evt) { butt2MouseReleased(evt); } }); getContentPane().add(butt2); butt2.setBounds(40, 270, 540, 170); butt1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/new_cust.png"))); // NOI18N butt1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { butt1MouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { butt1MouseExited(evt); } public void mousePressed(java.awt.event.MouseEvent evt) { butt1MousePressed(evt); } public void mouseReleased(java.awt.event.MouseEvent evt) { butt1MouseReleased(evt); } }); getContentPane().add(butt1); butt1.setBounds(40, 100, 520, 160); bg.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cust_sel.png"))); // NOI18N getContentPane().add(bg); bg.setBounds(0, 0, 800, 520); pack(); }// </editor-fold>//GEN-END:initComponents private void butt1MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_butt1MouseEntered // TODO add your handling code here: AnimationClass AC = new AnimationClass(); AC.jLabelXRight(40,45,1,1,butt1); }//GEN-LAST:event_butt1MouseEntered private void butt1MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_butt1MouseExited // TODO add your handling code here: AnimationClass AC = new AnimationClass(); AC.jLabelXLeft(45,40,1,1,butt1); }//GEN-LAST:event_butt1MouseExited private void butt2MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_butt2MouseEntered // TODO add your handling code here: AnimationClass AC = new AnimationClass(); AC.jLabelXRight(40,45,1,1,butt2); }//GEN-LAST:event_butt2MouseEntered private void butt2MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_butt2MouseExited // TODO add your handling code here: AnimationClass AC = new AnimationClass(); AC.jLabelXLeft(45,40,1,1,butt2); }//GEN-LAST:event_butt2MouseExited private void backActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backActionPerformed // TODO add your handling code here: mainscreen s = new mainscreen(); s.setVisible(true); close(); }//GEN-LAST:event_backActionPerformed private void butt1MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_butt1MousePressed // TODO add your handling code here: ImageIcon II = new ImageIcon(getClass().getResource("/new_cust_2.png")); butt1.setIcon(II); }//GEN-LAST:event_butt1MousePressed private void butt1MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_butt1MouseReleased // TODO add your handling code here: ImageIcon II = new ImageIcon(getClass().getResource("/new_cust.png")); butt1.setIcon(II); cust_fill s = new cust_fill(); s.setVisible(true); close(); }//GEN-LAST:event_butt1MouseReleased private void butt2MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_butt2MousePressed // TODO add your handling code here: ImageIcon II = new ImageIcon(getClass().getResource("/old_cust_2.png")); butt2.setIcon(II); }//GEN-LAST:event_butt2MousePressed private void butt2MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_butt2MouseReleased // TODO add your handling code here: ImageIcon II = new ImageIcon(getClass().getResource("/old_cust.png")); butt2.setIcon(II); old_cust s = new old_cust(); s.setVisible(true); close(); }//GEN-LAST:event_butt2MouseReleased /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(cust_sel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(cust_sel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(cust_sel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(cust_sel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new cust_sel().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton back; private javax.swing.JLabel bg; private javax.swing.JLabel butt1; private javax.swing.JLabel butt2; // End of variables declaration//GEN-END:variables }
[ "arnab.sayla902@gmail.com" ]
arnab.sayla902@gmail.com
3c5563c6639c2e09b4cf976c25ff35f85185ad5e
abbbc51ce5faf8e71ed61e2ef327feeab341dc86
/src/main/java/com/mlimavieira/buildit/crawler/controller/LinkController.java
471c38bce989ee0f96986fa319e7ddbbf919f3c1
[]
no_license
mlimavieira/buildit
7f36ac346c04e8fb5ea3ba3664087fef6d111810
62412e11ee4a70006d3f2e3950b13d629d1852e9
refs/heads/master
2021-01-25T14:39:05.281671
2018-03-03T18:31:08
2018-03-03T18:31:08
123,719,690
0
0
null
null
null
null
UTF-8
Java
false
false
1,165
java
package com.mlimavieira.buildit.crawler.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.mlimavieira.buildit.crawler.repository.LinkRepository; import com.mlimavieira.buildit.crawler.sitemap.Link; @RestController public class LinkController { @Autowired private LinkRepository repository; @RequestMapping(value = "/crawler/links", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public Response getLinks(@RequestParam(value = "page", defaultValue = "0") int page, @RequestParam(value = "offset", defaultValue = "10") int offset) { Page<Link> findAll = repository.findAll(PageRequest.of(page, offset)); return new Response(findAll.getNumber(), findAll.getTotalElements(), findAll.getContent()); } }
[ "marciovieira@Marcios-MacBook-Pro.local" ]
marciovieira@Marcios-MacBook-Pro.local
b0e5607acbcc24d88f61081f098d82cdc9e70c10
7a682dcc4e284bced37d02b31a3cd15af125f18f
/bitcamp-java-basic/src/main/java/ch24/c/Test04.java
d3b1651e17d5f503f821927af5bef24c195c66b3
[]
no_license
eomjinyoung/bitcamp-java-20190527
a415314b74954f14989042c475a4bf36b7311a8c
09f1b677587225310250078c4371ed94fe428a35
refs/heads/master
2022-03-15T04:33:15.248451
2019-11-11T03:33:58
2019-11-11T03:33:58
194,775,330
4
3
null
null
null
null
UTF-8
Java
false
false
801
java
// join() - 해당 스레드가 종료될 때까지 현재 스레드를 기다리게 한다. package ch24.c; public class Test04 { public static void main(String[] args) throws Exception { Thread t = new Thread() { @Override public void run() { for (int i = 0; i < 1000; i++) { System.out.printf("스레드 ===> %d\n", i); } try { sleep(5000); // 현재 스레드를 5초 동안 Not Runnable 상태에 둔다. } catch (Exception e) {} } }; // 스레드 객체 생성 => 준비 상태 t.start(); // => Running 상태 // t 스레드가 dead 상태가 될 때까지 기다린다. t.join(); for (int i = 0; i < 1000; i++) { System.out.printf("main() ~~~~> %d\n", i); } } }
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
ed4d94e9d24c4079e704ea466ba9d28cff5703d4
d866c060f4752eafb10664b0855e02d112537788
/webuy-learning/webuy-learning-spring/src/main/java/com/weweibuy/webuy/learning/spring/model/po/TestUserExample.java
60beddfee944b6ca7da16314077eaa8a5bb89c5b
[]
no_license
weweibuy/weweibuy
75910a4fa229efda39b626740f0f8138db4d4cb2
d48ec7ce9135293991703ecfae4bfc3b08112e85
refs/heads/master
2023-07-20T06:27:57.327861
2022-12-24T14:13:16
2022-12-24T14:13:16
150,745,949
14
5
null
2023-09-05T22:03:32
2018-09-28T13:37:34
Java
UTF-8
Java
false
false
11,361
java
package com.weweibuy.webuy.learning.spring.model.po; import java.util.ArrayList; import java.util.List; public class TestUserExample { protected String orderByClause; protected boolean distinct; protected List<Criteria> oredCriteria; public TestUserExample() { oredCriteria = new ArrayList<Criteria>(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List<Criteria> getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); } public boolean isValid() { return criteria.size() > 0; } public List<Criterion> getAllCriteria() { return criteria; } public List<Criterion> getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } public Criteria andIdIn(List<Long> values) { addCriterion("id in", values, "id"); return (Criteria) this; } public Criteria andIdNotIn(List<Long> values) { addCriterion("id not in", values, "id"); return (Criteria) this; } public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } public Criteria andNameIsNull() { addCriterion("name is null"); return (Criteria) this; } public Criteria andNameIsNotNull() { addCriterion("name is not null"); return (Criteria) this; } public Criteria andNameEqualTo(String value) { addCriterion("name =", value, "name"); return (Criteria) this; } public Criteria andNameNotEqualTo(String value) { addCriterion("name <>", value, "name"); return (Criteria) this; } public Criteria andNameGreaterThan(String value) { addCriterion("name >", value, "name"); return (Criteria) this; } public Criteria andNameGreaterThanOrEqualTo(String value) { addCriterion("name >=", value, "name"); return (Criteria) this; } public Criteria andNameLessThan(String value) { addCriterion("name <", value, "name"); return (Criteria) this; } public Criteria andNameLessThanOrEqualTo(String value) { addCriterion("name <=", value, "name"); return (Criteria) this; } public Criteria andNameLike(String value) { addCriterion("name like", value, "name"); return (Criteria) this; } public Criteria andNameNotLike(String value) { addCriterion("name not like", value, "name"); return (Criteria) this; } public Criteria andNameIn(List<String> values) { addCriterion("name in", values, "name"); return (Criteria) this; } public Criteria andNameNotIn(List<String> values) { addCriterion("name not in", values, "name"); return (Criteria) this; } public Criteria andNameBetween(String value1, String value2) { addCriterion("name between", value1, value2, "name"); return (Criteria) this; } public Criteria andNameNotBetween(String value1, String value2) { addCriterion("name not between", value1, value2, "name"); return (Criteria) this; } public Criteria andAgeIsNull() { addCriterion("age is null"); return (Criteria) this; } public Criteria andAgeIsNotNull() { addCriterion("age is not null"); return (Criteria) this; } public Criteria andAgeEqualTo(String value) { addCriterion("age =", value, "age"); return (Criteria) this; } public Criteria andAgeNotEqualTo(String value) { addCriterion("age <>", value, "age"); return (Criteria) this; } public Criteria andAgeGreaterThan(String value) { addCriterion("age >", value, "age"); return (Criteria) this; } public Criteria andAgeGreaterThanOrEqualTo(String value) { addCriterion("age >=", value, "age"); return (Criteria) this; } public Criteria andAgeLessThan(String value) { addCriterion("age <", value, "age"); return (Criteria) this; } public Criteria andAgeLessThanOrEqualTo(String value) { addCriterion("age <=", value, "age"); return (Criteria) this; } public Criteria andAgeLike(String value) { addCriterion("age like", value, "age"); return (Criteria) this; } public Criteria andAgeNotLike(String value) { addCriterion("age not like", value, "age"); return (Criteria) this; } public Criteria andAgeIn(List<String> values) { addCriterion("age in", values, "age"); return (Criteria) this; } public Criteria andAgeNotIn(List<String> values) { addCriterion("age not in", values, "age"); return (Criteria) this; } public Criteria andAgeBetween(String value1, String value2) { addCriterion("age between", value1, value2, "age"); return (Criteria) this; } public Criteria andAgeNotBetween(String value1, String value2) { addCriterion("age not between", value1, value2, "age"); return (Criteria) this; } } public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List<?>) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } }
[ "ak514250@126.com" ]
ak514250@126.com
c9ab1f78a1f3c7ebca9f85e2015db42a12f9b5d0
1ffbb3e96e267b27b1a7e5c83aafc579c634cecc
/MyBATIS_03_iolist4/src/com/biz/iolist/dao/IolistViewDao.java
e8432574e00bc45982e41497d98d6974589fb5e7
[]
no_license
desperategirl/JDBC
bd10710c436c1185c89b3312c48616965cc7b5b9
1a1ee469b8fac04d8d42ca9702c65f219b35db3d
refs/heads/master
2020-09-30T15:05:06.775811
2019-12-12T01:07:39
2019-12-12T01:07:39
227,312,045
0
0
null
null
null
null
UTF-8
Java
false
false
465
java
package com.biz.iolist.dao; import java.util.List; import com.biz.iolist.persistence.IolistVO; public interface IolistViewDao { public List<IolistVO> selectAll(); public IolistVO findById(long io_seq); public List<IolistVO> findByDCode(String io_dcode); // 거래처코드 public List<IolistVO> findByPCode(String io_pcode); // 상품코드 public List<IolistVO> findByDName(String io_dname); public List<IolistVO> findByPName(String io_pname); }
[ "gjlhh0205@naver.com" ]
gjlhh0205@naver.com
e26cfcad3461e89a51dd03ec1fb710b0502c67d0
d758a582e91b5d083c725558d18a6f6ae1c23452
/Cap06Prj/src/InetAddressTest.java
70617b50594529536b6edc4e0e23abce338ac76a
[]
no_license
Edd002/Desenvolvimento-de-Sistemas-Distribuidos-workspace
5da4f3b67a1496411b580d42e65537252589e669
08b3b693186562e74a4926f7f66bcb03bca6e732
refs/heads/master
2022-11-08T20:54:24.943803
2020-06-28T23:30:33
2020-06-28T23:30:33
271,330,487
0
0
null
null
null
null
UTF-8
Java
false
false
702
java
import java.net.InetAddress; import java.net.UnknownHostException; public class InetAddressTest { public static void main(String[] args) { try { InetAddress address = InetAddress.getByName("www.face.fumec.br"); System.out.println("IP: " + address.getHostAddress()); System.out.println("Hostname: " + address.getHostName()); for(byte b: address.getAddress()) System.out.print((0x0000FF & (int)b) + " "); System.out.println(); InetAddress local = InetAddress.getLocalHost(); System.out.println("IP (local): " + local.getHostAddress()); System.out.println("Hostname (local): " + local.getHostName()); } catch (UnknownHostException e) { e.printStackTrace(); } } }
[ "42621512+Edd002@users.noreply.github.com" ]
42621512+Edd002@users.noreply.github.com
21c29064766f9159e43686fd9cefcc7d5db3d593
7fb9cc2d15234bbe66a1dabfc7cf286bda97b2be
/com.sap.lmsl.slp.java/src/main/java/com/sap/lmsl/slp/DialogBody.java
a91febe5277d8fad7d7e512609c18f390ebcd8fa
[ "Apache-2.0" ]
permissive
DenitsaKostova/cloud-mta-java-common
7424348754d0fc63d2e1e1214260ff10a8836d6d
48ea0b70d79025b6729f2f954fcb61f5f902a1fd
refs/heads/master
2021-07-13T02:39:42.834247
2017-10-18T08:19:30
2017-10-18T09:49:15
107,266,245
0
0
null
2017-10-17T12:34:59
2017-10-17T12:34:59
null
UTF-8
Java
false
false
1,872
java
package com.sap.lmsl.slp; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element ref="{http://www.sap.com/lmsl/slp}groupView" maxOccurs="unbounded"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "groupView" }) @XmlRootElement(name = "dialogBody") public class DialogBody { @XmlElement(required = true) protected List<GroupView> groupView; /** * Gets the value of the groupView property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the groupView property. * * <p> * For example, to add a new item, do as follows: * <pre> * getGroupView().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link GroupView } * * */ public List<GroupView> getGroupView() { if (groupView == null) { groupView = new ArrayList<GroupView>(); } return this.groupView; } }
[ "nikolay.valchev@sap.com" ]
nikolay.valchev@sap.com
a45189349d8f376cdae6ddbf1f48d5dee419d891
7cf707f3071a5437f430aede1386319383fc45c6
/Library/src/main/java/com/nmss/DiameterClient.java
ac5fa4992b99977b808fa33a8bff80e2b28cbd27
[]
no_license
mehtagit/DiameterServerClient
9d44a7048f984cb45798499989de8a24a054e5fd
8f4e89f5ebcecaabd577387d45964c31bd82b0b6
refs/heads/master
2023-01-07T16:45:15.739866
2023-01-02T07:27:26
2023-01-02T07:27:26
125,911,843
0
0
null
null
null
null
UTF-8
Java
false
false
3,986
java
package com.nmss; import java.util.List; import java.util.Map; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.LinkedBlockingDeque; import java.util.concurrent.LinkedBlockingQueue; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import com.nmss.client.Client; import com.nmss.pojo.DiameterData; import com.nmss.pojo.DiameterServer; import com.nmss.pojo.Stats; import com.nmss.util.Config; import com.nmss.util.StatsMonitor; public class DiameterClient { private static Logger logger = LogManager.getLogger(DiameterClient.class); private String filename; private List<DiameterServer> diameterServerList; private BlockingQueue<DiameterData> digestRequestQueue; private BlockingQueue<DiameterData> gbuRequestQueue; private BlockingQueue<DiameterData> responseQueue; private BlockingQueue<DiameterData> rootQueue; private BlockingQueue<Stats> statsQueue; private static Map<String, DiameterData> sessionMap; public DiameterClient(String filename) throws Exception { diameterServerList = new Config(filename).getConnectionList(); } private DiameterClient() { } public void init() throws Exception { try { if (diameterServerList == null || diameterServerList.size() < 1) throw new Exception("Please provide property file"); else { digestRequestQueue = new LinkedBlockingDeque<DiameterData>(); gbuRequestQueue = new LinkedBlockingDeque<DiameterData>(); rootQueue = new LinkedBlockingDeque<DiameterData>(); responseQueue = new LinkedBlockingQueue<DiameterData>(); statsQueue = new LinkedBlockingQueue<Stats>(); sessionMap = new ConcurrentHashMap<>(); StatsMonitor statsMonitor = new StatsMonitor(statsQueue); new Thread(statsMonitor::monitor, "Thread-DC-Stats").start(); for (DiameterServer diameterServer : diameterServerList) { if (diameterServer.isDigestTrueGbuFalse()) { Client client = new Client(diameterServer, digestRequestQueue, responseQueue, statsQueue); new Thread(client::monitor, "Thread-DC-digest-" + diameterServer.getClientId()).start(); } else { Client client = new Client(diameterServer, gbuRequestQueue, responseQueue, statsQueue); new Thread(client::monitor, "Thread-DC-gbu-" + diameterServer.getClientId()).start(); } } new Thread(this::deciderGbuOrDigest, "Thread-DC-Decider").start(); } } catch (Exception e) { throw e; } } public void put(DiameterData transactionData) throws Exception { rootQueue.put(transactionData); } public BlockingQueue<DiameterData> getResponseQueue() throws Exception { return responseQueue; } private void deciderGbuOrDigest() { logger.info(Thread.currentThread().getName() + " Started"); while (true) { try { DiameterData diameterData = rootQueue.take(); if (diameterData.getIsDigest()) { digestRequestQueue.put(diameterData); } else { gbuRequestQueue.put(diameterData); } } catch (Exception e) { logger.error(e.getMessage(), e); } } } public static void addSession(DiameterData requestData) { if (requestData != null) { requestData.setDcNetworkTime(System.currentTimeMillis()); sessionMap.put(requestData.getTid(), requestData); logger.debug("Added request to session " + requestData); } } public static void removeSession(DiameterData responseData) { if (responseData != null) { DiameterData requestData = sessionMap.remove(responseData.getTid()); if (requestData == null) { responseData.setDcNetworkTime(-1); logger.debug("Not Found in session map, Not able to calculate time" + responseData); return; } responseData.setRequestType(requestData.getRequestType()); responseData.setDcNetworkTime(System.currentTimeMillis() - requestData.getDcNetworkTime()); } } }
[ "33978751+mehtagit@users.noreply.github.com" ]
33978751+mehtagit@users.noreply.github.com
b2ebfb7a523a636c170d597fdfa6fba547b463ec
e3990e8c3b1e0b8824a0a19bf9d12e48441def7a
/ebean-core/src/main/java/io/ebeaninternal/api/BinaryWriteContext.java
610ad41ea3482c81bf67d4ed7f0cd8af28b42d86
[ "Apache-2.0" ]
permissive
ebean-orm/ebean
13c9c465f597dd2cf8b3e54e4b300543017c9dee
bfe94786de3c3b5859aaef5afb3a7572e62275c4
refs/heads/master
2023-08-22T12:57:34.271133
2023-08-22T11:43:41
2023-08-22T11:43:41
5,793,895
1,199
224
Apache-2.0
2023-09-11T14:05:26
2012-09-13T11:49:56
Java
UTF-8
Java
false
false
917
java
package io.ebeaninternal.api; import java.io.DataOutputStream; import java.io.IOException; /** * Context used to write binary message (like RemoteTransactionEvent). */ public final class BinaryWriteContext { private final DataOutputStream out; private long counter; public BinaryWriteContext(DataOutputStream out) { this.out = out; } /** * Return the number of message parts that have been written. */ public long counter() { return counter; } /** * Return the output stream to write to. */ public DataOutputStream os() { return out; } /** * Start a message part with a given type code. */ public DataOutputStream start(int type) throws IOException { counter++; out.writeBoolean(true); out.writeInt(type); return out; } /** * End of message parts. */ public void end() throws IOException { out.writeBoolean(false); } }
[ "robin.bygrave@gmail.com" ]
robin.bygrave@gmail.com
36996d33774190091f301fc06f4642f024679a94
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/52/org/apache/commons/math/fraction/BigFraction_divide_650.java
96aa401d328106500601b0159474e751163a2d8b
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,428
java
org apach common math fraction represent ration number overflow immut version big fraction bigfract divid fraction pass return result reduc form param divid link big fraction bigfract instanc result valu arithmet except arithmeticexcept fraction divid big fraction bigfract divid divid big integ biginteg valueof
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
60bc4287ae784746b5328ceda9301237044b4b57
c67bfa038782a9ed524f0552a7840b1e3c561579
/src/main/java/pl/redheadsolutions/lg/service/impl/HousingAssociationServiceImpl.java
25b131b14b1ebab1a5ddb0d53669fb923837285a
[]
no_license
Viwritis/housing-association-voting-platform
1f23f1272785680226e21883492da82ec27bec71
3b5ed0b3714999e4aee73d572733d87b245260b9
refs/heads/master
2022-04-30T19:13:00.148243
2020-03-16T21:19:45
2020-03-16T21:19:45
247,541,285
0
0
null
2022-03-08T21:18:37
2020-03-15T19:57:22
Java
UTF-8
Java
false
false
2,514
java
package pl.redheadsolutions.lg.service.impl; import pl.redheadsolutions.lg.service.HousingAssociationService; import pl.redheadsolutions.lg.domain.HousingAssociation; import pl.redheadsolutions.lg.repository.HousingAssociationRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Optional; /** * Service Implementation for managing {@link HousingAssociation}. */ @Service @Transactional public class HousingAssociationServiceImpl implements HousingAssociationService { private final Logger log = LoggerFactory.getLogger(HousingAssociationServiceImpl.class); private final HousingAssociationRepository housingAssociationRepository; public HousingAssociationServiceImpl(HousingAssociationRepository housingAssociationRepository) { this.housingAssociationRepository = housingAssociationRepository; } /** * Save a housingAssociation. * * @param housingAssociation the entity to save. * @return the persisted entity. */ @Override public HousingAssociation save(HousingAssociation housingAssociation) { log.debug("Request to save HousingAssociation : {}", housingAssociation); return housingAssociationRepository.save(housingAssociation); } /** * Get all the housingAssociations. * * @param pageable the pagination information. * @return the list of entities. */ @Override @Transactional(readOnly = true) public Page<HousingAssociation> findAll(Pageable pageable) { log.debug("Request to get all HousingAssociations"); return housingAssociationRepository.findAll(pageable); } /** * Get one housingAssociation by id. * * @param id the id of the entity. * @return the entity. */ @Override @Transactional(readOnly = true) public Optional<HousingAssociation> findOne(Long id) { log.debug("Request to get HousingAssociation : {}", id); return housingAssociationRepository.findById(id); } /** * Delete the housingAssociation by id. * * @param id the id of the entity. */ @Override public void delete(Long id) { log.debug("Request to delete HousingAssociation : {}", id); housingAssociationRepository.deleteById(id); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
b292b5aa5f353daaa3168824cd194bf448326622
55c9ac61ded11f809de199ddc8f67be84f997ae0
/lib/src/main/java/com/kingkung/train/TrainPage.java
e7098970cbd47ef5e90c832a718413e9933011e4
[]
no_license
kingkungk/second
9821f640f7c4854f588719e66fe7758d5281daaa
1434663a5cadb13400e0f9bb48fbd3027039fa22
refs/heads/master
2020-04-17T03:06:53.839922
2019-01-22T09:38:38
2019-01-22T09:38:38
166,167,061
0
0
null
null
null
null
UTF-8
Java
false
false
10,378
java
package com.kingkung.train; import com.kingkung.lib.MyClass; import com.kingkung.train.api.TrainApiService; import com.kingkung.train.bean.PassengerInfo; import com.kingkung.train.bean.TrainDetails; import com.kingkung.train.contract.TrainContract; import com.kingkung.train.presenter.TrainPresenter; import com.kingkung.train.utils.TextUtils; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; public class TrainPage extends BasePage<TrainPresenter> implements TrainContract.View { private int count = 1; private int dateIndex = 0; private SimpleDateFormat leaveDateFormat = new SimpleDateFormat("HH:mm"); public static SimpleDateFormat timerDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); //刷新间隔 private int refreshQueryInterval = 750; //刷新登录会话 private int refreshLoginInterval = 1000 * 60 * 5; //出发站 private String fromStation = "杭州"; //到达站 private String toStation = "蕲春"; // 车次,如果为空就不过滤 private List<String> trainNo = Arrays.asList("K", "G", "D", "Z"); //乘车日期 private List<String> trainDate = Arrays.asList("2019-01-30", "2019-01-31", "2019-02-01", "2019-02-02"); //乘车人姓名 private List<String> passengerNames = Arrays.asList("程航"); //选择车次的起始时间 private String leaveStartDate = "7:30"; private long leaveStartTime; //选择车次的结束时间 private String leaveEndDate = "17:00"; private long leaveEndTime; //座位类别,如果为空就不过滤 private List<SeatType> seatType = Arrays.asList(SeatType.HARD_SLEEP, SeatType.HARD_SEAT, SeatType.SECOND_CLASS); //定时抢票时间 private String timerDate = "2019-01-15 10:20"; //接受通知的邮箱 private List<String> sendEmails = Arrays.asList("745440793@qq.com", "894474628@qq.com"); private boolean isStartQuery = true; public enum SeatType { HARD_SLEEP("硬卧", "3"), HARD_SEAT("硬座", "1"), SECOND_CLASS("二等座", "O"), FIRST_CLASS("一等座", "M"); public String name; public String seatType; SeatType(String name, String seatType) { this.name = name; this.seatType = seatType; } @Override public String toString() { return name; } } @Override protected void inject() { presenter = new TrainPresenter(TrainApiService.getTrainApi(MyClass.isProxy)); } @Override protected void create() { try { leaveStartTime = leaveDateFormat.parse(leaveStartDate).getTime(); leaveEndTime = leaveDateFormat.parse(leaveEndDate).getTime(); } catch (ParseException e) { e.printStackTrace(); } presenter.interval(0, refreshLoginInterval, () -> presenter.uamtk()); if (MyClass.isTestSendEmail) { presenter.sendEmail(sendEmails, "java端", "测试内容"); } } @Override public void uamtkSuccess(String newapptk) { presenter.uamauthClient(newapptk); } @Override public void uamtkFaild() { System.out.println("验证失败,请重新登录"); LoginPage loginPage = new LoginPage(); loginPage.onCreate(); onDestroy(); } @Override public void uamauthClientSuccess(String username) { System.out.println("验证成功,用户名:" + username); if (!isStartQuery) { return; } try { isStartQuery = false; long timer; long timerTime = timerDateFormat.parse(timerDate).getTime(); long curTime = System.currentTimeMillis(); if (timerTime <= curTime) { timer = 0; } else { timer = timerTime - curTime + 50; } presenter.interval(timer, refreshQueryInterval, () -> { if (dateIndex >= trainDate.size()) { dateIndex = 0; } presenter.queryTrain(trainDate.get(dateIndex), fromStation, toStation); dateIndex++; }); } catch (ParseException e) { e.printStackTrace(); } } @Override public void queryTrainSuccess(List<TrainDetails> details) { Iterator<TrainDetails> it = details.iterator(); while (it.hasNext()) { TrainDetails trainDetail = it.next(); if (filterSeatType(trainDetail)) { it.remove(); continue; } if (filterTrainNo(trainDetail)) { it.remove(); continue; } if (filterLeaveTime(trainDetail)) { it.remove(); continue; } } showMsg("第" + count + "次"); count++; List<TrainDetails> result = new ArrayList<>(details); if (result.size() == 0) { showMsg("没有查询到可买的票"); showMsg(""); return; } presenter.intervalDispose(); if (MyClass.isSubmitFromProxy) { presenter.setTrainApi(TrainApiService.getTrainApi(true)); } presenter.sendEmail(sendEmails, "java端", "查询到可买的票"); for (TrainDetails detail : result) { showMsg("车次:" + detail.trainNo + "\t\t可买票类型:" + detail.seatTypes.toString() + "\t\t张数:" + detail.count); presenter.submitOrder(detail); break; } showMsg(""); } @Override public void checkUserSuccess() { } @Override public void submitOrderSuccess(TrainDetails detail) { presenter.initDc(detail); } @Override public void initDcSuccess(TrainDetails detail) { presenter.getPassenger(detail); } @Override public void getPassengerSuccess(TrainDetails detail) { List<String> copyPassengerNames = new ArrayList<>(passengerNames); if (copyPassengerNames.size() == 0) { presenter.checkOrderInfo(detail); return; } List<PassengerInfo> passengerInfos = detail.passengerInfos; Iterator<PassengerInfo> it = passengerInfos.iterator(); while (it.hasNext()) { PassengerInfo info = it.next(); if (!copyPassengerNames.contains(info.passenger_name)) { it.remove(); } } presenter.checkOrderInfo(detail); } @Override public void checkOrderInfoSuccess(TrainDetails detail) { presenter.getQueueCount(detail); } @Override public void getQueueCountSuccess(TrainDetails detail) { presenter.confirmSingleForQueue(detail); } @Override public void confirmSingleForQueueSuccess(TrainDetails detail) { presenter.sendEmail(sendEmails, "java端", "订单排队中"); presenter.queryOrderWaitTime(detail); } @Override public void confirmSingleForQueueFaild() { presenter.sendEmail(sendEmails, "java端", "提交失败"); if (MyClass.isSubmitFromProxy) { presenter.setTrainApi(TrainApiService.getTrainApi(false)); } presenter.interval(0, refreshLoginInterval, () -> presenter.uamtk()); } @Override public void queryOrderWaitTimeSuccess(TrainDetails detail) { presenter.resultOrderForQueue(detail); } @Override public void resultOrderForQueueSuccess() { presenter.sendEmail(sendEmails, "java端", "订单提交成功"); presenter.detachView(); } public boolean filterTrainNo(TrainDetails detail) { if (trainNo.size() == 0) { return false; } List<String> copyTrainNo = new ArrayList<>(trainNo); int position = 0; for (; position < copyTrainNo.size(); position++) { String type = copyTrainNo.get(position); if (detail.trainNo.startsWith(type)) { break; } } if (position == copyTrainNo.size()) { return true; } return false; } public boolean filterLeaveTime(TrainDetails detail) { try { long leaveTime = leaveDateFormat.parse(detail.leaveTime).getTime(); if (leaveTime < leaveStartTime || leaveTime > leaveEndTime) { return true; } } catch (ParseException e) { e.printStackTrace(); } return false; } public boolean filterSeatType(TrainDetails detail) { if (seatType.size() == 0) { return false; } List<SeatType> copySeatType = new ArrayList<>(seatType); for (int i = 0; i < copySeatType.size(); i++) { SeatType type = copySeatType.get(i); if (type == SeatType.HARD_SLEEP && !TextUtils.isEmpty(detail.hardSleep) && !"无".equals(detail.hardSleep) && !"*".equals(detail.hardSleep)) { detail.seatTypes.add(SeatType.HARD_SLEEP); detail.count = detail.hardSleep; } if (type == SeatType.HARD_SEAT && !TextUtils.isEmpty(detail.hardSeat) && !"无".equals(detail.hardSeat) && !"*".equals(detail.hardSeat)) { detail.seatTypes.add(SeatType.HARD_SEAT); detail.count = detail.hardSeat; } if (type == SeatType.SECOND_CLASS && !TextUtils.isEmpty(detail.secondClassSeat) && !"无".equals(detail.secondClassSeat) && !"*".equals(detail.secondClassSeat)) { detail.seatTypes.add(SeatType.SECOND_CLASS); detail.count = detail.secondClassSeat; } if (type == SeatType.FIRST_CLASS && !TextUtils.isEmpty(detail.firstClassSeat) && !"无".equals(detail.firstClassSeat) && !"*".equals(detail.firstClassSeat)) { detail.seatTypes.add(SeatType.FIRST_CLASS); detail.count = detail.firstClassSeat; } } if (detail.seatTypes.size() == 0) { return true; } return false; } }
[ "745440793@qq.com" ]
745440793@qq.com
673781833f80be9f9465c915642e1a58785f4fe9
2f7560376d13afa09388ac0fbaa6a4aa5a0f5cc4
/mvp/src/view/BasicWindow.java
73c0a1355f6904b36c71c2790eea82ff29f76286
[]
no_license
zivmoshe89/zivandliran
2751f171ee53b194347dcd209b2aab6f8a90e62f
33536fa388da9b45fddd3317f79ac9a92ee1d9b3
refs/heads/master
2021-01-10T01:47:53.056005
2016-01-26T16:35:07
2016-01-26T16:35:07
49,962,441
0
0
null
null
null
null
UTF-8
Java
false
false
1,239
java
package view; import java.util.Observable; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; /** * The Class BasicWindow. */ public abstract class BasicWindow extends Observable implements Runnable { /** The display. */ Display display;// /** The shell. */ Shell shell; /** * Instantiates a new basic window. * * @param title the title * @param width the width * @param height the height */ public BasicWindow(String title, int width,int height) { display = new Display(); shell = new Shell(); shell.setSize(width, height); shell.setText(title); } /** * Inits the widgets. */ abstract void initWidgets(); @Override public void run() { initWidgets(); shell.open(); // main event loop while(!shell.isDisposed()){ // while window isn't closed // 1. read events, put then in a queue. // 2. dispatch the assigned listener if(!display.readAndDispatch()){ // if the queue is empty display.sleep(); // sleep until an event occurs } } // shell is disposed display.dispose(); // dispose OS components } @Override public void notifyObservers(Object arg) { setChanged(); super.notifyObservers(arg); } }
[ "zivm89@gmail.com" ]
zivm89@gmail.com
4a250a18cd55d0c6fffbf2cbcf30b837213437df
21c04928141def9b90c1598da06b11680650e3d6
/src/main/java/de/ovgu/dke/clustering/util/NeareastNeighborDistance.java
27425707dbf36e2868bc0d8ce1e8a67d7441c68e
[]
no_license
grenouille82/etreegcs
8a68da7d9ce57ab655f6fde2e70b64a9552b64a9
fde0938558082be2b82954513330a9349244a8b1
refs/heads/master
2021-01-23T03:26:57.698233
2017-03-24T14:23:08
2017-03-24T14:23:08
86,076,080
0
0
null
null
null
null
UTF-8
Java
false
false
1,763
java
package de.ovgu.dke.clustering.util; import java.util.Collection; import de.ovgu.dke.clustering.model.Cluster; import de.ovgu.dke.util.DistanceMeasure; import de.ovgu.dke.util.ObjectSet; public class NeareastNeighborDistance extends AbstractIntraClusterDistance<Cluster> implements IntraClusterDistance<Cluster> { public NeareastNeighborDistance() { super(); } public NeareastNeighborDistance(ObjectSet dataset, DistanceMeasure metric) { super(dataset, metric); } public double distance(Cluster cluster) { if(cluster == null) throw new NullPointerException(); if(dataset == null) throw new IllegalStateException("dataset is not defined"); if(metric == null) throw new IllegalStateException("metric is not defined"); double d = 0d; Collection<Integer> data = cluster.getData(); double[] x,y; double minDist; for(int i : data) { minDist = Double.POSITIVE_INFINITY; x = dataset.get(i).getRepresentation(); for(int j : data) { if(i!=j) { y = dataset.get(j).getRepresentation(); minDist = Math.min(metric.getDistance(x, y), minDist); } } d += minDist; } return d/(double)data.size(); } public double distance(Cluster cluster, ProximityMatrix matrix) { if(cluster == null) throw new NullPointerException(); if(matrix == null) throw new NullPointerException(); if(dataset == null) throw new IllegalStateException("dataset is not defined"); double d = 0d; Collection<Integer> data = cluster.getData(); double minDist; for(int i : data) { minDist = Double.POSITIVE_INFINITY; for(int j : data) { if(i!=j) minDist = Math.min(matrix.getValue(i, j), minDist); } d += minDist; } return d/(double)data.size(); } }
[ "Marcel.Hermkes@webtrekk.com" ]
Marcel.Hermkes@webtrekk.com
5fac231a94fab21be65b728f7a019ad02ffc2ef4
af505010378e70a1af2d690ad8b4ffe09832a49a
/CarouselDemo/src/com/carouseldemo/main/Select_leader.java
daf39cf4a9d1d6a5a070f8dd2eed0e24495b6033
[]
no_license
suman29/peer-evaluation
343f16f19580e8b00d177772409455303cb37064
dfcb25415ffc3a5cab0d19a41674d7c18397c7f3
refs/heads/master
2021-01-23T20:18:54.005408
2014-06-18T09:33:04
2014-06-18T09:33:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,829
java
package com.carouseldemo.main; import android.widget.ArrayAdapter; import android.app.ListActivity; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.view.View; import android.view.View.OnClickListener; import android.widget.ListView; import android.widget.Toast; public class Select_leader extends ListActivity implements OnClickListener { ArrayAdapter<String> leaders; String subject[] = {"Select your Leader","leader1", "leader2", "leader3", "leader4", "leader5"}; ProgressDialog pd1; int counter1 = 0; Handler h1; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); leaders = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, subject); setListAdapter(leaders); pd1 = new ProgressDialog(this); pd1.setProgress(0); h1 = new Handler() { @Override public void handleMessage(Message msg) { super.handleMessage(msg); if(counter1>10) { pd1.dismiss(); Intent x = new Intent(getApplicationContext(), Team_details.class); startActivity(x); } else { counter1++; pd1.incrementProgressBy(1); h1.sendEmptyMessageDelayed(0, 200); } } }; } protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); pd1.setTitle("Please Wait for few moments . . . "); pd1.setMessage("After this you will get your team."); pd1.setProgressStyle(ProgressDialog.STYLE_SPINNER); h1.sendEmptyMessage(0); pd1.show(); } public void onClick(View v) { // TODO Auto-generated method stub } }
[ "suman14@osl-08.cse.iitb.ac.in" ]
suman14@osl-08.cse.iitb.ac.in
9059a408fba23042374019e2e56eff5e9c868479
75dfde36b7a28170a1eae231095b18ccbd8d5bc7
/app/DaCAServices/DaCAUserManagement/src/main/java/com/wade/daca/management/api/UserService.java
88d4705f2f24411cd8d8ce63988c88eb54c5d9a1
[]
no_license
catalin-vlas/DaCA
51f9994b5d59752f16c1870d08353643093896b2
2fb800acdf70c3b468d897cba0f475be3802b071
refs/heads/master
2021-05-08T03:04:23.032181
2018-01-31T18:01:49
2018-01-31T18:01:49
108,120,981
0
2
null
null
null
null
UTF-8
Java
false
false
1,076
java
package com.wade.daca.management.api; import com.wade.daca.management.dataobjects.User; import org.springframework.web.bind.annotation.*; public interface UserService { @RequestMapping(value = "/user", method = RequestMethod.POST) String createUser(@RequestBody User user); @RequestMapping(value = "/user/login", method = RequestMethod.GET) String loginUser(@RequestParam("username") String username, @RequestParam("password") String password); @RequestMapping(value = "/user/logout", method = RequestMethod.GET) String logoutUser(); @RequestMapping(value = "/user/{username:.+}", method = RequestMethod.GET) User getUserByName(@PathVariable("username") String username); @RequestMapping(value = "/user/{username:.+}", method = RequestMethod.PUT) String updateUser(@PathVariable("username") String username, @RequestBody User user); @RequestMapping(value = "/user/{username:.+}", method = RequestMethod.DELETE) String deleteUser(@PathVariable("username") String username); }
[ "ghitza9404@gmail.com" ]
ghitza9404@gmail.com
893b4887f8586c9fe63418c8394c75e1b226d959
c4b706b2c3a5f49f78351c701004d026a8c47b3a
/compiler/src/main/java/org/jaxsb/compiler/processor/model/element/ExtensionModel.java
193651db1d3f46cf65131c3106aac552b2472575
[ "MIT" ]
permissive
jaxsb/jaxsb
19447a028aa2a57ebb8fdf8bce0e3364c4a070a0
01713bdf722b10e5bf5ab073cb106845234d19cc
refs/heads/master
2023-08-21T12:30:38.219514
2023-08-19T10:40:47
2023-08-19T10:40:47
148,918,510
2
0
MIT
2023-06-16T10:33:11
2018-09-15T16:17:53
Java
UTF-8
Java
false
false
2,151
java
/* Copyright (c) 2008 JAX-SB * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * You should have received a copy of The MIT License (MIT) along with this * program. If not, see <http://opensource.org/licenses/MIT/>. */ package org.jaxsb.compiler.processor.model.element; import org.jaxsb.compiler.lang.LexerFailureException; import org.jaxsb.compiler.lang.UniqueQName; import org.jaxsb.compiler.processor.model.Model; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; public final class ExtensionModel extends Model { private SimpleTypeModel<?> base; protected ExtensionModel(final Node node, final Model parent) { super(node, parent); final NamedNodeMap attributes = node.getAttributes(); for (int i = 0, i$ = attributes.getLength(); i < i$; ++i) { // [RA] final Node attribute = attributes.item(i); if ("base".equals(attribute.getLocalName())) { final Node parentNode = node.getParentNode(); if (parentNode.getLocalName().contains("complex")) base = ComplexTypeModel.Reference.parseComplexType(UniqueQName.getInstance(parseQNameValue(attribute.getNodeValue(), node))); else if (parentNode.getLocalName().contains("simple")) base = SimpleTypeModel.Reference.parseSimpleType(UniqueQName.getInstance(parseQNameValue(attribute.getNodeValue(), node))); else throw new LexerFailureException("whoa, schema error?"); } } } public void setBase(final SimpleTypeModel<?> base) { this.base = base; } @SuppressWarnings("rawtypes") public SimpleTypeModel getBase() { return base; } }
[ "seva@safris.org" ]
seva@safris.org
d447eea03dabef62d7c3970410e7a067d937d2d0
34314f7c444d56cec1a476f92d066a65e9772090
/src/main/java/com/scp/HQL/Hibernateutil.java
9ced1f0b80e5e41ac3a0b6398f0a5f7ca6c83158
[]
no_license
amarghorpade/HQL
e17b01b337b8f2bfbfd6999b7eab4128e3944892
ece5cb05ec25340434e45bda7ff98adcace53a9f
refs/heads/master
2021-09-01T21:34:44.566228
2017-12-28T19:06:49
2017-12-28T19:06:49
115,651,850
0
0
null
null
null
null
UTF-8
Java
false
false
748
java
package com.scp.HQL; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.Configuration; public class Hibernateutil { public static SessionFactory sessionFactory = null; public static SessionFactory getSessionFactory() throws MyException { try { if (null == sessionFactory) { sessionFactory=new Configuration().configure().buildSessionFactory(); } } catch (Exception e) { throw new MyException("Session Factory Creation Error...!!!"); } return sessionFactory; } public static void resourceCleanupActivities(Session session, Transaction trans) { if (null != trans) trans.commit(); if (null != session) session.close(); } }
[ "amar_ghorpade@live.com" ]
amar_ghorpade@live.com
eeabab3b0f7d383a4d1c074abcd32f7987ed086f
f876ce468da7bb674d9ba62b7dbfe515edf0ed12
/lrecyclerview/src/main/java/com/lexing/lrecyclerview/animation/SlideBottomAnimation.java
d5ac9f5fc993b8c6636b9ab273f893e525b69118
[]
no_license
amosbake/LexingFrame
8dfa3a71c94a62dd7e24acac461026a34b61408f
c684ca41443637a1ea3cfdb913c3bba523e0e0f2
refs/heads/master
2021-01-12T15:23:33.114842
2016-12-16T09:50:27
2016-12-16T09:50:27
71,768,033
9
3
null
2016-10-29T09:13:28
2016-10-24T08:27:36
Java
UTF-8
Java
false
false
460
java
package com.lexing.lrecyclerview.animation; import android.animation.Animator; import android.animation.ObjectAnimator; import android.view.View; /** * * Author: mopel * Date : 2016/10/25 */ public class SlideBottomAnimation implements BaseAnimation { @Override public Animator[] getAnimators(View view) { return new Animator[]{ ObjectAnimator.ofFloat(view, "translationY", view.getMeasuredHeight(), 0) }; } }
[ "amosbake@gmail.com" ]
amosbake@gmail.com
e1e4f80262902e22d4f7d386bed436d6db5dd0a8
a6ff7a994ecfe54642752d9bc4d780c42eafce59
/common/src/main/java/com/erayic/agr/common/net/back/enums/EnumServiceType.java
c15df0b8826051ea4d6f687b7a2067386a8eba75
[]
no_license
chenxizhe/monster
efdebc446c85f3b73258a669d67957ce512af76b
43314e29111065b1bf77fa74a864bec7818349ef
refs/heads/master
2023-05-06T12:48:51.978300
2017-07-27T02:05:37
2017-07-27T02:05:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
897
java
package com.erayic.agr.common.net.back.enums; /** * 作者:Hkceey * 邮箱:hkceey@outlook.com * 注解: */ public class EnumServiceType { public static final int KERNEL = 0;//核心服务 public static final int InfoService = 1;//信息服务 public static final int Subject = 2;//主题服务 public static final int Specify = 3;//特定作物服务 public static final int All = 9;//全部 public static String getTypeDes(int type) { switch (type) { case KERNEL: return "核心服务"; case InfoService: return "信息服务"; case Subject: return "主题服务"; case Specify: return "特定作物服务"; case All: return "全部"; default: return "未定义"; } } }
[ "hkceey@outlook.com" ]
hkceey@outlook.com
dc3956e1df3511414cb77baf6532ec38d62735c0
d6ec147af05d48184f7b365dd00d567f79153952
/src/main/java/com/zhuc/my/h2/Test1.java
e0b7b82764fc4c4f6b67a24a7535c1178d4d6dc5
[]
no_license
nicolas360/my
5ffb4ae3cb0c2d3048b3acd305aa470a3f8d3633
a7de2d6acaab586159ad64d3cd13089ae86f0ee5
refs/heads/master
2021-01-10T19:53:53.585376
2015-09-17T04:52:33
2015-09-17T04:52:33
21,148,807
1
0
null
null
null
null
UTF-8
Java
false
false
1,737
java
package com.zhuc.my.h2; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import org.h2.tools.Server; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Test1 { private static final Logger logger = LoggerFactory.getLogger(Test1.class); private Server server; private final String port = "9080"; private final String dbDir = "./h2db/sample"; private final String user = "sa"; private final String password = ""; public void startServer() { try { logger.debug("正在启动h2..."); server = Server.createTcpServer(new String[] { "-tcpPort", port }).start(); } catch (Exception e) { logger.error("启动h2出错:", e); } } public void stopServer() { if (server != null) { logger.debug("正在关闭h2..."); server.stop(); logger.debug("关闭成功."); } } public void useH2() { try { Class.forName("org.h2.Driver"); Connection conn = DriverManager.getConnection("jdbc:h2:" + dbDir, user, password); Statement stat = conn.createStatement(); // insert data //stat.execute("DROP TABLE IF EXISTS TEST"); // stat.execute("CREATE TABLE TEST(NAME VARCHAR)"); stat.execute("INSERT INTO TEST VALUES('Hello World2')"); // use data ResultSet result = stat.executeQuery("select name from test "); int i = 1; while (result.next()) { logger.debug(i++ + ":" + result.getString("name")); } result.close(); stat.close(); conn.close(); } catch (Exception e) { e.printStackTrace(); } } /** * @param args */ public static void main(String[] args) { Test1 h2 = new Test1(); h2.startServer(); h2.useH2(); h2.stopServer(); logger.debug("==END=="); } }
[ "654460950@qq.com" ]
654460950@qq.com
a3aae4c906449fe54ffb8e1729aa296745e31b7e
92c1674aacda6c550402a52a96281ff17cfe5cff
/module15/module54/module1/src/main/java/com/android/example/module15_module54_module1/ClassAAI.java
a742100f0820c3cee616bc9f6887406aebcb30d1
[]
no_license
bingranl/android-benchmark-project
2815c926df6a377895bd02ad894455c8b8c6d4d5
28738e2a94406bd212c5f74a79179424dd72722a
refs/heads/main
2023-03-18T20:29:59.335650
2021-03-12T11:47:03
2021-03-12T11:47:03
336,009,838
0
0
null
null
null
null
UTF-8
Java
false
false
832
java
package com.android.example.module15_module54_module1; public class ClassAAI { private java.lang.String instance_var_1_0 = "SomeString"; private java.lang.String instance_var_1_1 = "SomeString"; private java.lang.String instance_var_1_2 = "SomeString"; public void method0( java.lang.String param0, java.lang.String param1) throws Throwable { java.lang.String local_var_2_2 = "SomeString"; local_var_2_2.compareTo("SomeString"); java.lang.String local_var_2_3 = "SomeString"; local_var_2_3.compareTo("SomeString"); java.lang.String local_var_2_4 = "SomeString"; local_var_2_4.compareTo("SomeString"); } public void method1( java.lang.String param0, java.lang.String param1) throws Throwable { } public void method2( java.lang.String param0, java.lang.String param1) throws Throwable { } }
[ "bingran@google.com" ]
bingran@google.com
40d1c1ffc2beb6eea398d8b5dd5e6b4f0a2a9966
0ce0db4696339905a901d427d2a3b53afca01586
/src/scale/report/DetailFrame.java
8dfda4aa2332574c65448a38b515718ad997911d
[]
no_license
pspiroib2/Dynamic-Charts
c5fc2ac540732b4155b878d05cb8faf86815c77a
c0fd2e51ae7aaa041a93117bac26a9de7daa39a7
refs/heads/master
2020-05-16T21:24:50.121860
2013-03-07T22:58:14
2013-03-07T22:58:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,530
java
package scale.report; import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import javax.swing.JCheckBox; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.table.AbstractTableModel; import lib.Util; import scale.report.FilterPanel.Table; public class DetailFrame extends JFrame { private Collection<Scale> m_scales; private ArrayList<Rec> m_recs = new ArrayList<Rec>(); private JCheckBox m_open = new JCheckBox( "Show open positions"); private JCheckBox m_closed = new JCheckBox( "Show closed positions"); private Model m_model = new Model(); ArrayList<Underlying> m_unders = new ArrayList<Underlying>(); DetailFrame( Collection<Scale> scales) { m_scales = scales; // build list of underlyings and sort them for( Scale scale : m_scales) { if( !m_unders.contains( scale.underlying() ) ) { m_unders.add( scale.underlying() ); } } Collections.sort( m_unders); // show open and close positions by default m_open.setSelected( true); m_closed.setSelected( true); // build list of records refresh(); // build checkbox panel JPanel checkboxPanel = new JPanel(); checkboxPanel.add( m_open); checkboxPanel.add( m_closed); // create table JTable table = new Table( m_model, 0); JScrollPane scroll = new JScrollPane( table); // build this frame add( checkboxPanel, BorderLayout.NORTH); add( scroll); setSize( 700, 300); setVisible( true); m_open.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { refresh(); } }); m_closed.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { refresh(); } }); } protected void refresh() { m_recs.clear(); // build list of records double[] totals = new double[3]; for( Underlying under : m_unders) { double[] pnls = new double[3]; pnls[0] = under.oldUnreal(); pnls[1] = under.totalReal(); pnls[2] = under.unreal(); Rec rec = new Rec( under.symbol(), under.stockPos(), under.optPos(), pnls[0], pnls[1], pnls[2]); if( rec.valid() ) { boolean hasPosition = rec.hasPosition(); if( hasPosition && m_open.isSelected() || !hasPosition && m_closed.isSelected() ) { m_recs.add( rec); totals[0] += pnls[0]; totals[1] += pnls[1]; totals[2] += pnls[2]; } } } // add total row m_recs.add( new Rec( "Total", 0, 0, totals[0], totals[1], totals[2]) ); m_model.fireTableDataChanged(); } static class Rec { private String m_symbol; private int m_stockPos; private int m_optPos; private double m_totalReal; private double m_unrealStart; private double m_unrealEnd; public double unrealChange() { return m_unrealEnd - m_unrealStart; } public double totalChange() { return m_totalReal + unrealChange(); } // change in total public boolean hasPosition() { return m_stockPos != 0 || m_optPos != 0; } public Rec(String symbol, int stockPos, int optPos, double unrealStart, double totalReal, double unrealEnd) { m_symbol = symbol; m_stockPos = stockPos; m_optPos = optPos; m_unrealStart = unrealStart; m_totalReal = totalReal; m_unrealEnd = unrealEnd; } public boolean valid() { return m_stockPos != 0 || m_optPos != 0 || m_totalReal != 0; } } class Model extends AbstractTableModel { @Override public int getColumnCount() { return 8; } @Override public String getColumnName(int col) { switch( col) { case 0: return "Symbol"; case 1: return "Stock Pos"; case 2: return "Opt Pos"; case 3: return "Unreal Start"; case 4: return "Real"; case 5: return "Unreal End"; case 6: return "Unreal Chg"; case 7: return "Total Chg"; default: return null; } } @Override public int getRowCount() { return m_recs.size(); } @Override public Object getValueAt(int row, int col) { Rec rec = m_recs.get( row); switch( col) { case 0: return rec.m_symbol; case 1: return rec.m_stockPos; case 2: return rec.m_optPos; case 3: return Util.fmtShort( rec.m_unrealStart); case 4: return Util.fmtShort( rec.m_totalReal); case 5: return Util.fmtShort( rec.m_unrealEnd); case 6: return Util.fmtShort( rec.unrealChange() ); case 7: return Util.fmtShort( rec.totalChange() ); default: return null; } } } }
[ "pspiro@interactivebrokers.com" ]
pspiro@interactivebrokers.com
586b6eb9a28606b961141047bf9e3c73ce554d6e
18a6b6b9303a706d6ff7be4abc3ab1d5fe6497b2
/java-examples/java-core/src/test/java/com/hellokoding/java/collections/HashSetSortingByTreeSetTest.java
ba322ddbd8b141dc499f7d6c21a79152f9dd1159
[ "MIT" ]
permissive
charu-jain89/hellokoding-courses
88b4ee55d55fffe183da30201c1c7eed98bae858
b5e2ae3b889ec9d828ec9e4d7ceb3eea220eb08c
refs/heads/master
2021-02-09T13:45:41.348588
2020-03-02T03:01:51
2020-03-02T03:01:51
244,289,242
1
0
MIT
2020-03-02T05:37:41
2020-03-02T05:37:40
null
UTF-8
Java
false
false
1,871
java
package com.hellokoding.java.collections; import org.junit.Test; import java.util.*; import java.util.stream.Collectors; import static org.assertj.core.api.Assertions.assertThat; public class HashSetSortingByTreeSetTest { @Test(expected = ClassCastException.class) public void givenNonComparable_whenSortAsc_thenThrowException(){ // given HashSet<NonComparableBook> bookSet = new HashSet<>(); bookSet.add(new NonComparableBook("C")); bookSet.add(new NonComparableBook("A")); bookSet.add(new NonComparableBook("D")); // when sorting in the natural / ascending order SortedSet<NonComparableBook> bookTreeSet = new TreeSet<>(bookSet); } @Test public void givenComparable_whenSortAsc_thenSuccess(){ // given HashSet<ComparableBook> bookSet = new HashSet<>(); bookSet.add(new ComparableBook("C")); bookSet.add(new ComparableBook("A")); bookSet.add(new ComparableBook("D")); // when sorting in the natural / ascending order SortedSet<ComparableBook> sortedSet = new TreeSet<>(bookSet); // then String actual = sortedSet.stream().map(k -> k.title).collect(Collectors.joining()); assertThat(actual).isEqualTo("ACD"); } @Test public void givenComparable_whenSortDesc_thenSuccess(){ // given HashSet<ComparableBook> bookSet = new HashSet<>(); bookSet.add(new ComparableBook("C")); bookSet.add(new ComparableBook("A")); bookSet.add(new ComparableBook("D")); // when sorting in the reverse / descending order SortedSet<ComparableBook> sortedSet = new TreeSet<>(bookSet).descendingSet(); // then String actual = sortedSet.stream().map(k -> k.title).collect(Collectors.joining()); assertThat(actual).isEqualTo("DCA"); } }
[ "giaunv@users.noreply.github.com" ]
giaunv@users.noreply.github.com
68b438680b9e9d86aa565cd9878a0c6265ca5d99
e8ed4c00268408d812b043588acfe94844d7a7be
/vickze-auth/vickze-auth-server/src/main/java/io/vickze/auth/mapper/UserRoleMapper.java
6be65bdd596d286befd8aeb4911560be11fd0026
[]
no_license
Godricm/vickze-cloud-admin
c4ea7b7566e667bcebb2586ecbc732e0b7540b20
1749387966b93a73adedbbb1bb077b117ab50355
refs/heads/master
2022-04-06T05:40:48.657751
2020-03-18T10:03:24
2020-03-18T10:03:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
371
java
package io.vickze.auth.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import io.vickze.auth.domain.DO.UserRoleDO; import org.apache.ibatis.annotations.Mapper; /** * 用户与角色对应关系 * * @author vick.zeng * @email zyk@yk95.top * @create 2019-04-16 11:19:31 */ @Mapper public interface UserRoleMapper extends BaseMapper<UserRoleDO> { }
[ "zyk@yk95.top" ]
zyk@yk95.top
09f80151312e78091b11a3b0adee640558a6b2a1
812be6b9d1ba4036652df166fbf8662323f0bdc9
/java/Dddml.Wms.JavaCommon/src/generated/java/org/dddml/wms/domain/inventoryitem/InventoryItemEntryStateDto.java
d0ad44ce25d0d9d0687db156f40334aadb48d972
[]
no_license
lanmolsz/wms
8503e54a065670b48a15955b15cea4926f05b5d6
4b71afd80127a43890102167a3af979268e24fa2
refs/heads/master
2020-03-12T15:10:26.133106
2018-09-27T08:28:05
2018-09-27T08:28:05
130,684,482
0
0
null
2018-04-23T11:11:24
2018-04-23T11:11:24
null
UTF-8
Java
false
false
6,131
java
package org.dddml.wms.domain.inventoryitem; import java.util.*; import java.math.BigDecimal; import java.util.Date; import org.dddml.wms.domain.*; import org.dddml.wms.specialization.*; public class InventoryItemEntryStateDto { private Long entrySeqId; public Long getEntrySeqId() { return this.entrySeqId; } public void setEntrySeqId(Long entrySeqId) { this.entrySeqId = entrySeqId; } private BigDecimal onHandQuantity; public BigDecimal getOnHandQuantity() { return this.onHandQuantity; } public void setOnHandQuantity(BigDecimal onHandQuantity) { this.onHandQuantity = onHandQuantity; } private BigDecimal inTransitQuantity; public BigDecimal getInTransitQuantity() { return this.inTransitQuantity; } public void setInTransitQuantity(BigDecimal inTransitQuantity) { this.inTransitQuantity = inTransitQuantity; } private BigDecimal reservedQuantity; public BigDecimal getReservedQuantity() { return this.reservedQuantity; } public void setReservedQuantity(BigDecimal reservedQuantity) { this.reservedQuantity = reservedQuantity; } private BigDecimal occupiedQuantity; public BigDecimal getOccupiedQuantity() { return this.occupiedQuantity; } public void setOccupiedQuantity(BigDecimal occupiedQuantity) { this.occupiedQuantity = occupiedQuantity; } private BigDecimal virtualQuantity; public BigDecimal getVirtualQuantity() { return this.virtualQuantity; } public void setVirtualQuantity(BigDecimal virtualQuantity) { this.virtualQuantity = virtualQuantity; } private InventoryItemSourceInfo source; public InventoryItemSourceInfo getSource() { return this.source; } public void setSource(InventoryItemSourceInfo source) { this.source = source; } private Long version; public Long getVersion() { return this.version; } public void setVersion(Long version) { this.version = version; } private InventoryItemId inventoryItemId; public InventoryItemId getInventoryItemId() { return this.inventoryItemId; } public void setInventoryItemId(InventoryItemId inventoryItemId) { this.inventoryItemId = inventoryItemId; } private String createdBy; public String getCreatedBy() { return this.createdBy; } public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } private Date createdAt; public Date getCreatedAt() { return this.createdAt; } public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; } private String updatedBy; public String getUpdatedBy() { return this.updatedBy; } public void setUpdatedBy(String updatedBy) { this.updatedBy = updatedBy; } private Date updatedAt; public Date getUpdatedAt() { return this.updatedAt; } public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; } public static class DtoConverter extends AbstractStateDtoConverter { public static Collection<String> collectionFieldNames = Arrays.asList(new String[]{}); @Override protected boolean isCollectionField(String fieldName) { return CollectionUtils.collectionContainsIgnoringCase(collectionFieldNames, fieldName); } public InventoryItemEntryStateDto[] toInventoryItemEntryStateDtoArray(Iterable<InventoryItemEntryState> states) { ArrayList<InventoryItemEntryStateDto> stateDtos = new ArrayList(); for (InventoryItemEntryState s : states) { InventoryItemEntryStateDto dto = toInventoryItemEntryStateDto(s); stateDtos.add(dto); } return stateDtos.toArray(new InventoryItemEntryStateDto[0]); } public InventoryItemEntryStateDto toInventoryItemEntryStateDto(InventoryItemEntryState state) { if(state == null) { return null; } InventoryItemEntryStateDto dto = new InventoryItemEntryStateDto(); if (returnedFieldsContains("EntrySeqId")) { dto.setEntrySeqId(state.getEntrySeqId()); } if (returnedFieldsContains("OnHandQuantity")) { dto.setOnHandQuantity(state.getOnHandQuantity()); } if (returnedFieldsContains("InTransitQuantity")) { dto.setInTransitQuantity(state.getInTransitQuantity()); } if (returnedFieldsContains("ReservedQuantity")) { dto.setReservedQuantity(state.getReservedQuantity()); } if (returnedFieldsContains("OccupiedQuantity")) { dto.setOccupiedQuantity(state.getOccupiedQuantity()); } if (returnedFieldsContains("VirtualQuantity")) { dto.setVirtualQuantity(state.getVirtualQuantity()); } if (returnedFieldsContains("Source")) { dto.setSource(state.getSource()); } if (returnedFieldsContains("Version")) { dto.setVersion(state.getVersion()); } if (returnedFieldsContains("InventoryItemId")) { dto.setInventoryItemId(state.getInventoryItemId()); } if (returnedFieldsContains("CreatedBy")) { dto.setCreatedBy(state.getCreatedBy()); } if (returnedFieldsContains("CreatedAt")) { dto.setCreatedAt(state.getCreatedAt()); } if (returnedFieldsContains("UpdatedBy")) { dto.setUpdatedBy(state.getUpdatedBy()); } if (returnedFieldsContains("UpdatedAt")) { dto.setUpdatedAt(state.getUpdatedAt()); } return dto; } } }
[ "yangjiefeng@gmail.com" ]
yangjiefeng@gmail.com
ae6216fe1ec6d74350d905c8e882394648b7274d
26cf618d00e6aac5915d8c51938a9e5e192faf75
/buession-security-shiro/src/main/java/com/buession/security/shiro/support/ViewSupport.java
badfa050bc1c62b38b6ec2d5f67290c5210056a5
[ "Apache-2.0" ]
permissive
buession/buession-security
c8726748f146ed85c501aa3c4cf4e42e390df18d
a9b2de143cc72b365fd6eae1a84a5f9d0fd2443d
refs/heads/master
2023-08-17T18:08:22.968501
2023-08-17T02:19:17
2023-08-17T02:19:17
189,758,437
6
3
Apache-2.0
2023-08-17T02:19:18
2019-06-01T17:09:45
Java
UTF-8
Java
false
false
16,711
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. * See the NOTICE file distributed with this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and limitations under the License. * * ========================================================================================================= * * This software consists of voluntary contributions made by many individuals on behalf of the * Apache Software Foundation. For more information on the Apache Software Foundation, please see * <http://www.apache.org/>. * * +-------------------------------------------------------------------------------------------------------+ * | License: http://www.apache.org/licenses/LICENSE-2.0.txt | * | Author: Yong.Teng <webmaster@buession.com> | * | Copyright @ 2013-2022 Buession.com Inc. | * +-------------------------------------------------------------------------------------------------------+ */ package com.buession.security.shiro.support; import com.buession.core.utils.Assert; import com.buession.core.utils.StringUtils; import com.buession.core.validator.Validate; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authz.Permission; import org.apache.shiro.subject.Subject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.beans.BeanInfo; import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.util.Arrays; import java.util.Collection; /** * Shiro 功能视图标签支持 * * @author Yong.Teng * @since 2.0.0 */ public interface ViewSupport { String ROLE_NAMES_DELIMITER = ","; String PERMISSION_NAMES_DELIMITER = ","; Logger logger = LoggerFactory.getLogger(ViewSupport.class); /** * 验证是否为已认证通过的用户,不包含已记住的用户,这是与 isUser 标签方法的区别所在 * * @return 用户是否已通过认证 */ default boolean isAuthenticated(){ Subject subject = SecurityUtils.getSubject(); return subject != null && subject.isAuthenticated(); } /** * 验证是否为未认证通过用户,与 isAuthenticated 标签相对应,与 isGuest 标签的区别是,该标签包含已记住用户 * * @return 用户是否未通过认证 */ default boolean isNotAuthenticated(){ Subject subject = SecurityUtils.getSubject(); return subject != null && subject.isAuthenticated(); } /** * 验证用户是否为访客,即未认证(包含未记住)的用户 * * @return 用户是否为访客 */ default boolean isGuest(){ Subject subject = SecurityUtils.getSubject(); return subject == null || subject.getPrincipal() == null; } /** * 验证用户是否认证通过或已记住的用户 * * @return 用户是否认证通过或已记住的用户 */ default boolean isUser(){ Subject subject = SecurityUtils.getSubject(); return subject != null && subject.getPrincipal() != null; } /** * 验证用户是通过记住我登录的 * * @return 用户是通过记住我登录的 */ default boolean isRemembered(){ Subject subject = SecurityUtils.getSubject(); return subject != null && subject.isRemembered(); } /** * 返回用户 Principal * * @return 用户 Principal */ default Object getPrincipal(){ Subject subject = SecurityUtils.getSubject(); return subject != null ? subject.getPrincipal() : null; } /** * 返回用户属性 * * @param property * 属性名称 * * @return 用户属性 */ default Object getPrincipalProperty(String property){ Assert.isBlank(property, "property must be contains character."); Subject subject = SecurityUtils.getSubject(); if(subject == null){ return null; } Object principal = subject.getPrincipal(); try{ BeanInfo bi = Introspector.getBeanInfo(principal.getClass()); PropertyDescriptor[] propertyDescriptors = bi.getPropertyDescriptors(); for(PropertyDescriptor pd : propertyDescriptors){ if(property.equals(pd.getName())){ return pd.getReadMethod().invoke(principal, (Object[]) null); } } if(logger.isTraceEnabled()){ logger.trace("Property [{}] not found in principal of type [{}]", property, principal.getClass().getName()); } }catch(Exception e){ if(logger.isWarnEnabled()){ logger.warn("Error reading property [{}] from principal of type [{}]", property, principal.getClass().getName()); } } return null; } /** * 验证用户是否具备某角色 * * @param roleName * 角色名称 * * @return 用户是否具备某角色 */ default boolean hasRole(String roleName){ Subject subject = SecurityUtils.getSubject(); return subject != null && subject.hasRole(roleName); } /** * 验证用户是否不具备某角色,与 hasRole 逻辑相反 * * @param roleName * 角色名称 * * @return 用户是否不具备某角色 */ default boolean lacksRole(String roleName){ return hasRole(roleName) == false; } /** * 验证用户是否具有以下任意一个角色 * * @param roleNames * 以 delimiter 为分隔符的角色列表 * @param delimiter * 角色列表分隔符 * * @return 用户是否具有以下任意一个角色 */ @Deprecated default boolean hasAnyRoles(String roleNames, String delimiter){ return hasAnyRole(roleNames, delimiter); } /** * 验证用户是否具有以下任意一个角色 * * @param roleNames * 以 delimiter 为分隔符的角色列表 * @param delimiter * 角色列表分隔符 * * @return 用户是否具有以下任意一个角色 * * @since 1.3.2 */ default boolean hasAnyRole(String roleNames, String delimiter){ return hasAnyRole(StringUtils.split(roleNames, Validate.isBlank(delimiter) ? ROLE_NAMES_DELIMITER : delimiter)); } /** * 验证用户是否具有以下任意一个角色 * * @param roleNames * 以 ROLE_NAMES_DELIMITER 为分隔符的角色列表 * * @return 用户是否具有以下任意一个角色 */ @Deprecated default boolean hasAnyRoles(String roleNames){ return hasAnyRole(roleNames); } /** * 验证用户是否具有以下任意一个角色 * * @param roleNames * 以 ROLE_NAMES_DELIMITER 为分隔符的角色列表 * * @return 用户是否具有以下任意一个角色 */ default boolean hasAnyRole(String roleNames){ return hasAnyRole(roleNames, ROLE_NAMES_DELIMITER); } /** * 验证用户是否具有以下任意一个角色 * * @param roleNames * 角色列表 * * @return 用户是否具有以下任意一个角色 */ @Deprecated default boolean hasAnyRoles(Collection<String> roleNames){ return hasAnyRole(roleNames); } /** * 验证用户是否具有以下任意一个角色 * * @param roleNames * 角色列表 * * @return 用户是否具有以下任意一个角色 * * @since 1.3.2 */ default boolean hasAnyRole(Collection<String> roleNames){ if(Validate.isNotEmpty(roleNames)){ Subject subject = SecurityUtils.getSubject(); if(subject != null){ for(String role : roleNames){ if(role != null && subject.hasRole(role.trim())){ return true; } } } } return false; } /** * 验证用户是否具有以下任意一个角色 * * @param roleNames * 角色列表 * * @return 用户是否具有以下任意一个角色 */ @Deprecated default boolean hasAnyRoles(String... roleNames){ return hasAnyRole(roleNames); } /** * 验证用户是否具有以下任意一个角色 * * @param roleNames * 角色列表 * * @return 用户是否具有以下任意一个角色 * * @since 1.3.2 */ default boolean hasAnyRole(String... roleNames){ if(Validate.isNotEmpty(roleNames)){ Subject subject = SecurityUtils.getSubject(); if(subject != null){ for(String role : roleNames){ if(role != null && subject.hasRole(role.trim())){ return true; } } } } return false; } /** * 验证用户是否具有以下所有角色 * * @param roleNames * 以 delimiter 为分隔符的角色列表 * @param delimiter * 角色列表分隔符 * * @return 用户是否具有以下所有角色 */ default boolean hasRolesAll(String roleNames, String delimiter){ return hasRolesAll( StringUtils.split(roleNames, Validate.isBlank(delimiter) ? ROLE_NAMES_DELIMITER : delimiter)); } /** * 验证用户是否具有以下所有角色 * * @param roleNames * 以 ROLE_NAMES_DELIMITER 为分隔符的角色列表 * * @return 用户是否具有以下所有角色 */ default boolean hasRolesAll(String roleNames){ return hasRolesAll(roleNames, ROLE_NAMES_DELIMITER); } /** * 验证用户是否具有以下所有角色 * * @param roleNames * 角色列表 * * @return 用户是否具有以下所有角色 */ default boolean hasRolesAll(Collection<String> roleNames){ if(Validate.isEmpty(roleNames)){ return false; } Subject subject = SecurityUtils.getSubject(); return subject != null && subject.hasAllRoles(roleNames); } /** * 验证用户是否具有以下所有角色 * * @param roleNames * 角色列表 * * @return 用户是否具有以下所有角色 * * @since 1.3.2 */ default boolean hasRolesAll(String... roleNames){ return Validate.isNotEmpty(roleNames) && hasRolesAll(Arrays.asList(roleNames)); } /** * 验证用户是否具备某权限 * * @param permission * 权限名称 * * @return 用户是否具备某权限 */ default boolean hasPermission(String permission){ Subject subject = SecurityUtils.getSubject(); return subject != null && subject.isPermitted(permission); } /** * 验证用户是否具备某权限 * * @param permission * 权限 * * @return 用户是否具备某权限 */ default boolean hasPermission(Permission permission){ Subject subject = SecurityUtils.getSubject(); return subject != null && subject.isPermitted(permission); } /** * 验证用户是否不具备某权限,与 hasPermission 逻辑相反 * * @param permission * 权限名称 * * @return 用户是否不具备某权限 */ default boolean lacksPermission(String permission){ return hasPermission(permission) == false; } /** * 验证用户是否具有以下任意一个权限 * * @param permissions * 以 delimiter 为分隔符的权限列表 * @param delimiter * 权限列表分隔符 * * @return 用户是否具有以下任意一个权限 */ @Deprecated default boolean hasAnyPermissions(String permissions, String delimiter){ return hasAnyPermission(permissions, delimiter); } /** * 验证用户是否具有以下任意一个权限 * * @param permissions * 以 delimiter 为分隔符的权限列表 * @param delimiter * 权限列表分隔符 * * @return 用户是否具有以下任意一个权限 * * @since 1.3.2 */ default boolean hasAnyPermission(String permissions, String delimiter){ return hasAnyPermission( StringUtils.split(permissions, Validate.isBlank(delimiter) ? PERMISSION_NAMES_DELIMITER : delimiter)); } /** * 验证用户是否具有以下任意一个权限 * * @param permissions * 以 PERMISSION_NAMES_DELIMITER 为分隔符的权限列表 * * @return 用户是否具有以下任意一个权限 */ @Deprecated default boolean hasAnyPermissions(String permissions){ return hasAnyPermission(permissions); } /** * 验证用户是否具有以下任意一个权限 * * @param permissions * 以 PERMISSION_NAMES_DELIMITER 为分隔符的权限列表 * * @return 用户是否具有以下任意一个权限 */ default boolean hasAnyPermission(String permissions){ return hasAnyPermission(permissions, PERMISSION_NAMES_DELIMITER); } /** * 验证用户是否具有以下任意一个权限 * * @param permissions * 权限列表 * * @return 用户是否具有以下任意一个权限 */ @Deprecated default boolean hasAnyPermissions(Collection<String> permissions){ return hasAnyPermission(permissions); } /** * 验证用户是否具有以下任意一个权限 * * @param permissions * 权限列表 * * @return 用户是否具有以下任意一个权限 */ default boolean hasAnyPermission(Collection<String> permissions){ if(Validate.isNotEmpty(permissions)){ Subject subject = SecurityUtils.getSubject(); if(subject != null){ for(String permission : permissions){ if(permission != null && subject.isPermitted(permission.trim())){ return true; } } } } return false; } /** * 验证用户是否具有以下任意一个权限 * * @param permissions * 权限列表 * * @return 用户是否具有以下任意一个权限 */ @Deprecated default boolean hasAnyPermissions(String... permissions){ return hasAnyPermission(permissions); } /** * 验证用户是否具有以下任意一个权限 * * @param permissions * 权限列表 * * @return 用户是否具有以下任意一个权限 */ default boolean hasAnyPermission(String... permissions){ if(Validate.isNotEmpty(permissions)){ Subject subject = SecurityUtils.getSubject(); if(subject != null){ for(String permission : permissions){ if(permission != null && subject.isPermitted(permission.trim())){ return true; } } } } return false; } /** * 验证用户是否具有以下任意一个权限 * * @param permissions * 权限列表 * * @return 用户是否具有以下任意一个权限 * * @since 1.3.2 */ @Deprecated default boolean hasAnyPermissions(Permission... permissions){ return hasAnyPermission(permissions); } /** * 验证用户是否具有以下任意一个权限 * * @param permissions * 权限列表 * * @return 用户是否具有以下任意一个权限 */ default boolean hasAnyPermission(Permission... permissions){ if(Validate.isNotEmpty(permissions)){ Subject subject = SecurityUtils.getSubject(); if(subject != null){ for(Permission permission : permissions){ if(permission != null && subject.isPermitted(permission)){ return true; } } } } return false; } /** * 验证用户是否具有以下所有权限 * * @param permissions * 以 delimiter 为分隔符的权限列表 * @param delimiter * 权限列表分隔符 * * @return 用户是否具有以下所有权限 */ default boolean hasPermissionsAll(String permissions, String delimiter){ return hasPermissionsAll( StringUtils.split(permissions, Validate.isBlank(delimiter) ? PERMISSION_NAMES_DELIMITER : delimiter)); } /** * 验证用户是否具有以下所有权限 * * @param permissions * 以 PERMISSION_NAMES_DELIMITER 为分隔符的权限列表 * * @return 用户是否具有以下所有权限 */ default boolean hasPermissionsAll(String permissions){ return hasPermissionsAll(permissions, PERMISSION_NAMES_DELIMITER); } /** * 验证用户是否具有以下所有权限 * * @param permissions * 权限列表 * * @return 用户是否具有以下所有权限 */ default boolean hasPermissionsAll(Collection<String> permissions){ return permissions != null && hasPermissionsAll(permissions.toArray(new String[]{})); } /** * 验证用户是否具有以下所有权限 * * @param permissions * 权限列表 * * @return 用户是否具有以下所有权限 */ default boolean hasPermissionsAll(String... permissions){ if(Validate.isEmpty(permissions)){ return false; } Subject subject = SecurityUtils.getSubject(); return subject != null && subject.isPermittedAll(permissions); } /** * 验证用户是否具有以下所有权限 * * @param permissions * 权限列表 * * @return 用户是否具有以下所有权限 */ default boolean hasPermissionsAll(Permission... permissions){ if(Validate.isEmpty(permissions)){ return false; } Subject subject = SecurityUtils.getSubject(); return subject != null && subject.isPermittedAll(Arrays.asList(permissions)); } }
[ "webmaster@buession.com" ]
webmaster@buession.com
97c85a376418ee327260d507f7715ceee48d042e
a33a6fb78214b4a05269569daa49bb710faf8f2d
/src/main/java/com/ccq/myblog/MyBlogApplication.java
90b027eb21916d30c24415d2235d2952527a539a
[ "MIT" ]
permissive
minatoyukina/my-blog
30a45f9e628e9e84e5fa75eac9ceabf855039e96
a59b1d41ba2a55fb162acc5501c1ec7ef994e4d3
refs/heads/master
2022-06-21T16:30:45.671151
2020-09-10T06:01:07
2020-09-10T06:01:07
174,797,933
23
7
MIT
2022-06-21T00:58:30
2019-03-10T08:39:38
JavaScript
UTF-8
Java
false
false
321
java
package com.ccq.myblog; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class MyBlogApplication { public static void main(String[] args) { SpringApplication.run(MyBlogApplication.class, args); } }
[ "1096445518@qq.com" ]
1096445518@qq.com
844ce0d0e0aeb4876ebea1c7cc8d81a45c4e17aa
69ed18f94b2c1caf9742d983f5daf28f40614ca2
/SpringboardWsClient/src/com/pccw/dwfmGateway/orderInformation/OrderInformationOriVoiceReturn.java
fefd407b4de51952e422f5a8299f5493e21e732a
[]
no_license
RodexterMalinao/springBoard
d1b4f9d2f7e76f63e2690f414863096e3e271369
aa4bf03395b12d923d28767e1561049c45ee3261
refs/heads/master
2020-09-03T07:21:15.415737
2019-12-16T07:12:22
2019-12-16T07:12:22
219,409,720
0
1
null
2019-12-16T07:12:23
2019-11-04T03:28:03
Java
UTF-8
Java
false
false
49,647
java
package com.pccw.dwfmGateway.orderInformation; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for OrderInformationOriVoiceReturn complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="OrderInformationOriVoiceReturn"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="AftCd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="AgNodeId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="AgTid" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="AnExchng" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="AnInd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="AnPortNum" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="AttenuatnAt1600HzQty" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="AttenuatnAt800HzQty" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="AudioCarrInd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="BlkWirePairNumPr1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="BlkWirePairNumPr2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="BuildId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="CabinetSeqNum" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="CableCd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="CablePairNum" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="ChannelNum1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="ChannelNum2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="DivrCd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="DnPnExchngeId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="DpCat" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="DpsdfCd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="DpsdfPairNum" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="DpSubCat" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="DsidePairNum" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="DslInd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="EnExchange" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="EsidePairNum" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="ExistLineCls" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="ExistSrvNum" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="FromAdslInd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="FromBsn" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="FromL2Prov" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="FromLcCrType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="FromNiden" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="FromProdId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="FromRtId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="FromRtPort" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="FromStbType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="HorTypeCdPr1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="HorTypeCdPr2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="HostEn" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="HostExchng" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="JmpInd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="L3Address" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="LineEqmtNum" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="MdfbarSeqNum" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="MdfBuildId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="MdfSeqNum" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="OltNum" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="OrderId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="PcmId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="PinNum" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="PnNnExchange" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="PnNnInd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="RefPnNn" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="RelBwBuildId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="RelBwDpsdfCd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="RelBwPairNum" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="RelBwVt" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="RelNid" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="RelRtDpCat" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="RelRtDpSubCat" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="RelRtDslInd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="RemoteMdfSeqNum" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="RestncQty" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="SbiInd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="TermntrCdPr1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="TermntrCdPr2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="VdslBwSharedInd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="VertTypeCdPr1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="VertTypeCdPr2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="VfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="VoipInd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "OrderInformationOriVoiceReturn", propOrder = { "aftCd", "agNodeId", "agTid", "anExchng", "anInd", "anPortNum", "attenuatnAt1600HzQty", "attenuatnAt800HzQty", "audioCarrInd", "blkWirePairNumPr1", "blkWirePairNumPr2", "buildId", "cabinetSeqNum", "cableCd", "cablePairNum", "channelNum1", "channelNum2", "divrCd", "dnPnExchngeId", "dpCat", "dpsdfCd", "dpsdfPairNum", "dpSubCat", "dsidePairNum", "dslInd", "enExchange", "esidePairNum", "existLineCls", "existSrvNum", "fromAdslInd", "fromBsn", "fromL2Prov", "fromLcCrType", "fromNiden", "fromProdId", "fromRtId", "fromRtPort", "fromStbType", "horTypeCdPr1", "horTypeCdPr2", "hostEn", "hostExchng", "jmpInd", "l3Address", "lineEqmtNum", "mdfbarSeqNum", "mdfBuildId", "mdfSeqNum", "oltNum", "orderId", "pcmId", "pinNum", "pnNnExchange", "pnNnInd", "refPnNn", "relBwBuildId", "relBwDpsdfCd", "relBwPairNum", "relBwVt", "relNid", "relRtDpCat", "relRtDpSubCat", "relRtDslInd", "remoteMdfSeqNum", "restncQty", "sbiInd", "termntrCdPr1", "termntrCdPr2", "vdslBwSharedInd", "vertTypeCdPr1", "vertTypeCdPr2", "vfId", "voipInd" }) public class OrderInformationOriVoiceReturn { @XmlElement(name = "AftCd") protected String aftCd; @XmlElement(name = "AgNodeId") protected String agNodeId; @XmlElement(name = "AgTid") protected String agTid; @XmlElement(name = "AnExchng") protected String anExchng; @XmlElement(name = "AnInd") protected String anInd; @XmlElement(name = "AnPortNum") protected String anPortNum; @XmlElement(name = "AttenuatnAt1600HzQty") protected String attenuatnAt1600HzQty; @XmlElement(name = "AttenuatnAt800HzQty") protected String attenuatnAt800HzQty; @XmlElement(name = "AudioCarrInd") protected String audioCarrInd; @XmlElement(name = "BlkWirePairNumPr1") protected String blkWirePairNumPr1; @XmlElement(name = "BlkWirePairNumPr2") protected String blkWirePairNumPr2; @XmlElement(name = "BuildId") protected String buildId; @XmlElement(name = "CabinetSeqNum") protected String cabinetSeqNum; @XmlElement(name = "CableCd") protected String cableCd; @XmlElement(name = "CablePairNum") protected String cablePairNum; @XmlElement(name = "ChannelNum1") protected String channelNum1; @XmlElement(name = "ChannelNum2") protected String channelNum2; @XmlElement(name = "DivrCd") protected String divrCd; @XmlElement(name = "DnPnExchngeId") protected String dnPnExchngeId; @XmlElement(name = "DpCat") protected String dpCat; @XmlElement(name = "DpsdfCd") protected String dpsdfCd; @XmlElement(name = "DpsdfPairNum") protected String dpsdfPairNum; @XmlElement(name = "DpSubCat") protected String dpSubCat; @XmlElement(name = "DsidePairNum") protected String dsidePairNum; @XmlElement(name = "DslInd") protected String dslInd; @XmlElement(name = "EnExchange") protected String enExchange; @XmlElement(name = "EsidePairNum") protected String esidePairNum; @XmlElement(name = "ExistLineCls") protected String existLineCls; @XmlElement(name = "ExistSrvNum") protected String existSrvNum; @XmlElement(name = "FromAdslInd") protected String fromAdslInd; @XmlElement(name = "FromBsn") protected String fromBsn; @XmlElement(name = "FromL2Prov") protected String fromL2Prov; @XmlElement(name = "FromLcCrType") protected String fromLcCrType; @XmlElement(name = "FromNiden") protected String fromNiden; @XmlElement(name = "FromProdId") protected String fromProdId; @XmlElement(name = "FromRtId") protected String fromRtId; @XmlElement(name = "FromRtPort") protected String fromRtPort; @XmlElement(name = "FromStbType") protected String fromStbType; @XmlElement(name = "HorTypeCdPr1") protected String horTypeCdPr1; @XmlElement(name = "HorTypeCdPr2") protected String horTypeCdPr2; @XmlElement(name = "HostEn") protected String hostEn; @XmlElement(name = "HostExchng") protected String hostExchng; @XmlElement(name = "JmpInd") protected String jmpInd; @XmlElement(name = "L3Address") protected String l3Address; @XmlElement(name = "LineEqmtNum") protected String lineEqmtNum; @XmlElement(name = "MdfbarSeqNum") protected String mdfbarSeqNum; @XmlElement(name = "MdfBuildId") protected String mdfBuildId; @XmlElement(name = "MdfSeqNum") protected String mdfSeqNum; @XmlElement(name = "OltNum") protected String oltNum; @XmlElement(name = "OrderId") protected String orderId; @XmlElement(name = "PcmId") protected String pcmId; @XmlElement(name = "PinNum") protected String pinNum; @XmlElement(name = "PnNnExchange") protected String pnNnExchange; @XmlElement(name = "PnNnInd") protected String pnNnInd; @XmlElement(name = "RefPnNn") protected String refPnNn; @XmlElement(name = "RelBwBuildId") protected String relBwBuildId; @XmlElement(name = "RelBwDpsdfCd") protected String relBwDpsdfCd; @XmlElement(name = "RelBwPairNum") protected String relBwPairNum; @XmlElement(name = "RelBwVt") protected String relBwVt; @XmlElement(name = "RelNid") protected String relNid; @XmlElement(name = "RelRtDpCat") protected String relRtDpCat; @XmlElement(name = "RelRtDpSubCat") protected String relRtDpSubCat; @XmlElement(name = "RelRtDslInd") protected String relRtDslInd; @XmlElement(name = "RemoteMdfSeqNum") protected String remoteMdfSeqNum; @XmlElement(name = "RestncQty") protected String restncQty; @XmlElement(name = "SbiInd") protected String sbiInd; @XmlElement(name = "TermntrCdPr1") protected String termntrCdPr1; @XmlElement(name = "TermntrCdPr2") protected String termntrCdPr2; @XmlElement(name = "VdslBwSharedInd") protected String vdslBwSharedInd; @XmlElement(name = "VertTypeCdPr1") protected String vertTypeCdPr1; @XmlElement(name = "VertTypeCdPr2") protected String vertTypeCdPr2; @XmlElement(name = "VfId") protected String vfId; @XmlElement(name = "VoipInd") protected String voipInd; /** * Gets the value of the aftCd property. * * @return * possible object is * {@link String } * */ public String getAftCd() { return aftCd; } /** * Sets the value of the aftCd property. * * @param value * allowed object is * {@link String } * */ public void setAftCd(String value) { this.aftCd = value; } /** * Gets the value of the agNodeId property. * * @return * possible object is * {@link String } * */ public String getAgNodeId() { return agNodeId; } /** * Sets the value of the agNodeId property. * * @param value * allowed object is * {@link String } * */ public void setAgNodeId(String value) { this.agNodeId = value; } /** * Gets the value of the agTid property. * * @return * possible object is * {@link String } * */ public String getAgTid() { return agTid; } /** * Sets the value of the agTid property. * * @param value * allowed object is * {@link String } * */ public void setAgTid(String value) { this.agTid = value; } /** * Gets the value of the anExchng property. * * @return * possible object is * {@link String } * */ public String getAnExchng() { return anExchng; } /** * Sets the value of the anExchng property. * * @param value * allowed object is * {@link String } * */ public void setAnExchng(String value) { this.anExchng = value; } /** * Gets the value of the anInd property. * * @return * possible object is * {@link String } * */ public String getAnInd() { return anInd; } /** * Sets the value of the anInd property. * * @param value * allowed object is * {@link String } * */ public void setAnInd(String value) { this.anInd = value; } /** * Gets the value of the anPortNum property. * * @return * possible object is * {@link String } * */ public String getAnPortNum() { return anPortNum; } /** * Sets the value of the anPortNum property. * * @param value * allowed object is * {@link String } * */ public void setAnPortNum(String value) { this.anPortNum = value; } /** * Gets the value of the attenuatnAt1600HzQty property. * * @return * possible object is * {@link String } * */ public String getAttenuatnAt1600HzQty() { return attenuatnAt1600HzQty; } /** * Sets the value of the attenuatnAt1600HzQty property. * * @param value * allowed object is * {@link String } * */ public void setAttenuatnAt1600HzQty(String value) { this.attenuatnAt1600HzQty = value; } /** * Gets the value of the attenuatnAt800HzQty property. * * @return * possible object is * {@link String } * */ public String getAttenuatnAt800HzQty() { return attenuatnAt800HzQty; } /** * Sets the value of the attenuatnAt800HzQty property. * * @param value * allowed object is * {@link String } * */ public void setAttenuatnAt800HzQty(String value) { this.attenuatnAt800HzQty = value; } /** * Gets the value of the audioCarrInd property. * * @return * possible object is * {@link String } * */ public String getAudioCarrInd() { return audioCarrInd; } /** * Sets the value of the audioCarrInd property. * * @param value * allowed object is * {@link String } * */ public void setAudioCarrInd(String value) { this.audioCarrInd = value; } /** * Gets the value of the blkWirePairNumPr1 property. * * @return * possible object is * {@link String } * */ public String getBlkWirePairNumPr1() { return blkWirePairNumPr1; } /** * Sets the value of the blkWirePairNumPr1 property. * * @param value * allowed object is * {@link String } * */ public void setBlkWirePairNumPr1(String value) { this.blkWirePairNumPr1 = value; } /** * Gets the value of the blkWirePairNumPr2 property. * * @return * possible object is * {@link String } * */ public String getBlkWirePairNumPr2() { return blkWirePairNumPr2; } /** * Sets the value of the blkWirePairNumPr2 property. * * @param value * allowed object is * {@link String } * */ public void setBlkWirePairNumPr2(String value) { this.blkWirePairNumPr2 = value; } /** * Gets the value of the buildId property. * * @return * possible object is * {@link String } * */ public String getBuildId() { return buildId; } /** * Sets the value of the buildId property. * * @param value * allowed object is * {@link String } * */ public void setBuildId(String value) { this.buildId = value; } /** * Gets the value of the cabinetSeqNum property. * * @return * possible object is * {@link String } * */ public String getCabinetSeqNum() { return cabinetSeqNum; } /** * Sets the value of the cabinetSeqNum property. * * @param value * allowed object is * {@link String } * */ public void setCabinetSeqNum(String value) { this.cabinetSeqNum = value; } /** * Gets the value of the cableCd property. * * @return * possible object is * {@link String } * */ public String getCableCd() { return cableCd; } /** * Sets the value of the cableCd property. * * @param value * allowed object is * {@link String } * */ public void setCableCd(String value) { this.cableCd = value; } /** * Gets the value of the cablePairNum property. * * @return * possible object is * {@link String } * */ public String getCablePairNum() { return cablePairNum; } /** * Sets the value of the cablePairNum property. * * @param value * allowed object is * {@link String } * */ public void setCablePairNum(String value) { this.cablePairNum = value; } /** * Gets the value of the channelNum1 property. * * @return * possible object is * {@link String } * */ public String getChannelNum1() { return channelNum1; } /** * Sets the value of the channelNum1 property. * * @param value * allowed object is * {@link String } * */ public void setChannelNum1(String value) { this.channelNum1 = value; } /** * Gets the value of the channelNum2 property. * * @return * possible object is * {@link String } * */ public String getChannelNum2() { return channelNum2; } /** * Sets the value of the channelNum2 property. * * @param value * allowed object is * {@link String } * */ public void setChannelNum2(String value) { this.channelNum2 = value; } /** * Gets the value of the divrCd property. * * @return * possible object is * {@link String } * */ public String getDivrCd() { return divrCd; } /** * Sets the value of the divrCd property. * * @param value * allowed object is * {@link String } * */ public void setDivrCd(String value) { this.divrCd = value; } /** * Gets the value of the dnPnExchngeId property. * * @return * possible object is * {@link String } * */ public String getDnPnExchngeId() { return dnPnExchngeId; } /** * Sets the value of the dnPnExchngeId property. * * @param value * allowed object is * {@link String } * */ public void setDnPnExchngeId(String value) { this.dnPnExchngeId = value; } /** * Gets the value of the dpCat property. * * @return * possible object is * {@link String } * */ public String getDpCat() { return dpCat; } /** * Sets the value of the dpCat property. * * @param value * allowed object is * {@link String } * */ public void setDpCat(String value) { this.dpCat = value; } /** * Gets the value of the dpsdfCd property. * * @return * possible object is * {@link String } * */ public String getDpsdfCd() { return dpsdfCd; } /** * Sets the value of the dpsdfCd property. * * @param value * allowed object is * {@link String } * */ public void setDpsdfCd(String value) { this.dpsdfCd = value; } /** * Gets the value of the dpsdfPairNum property. * * @return * possible object is * {@link String } * */ public String getDpsdfPairNum() { return dpsdfPairNum; } /** * Sets the value of the dpsdfPairNum property. * * @param value * allowed object is * {@link String } * */ public void setDpsdfPairNum(String value) { this.dpsdfPairNum = value; } /** * Gets the value of the dpSubCat property. * * @return * possible object is * {@link String } * */ public String getDpSubCat() { return dpSubCat; } /** * Sets the value of the dpSubCat property. * * @param value * allowed object is * {@link String } * */ public void setDpSubCat(String value) { this.dpSubCat = value; } /** * Gets the value of the dsidePairNum property. * * @return * possible object is * {@link String } * */ public String getDsidePairNum() { return dsidePairNum; } /** * Sets the value of the dsidePairNum property. * * @param value * allowed object is * {@link String } * */ public void setDsidePairNum(String value) { this.dsidePairNum = value; } /** * Gets the value of the dslInd property. * * @return * possible object is * {@link String } * */ public String getDslInd() { return dslInd; } /** * Sets the value of the dslInd property. * * @param value * allowed object is * {@link String } * */ public void setDslInd(String value) { this.dslInd = value; } /** * Gets the value of the enExchange property. * * @return * possible object is * {@link String } * */ public String getEnExchange() { return enExchange; } /** * Sets the value of the enExchange property. * * @param value * allowed object is * {@link String } * */ public void setEnExchange(String value) { this.enExchange = value; } /** * Gets the value of the esidePairNum property. * * @return * possible object is * {@link String } * */ public String getEsidePairNum() { return esidePairNum; } /** * Sets the value of the esidePairNum property. * * @param value * allowed object is * {@link String } * */ public void setEsidePairNum(String value) { this.esidePairNum = value; } /** * Gets the value of the existLineCls property. * * @return * possible object is * {@link String } * */ public String getExistLineCls() { return existLineCls; } /** * Sets the value of the existLineCls property. * * @param value * allowed object is * {@link String } * */ public void setExistLineCls(String value) { this.existLineCls = value; } /** * Gets the value of the existSrvNum property. * * @return * possible object is * {@link String } * */ public String getExistSrvNum() { return existSrvNum; } /** * Sets the value of the existSrvNum property. * * @param value * allowed object is * {@link String } * */ public void setExistSrvNum(String value) { this.existSrvNum = value; } /** * Gets the value of the fromAdslInd property. * * @return * possible object is * {@link String } * */ public String getFromAdslInd() { return fromAdslInd; } /** * Sets the value of the fromAdslInd property. * * @param value * allowed object is * {@link String } * */ public void setFromAdslInd(String value) { this.fromAdslInd = value; } /** * Gets the value of the fromBsn property. * * @return * possible object is * {@link String } * */ public String getFromBsn() { return fromBsn; } /** * Sets the value of the fromBsn property. * * @param value * allowed object is * {@link String } * */ public void setFromBsn(String value) { this.fromBsn = value; } /** * Gets the value of the fromL2Prov property. * * @return * possible object is * {@link String } * */ public String getFromL2Prov() { return fromL2Prov; } /** * Sets the value of the fromL2Prov property. * * @param value * allowed object is * {@link String } * */ public void setFromL2Prov(String value) { this.fromL2Prov = value; } /** * Gets the value of the fromLcCrType property. * * @return * possible object is * {@link String } * */ public String getFromLcCrType() { return fromLcCrType; } /** * Sets the value of the fromLcCrType property. * * @param value * allowed object is * {@link String } * */ public void setFromLcCrType(String value) { this.fromLcCrType = value; } /** * Gets the value of the fromNiden property. * * @return * possible object is * {@link String } * */ public String getFromNiden() { return fromNiden; } /** * Sets the value of the fromNiden property. * * @param value * allowed object is * {@link String } * */ public void setFromNiden(String value) { this.fromNiden = value; } /** * Gets the value of the fromProdId property. * * @return * possible object is * {@link String } * */ public String getFromProdId() { return fromProdId; } /** * Sets the value of the fromProdId property. * * @param value * allowed object is * {@link String } * */ public void setFromProdId(String value) { this.fromProdId = value; } /** * Gets the value of the fromRtId property. * * @return * possible object is * {@link String } * */ public String getFromRtId() { return fromRtId; } /** * Sets the value of the fromRtId property. * * @param value * allowed object is * {@link String } * */ public void setFromRtId(String value) { this.fromRtId = value; } /** * Gets the value of the fromRtPort property. * * @return * possible object is * {@link String } * */ public String getFromRtPort() { return fromRtPort; } /** * Sets the value of the fromRtPort property. * * @param value * allowed object is * {@link String } * */ public void setFromRtPort(String value) { this.fromRtPort = value; } /** * Gets the value of the fromStbType property. * * @return * possible object is * {@link String } * */ public String getFromStbType() { return fromStbType; } /** * Sets the value of the fromStbType property. * * @param value * allowed object is * {@link String } * */ public void setFromStbType(String value) { this.fromStbType = value; } /** * Gets the value of the horTypeCdPr1 property. * * @return * possible object is * {@link String } * */ public String getHorTypeCdPr1() { return horTypeCdPr1; } /** * Sets the value of the horTypeCdPr1 property. * * @param value * allowed object is * {@link String } * */ public void setHorTypeCdPr1(String value) { this.horTypeCdPr1 = value; } /** * Gets the value of the horTypeCdPr2 property. * * @return * possible object is * {@link String } * */ public String getHorTypeCdPr2() { return horTypeCdPr2; } /** * Sets the value of the horTypeCdPr2 property. * * @param value * allowed object is * {@link String } * */ public void setHorTypeCdPr2(String value) { this.horTypeCdPr2 = value; } /** * Gets the value of the hostEn property. * * @return * possible object is * {@link String } * */ public String getHostEn() { return hostEn; } /** * Sets the value of the hostEn property. * * @param value * allowed object is * {@link String } * */ public void setHostEn(String value) { this.hostEn = value; } /** * Gets the value of the hostExchng property. * * @return * possible object is * {@link String } * */ public String getHostExchng() { return hostExchng; } /** * Sets the value of the hostExchng property. * * @param value * allowed object is * {@link String } * */ public void setHostExchng(String value) { this.hostExchng = value; } /** * Gets the value of the jmpInd property. * * @return * possible object is * {@link String } * */ public String getJmpInd() { return jmpInd; } /** * Sets the value of the jmpInd property. * * @param value * allowed object is * {@link String } * */ public void setJmpInd(String value) { this.jmpInd = value; } /** * Gets the value of the l3Address property. * * @return * possible object is * {@link String } * */ public String getL3Address() { return l3Address; } /** * Sets the value of the l3Address property. * * @param value * allowed object is * {@link String } * */ public void setL3Address(String value) { this.l3Address = value; } /** * Gets the value of the lineEqmtNum property. * * @return * possible object is * {@link String } * */ public String getLineEqmtNum() { return lineEqmtNum; } /** * Sets the value of the lineEqmtNum property. * * @param value * allowed object is * {@link String } * */ public void setLineEqmtNum(String value) { this.lineEqmtNum = value; } /** * Gets the value of the mdfbarSeqNum property. * * @return * possible object is * {@link String } * */ public String getMdfbarSeqNum() { return mdfbarSeqNum; } /** * Sets the value of the mdfbarSeqNum property. * * @param value * allowed object is * {@link String } * */ public void setMdfbarSeqNum(String value) { this.mdfbarSeqNum = value; } /** * Gets the value of the mdfBuildId property. * * @return * possible object is * {@link String } * */ public String getMdfBuildId() { return mdfBuildId; } /** * Sets the value of the mdfBuildId property. * * @param value * allowed object is * {@link String } * */ public void setMdfBuildId(String value) { this.mdfBuildId = value; } /** * Gets the value of the mdfSeqNum property. * * @return * possible object is * {@link String } * */ public String getMdfSeqNum() { return mdfSeqNum; } /** * Sets the value of the mdfSeqNum property. * * @param value * allowed object is * {@link String } * */ public void setMdfSeqNum(String value) { this.mdfSeqNum = value; } /** * Gets the value of the oltNum property. * * @return * possible object is * {@link String } * */ public String getOltNum() { return oltNum; } /** * Sets the value of the oltNum property. * * @param value * allowed object is * {@link String } * */ public void setOltNum(String value) { this.oltNum = value; } /** * Gets the value of the orderId property. * * @return * possible object is * {@link String } * */ public String getOrderId() { return orderId; } /** * Sets the value of the orderId property. * * @param value * allowed object is * {@link String } * */ public void setOrderId(String value) { this.orderId = value; } /** * Gets the value of the pcmId property. * * @return * possible object is * {@link String } * */ public String getPcmId() { return pcmId; } /** * Sets the value of the pcmId property. * * @param value * allowed object is * {@link String } * */ public void setPcmId(String value) { this.pcmId = value; } /** * Gets the value of the pinNum property. * * @return * possible object is * {@link String } * */ public String getPinNum() { return pinNum; } /** * Sets the value of the pinNum property. * * @param value * allowed object is * {@link String } * */ public void setPinNum(String value) { this.pinNum = value; } /** * Gets the value of the pnNnExchange property. * * @return * possible object is * {@link String } * */ public String getPnNnExchange() { return pnNnExchange; } /** * Sets the value of the pnNnExchange property. * * @param value * allowed object is * {@link String } * */ public void setPnNnExchange(String value) { this.pnNnExchange = value; } /** * Gets the value of the pnNnInd property. * * @return * possible object is * {@link String } * */ public String getPnNnInd() { return pnNnInd; } /** * Sets the value of the pnNnInd property. * * @param value * allowed object is * {@link String } * */ public void setPnNnInd(String value) { this.pnNnInd = value; } /** * Gets the value of the refPnNn property. * * @return * possible object is * {@link String } * */ public String getRefPnNn() { return refPnNn; } /** * Sets the value of the refPnNn property. * * @param value * allowed object is * {@link String } * */ public void setRefPnNn(String value) { this.refPnNn = value; } /** * Gets the value of the relBwBuildId property. * * @return * possible object is * {@link String } * */ public String getRelBwBuildId() { return relBwBuildId; } /** * Sets the value of the relBwBuildId property. * * @param value * allowed object is * {@link String } * */ public void setRelBwBuildId(String value) { this.relBwBuildId = value; } /** * Gets the value of the relBwDpsdfCd property. * * @return * possible object is * {@link String } * */ public String getRelBwDpsdfCd() { return relBwDpsdfCd; } /** * Sets the value of the relBwDpsdfCd property. * * @param value * allowed object is * {@link String } * */ public void setRelBwDpsdfCd(String value) { this.relBwDpsdfCd = value; } /** * Gets the value of the relBwPairNum property. * * @return * possible object is * {@link String } * */ public String getRelBwPairNum() { return relBwPairNum; } /** * Sets the value of the relBwPairNum property. * * @param value * allowed object is * {@link String } * */ public void setRelBwPairNum(String value) { this.relBwPairNum = value; } /** * Gets the value of the relBwVt property. * * @return * possible object is * {@link String } * */ public String getRelBwVt() { return relBwVt; } /** * Sets the value of the relBwVt property. * * @param value * allowed object is * {@link String } * */ public void setRelBwVt(String value) { this.relBwVt = value; } /** * Gets the value of the relNid property. * * @return * possible object is * {@link String } * */ public String getRelNid() { return relNid; } /** * Sets the value of the relNid property. * * @param value * allowed object is * {@link String } * */ public void setRelNid(String value) { this.relNid = value; } /** * Gets the value of the relRtDpCat property. * * @return * possible object is * {@link String } * */ public String getRelRtDpCat() { return relRtDpCat; } /** * Sets the value of the relRtDpCat property. * * @param value * allowed object is * {@link String } * */ public void setRelRtDpCat(String value) { this.relRtDpCat = value; } /** * Gets the value of the relRtDpSubCat property. * * @return * possible object is * {@link String } * */ public String getRelRtDpSubCat() { return relRtDpSubCat; } /** * Sets the value of the relRtDpSubCat property. * * @param value * allowed object is * {@link String } * */ public void setRelRtDpSubCat(String value) { this.relRtDpSubCat = value; } /** * Gets the value of the relRtDslInd property. * * @return * possible object is * {@link String } * */ public String getRelRtDslInd() { return relRtDslInd; } /** * Sets the value of the relRtDslInd property. * * @param value * allowed object is * {@link String } * */ public void setRelRtDslInd(String value) { this.relRtDslInd = value; } /** * Gets the value of the remoteMdfSeqNum property. * * @return * possible object is * {@link String } * */ public String getRemoteMdfSeqNum() { return remoteMdfSeqNum; } /** * Sets the value of the remoteMdfSeqNum property. * * @param value * allowed object is * {@link String } * */ public void setRemoteMdfSeqNum(String value) { this.remoteMdfSeqNum = value; } /** * Gets the value of the restncQty property. * * @return * possible object is * {@link String } * */ public String getRestncQty() { return restncQty; } /** * Sets the value of the restncQty property. * * @param value * allowed object is * {@link String } * */ public void setRestncQty(String value) { this.restncQty = value; } /** * Gets the value of the sbiInd property. * * @return * possible object is * {@link String } * */ public String getSbiInd() { return sbiInd; } /** * Sets the value of the sbiInd property. * * @param value * allowed object is * {@link String } * */ public void setSbiInd(String value) { this.sbiInd = value; } /** * Gets the value of the termntrCdPr1 property. * * @return * possible object is * {@link String } * */ public String getTermntrCdPr1() { return termntrCdPr1; } /** * Sets the value of the termntrCdPr1 property. * * @param value * allowed object is * {@link String } * */ public void setTermntrCdPr1(String value) { this.termntrCdPr1 = value; } /** * Gets the value of the termntrCdPr2 property. * * @return * possible object is * {@link String } * */ public String getTermntrCdPr2() { return termntrCdPr2; } /** * Sets the value of the termntrCdPr2 property. * * @param value * allowed object is * {@link String } * */ public void setTermntrCdPr2(String value) { this.termntrCdPr2 = value; } /** * Gets the value of the vdslBwSharedInd property. * * @return * possible object is * {@link String } * */ public String getVdslBwSharedInd() { return vdslBwSharedInd; } /** * Sets the value of the vdslBwSharedInd property. * * @param value * allowed object is * {@link String } * */ public void setVdslBwSharedInd(String value) { this.vdslBwSharedInd = value; } /** * Gets the value of the vertTypeCdPr1 property. * * @return * possible object is * {@link String } * */ public String getVertTypeCdPr1() { return vertTypeCdPr1; } /** * Sets the value of the vertTypeCdPr1 property. * * @param value * allowed object is * {@link String } * */ public void setVertTypeCdPr1(String value) { this.vertTypeCdPr1 = value; } /** * Gets the value of the vertTypeCdPr2 property. * * @return * possible object is * {@link String } * */ public String getVertTypeCdPr2() { return vertTypeCdPr2; } /** * Sets the value of the vertTypeCdPr2 property. * * @param value * allowed object is * {@link String } * */ public void setVertTypeCdPr2(String value) { this.vertTypeCdPr2 = value; } /** * Gets the value of the vfId property. * * @return * possible object is * {@link String } * */ public String getVfId() { return vfId; } /** * Sets the value of the vfId property. * * @param value * allowed object is * {@link String } * */ public void setVfId(String value) { this.vfId = value; } /** * Gets the value of the voipInd property. * * @return * possible object is * {@link String } * */ public String getVoipInd() { return voipInd; } /** * Sets the value of the voipInd property. * * @param value * allowed object is * {@link String } * */ public void setVoipInd(String value) { this.voipInd = value; } }
[ "acer_08_06@yahoo.com" ]
acer_08_06@yahoo.com
e32dd6b0585ccee6597842007024bc27005d2115
2c02b2c6417f52a7f6f447ba5a34f326d074b118
/spring-boot-demo-07-1/src/main/java/com/roncoo/example071/controller/WebController.java
dfba0aa1d0a5d2814df4f4f75d5f0f5db1d5398d
[]
no_license
SeerGlaucus/spring-boot-demo
ca313b3596a01ba2dcfdaff11756b9e6aac50ab3
2605a30c5b6abca3a2d8e35847b9ccab603c0fb7
refs/heads/master
2021-07-10T05:19:39.525992
2017-10-12T08:07:20
2017-10-12T08:07:20
106,662,887
0
0
null
null
null
null
UTF-8
Java
false
false
628
java
package com.roncoo.example071.controller; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; @Controller @RequestMapping("/web") public class WebController { private static final Logger logger = LoggerFactory.getLogger(WebController.class); @RequestMapping("index") public String index(ModelMap map){ logger.info("这里是controller"); map.put("title", "hello world"); return "index"; // 注意,不要在最前面加上/,linux下面会出错 } }
[ "ygss2020@gmail.com" ]
ygss2020@gmail.com
c3a81015aec59ee71ab3bf177a71dba4d524ba6b
b671c2d070ebc8a6199229f53c4e8815d2a12b3a
/mall-portal/src/main/java/com/macro/mall/portal/service/impl/OssServiceImpl.java
884d4137f60c58851b44947fd3a3144330a7dee9
[ "Apache-2.0" ]
permissive
stubbornfrog/shop
d8078480e3b485674a46fb467335a50e065b1f32
fa716b8c46725197fee96ea40ffccc625112c3df
refs/heads/master
2022-07-23T02:47:51.463701
2019-06-14T03:10:30
2019-06-14T03:10:30
191,555,257
2
0
Apache-2.0
2022-06-17T02:11:06
2019-06-12T11:10:38
PLpgSQL
UTF-8
Java
false
false
4,149
java
package com.macro.mall.portal.service.impl; import com.aliyun.oss.OSSClient; import com.aliyun.oss.common.utils.BinaryUtil; import com.aliyun.oss.model.MatchMode; import com.aliyun.oss.model.PolicyConditions; import com.macro.mall.dto.OssCallbackResult; import com.macro.mall.dto.OssPolicyResult; import com.macro.mall.portal.service.OssService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import javax.servlet.http.HttpServletRequest; import java.text.SimpleDateFormat; import java.util.Date; /** * https://gitee.com/zscat-platform/mall on 2018/5/17. */ @Service public class OssServiceImpl implements OssService { private static final Logger LOGGER = LoggerFactory.getLogger(OssServiceImpl.class); @Value("${aliyun.oss.policy.expire}") private int ALIYUN_OSS_EXPIRE; @Value("${aliyun.oss.maxSize}") private int ALIYUN_OSS_MAX_SIZE; @Value("${aliyun.oss.callback}") private String ALIYUN_OSS_CALLBACK; @Value("${aliyun.oss.bucketName}") private String ALIYUN_OSS_BUCKET_NAME; @Value("${aliyun.oss.endpoint}") private String ALIYUN_OSS_ENDPOINT; @Value("${aliyun.oss.dir.prefix}") private String ALIYUN_OSS_DIR_PREFIX; @Autowired private OSSClient ossClient; /** * 签名生成 */ @Override public OssPolicyResult policy() { OssPolicyResult result = new OssPolicyResult(); // 存储目录 SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); String dir = ALIYUN_OSS_DIR_PREFIX + sdf.format(new Date()); // 签名有效期 long expireEndTime = System.currentTimeMillis() + ALIYUN_OSS_EXPIRE * 1000; Date expiration = new Date(expireEndTime); // 文件大小 long maxSize = ALIYUN_OSS_MAX_SIZE * 1024 * 1024; // 回调 // OssCallbackParam callback = new OssCallbackParam(); // callback.setCallbackUrl(ALIYUN_OSS_CALLBACK); // callback.setCallbackBody("filename=${object}&size=${size}&mimeType=${mimeType}&height=${imageInfo.height}&width=${imageInfo.width}"); // callback.setCallbackBodyType("application/x-www-form-urlencoded"); // 提交节点 String action = "http://" + ALIYUN_OSS_BUCKET_NAME + "." + ALIYUN_OSS_ENDPOINT; try { PolicyConditions policyConds = new PolicyConditions(); policyConds.addConditionItem(PolicyConditions.COND_CONTENT_LENGTH_RANGE, 0, maxSize); policyConds.addConditionItem(MatchMode.StartWith, PolicyConditions.COND_KEY, dir); String postPolicy = ossClient.generatePostPolicy(expiration, policyConds); byte[] binaryData = postPolicy.getBytes("utf-8"); String policy = BinaryUtil.toBase64String(binaryData); String signature = ossClient.calculatePostSignature(postPolicy); // String callbackData = BinaryUtil.toBase64String(JsonUtil.objectToJson(callback).getBytes("utf-8")); // 返回结果 result.setAccessKeyId(ossClient.getCredentialsProvider().getCredentials().getAccessKeyId()); result.setPolicy(policy); result.setSignature(signature); result.setDir(dir); // result.setCallback(callbackData); result.setHost(action); } catch (Exception e) { LOGGER.error("签名生成失败", e); } return result; } @Override public OssCallbackResult callback(HttpServletRequest request) { OssCallbackResult result = new OssCallbackResult(); String filename = request.getParameter("filename"); filename = "http://".concat(ALIYUN_OSS_BUCKET_NAME).concat(".").concat(ALIYUN_OSS_ENDPOINT).concat("/").concat(filename); result.setFilename(filename); result.setSize(request.getParameter("size")); result.setMimeType(request.getParameter("mimeType")); result.setWidth(request.getParameter("width")); result.setHeight(request.getParameter("height")); return result; } }
[ "Administrator@CT2N190M5AL8798" ]
Administrator@CT2N190M5AL8798
ea9240e018ed97c5207222e39e6ce2e01502ee15
01422c4ace67d8549a47e9596018b1930106ec7a
/com/syntax/class28/BankTest.java
825834c2c7928b4310c70d989ea9e4650e7c2d38
[]
no_license
DStone126/JAVA-Eclipse
a4ed4413020babbb7bccd789c21dc56c1e30a379
5344b3927b59b2fc87a1bf2a9a0b864e790b7c4f
refs/heads/master
2023-01-13T18:13:44.086399
2020-11-13T02:15:33
2020-11-13T02:15:33
275,614,373
0
0
null
null
null
null
UTF-8
Java
false
false
262
java
package com.syntax.class28; public class BankTest { public static void main(String[] args) { Bank b = new Bank(); b.setAccountNumber(123456789); System.out.println(b.getAccountNumber()); b.setBalance(9123456); System.out.println(b.getBalance()); } }
[ "dmstone0219@gmail.com" ]
dmstone0219@gmail.com
439159a8ed1e3d05cbc1ed357f67ca3d5ac8b9fb
28f6e74be1242ebf3f82bc5fa859f4450afea096
/Question 2/DemoninatorApp/src/com/company/module/DenominatorApp.java
534efab0166bd5a6daccf56db228cef30673eac4
[]
no_license
shyamravinair86/shyamnair-AlgorithmsLabSolution
c6a9b73cbfa930eca3c3a813c9143873607d13c3
dbe4288b0558a7337bfef5055004dbfe7f01c4c2
refs/heads/master
2023-08-18T05:36:08.688324
2021-09-19T12:52:58
2021-09-19T12:52:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
294
java
package com.company.module; import com.company.services.DenominatorServicer; public class DenominatorApp { public static void main(String[] args) { DenominatorServicer denominatorServicer = new DenominatorServicer(); denominatorServicer.denominatorImplementor(); } }
[ "shyam.nair@salesforce.com" ]
shyam.nair@salesforce.com
8939af22443183a3c30d164342c4b4428f745565
3cf3979bd115843dd3b1c168e1277a9780c05bd7
/src/main/java/com/it/demo/dao/KaoQinDetailsMapper.java
51d6bb4fc1228fd901c460fbf4d16657bb7275d0
[]
no_license
zhenglise/demo
190f1fa8e7dcfd7b25ae5f687911b868abd5012e
2ad9f41714fb06152e8499a24d169650dbc6dbb7
refs/heads/master
2023-07-15T04:06:10.408872
2021-08-18T14:58:34
2021-08-18T14:58:34
380,709,107
0
0
null
null
null
null
UTF-8
Java
false
false
1,071
java
package com.it.demo.dao; import com.it.demo.model.KaoQinDetails; import com.it.demo.model.KaoQinDetailsExample; import java.util.List; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; @Mapper @Repository public interface KaoQinDetailsMapper { int countByExample(KaoQinDetailsExample example); int deleteByExample(KaoQinDetailsExample example); int deleteByPrimaryKey(Integer kaoQinDetailsId); int insert(KaoQinDetails record); int insertSelective(KaoQinDetails record); List<KaoQinDetails> selectByExample(KaoQinDetailsExample example); KaoQinDetails selectByPrimaryKey(Integer kaoQinDetailsId); int updateByExampleSelective(@Param("record") KaoQinDetails record, @Param("example") KaoQinDetailsExample example); int updateByExample(@Param("record") KaoQinDetails record, @Param("example") KaoQinDetailsExample example); int updateByPrimaryKeySelective(KaoQinDetails record); int updateByPrimaryKey(KaoQinDetails record); }
[ "764979@qq.com" ]
764979@qq.com
ec69ec30ce3ebeb45bf282506a45fa9570b59899
eb8370a3fc3ae77de1b99789f471376ce9126c98
/src/main/java/org/hdcd/controller/MemberController.java
db222222829f708cc69ca9a7b64835a3cb4c660d
[]
no_license
im-daegeun/spring-boot-ch2223
c07bd976ec1cafd466ff54ce79ae090a878eab1b
2016039ec4eda6cbbdc358dbde5bffa0e68caa57
refs/heads/master
2023-03-31T23:22:55.257856
2021-04-07T02:14:29
2021-04-07T02:14:29
355,075,694
0
0
null
null
null
null
UTF-8
Java
false
false
4,272
java
package org.hdcd.controller; import java.util.List; import java.util.Locale; import org.hdcd.common.util.AuthUtil; import org.hdcd.domain.Member; import org.hdcd.service.MemberService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import lombok.extern.java.Log; @Log @RestController @RequestMapping("/users") public class MemberController { @Autowired private MemberService service; @Autowired private PasswordEncoder passwordEncoder; @Autowired private MessageSource messageSource; @RequestMapping(value = "", method = RequestMethod.POST) public ResponseEntity<Member> register(@Validated @RequestBody Member member) throws Exception { log.info("member.getUserName() = " + member.getUserName()); String inputPassword = member.getUserPw(); member.setUserPw(passwordEncoder.encode(inputPassword)); service.register(member); log.info("register member.getUserNo() = " + member.getUserNo()); return new ResponseEntity<>(member, HttpStatus.OK); } @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "", method = RequestMethod.GET) public ResponseEntity<List<Member>> list() throws Exception { return new ResponseEntity<>(service.list(), HttpStatus.OK); } @RequestMapping(value = "/{userNo}", method = RequestMethod.GET) public ResponseEntity<Member> read(@PathVariable("userNo") int userNo) throws Exception { Member member = service.read(userNo); return new ResponseEntity<>(member, HttpStatus.OK); } @PreAuthorize("hasRole('ROLE_ADMIN')") @RequestMapping(value = "/{userNo}", method = RequestMethod.DELETE) public ResponseEntity<Void> remove(@PathVariable("userNo") int userNo) throws Exception { service.remove(userNo); return new ResponseEntity<Void>(HttpStatus.NO_CONTENT); } @RequestMapping(value = "/{userNo}", method = RequestMethod.PUT) public ResponseEntity<Void> modify(@PathVariable("userNo") int userNo, @Validated @RequestBody Member member) throws Exception { log.info("modify : member.getUserName() = " + member.getUserName()); log.info("modify : userNo = " + userNo); member.setUserNo(userNo); service.modify(member); return new ResponseEntity<Void>(HttpStatus.NO_CONTENT); } @RequestMapping(value = "/setup", method = RequestMethod.POST, produces="text/plain;charset=UTF-8") public ResponseEntity<String> setupAdmin(@Validated @RequestBody Member member) throws Exception { log.info("setupAdmin : member.getUserName() = " + member.getUserName()); log.info("setupAdmin : service.countAll() = " + service.countAll()); if(service.countAll() == 0) { String inputPassword = member.getUserPw(); member.setUserPw(passwordEncoder.encode(inputPassword)); member.setJob("00"); service.setupAdmin(member); return new ResponseEntity<>("SUCCESS", HttpStatus.OK); } String message = messageSource.getMessage("common.cannotSetupAdmin", null, Locale.KOREAN); return new ResponseEntity<>(message, HttpStatus.BAD_REQUEST); } @PreAuthorize("hasAnyRole('ROLE_ADMIN','ROLE_MEMBER')") @RequestMapping(value = "/myinfo", method = RequestMethod.GET) public ResponseEntity<Member> getMyInfo(@RequestHeader (name="Authorization") String header) throws Exception { int userNo = AuthUtil.getUserNo(header); log.info("register userNo = " + userNo); Member member = service.read(userNo); member.setUserPw(""); return new ResponseEntity<>(member, HttpStatus.OK); } }
[ "user@DESKTOP-4NETBB5.Dlink" ]
user@DESKTOP-4NETBB5.Dlink
2c63f14df316101dbcbacf2522ce71a842397dcd
37d479cb46de032c55ad35a6bd0f6dadba6ca248
/src/main/java/com/foursstudio/online/newtest/service/util/RandomUtil.java
608af28789d97876f50c7915f83167091a134522
[]
no_license
Aqueelone/jhipster-test-new
6cb57f7bab60f118a1672aa26669676f40221e02
742f5d71a7eb9608f293741188c77ca11676a1c2
refs/heads/master
2021-06-25T18:05:38.921268
2019-12-05T10:55:48
2019-12-05T10:55:48
226,080,579
0
0
null
2021-04-29T21:53:10
2019-12-05T10:55:33
Java
UTF-8
Java
false
false
1,240
java
package com.foursstudio.online.newtest.service.util; import org.apache.commons.lang3.RandomStringUtils; import java.security.SecureRandom; /** * Utility class for generating random Strings. */ public final class RandomUtil { private static final int DEF_COUNT = 20; private static final SecureRandom SECURE_RANDOM; static { SECURE_RANDOM = new SecureRandom(); SECURE_RANDOM.nextBytes(new byte[64]); } private RandomUtil() { } private static String generateRandomAlphanumericString() { return RandomStringUtils.random(DEF_COUNT, 0, 0, true, true, null, SECURE_RANDOM); } /** * Generate a password. * * @return the generated password. */ public static String generatePassword() { return generateRandomAlphanumericString(); } /** * Generate an activation key. * * @return the generated activation key. */ public static String generateActivationKey() { return generateRandomAlphanumericString(); } /** * Generate a reset key. * * @return the generated reset key. */ public static String generateResetKey() { return generateRandomAlphanumericString(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
5dba935eb41efa251ccafa7675c2cdad84c3c290
e056e2a3814192a6a6863c179e9cfab613819dc9
/service/src/main/java/in/gore/service/Main.java
d708f3200b4873d251e100e3e08e9689cc175009
[]
no_license
mihirg/extensions
6a0a98c80378c66ae6d6124b04d55a52783feb30
0a1f76836b2bbb80b85c7bbf85c15c0e9b25d469
refs/heads/main
2023-07-11T18:05:38.687466
2021-08-11T09:30:51
2021-08-11T09:30:51
394,926,090
0
0
null
null
null
null
UTF-8
Java
false
false
2,039
java
package in.gore.service; import java.io.File; import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; import java.util.List; import java.util.ServiceLoader; import in.gore.adapter.Plugin; public class Main { public static void main(String[] args) { File libDir = new File("./lib"); List<Plugin> plugins = loadPlugins(libDir.listFiles()); for (Plugin p : plugins) { PropertyReaderImpl propReader = new PropertyReaderImpl(p.getName(), p.getConnectionProperties(), p.getAdditionalProperties()); p.initialize(propReader); p.getCapabilities(); // the steps above can be done once when the plugins are loaded // send approval request to plugin. The plugin now has full context, // it can query connection params, additional params and connect to target system // the call to approve request below can now do some work. p.approveRequest(); } } public static List<Plugin> loadPlugins(File[] contents) { List<Plugin> plugins = new ArrayList<>(); for (File f : contents) { if (f.isDirectory()) { ClassLoader cls = getClassLoader(f.listFiles()); ServiceLoader<Plugin> plg = ServiceLoader.load(Plugin.class, cls); for (Plugin p : plg) { plugins.add(p); break; } } } return plugins; } public static ClassLoader getClassLoader(File[] jars) { List<URL> urls = new ArrayList<>(); for (File f: jars) { if (f.isFile()) { try { urls.add(f.toURI().toURL()); } catch (Exception exp) { } } } if (urls.size() > 0) { URLClassLoader clsLoader = new URLClassLoader(urls.toArray(new URL[urls.size()])); return clsLoader; } else return null; } }
[ "mgore@moveworks.ai" ]
mgore@moveworks.ai
33b9f9eef8a4ed113606280a090ecc6fb2dcd56c
6e5d901d60fd99728ef94a071d073d077adfddbb
/src/main/java/com/example/demo/controller/ClientController.java
65ce385d391f8fcf59fbf3e08a7e53562899d622
[]
no_license
TiagoJava2019/testUOL
6962279aacd2ef2a9c6c5fe3714f9b8f290f9ac7
4c76558aec916f8ccb2a30834b5262a2126564b7
refs/heads/master
2020-07-07T06:08:30.395092
2019-08-20T01:24:56
2019-08-20T01:24:56
203,273,494
0
0
null
null
null
null
UTF-8
Java
false
false
3,394
java
package com.example.demo.controller; import java.util.List; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.client.RestTemplate; import com.example.demo.domain.Client; import com.example.demo.service.ClientService; /** * * @author t.almeida * */ @Controller @RequestMapping("/client") public class ClientController { @Autowired private ClientService clientService; /** * receber o endereço do web service * * @param request * @return */ private ResponseEntity<String> getAddress(HttpServletRequest request) { RestTemplate restTemplate = new RestTemplate(); String ipAddress = ""; String url; if (request.getHeader("X-FORWARDED-FOR") == null) { ipAddress = request.getRemoteAddr(); } if (ipAddress.equals("0:0:0:0:0:0:0:1")) { url = "https://ipvigilante.com/json/177.140.234.239"; } else { url = "https://ipvigilante.com/json/" + ipAddress; } return restTemplate.getForEntity(url, String.class); } /** * Listar todos os clientes * * @return */ @GetMapping("/listAll") @ResponseBody public List<Client> listAl() { List<Client> clients = clientService.listAll(); return clients; } /** * listar clientes por id * * @param id * @return */ @GetMapping("/list/{id}") @ResponseBody public Client list(@PathVariable("id") Long id) { return clientService.findById(id); } /** * cria registros de clientes * * @param name * @param age * @param request * @return */ @PostMapping("/create") @ResponseBody public String create(@RequestParam("name") String name, @RequestParam("age") int age, HttpServletRequest request) { Client client = new Client(); ResponseEntity<String> address = getAddress(request); client.setName(name); client.setAge(age); client.setAddress(address.getBody()); clientService.save(client); return "Registro Salvo com sucesso!"; } /** * atualiza registros de clientes por id * * @param id * @param name * @param age * @return */ @PostMapping("/update/{id}") @ResponseBody public String update(@PathVariable("id") Long id, @RequestParam("name") String name, @RequestParam("age") int age) { Client client = clientService.findById(id); if (null != client) { client.setName(name); client.setAge(age); clientService.update(client); return "Cliente atualizado com sucesso!"; } else { return "Cliente não encontrado! O Update não foi efetuado..."; } } /** * deleta registros de clientes * * @param id * @return */ @GetMapping("/delete/{id}") @ResponseBody public String delete(@PathVariable("id") Long id) { Client client = clientService.findById(id); if (null != client) { clientService.delete(id); return "Cliente deletado com sucesso!"; } else { return "Cliente não encontrado! O Delete não foi efetuado..."; } } }
[ "almeidaschwingel.ll@gmail.com" ]
almeidaschwingel.ll@gmail.com
b1a2c8ee9ef46ae88f1dab985db36451ee9f179c
06cb11d10fffceb99d38ad82b6712be24944d685
/src/main/java/me/calvinliu/scoreboard/util/ResponseCode.java
cbeb51cef4ae9602c35fea12da06de7568fbdfdf
[]
no_license
calvinlau/Score-board
92bac26b4ed6672fa65e5d9bbdcd7bf70c3ecd1d
aba96ccd96eb91a389a03e429819b459dd2031be
refs/heads/master
2021-01-01T04:39:23.564973
2016-05-04T09:27:46
2016-05-04T09:27:46
56,687,175
0
0
null
null
null
null
UTF-8
Java
false
false
303
java
/* * Creator: Calvin Liu */ package me.calvinliu.scoreboard.util; /** * Response Code */ public class ResponseCode { public static final String ERR_INVALID_INTEGER = "408"; public static final String ERR_INVALID_SESSION = "409"; public static final String ERR_INVALID_URL = "410"; }
[ "always_my_fault@163.com" ]
always_my_fault@163.com
30bdb5b3871b08e6e4cdd38866416107df1575b4
602175281384205e7c6e153c4889eaec46099c90
/app/src/main/java/com/example/ui/TablayoutRecyclerViewActivity.java
90b7ca4264edfe220c47413a32f896a2d0966172
[ "MIT" ]
permissive
Lsing101/ui
13b259e41e69b0dcc2247584e47de73bc3225d2b
b35b6ba231062cd3940a6030b847599c4c4becc7
refs/heads/master
2022-03-01T21:20:03.149297
2019-10-27T14:20:53
2019-10-27T14:20:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,683
java
package com.example.ui; import android.graphics.Color; import android.os.Bundle; import android.support.design.widget.TabLayout; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.widget.TextView; import android.widget.Toast; public class TablayoutRecyclerViewActivity extends AppCompatActivity { private TabLayout mTabLayout; private RecyclerView mRecyclerView; private LinearLayoutManager mManager; private TabRecyclerAdapter mAdapter; private String titles[] = new String[]{"TAB1", "TAB2", "TAB3", "TAB4", "TAB5", "TAB6", "TAB7", "TAB8", "TAB9", "TAB10"}; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.activity_tablayout_recyclerview); mTabLayout = (TabLayout) findViewById(R.id.tab_layout); mRecyclerView = (RecyclerView) findViewById(R.id.recycler_view); initTab(); mAdapter = new TabRecyclerAdapter(); mManager = new LinearLayoutManager(this); mRecyclerView.setLayoutManager(mManager); mRecyclerView.setAdapter(mAdapter); mRecyclerView.setOnScrollChangeListener(new View.OnScrollChangeListener() { @Override public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) { // mTabLayout.setScrollPosition(mManager.findFirstVisibleItemPosition(), 0, true); int pos = mManager.findFirstVisibleItemPosition(); if(pos == 0) { mTabLayout.setScrollPosition(0, 0, true); } else if(pos == 1) { mTabLayout.setScrollPosition(1, 0, true); } else if(pos == 5) { mTabLayout.setScrollPosition(2, 0, true); } else if(pos == 7) { mTabLayout.setScrollPosition(3, 0, true); } } }); mTabLayout.setSelectedTabIndicatorColor(ContextCompat.getColor(this, R.color.colorBlue)); mTabLayout.setTabTextColors(Color.WHITE, ContextCompat.getColor(this, R.color.colorBlue)); mTabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() { @Override public void onTabSelected(TabLayout.Tab tab) { //mManager.scrollToPositionWithOffset(tab.getPosition(), 0); // 坑 快速滑动底部,切换tab mRecyclerView 滑动指定位置失效 int pos = tab.getPosition(); if(pos == 0) { mManager.scrollToPositionWithOffset(0, 0); } else if(pos == 1) { mManager.scrollToPositionWithOffset(1, 0); } else if(pos == 2) { mManager.scrollToPositionWithOffset(5, 0); } else if(pos == 3) { mManager.scrollToPositionWithOffset(7, 0); } } @Override public void onTabUnselected(TabLayout.Tab tab) { } @Override public void onTabReselected(TabLayout.Tab tab) { // 坑 快速滑动底部,切换tab 失败 // mLinearSnapHelper.attachToRecyclerView(mRecyclerView); // item滑动居中 // ru.noties:scrollable scrollableLayout.animateScroll(1000).setDuration(250L).start(); Animate Scroll // collapsed header //关于Android7.x系统Toast显示异常BadTokenException解决方案 //调用Toast的show()方法后,将主线程阻塞5s,即可稳定复现这个异常 //Toast.makeToast(context, "123", LENGTH_LONG).show(); //Thread.sleep(5*1000); //出现这个异常的原因就是Toast显示时会有一个Token,这个Token是由WindowManager创建并管理的,重点是这个Token有时间限制,当超过了一个Toast的显示时长(LENGTH_LONG)后,会把这个Token置为无效。所以把Toast延迟显示后,使用的Token就已经过期了。 } }); } private void initTab() { //mTabLayout.setTabMode(TabLayout.MODE_SCROLLABLE); mTabLayout.addTab(mTabLayout.newTab().setText(titles[0]).setTag(Constants.TAG_ZERO)); mTabLayout.addTab(mTabLayout.newTab().setText(titles[1]).setTag(Constants.TAG_ONE)); mTabLayout.addTab(mTabLayout.newTab().setText(titles[2]).setTag(Constants.TAG_TWO)); mTabLayout.addTab(mTabLayout.newTab().setText(titles[3]).setTag(Constants.TAG_THREE)); } private class Constants { public static final int TAG_ZERO = 0; public static final int TAG_ONE = 1; public static final int TAG_TWO = 2; public static final int TAG_THREE = 3; public static final int TAG_FOUR = 4; public static final int TAG_FIVE = 5; public static final int TAG_SIX = 6; public static final int TAG_SEVEN = 7; public static final int TAG_EIGHT = 8; public static final int TAG_NINE = 9; } public class TabRecyclerAdapter extends RecyclerView.Adapter { public static final int VIEW_TYPE_ITEM = 1; public static final int VIEW_TYPE_FOOTER = 2; public static final int VIEW_TYPE_BIG = 3; private int parentHeight; private int itemHeight; @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == VIEW_TYPE_ITEM) { final View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_list, parent, false); view.post(new Runnable() { @Override public void run() { parentHeight = mRecyclerView.getHeight(); itemHeight = view.getHeight(); } }); return new ItemViewHolder(view); } else { View view = new View(parent.getContext()); view.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, parentHeight - itemHeight)); return new FooterViewHolder(view); } } @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { if (position != titles.length) { ((ItemViewHolder) holder).setData(position); } } @Override public int getItemCount() { return titles.length + 1; } @Override public int getItemViewType(int position) { if (position == titles.length) { return VIEW_TYPE_FOOTER; } else { return VIEW_TYPE_ITEM; } } class FooterViewHolder extends RecyclerView.ViewHolder { public FooterViewHolder(View itemView) { super(itemView); } } class ItemViewHolder extends RecyclerView.ViewHolder { public TextView mTitle; public ItemViewHolder(View itemView) { super(itemView); mTitle = (TextView) itemView.findViewById(R.id.title); } public void setData(int position) { switch (position) { case Constants.TAG_ZERO: case Constants.TAG_ONE: case Constants.TAG_TWO: case Constants.TAG_THREE: case Constants.TAG_FOUR: case Constants.TAG_FIVE: case Constants.TAG_SIX: case Constants.TAG_SEVEN: case Constants.TAG_EIGHT: case Constants.TAG_NINE: mTitle.setText("Item " + position); break; default: mTitle.setText("Item"); } } } } }
[ "anymyna@126.com" ]
anymyna@126.com
c8beb8d162a0b9cb69a3fe82a98cab3885c0ce3a
c66eded8c9c54b981940573ca48188db8876872c
/p0751_files/src/test/java/com/olegis/p0751_files/ExampleUnitTest.java
36b8906ae1dde3f3843166018c42a8045bd8f3d1
[]
no_license
Olegis/StartAndroid2
ab7d8107784f978729a58e59c955ef9099aadffd
449efc21287748cfca5156849b093fb8ebbe4b06
refs/heads/master
2022-11-25T07:01:36.379132
2020-08-03T08:39:18
2020-08-03T08:39:18
264,944,438
0
0
null
null
null
null
UTF-8
Java
false
false
383
java
package com.olegis.p0751_files; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "olegis85@mail.ru" ]
olegis85@mail.ru
2cc79577169e8c13d0a6bb96c52cb67f0a2bd28f
d7827ab297b0b3e4baa4b0c806a7bb93ecbcedca
/src/main/java/com/posts/controllers/SecurityWebApplicationInitializer.java
d40d92e2b6325c58fef1fc28322ca05aaa138f67
[]
no_license
pavansachi/showcase-web
abba903b35cf7dc8a1c4c4fcdc75fa4ff39748fd
fa2f3e7bba938c495de45bb35d5df9da84b83f43
refs/heads/master
2021-01-01T05:20:51.588194
2016-04-26T08:39:52
2016-04-26T08:39:52
56,737,486
0
0
null
null
null
null
UTF-8
Java
false
false
345
java
package com.posts.controllers; import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer; //@Order(1) public class SecurityWebApplicationInitializer extends AbstractSecurityWebApplicationInitializer{ public SecurityWebApplicationInitializer() { System.out.println("SecurityWebApplicationInitializer"); } }
[ "pavan8sachi@gmail.com" ]
pavan8sachi@gmail.com
119e1777bef8495830894af4eafa3ed086fc75ea
c5668d6ef90910010a52ce511ad0e5b6522b6bdf
/eclipse-workspace/Training/HibernateApps_Lesson07_AutomatedEntities/src/training/oracle/tms/test/OffenceDAOTest.java
3d4e12b0029fe488bba0e75ee8c32694ba0ae0dc
[]
no_license
iamscratches/small_spring_and_hibernate_projects
9f749435222ce25695fb04e8e051a94937b1de03
9f5afd5fd51b9515180782202f6bc831bd9943d0
refs/heads/main
2023-03-28T13:49:27.820741
2021-04-03T07:18:07
2021-04-03T07:18:07
347,425,981
0
0
null
null
null
null
UTF-8
Java
false
false
2,007
java
package training.oracle.tms.test; import java.util.Iterator; import java.util.List; import org.junit.Assert; import org.junit.Test; import training.oracle.tms.dao.OffenceDAO; import training.oracle.tms.dao.impl.OffenceDAOImpl; import training.oracle.tms.entities.OffenceEO; public class OffenceDAOTest { private OffenceDAO offenceDAORef = new OffenceDAOImpl(); @Test public void testInsertOffence() { OffenceEO offenceEORef = new OffenceEO(); offenceEORef.setOffenceId(1003); offenceEORef.setOffenceType("Signal break"); offenceEORef.setPenalty(5000.0f); offenceEORef.setVehType("All vehicles"); Integer retOffenceID = offenceDAORef.insertOffence(offenceEORef); Assert.assertEquals(new Integer(1003), retOffenceID); } @Test public void UpdateOffenceTest() { OffenceEO offenceEORef = new OffenceEO(); offenceEORef.setOffenceId(1006); offenceEORef.setOffenceType("Without helmet"); offenceEORef.setPenalty(5000.0f); offenceEORef.setVehType("All Vehicles"); offenceDAORef.updateOffence(offenceEORef); } @Test public void FetchOffenceTest() { OffenceEO returnedOffenceEORef = offenceDAORef.findByPrimaryKey(1004); System.out.println(returnedOffenceEORef); } @Test public void DeleteOffenceTest() { offenceDAORef.deleteOffence(1003); } @Test public void findAllTest() { List<OffenceEO> resultOffenceList = offenceDAORef.findAll(); for (OffenceEO offenceEO : resultOffenceList) { System.out.println(offenceEO); } } @Test public void findBasedOnPenaltyTest() { List<OffenceEO> resultOffenceList = offenceDAORef.findAllOffencesBasedOnPenalty(2000.0f); for (OffenceEO offenceEO : resultOffenceList) { System.out.println(offenceEO); } } @Test public void findPrgCriteria(){ List<OffenceEO> result = offenceDAORef.findAllBasedOnPrgCriteria(); for (Iterator iterator = result.iterator(); iterator.hasNext();) { OffenceEO offenceEO = (OffenceEO) iterator.next(); System.out.println(offenceEO); } } }
[ "35376376+iamscratches@users.noreply.github.com" ]
35376376+iamscratches@users.noreply.github.com
1d51683a6b6f7d55eae52c0267a6fb55999695b0
5f5675ee0429b504eaaa1d4f8a5451e36c434850
/plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/navigator/actions/NavigatorHandlerObjectCreateNew.java
b1ee1f06f90cd697fb520a22db5498789b4eab40
[ "Apache-2.0", "EPL-2.0" ]
permissive
tianguanghui/dbeaver
6f09f16bd752a3581008f9e674fc7bf70ca53e2e
24538a0a327ff94895b5b8091f7a29031ec394bc
refs/heads/devel
2022-11-13T17:04:10.795431
2020-06-28T14:05:02
2020-06-28T14:05:02
275,745,610
1
0
Apache-2.0
2020-06-29T06:08:55
2020-06-29T06:08:54
null
UTF-8
Java
false
false
18,623
java
/* * DBeaver - Universal Database Manager * Copyright (C) 2010-2020 DBeaver Corp and others * * 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.jkiss.dbeaver.ui.navigator.actions; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.commands.ParameterizedCommand; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.jface.action.IContributionItem; import org.eclipse.jface.action.Separator; import org.eclipse.jface.viewers.ISelection; import org.eclipse.osgi.util.NLS; import org.eclipse.ui.*; import org.eclipse.ui.actions.CompoundContributionItem; import org.eclipse.ui.commands.IElementUpdater; import org.eclipse.ui.handlers.HandlerUtil; import org.eclipse.ui.menus.CommandContributionItem; import org.eclipse.ui.menus.CommandContributionItemParameter; import org.eclipse.ui.menus.UIElement; import org.jkiss.code.Nullable; import org.jkiss.dbeaver.Log; import org.jkiss.dbeaver.model.*; import org.jkiss.dbeaver.model.app.DBPResourceCreator; import org.jkiss.dbeaver.model.app.DBPResourceHandler; import org.jkiss.dbeaver.model.app.DBPWorkspace; import org.jkiss.dbeaver.model.edit.DBEObjectMaker; import org.jkiss.dbeaver.model.messages.ModelMessages; import org.jkiss.dbeaver.model.navigator.*; import org.jkiss.dbeaver.model.navigator.meta.DBXTreeFolder; import org.jkiss.dbeaver.model.navigator.meta.DBXTreeItem; import org.jkiss.dbeaver.model.navigator.meta.DBXTreeNode; import org.jkiss.dbeaver.model.struct.DBSObject; import org.jkiss.dbeaver.runtime.DBWorkbench; import org.jkiss.dbeaver.ui.ActionUtils; import org.jkiss.dbeaver.ui.DBeaverIcons; import org.jkiss.dbeaver.ui.UIIcon; import org.jkiss.dbeaver.ui.UIUtils; import org.jkiss.dbeaver.ui.internal.UINavigatorMessages; import org.jkiss.dbeaver.ui.navigator.NavigatorCommands; import org.jkiss.dbeaver.ui.navigator.NavigatorUtils; import org.jkiss.utils.CommonUtils; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Sorry, this is a bit over-complicated handler. Historical reasons. * It can create object of specified type (in parameters) or for current selection. * Dynamic menu "Create" fills elements with parameters. Direct contribution of create command will create nearest * object type according to navigator selection. */ public class NavigatorHandlerObjectCreateNew extends NavigatorHandlerObjectCreateBase implements IElementUpdater { private static final Log log = Log.getLog(NavigatorHandlerObjectCreateNew.class); public static final Separator DUMMY_CONTRIBUTION_ITEM = new Separator(); @Override public Object execute(ExecutionEvent event) throws ExecutionException { String objectType = event.getParameter(NavigatorCommands.PARAM_OBJECT_TYPE); boolean isFolder = CommonUtils.toBoolean(event.getParameter(NavigatorCommands.PARAM_OBJECT_TYPE_FOLDER)); final ISelection selection = HandlerUtil.getCurrentSelection(event); DBNNode node = NavigatorUtils.getSelectedNode(selection); if (node != null) { Class<?> newObjectType = null; if (objectType != null) { if (node instanceof DBNDatabaseNode) { newObjectType = ((DBNDatabaseNode) node).getMeta().getSource().getObjectClass(objectType); } else { try { newObjectType = Class.forName(objectType); } catch (ClassNotFoundException e) { log.error("Error detecting new object type " + objectType, e); } } } else { // No explicit object type. Try to detect from selection IWorkbenchPart activePart = HandlerUtil.getActivePart(event); if (activePart != null) { List<IContributionItem> actions = fillCreateMenuItems(activePart.getSite(), node); for (IContributionItem item : actions) { if (item instanceof CommandContributionItem) { ParameterizedCommand command = ((CommandContributionItem) item).getCommand(); if (command != null) { ActionUtils.runCommand(command.getId(), selection, command.getParameterMap(), activePart.getSite()); return null; } } } } } createNewObject(HandlerUtil.getActiveWorkbenchWindow(event), node, newObjectType, null, isFolder); } return null; } @Override public void updateElement(UIElement element, Map parameters) { if (!updateUI) { return; } IWorkbenchWindow workbenchWindow = element.getServiceLocator().getService(IWorkbenchWindow.class); if (workbenchWindow == null || workbenchWindow.getActivePage() == null) { return; } Object typeName = parameters.get(NavigatorCommands.PARAM_OBJECT_TYPE_NAME); Object objectIcon = parameters.get(NavigatorCommands.PARAM_OBJECT_TYPE_ICON); if (typeName == null) { // Try to get type from active selection DBNNode node = NavigatorUtils.getSelectedNode(element); if (node != null && !node.isDisposed()) { List<IContributionItem> actions = fillCreateMenuItems(workbenchWindow.getActivePage().getActivePart().getSite(), node); for (IContributionItem item : actions) { if (item instanceof CommandContributionItem) { ParameterizedCommand command = ((CommandContributionItem) item).getCommand(); if (command != null) { typeName = command.getParameterMap().get(NavigatorCommands.PARAM_OBJECT_TYPE_NAME); if (typeName != null) { // Prepend "Create new" as it is a single node typeName = NLS.bind(UINavigatorMessages.actions_navigator_create_new, typeName); if (!(node instanceof DBNDatabaseFolder)) { objectIcon = command.getParameterMap().get(NavigatorCommands.PARAM_OBJECT_TYPE_ICON); } } break; } } } } } if (typeName != null) { element.setText(typeName.toString()); } else { element.setText(NLS.bind(UINavigatorMessages.actions_navigator_create_new, getObjectTypeName(element))); } if (objectIcon != null) { element.setIcon(DBeaverIcons.getImageDescriptor(new DBIcon(objectIcon.toString()))); } else { DBPImage image = getObjectTypeIcon(element); if (image == null) { image = DBIcon.TYPE_OBJECT; } element.setIcon(DBeaverIcons.getImageDescriptor(image)); } } public static String getObjectTypeName(UIElement element) { DBNNode node = NavigatorUtils.getSelectedNode(element); if (node != null) { if (node instanceof DBNContainer && !(node instanceof DBNDataSource)) { return ((DBNContainer)node).getChildrenType(); } else { return node.getNodeType(); } } return null; } public static DBPImage getObjectTypeIcon(UIElement element) { DBNNode node = NavigatorUtils.getSelectedNode(element); if (node != null) { if (node instanceof DBNDatabaseNode && node.getParentNode() instanceof DBNDatabaseFolder) { node = node.getParentNode(); } if (node instanceof DBNDataSource) { return UIIcon.SQL_CONNECT; } else if (node instanceof DBNDatabaseFolder) { final List<DBXTreeNode> metaChildren = ((DBNDatabaseFolder)node).getMeta().getChildren(node); if (!CommonUtils.isEmpty(metaChildren)) { return metaChildren.get(0).getIcon(null); } return null; } else { return node.getNodeIconDefault(); } } return null; } // If site is null then we need only item count. BAD CODE. public static List<IContributionItem> fillCreateMenuItems(@Nullable IWorkbenchPartSite site, DBNNode node) { List<IContributionItem> createActions = new ArrayList<>(); if (node instanceof DBNLocalFolder || node instanceof DBNProjectDatabases) { IContributionItem item = makeCreateContributionItem( site, DBPDataSourceContainer.class.getName(), ModelMessages.model_navigator_Connection, UIIcon.SQL_NEW_CONNECTION, false); createActions.add(item); } if (node instanceof DBNDatabaseNode) { addDatabaseNodeCreateItems(site, createActions, (DBNDatabaseNode) node); } if (node instanceof DBNLocalFolder || node instanceof DBNProjectDatabases || node instanceof DBNDataSource) { createActions.add(makeCommandContributionItem(site, NavigatorCommands.CMD_CREATE_LOCAL_FOLDER)); } else if (node instanceof DBNResource) { final DBPWorkspace workspace = DBWorkbench.getPlatform().getWorkspace(); IResource resource = ((DBNResource) node).getResource(); if (resource instanceof IProject) { createActions.add(makeCommandContributionItem(site, NavigatorCommands.CMD_CREATE_PROJECT)); } DBPResourceHandler handler = workspace.getResourceHandler(resource); if (handler instanceof DBPResourceCreator && (handler.getFeatures(resource) & DBPResourceCreator.FEATURE_CREATE_FILE) != 0) { createActions.add(makeCommandContributionItem(site, NavigatorCommands.CMD_CREATE_RESOURCE_FILE)); } if (handler != null && (handler.getFeatures(resource) & DBPResourceHandler.FEATURE_CREATE_FOLDER) != 0) { createActions.add(makeCommandContributionItem(site, NavigatorCommands.CMD_CREATE_RESOURCE_FOLDER)); } if (resource instanceof IContainer) { createActions.add(makeCommandContributionItem(site, NavigatorCommands.CMD_CREATE_FILE_LINK)); createActions.add(makeCommandContributionItem(site, NavigatorCommands.CMD_CREATE_FOLDER_LINK)); } } if (site != null) { if (!createActions.isEmpty() && !(createActions.get(createActions.size() - 1) instanceof Separator)) { createActions.add(new Separator()); } createActions.add(ActionUtils.makeCommandContribution(site, IWorkbenchCommandConstants.FILE_NEW, "Other ...", null)); } return createActions; } private static void addDatabaseNodeCreateItems(@Nullable IWorkbenchPartSite site, List<IContributionItem> createActions, DBNDatabaseNode node) { if (node instanceof DBNDatabaseFolder) { final List<DBXTreeNode> metaChildren = ((DBNDatabaseFolder) node).getMeta().getChildren(node); if (!CommonUtils.isEmpty(metaChildren)) { Class<?> nodeClass = ((DBNContainer) node).getChildrenClass(); String nodeType = metaChildren.get(0).getChildrenTypeLabel(node.getDataSource(), null); DBPImage nodeIcon = node.getNodeIconDefault();//metaChildren.get(0).getIcon(node); if (nodeClass != null && nodeType != null) { if (isCreateSupported(node, nodeClass)) { IContributionItem item = makeCreateContributionItem( site, nodeClass.getName(), nodeType, nodeIcon, false); createActions.add(item); } } } } else { if (node.getObject() == null) { return; } Class<?> nodeItemClass = node.getObject().getClass(); DBNNode parentNode = node.getParentNode(); if (isCreateSupported( parentNode instanceof DBNDatabaseNode ? (DBNDatabaseNode) parentNode : null, nodeItemClass)) { if (site == null) { createActions.add(DUMMY_CONTRIBUTION_ITEM); } else { DBPImage nodeIcon = node instanceof DBNDataSource ? UIIcon.SQL_NEW_CONNECTION : node.getNodeIconDefault(); createActions.add( makeCreateContributionItem( site, nodeItemClass.getName(), node.getNodeType(), nodeIcon, false)); } } if (!node.getDataSourceContainer().hasModifyPermission(DBPDataSourcePermission.PERMISSION_EDIT_METADATA)) { // Do not add child folders return; } if (site != null) { // Now add all child folders createActions.add(new Separator()); } List<DBXTreeNode> childNodeMetas = node.getMeta().getChildren(node); if (!CommonUtils.isEmpty(childNodeMetas)) { for (DBXTreeNode childMeta : childNodeMetas) { if (childMeta instanceof DBXTreeFolder) { List<DBXTreeNode> folderChildMeta = childMeta.getChildren(node); if (!CommonUtils.isEmpty(folderChildMeta) && folderChildMeta.size() == 1 && folderChildMeta.get(0) instanceof DBXTreeItem) { addChildNodeCreateItem(site, createActions, node, (DBXTreeItem) folderChildMeta.get(0)); } } else if (childMeta instanceof DBXTreeItem) { addChildNodeCreateItem(site, createActions, node, (DBXTreeItem) childMeta); } } } } } private static boolean addChildNodeCreateItem(@Nullable IWorkbenchPartSite site, List<IContributionItem> createActions, DBNDatabaseNode node, DBXTreeItem childMeta) { if (childMeta.isVirtual()) { return false; } Class<?> objectClass = node.getChildrenClass(childMeta); if (objectClass != null) { if (!isCreateSupported(node, objectClass)) { return false; } String typeName = childMeta.getNodeTypeLabel(node.getDataSource(), null); if (typeName != null) { IContributionItem item = makeCreateContributionItem( site, objectClass.getName(), typeName, childMeta.getIcon(null), true); createActions.add(item); return true; } } return false; } private static boolean isCreateSupported(DBNDatabaseNode parentNode, Class<?> objectClass) { DBEObjectMaker objectMaker = DBWorkbench.getPlatform().getEditorsRegistry().getObjectManager(objectClass, DBEObjectMaker.class); return objectMaker != null && objectMaker.canCreateObject(parentNode == null ? null : parentNode.getValueObject()); } private static IContributionItem makeCommandContributionItem(@Nullable IWorkbenchPartSite site, String commandId) { if (site == null) { // Dummy item. We need only count return DUMMY_CONTRIBUTION_ITEM; } else { return ActionUtils.makeCommandContribution(site, commandId); } } private static IContributionItem makeCreateContributionItem( @Nullable IWorkbenchPartSite site, String objectType, String objectTypeName, DBPImage objectIcon, boolean isFolder) { if (site == null) { return DUMMY_CONTRIBUTION_ITEM; } CommandContributionItemParameter params = new CommandContributionItemParameter( site, NavigatorCommands.CMD_OBJECT_CREATE, NavigatorCommands.CMD_OBJECT_CREATE, CommandContributionItem.STYLE_PUSH ); Map<String, String> parameters = new HashMap<>(); parameters.put(NavigatorCommands.PARAM_OBJECT_TYPE, objectType); parameters.put(NavigatorCommands.PARAM_OBJECT_TYPE_NAME, objectTypeName); if (objectIcon != null) { parameters.put(NavigatorCommands.PARAM_OBJECT_TYPE_ICON, objectIcon.getLocation()); } if (isFolder) { parameters.put(NavigatorCommands.PARAM_OBJECT_TYPE_FOLDER, String.valueOf(true)); } params.parameters = parameters; return new CommandContributionItem(params); } private static boolean isReadOnly(DBSObject object) { if (object == null) { return true; } DBPDataSource dataSource = object.getDataSource(); return dataSource == null || dataSource.getContainer().isConnectionReadOnly(); } public static class MenuCreateContributor extends CompoundContributionItem { private static final IContributionItem[] EMPTY_MENU = new IContributionItem[0]; @Override protected IContributionItem[] getContributionItems() { IWorkbenchPage activePage = UIUtils.getActiveWorkbenchWindow().getActivePage(); IWorkbenchPart activePart = activePage.getActivePart(); if (activePart == null) { return EMPTY_MENU; } IWorkbenchPartSite site = activePart.getSite(); DBNNode node = NavigatorUtils.getSelectedNode(site.getSelectionProvider()); List<IContributionItem> createActions = fillCreateMenuItems(site, node); return createActions.toArray(new IContributionItem[0]); } } }
[ "serge@jkiss.org" ]
serge@jkiss.org
48ebe88e508e556ed6c580a0a7a433f6480dab91
4202942b5d32821eb37fbfd46ab5f59bf8ba4079
/src/main/java/matrix/MatrixRowRunnable.java
7dfc6e8d1ba2d95974bcf53aaf8af843c994224b
[]
no_license
Pavel38l/MatrixParallelMultiplication
f7ba447dc5aee799e79a3eb2a6a5564af65ebe46
23411f8b3ee5dd56b0fc381547ea0469ecbdddab
refs/heads/master
2023-04-01T15:01:38.368701
2021-04-11T10:35:57
2021-04-11T10:35:57
356,837,837
0
0
null
null
null
null
UTF-8
Java
false
false
1,183
java
package matrix; /** * @author Pavel Burdyug * Implementation of the task for one thread of matrix multiplication <br> * Multiplies one row of the first matrix by the second and forms one row of the resulting matrix */ public class MatrixRowRunnable implements Runnable { private int rowIndex; private double[] matrix1Row; private double[][] matrix2; private double[][] result; /** * @param rowIndex row index of the first matrix * @param matrix1Row row of the first matrix * @param matrix2 second matrix * @param result result matrix */ public MatrixRowRunnable(int rowIndex, double[] matrix1Row, double[][] matrix2, double[][] result) { this.rowIndex = rowIndex; this.matrix1Row = matrix1Row; this.matrix2 = matrix2; this.result = result; } public MatrixRowRunnable() { } @Override public void run() { System.out.printf("Multiply row %d%n", rowIndex); for (int i = 0;i < matrix2[0].length;i++) { for (int j = 0; j < matrix1Row.length; j++) { result[rowIndex][i] += matrix1Row[j] * matrix2[j][i]; } } } }
[ "serhioburdug@gmail.com" ]
serhioburdug@gmail.com
adeed81a52f46032b26e5ab067c2040f1337d7a9
a9798fe8cde43c310b09d7304204b9561d0792e9
/Decaf.java
13139920358fb6eba2fd0f91561085e69a172567
[]
no_license
dwojdyla/Decorator
bf0252d415b064cc70000796db1347dfc5b10026
0445113ebe03d6d8c46455c4398c277cf2140fa6
refs/heads/master
2021-01-01T05:29:18.981849
2016-04-14T13:25:50
2016-04-14T13:25:50
56,225,322
0
0
null
null
null
null
UTF-8
Java
false
false
126
java
public class Decaf extends Beverage{ public Decaf(){ description="Decaf oida"; } public double cost(){ return 1.99; } }
[ "dwojdyla@student.tgm.ac.at" ]
dwojdyla@student.tgm.ac.at
ba3abddb301573bbffd8a15f5b6a3e1c4008ad94
295f86d9c62fdfbe91e5c904e220e711c32754fd
/1_volley/app/src/main/java/com/example/a1_volley/MainActivity.java
34e42aad933ea812c8563d348c572d4a4210c18f
[]
no_license
HSEhw/Android
c583acde40d1e3d7bb3c1ec44ce9ad7ecaa11020
8d9bdb25ed9ce1f0ae27b4cf5c5a7f8321bc4392
refs/heads/main
2023-02-04T05:21:08.375489
2020-12-21T17:27:12
2020-12-21T17:27:12
311,663,530
0
0
null
null
null
null
UTF-8
Java
false
false
3,135
java
package com.example.a1_volley; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatDialogFragment; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; import androidx.fragment.app.FragmentManager; import android.Manifest; import android.annotation.SuppressLint; import android.app.Dialog; import android.content.pm.PackageManager; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.JsonObjectRequest; import com.android.volley.toolbox.Volley; import org.json.JSONException; import org.json.JSONObject; class MyDialogFragment extends AppCompatDialogFragment {} public class MainActivity extends AppCompatActivity { private static final int REQUEST_PERMISSION_INTERNET = 1; String url = "http://date.jsontest.com"; TextView text; TextView internet_permission; Button button; @SuppressLint("SetTextI18n") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); text = (TextView) findViewById(R.id.text); internet_permission = (TextView) findViewById(R.id.internet_permission); button = (Button) findViewById(R.id.button); permissionCheck(); } @SuppressLint("SetTextI18n") public void onButtonClick(View view) { this.getData(); } private void getData() { RequestQueue queue = Volley.newRequestQueue(this); JsonObjectRequest jsObjRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() { @SuppressLint("SetTextI18n") @Override public void onResponse(JSONObject response) { try { text.setText("date: " + response.getString("date") + "\n" + "time: " + response.getString("time")); } catch (JSONException e) { e.printStackTrace(); } } }, new Response.ErrorListener() { @SuppressLint("SetTextI18n") @Override public void onErrorResponse(VolleyError error) { text.setText("\toops\n\tError:\n" + error); } }); queue.add(jsObjRequest); } @SuppressLint("SetTextI18n") private void permissionCheck() { int permissionStatus = ContextCompat.checkSelfPermission(this, Manifest.permission.INTERNET); if (permissionStatus != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.INTERNET}, REQUEST_PERMISSION_INTERNET); } else { internet_permission.setText("Internet permission: done"); } } }
[ "you@example.com" ]
you@example.com
88b934c211866a6e0b5508918e0c643b4188bedc
8f23054d485be3d279553e643c52f1953ce22102
/app/src/test/java/com/jack/productsearch/ExampleUnitTest.java
7590d6d9707954c4e20d61135f27fe12176df45f
[]
no_license
GeraltRiv/ProductSearchEtsy
a37bbb9f104dd90f5aec2742e27aadcb51c3bae8
c40eeab559299f647b53b323557ee0e45a0e9018
refs/heads/master
2021-01-12T08:10:10.235205
2016-12-20T19:16:58
2016-12-20T19:16:58
76,492,484
0
0
null
null
null
null
UTF-8
Java
false
false
400
java
package com.jack.productsearch; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "Dayman90@gmail.com" ]
Dayman90@gmail.com
d56a99ae4daf90f5dcf03713221455847965259a
d4895edd31f52d945d832622f92aac7ad33eab3e
/GitStudy/src/myobj/school/Student2.java
ecfaad4bf9c41ea326dbef1dde59b9cfee0092ea
[ "Apache-2.0" ]
permissive
rhkdals5515/Repo
d1de309a9626bd9ebc27db04047c07776c5ebb09
642e3a91796e37669089de422f5ff0bf7ee0a937
refs/heads/main
2023-04-15T07:29:30.306602
2021-04-19T05:38:38
2021-04-19T05:38:38
359,295,123
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
765
java
package myobj.school; import java.util.Random; public class Student2 { private String name; private int kor; private int eng; private int math; private static Random ran = new Random(); private static int sno = 0; public static int BEST_TOTAL = 0; private static int getRandomScore() { return ran.nextInt(101); } public Student2() { kor = getRandomScore(); eng = getRandomScore(); math = getRandomScore(); name = String.format("Çлý%06d", sno++); BEST_TOTAL = (int)Math.max(getTotal(), BEST_TOTAL); } public int getTotal() { return kor + eng + math; } public double getAvg() { return getTotal() / 3.0; } public String getTranscript() { return String.format("%s / %3d / %.2f", name, getTotal(), getAvg()); } }
[ "rhkdals3461@naver.com" ]
rhkdals3461@naver.com
c349f5bc20e33f6a1a41da57884f39115789932e
b8b7e7f84e5dd812bbd70a72e9bc38c97f93950a
/plugins/org.polymap.rhei.ide/src/org/polymap/rhei/ide/Messages.java
65517e1bbe59a850984de1c81cb049847f2f5a5e
[]
no_license
Polymap3/polymap3-rhei
8125d4d18aabd3bd065cfa15915d3accee28ec66
c60d3c715074b0eee071bc9f5656a0c80baa8a89
refs/heads/master
2021-01-18T22:36:46.223268
2016-06-29T16:37:00
2016-06-29T16:37:00
31,905,076
0
2
null
null
null
null
UTF-8
Java
false
false
1,685
java
/* * polymap.org * Copyright 2010, Polymap GmbH, and individual contributors as indicated * by the @authors tag. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * $Id: $ */ package org.polymap.rhei.ide; import org.eclipse.rwt.RWT; import org.polymap.core.runtime.MessagesImpl; /** * * * @author <a href="http://www.polymap.de">Falko Braeutigam</a> * @version $Revision: $ */ public class Messages { private static final String BUNDLE_NAME = RheiIdePlugin.PLUGIN_ID + ".messages"; //$NON-NLS-1$ private static final MessagesImpl instance = new MessagesImpl( BUNDLE_NAME, Messages.class.getClassLoader() ); private Messages() { // prevent instantiation } public static String i18n( String key, Object... args ) { return get( key, args ); } public static String get( String key, Object... args ) { return instance.get( key, args ); } public static String get2( Object caller, String key, Object... args ) { return instance.get( caller, key, args ); } public static Messages get() { Class clazz = Messages.class; return (Messages)RWT.NLS.getISO8859_1Encoded( BUNDLE_NAME, clazz ); } }
[ "falko@polymap.de" ]
falko@polymap.de
9b92f8b400efb2a04607c7608efba5204b0a2a3f
e98aff3d79e49ef857a949be534a4a188c75bf5e
/src/test/java/lv/ctco/scm/mobile/utils/PosixUtilTest.java
f673e1b0ad5a860b11da18bc2d1020abe244f01d
[ "Apache-2.0" ]
permissive
ctco/gradle-mobile-plugin
c51a931f576ac8744e8e24f5b6967e0df71b6b5c
c33f110fe7c7e8536cea2d1c1affd9acdc5c310f
refs/heads/master
2023-01-24T05:25:01.060139
2023-01-17T15:35:12
2023-01-17T15:35:12
53,316,209
6
1
null
null
null
null
UTF-8
Java
false
false
2,079
java
/* * @(#)PosixUtilTest.java * * Copyright C.T.Co Ltd, 15/25 Jurkalnes Street, Riga LV-1046, Latvia. All rights reserved. */ package lv.ctco.scm.mobile.utils; import org.junit.Test; import static org.junit.Assert.*; public class PosixUtilTest { private static final int O400 = 256; private static final int O200 = 128; private static final int O100 = 64; private static final int O040 = 32; private static final int O020 = 16; private static final int O010 = 8; private static final int O004 = 4; private static final int O002 = 2; private static final int O001 = 1; private static final int O777 = 511; private static final int O755 = 493; private static final int O644 = 420; @Test public void testPosixPermissionConversions() { assertEquals(O400, PosixUtil.getPosixPermissionsAsInt(PosixUtil.getPosixPermissionsAsSet(O400))); assertEquals(O200, PosixUtil.getPosixPermissionsAsInt(PosixUtil.getPosixPermissionsAsSet(O200))); assertEquals(O100, PosixUtil.getPosixPermissionsAsInt(PosixUtil.getPosixPermissionsAsSet(O100))); assertEquals(O040, PosixUtil.getPosixPermissionsAsInt(PosixUtil.getPosixPermissionsAsSet(O040))); assertEquals(O020, PosixUtil.getPosixPermissionsAsInt(PosixUtil.getPosixPermissionsAsSet(O020))); assertEquals(O010, PosixUtil.getPosixPermissionsAsInt(PosixUtil.getPosixPermissionsAsSet(O010))); assertEquals(O004, PosixUtil.getPosixPermissionsAsInt(PosixUtil.getPosixPermissionsAsSet(O004))); assertEquals(O002, PosixUtil.getPosixPermissionsAsInt(PosixUtil.getPosixPermissionsAsSet(O002))); assertEquals(O001, PosixUtil.getPosixPermissionsAsInt(PosixUtil.getPosixPermissionsAsSet(O001))); assertEquals(O777, PosixUtil.getPosixPermissionsAsInt(PosixUtil.getPosixPermissionsAsSet(O777))); assertEquals(O755, PosixUtil.getPosixPermissionsAsInt(PosixUtil.getPosixPermissionsAsSet(O755))); assertEquals(O644, PosixUtil.getPosixPermissionsAsInt(PosixUtil.getPosixPermissionsAsSet(O644))); } }
[ "ivars.berzinsh@ctco.lv" ]
ivars.berzinsh@ctco.lv
97e11ff7e93081cf3efa4b7d1e55571166d254e7
6045518db77c6104b4f081381f61c26e0d19d5db
/datasets/file_version_per_commit_backup/apache-ant/3e615520363e28a3f45c9620b398152f81414dc5.java
64cefa5492d267d5610c46a84816d6d4f1f586cb
[]
no_license
edisutoyo/msr16_td_removal
6e039da7fed166b81ede9b33dcc26ca49ba9259c
41b07293c134496ba1072837e1411e05ed43eb75
refs/heads/master
2023-03-22T21:40:42.993910
2017-09-22T09:19:51
2017-09-22T09:19:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
16,543
java
/* * The Apache Software License, Version 1.1 * * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package org.apache.tools.ant.types; // java io classes import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Enumeration; import java.util.Hashtable; import java.util.Properties; import java.util.Vector; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; /** * A set of filters to be applied to something. * * A filter set may have begintoken and endtokens defined. * * @author <A href="mailto:gholam@xtra.co.nz"> Michael McCallum </A> * @author <A href="mailto:martin@mvdb.net"> Martin van den Bemt </A> */ public class FilterSet extends DataType implements Cloneable { /** * Individual filter component of filterset * * @author Michael McCallum */ public static class Filter { /** Token which will be replaced in the filter operation */ String token; /** The value which will replace the token in the filtering operation */ String value; /** * Constructor for the Filter object * * @param token The token which will be replaced when filtering * @param value The value which will replace the token when filtering */ public Filter(String token, String value) { this.token = token; this.value = value; } /** * No argument conmstructor */ public Filter() { } /** * Sets the Token attribute of the Filter object * * @param token The new Token value */ public void setToken(String token) { this.token = token; } /** * Sets the Value attribute of the Filter object * * @param value The new Value value */ public void setValue(String value) { this.value = value; } /** * Gets the Token attribute of the Filter object * * @return The Token value */ public String getToken() { return token; } /** * Gets the Value attribute of the Filter object * * @return The Value value */ public String getValue() { return value; } } /** * The filtersfile nested element. * * @author Michael McCallum */ public class FiltersFile { /** * Constructor for the Filter object */ public FiltersFile() { } /** * Sets the file from which filters will be read. * * @param file the file from which filters will be read. */ public void setFile(File file) { readFiltersFromFile(file); } } /** The default token start string */ public static final String DEFAULT_TOKEN_START = "@"; /** The default token end string */ public static final String DEFAULT_TOKEN_END = "@"; private String startOfToken = DEFAULT_TOKEN_START; private String endOfToken = DEFAULT_TOKEN_END; /** * List of ordered filters and filter files. */ private Vector filters = new Vector(); public FilterSet() { } /** * Create a Filterset from another filterset * * @param filterset the filterset upon which this filterset will be based. */ protected FilterSet(FilterSet filterset) { super(); this.filters = (Vector) filterset.getFilters().clone(); } protected Vector getFilters() { if (isReference()) { return getRef().getFilters(); } return filters; } protected FilterSet getRef() { return (FilterSet) getCheckedRef(FilterSet.class, "filterset"); } /** * Gets the filter hash of the FilterSet. * * @return The hash of the tokens and values for quick lookup. */ public Hashtable getFilterHash() { int filterSize = getFilters().size(); Hashtable filterHash = new Hashtable(filterSize + 1); for (Enumeration e = getFilters().elements(); e.hasMoreElements();) { Filter filter = (Filter) e.nextElement(); filterHash.put(filter.getToken(), filter.getValue()); } return filterHash; } /** * set the file containing the filters for this filterset. * * @param filtersFile sets the filter fil to read filters for this filter set from. * @exception BuildException if there is a problem reading the filters */ public void setFiltersfile(File filtersFile) throws BuildException { if (isReference()) { throw tooManyAttributes(); } readFiltersFromFile(filtersFile); } /** * The string used to id the beginning of a token. * * @param startOfToken The new Begintoken value */ public void setBeginToken(String startOfToken) { if (isReference()) { throw tooManyAttributes(); } if (startOfToken == null || "".equals(startOfToken)) { throw new BuildException("beginToken must not be empty"); } this.startOfToken = startOfToken; } public String getBeginToken() { if (isReference()) { return getRef().getBeginToken(); } return startOfToken; } /** * The string used to id the end of a token. * * @param endOfToken The new Endtoken value */ public void setEndToken(String endOfToken) { if (isReference()) { throw tooManyAttributes(); } if (endOfToken == null || "".equals(endOfToken)) { throw new BuildException("endToken must not be empty"); } this.endOfToken = endOfToken; } public String getEndToken() { if (isReference()) { return getRef().getEndToken(); } return endOfToken; } /** * Read the filters from the given file. * * @param filtersFile the file from which filters are read * @exception BuildException Throw a build exception when unable to read the * file. */ public void readFiltersFromFile(File filtersFile) throws BuildException { if (isReference()) { throw tooManyAttributes(); } if (filtersFile.isFile()) { log("Reading filters from " + filtersFile, Project.MSG_VERBOSE); FileInputStream in = null; try { Properties props = new Properties(); in = new FileInputStream(filtersFile); props.load(in); Enumeration enum = props.propertyNames(); Vector filters = getFilters(); while (enum.hasMoreElements()) { String strPropName = (String) enum.nextElement(); String strValue = props.getProperty(strPropName); filters.addElement(new Filter(strPropName, strValue)); } } catch (Exception e) { throw new BuildException("Could not read filters from file: " + filtersFile); } finally { if (in != null) { try { in.close(); } catch (IOException ioex) { } } } } else { throw new BuildException("Must specify a file not a directory in " + "the filtersfile attribute:" + filtersFile); } } /** * Does replacement on the given string with token matching. * This uses the defined begintoken and endtoken values which default to @ for both. * * @param line The line to process the tokens in. * @return The string with the tokens replaced. */ public String replaceTokens(String line) { String beginToken = getBeginToken(); String endToken = getEndToken(); int index = line.indexOf(beginToken); if (index > -1) { Hashtable tokens = getFilterHash(); try { StringBuffer b = new StringBuffer(); int i = 0; String token = null; String value = null; do { int endIndex = line.indexOf(endToken, index + beginToken.length() + 1); if (endIndex == -1) { break; } token = line.substring(index + beginToken.length(), endIndex); b.append(line.substring(i, index)); if (tokens.containsKey(token)) { value = (String) tokens.get(token); if (!value.equals(token)) { // we have another token, let's parse it. value = replaceTokens(value, token); } log("Replacing: " + beginToken + token + endToken + " -> " + value, Project.MSG_VERBOSE); b.append(value); i = index + beginToken.length() + token.length() + endToken.length(); } else { // just append beginToken and search further b.append(beginToken); i = index + beginToken.length(); } } while ((index = line.indexOf(beginToken, i)) > -1); b.append(line.substring(i)); return b.toString(); } catch (StringIndexOutOfBoundsException e) { return line; } } else { return line; } } /** Contains a list of parsed tokens */ private Vector passedTokens; /** if a ducplicate token is found, this is set to true */ private boolean duplicateToken = false; /** * This parses tokens which point to tokens. * It also maintains a list of currently used tokens, so we cannot * get into an infinite loop * @param value the value / token to parse * @param parent the parant token (= the token it was parsed from) */ private String replaceTokens(String line, String parent) throws BuildException { if (passedTokens == null) { passedTokens = new Vector(); } if (passedTokens.contains(parent) && !duplicateToken) { duplicateToken = true; StringBuffer sb = new StringBuffer(); sb.append("Inifinite loop in tokens. Currently known tokens : "); sb.append(passedTokens); sb.append("\nProblem token : "+getBeginToken()+parent+getEndToken()); sb.append(" called from "+getBeginToken()+passedTokens.lastElement()); sb.append(getEndToken()); System.out.println(sb.toString()); return parent; } passedTokens.addElement(parent); String value = this.replaceTokens(line); if (value.indexOf(getBeginToken()) == -1 && !duplicateToken) { duplicateToken = false; passedTokens = null; } else if(duplicateToken) { // should always be the case... if (passedTokens.size() > 0) { value = (String) passedTokens.lastElement(); passedTokens.removeElementAt(passedTokens.size()-1); if (passedTokens.size() == 0) { value = getBeginToken()+value+getEndToken(); duplicateToken = false; } } } return value; } /** * Create a new filter * * @param the filter to be added */ public void addFilter(Filter filter) { if (isReference()) { throw noChildrenAllowed(); } filters.addElement(filter); } /** * Create a new FiltersFile * * @return The filter that was created. */ public FiltersFile createFiltersfile() { if (isReference()) { throw noChildrenAllowed(); } return new FiltersFile(); } /** * Add a new filter made from the given token and value. * * @param token The token for the new filter. * @param value The value for the new filter. */ public void addFilter(String token, String value) { if (isReference()) { throw noChildrenAllowed(); } filters.addElement(new Filter(token, value)); } /** * Add a Filterset to this filter set * * @param filterSet the filterset to be added to this filterset */ public void addConfiguredFilterSet(FilterSet filterSet) { if (isReference()) { throw noChildrenAllowed(); } for (Enumeration e = filterSet.getFilters().elements(); e.hasMoreElements();) { filters.addElement(e.nextElement()); } } /** * Test to see if this filter set it empty. * * @return Return true if there are filter in this set otherwise false. */ public boolean hasFilters() { return getFilters().size() > 0; } public Object clone() throws BuildException { if (isReference()) { return ((FilterSet) getRef()).clone(); } else { try { FilterSet fs = (FilterSet) super.clone(); fs.filters = (Vector) getFilters().clone(); fs.setProject(getProject()); return fs; } catch (CloneNotSupportedException e) { throw new BuildException(e); } } } }
[ "everton.maldonado@gmail.com" ]
everton.maldonado@gmail.com
ec2e1f304886bd82ce5faa77c3491031fd7d2027
cbb57237a5c25735717ec2d6462463d1546f252f
/web/src/d20181114/SumData.java
4098471ccb4ada6eb55a586d06be0d2abad487ca
[]
no_license
callmey/scriptlet
c95edd278abd69bba43145c3224697bb281ed364
89647ea576200f10ff18a535899f95045bc1e956
refs/heads/master
2020-04-04T21:56:38.958150
2018-11-27T03:03:29
2018-11-27T03:03:29
156,304,240
0
0
null
null
null
null
UTF-8
Java
false
false
1,161
java
package d20181114; 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("/w20181114/SumData.do") public class SumData extends HttpServlet{ @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.setCharacterEncoding("UTF-8"); resp.setContentType("text/html;charset=UTF-8"); int sum = 0; String n = req.getParameter("num"); if(n!=null) { int num = Integer.parseInt(n); for(int i = 1; i<=num;i++) { sum +=i; } PrintWriter out = resp.getWriter(); //html로 출력 out.println("<html>"); out.println("<head>"); out.println("<title>Sum Check</title>"); out.println("</head>"); out.println("<body>"); out.println("<h2>1부터 "+ num +" 까지의 합은"+sum+"입니다.</h2>"); out.println("</body>"); out.println("</html>"); } } }
[ "soldesk@soldesk-PC" ]
soldesk@soldesk-PC
780e8e14abf567a24740d3f98b97121fcefa18e9
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/Ibotta_com.ibotta.android/javafiles/com/fasterxml/jackson/databind/introspect/AnnotatedCreatorCollector.java
f12a4cf9239e2e45b02f9fe8b09033f8437bff61
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
55,572
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package com.fasterxml.jackson.databind.introspect; import com.fasterxml.jackson.databind.AnnotationIntrospector; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.util.ClassUtil; import java.lang.annotation.Annotation; import java.lang.reflect.*; import java.util.*; // Referenced classes of package com.fasterxml.jackson.databind.introspect: // CollectorBase, MemberKey, AnnotatedConstructor, AnnotatedMethod, // AnnotationCollector, AnnotationMap, AnnotatedMember, TypeResolutionContext final class AnnotatedCreatorCollector extends CollectorBase { AnnotatedCreatorCollector(AnnotationIntrospector annotationintrospector, TypeResolutionContext typeresolutioncontext) { super(annotationintrospector); // 0 0:aload_0 // 1 1:aload_1 // 2 2:invokespecial #13 <Method void CollectorBase(AnnotationIntrospector)> _typeContext = typeresolutioncontext; // 3 5:aload_0 // 4 6:aload_2 // 5 7:putfield #15 <Field TypeResolutionContext _typeContext> // 6 10:return } private List _findPotentialConstructors(JavaType javatype, Class class1) { boolean flag1 = javatype.isEnumType(); // 0 0:aload_1 // 1 1:invokevirtual #24 <Method boolean JavaType.isEnumType()> // 2 4:istore 8 boolean flag = false; // 3 6:iconst_0 // 4 7:istore 6 Object obj4; if(!flag1) //* 5 9:iload 8 //* 6 11:ifne 126 { com.fasterxml.jackson.databind.util.ClassUtil.Ctor actor[] = ClassUtil.getConstructors(javatype.getRawClass()); // 7 14:aload_1 // 8 15:invokevirtual #28 <Method Class JavaType.getRawClass()> // 9 18:invokestatic #34 <Method com.fasterxml.jackson.databind.util.ClassUtil$Ctor[] ClassUtil.getConstructors(Class)> // 10 21:astore 12 int k = actor.length; // 11 23:aload 12 // 12 25:arraylength // 13 26:istore 4 Object obj2 = null; // 14 28:aconst_null // 15 29:astore 10 Object obj = obj2; // 16 31:aload 10 // 17 33:astore 9 int i = 0; // 18 35:iconst_0 // 19 36:istore_3 do { javatype = ((JavaType) (obj2)); // 20 37:aload 10 // 21 39:astore_1 obj4 = obj; // 22 40:aload 9 // 23 42:astore 11 if(i >= k) break; // 24 44:iload_3 // 25 45:iload 4 // 26 47:icmpge 131 obj4 = ((Object) (actor[i])); // 27 50:aload 12 // 28 52:iload_3 // 29 53:aaload // 30 54:astore 11 if(!isIncludableConstructor(((com.fasterxml.jackson.databind.util.ClassUtil.Ctor) (obj4)).getConstructor())) //* 31 56:aload 11 //* 32 58:invokevirtual #40 <Method Constructor com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getConstructor()> //* 33 61:invokestatic #44 <Method boolean isIncludableConstructor(Constructor)> //* 34 64:ifne 73 javatype = ((JavaType) (obj)); // 35 67:aload 9 // 36 69:astore_1 else //* 37 70:goto 116 if(((com.fasterxml.jackson.databind.util.ClassUtil.Ctor) (obj4)).getParamCount() == 0) //* 38 73:aload 11 //* 39 75:invokevirtual #48 <Method int com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getParamCount()> //* 40 78:ifne 91 { obj2 = obj4; // 41 81:aload 11 // 42 83:astore 10 javatype = ((JavaType) (obj)); // 43 85:aload 9 // 44 87:astore_1 } else //* 45 88:goto 116 { javatype = ((JavaType) (obj)); // 46 91:aload 9 // 47 93:astore_1 if(obj == null) //* 48 94:aload 9 //* 49 96:ifnonnull 107 javatype = ((JavaType) (new ArrayList())); // 50 99:new #50 <Class ArrayList> // 51 102:dup // 52 103:invokespecial #53 <Method void ArrayList()> // 53 106:astore_1 ((List) (javatype)).add(obj4); // 54 107:aload_1 // 55 108:aload 11 // 56 110:invokeinterface #59 <Method boolean List.add(Object)> // 57 115:pop } i++; // 58 116:iload_3 // 59 117:iconst_1 // 60 118:iadd // 61 119:istore_3 obj = ((Object) (javatype)); // 62 120:aload_1 // 63 121:astore 9 } while(true); // 64 123:goto 37 } else { javatype = null; // 65 126:aconst_null // 66 127:astore_1 obj4 = ((Object) (javatype)); // 67 128:aload_1 // 68 129:astore 11 } int j; Object obj3; if(obj4 == null) //* 69 131:aload 11 //* 70 133:ifnonnull 153 { obj3 = ((Object) (Collections.emptyList())); // 71 136:invokestatic #65 <Method List Collections.emptyList()> // 72 139:astore 10 if(javatype == null) //* 73 141:aload_1 //* 74 142:ifnonnull 148 return ((List) (obj3)); // 75 145:aload 10 // 76 147:areturn j = 0; // 77 148:iconst_0 // 78 149:istore_3 } else //* 79 150:goto 208 { int k1 = ((List) (obj4)).size(); // 80 153:aload 11 // 81 155:invokeinterface #68 <Method int List.size()> // 82 160:istore 5 ArrayList arraylist = new ArrayList(k1); // 83 162:new #50 <Class ArrayList> // 84 165:dup // 85 166:iload 5 // 86 168:invokespecial #71 <Method void ArrayList(int)> // 87 171:astore 9 int l = 0; // 88 173:iconst_0 // 89 174:istore 4 do { obj3 = ((Object) (arraylist)); // 90 176:aload 9 // 91 178:astore 10 j = k1; // 92 180:iload 5 // 93 182:istore_3 if(l >= k1) break; // 94 183:iload 4 // 95 185:iload 5 // 96 187:icmpge 208 ((List) (arraylist)).add(((Object) (null))); // 97 190:aload 9 // 98 192:aconst_null // 99 193:invokeinterface #59 <Method boolean List.add(Object)> // 100 198:pop l++; // 101 199:iload 4 // 102 201:iconst_1 // 103 202:iadd // 104 203:istore 4 } while(true); // 105 205:goto 176 } Object obj1 = ((Object) (javatype)); // 106 208:aload_1 // 107 209:astore 9 if(class1 != null) //* 108 211:aload_2 //* 109 212:ifnull 459 { com.fasterxml.jackson.databind.util.ClassUtil.Ctor actor1[] = ClassUtil.getConstructors(class1); // 110 215:aload_2 // 111 216:invokestatic #34 <Method com.fasterxml.jackson.databind.util.ClassUtil$Ctor[] ClassUtil.getConstructors(Class)> // 112 219:astore 14 int j2 = actor1.length; // 113 221:aload 14 // 114 223:arraylength // 115 224:istore 7 class1 = null; // 116 226:aconst_null // 117 227:astore_2 for(int i1 = 0; i1 < j2;) //* 118 228:iconst_0 //* 119 229:istore 4 //* 120 231:iload 4 //* 121 233:iload 7 //* 122 235:icmpge 456 { com.fasterxml.jackson.databind.util.ClassUtil.Ctor ctor = actor1[i1]; // 123 238:aload 14 // 124 240:iload 4 // 125 242:aaload // 126 243:astore 15 JavaType javatype1; Object obj5; if(ctor.getParamCount() == 0) //* 127 245:aload 15 //* 128 247:invokevirtual #48 <Method int com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getParamCount()> //* 129 250:ifne 283 { javatype1 = javatype; // 130 253:aload_1 // 131 254:astore 12 obj5 = ((Object) (class1)); // 132 256:aload_2 // 133 257:astore 13 if(javatype != null) //* 134 259:aload_1 //* 135 260:ifnull 441 { _defaultConstructor = constructDefaultConstructor(((com.fasterxml.jackson.databind.util.ClassUtil.Ctor) (javatype)), ctor); // 136 263:aload_0 // 137 264:aload_0 // 138 265:aload_1 // 139 266:aload 15 // 140 268:invokevirtual #75 <Method AnnotatedConstructor constructDefaultConstructor(com.fasterxml.jackson.databind.util.ClassUtil$Ctor, com.fasterxml.jackson.databind.util.ClassUtil$Ctor)> // 141 271:putfield #77 <Field AnnotatedConstructor _defaultConstructor> javatype1 = null; // 142 274:aconst_null // 143 275:astore 12 obj5 = ((Object) (class1)); // 144 277:aload_2 // 145 278:astore 13 } } else //* 146 280:goto 441 { javatype1 = javatype; // 147 283:aload_1 // 148 284:astore 12 obj5 = ((Object) (class1)); // 149 286:aload_2 // 150 287:astore 13 if(obj4 != null) //* 151 289:aload 11 //* 152 291:ifnull 441 { obj1 = ((Object) (class1)); // 153 294:aload_2 // 154 295:astore 9 if(class1 == null) //* 155 297:aload_2 //* 156 298:ifnonnull 353 { class1 = ((Class) (new MemberKey[j])); // 157 301:iload_3 // 158 302:anewarray MemberKey[] // 159 305:astore_2 int l1 = 0; // 160 306:iconst_0 // 161 307:istore 5 do { obj1 = ((Object) (class1)); // 162 309:aload_2 // 163 310:astore 9 if(l1 >= j) break; // 164 312:iload 5 // 165 314:iload_3 // 166 315:icmpge 353 class1[l1] = ((/*<invalid signature>*/java.lang.Object) (new MemberKey(((com.fasterxml.jackson.databind.util.ClassUtil.Ctor)((List) (obj4)).get(l1)).getConstructor()))); // 167 318:aload_2 // 168 319:iload 5 // 169 321:new #79 <Class MemberKey> // 170 324:dup // 171 325:aload 11 // 172 327:iload 5 // 173 329:invokeinterface #83 <Method Object List.get(int)> // 174 334:checkcast #36 <Class com.fasterxml.jackson.databind.util.ClassUtil$Ctor> // 175 337:invokevirtual #40 <Method Constructor com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getConstructor()> // 176 340:invokespecial #86 <Method void MemberKey(Constructor)> // 177 343:aastore l1++; // 178 344:iload 5 // 179 346:iconst_1 // 180 347:iadd // 181 348:istore 5 } while(true); // 182 350:goto 309 } class1 = ((Class) (new MemberKey(ctor.getConstructor()))); // 183 353:new #79 <Class MemberKey> // 184 356:dup // 185 357:aload 15 // 186 359:invokevirtual #40 <Method Constructor com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getConstructor()> // 187 362:invokespecial #86 <Method void MemberKey(Constructor)> // 188 365:astore_2 int i2 = 0; // 189 366:iconst_0 // 190 367:istore 5 do { javatype1 = javatype; // 191 369:aload_1 // 192 370:astore 12 obj5 = obj1; // 193 372:aload 9 // 194 374:astore 13 if(i2 >= j) break; // 195 376:iload 5 // 196 378:iload_3 // 197 379:icmpge 441 if(((MemberKey) (class1)).equals(((Object) (obj1[i2])))) //* 198 382:aload_2 //* 199 383:aload 9 //* 200 385:iload 5 //* 201 387:aaload //* 202 388:invokevirtual #89 <Method boolean MemberKey.equals(Object)> //* 203 391:ifeq 432 { ((List) (obj3)).set(i2, ((Object) (constructNonDefaultConstructor((com.fasterxml.jackson.databind.util.ClassUtil.Ctor)((List) (obj4)).get(i2), ctor)))); // 204 394:aload 10 // 205 396:iload 5 // 206 398:aload_0 // 207 399:aload 11 // 208 401:iload 5 // 209 403:invokeinterface #83 <Method Object List.get(int)> // 210 408:checkcast #36 <Class com.fasterxml.jackson.databind.util.ClassUtil$Ctor> // 211 411:aload 15 // 212 413:invokevirtual #92 <Method AnnotatedConstructor constructNonDefaultConstructor(com.fasterxml.jackson.databind.util.ClassUtil$Ctor, com.fasterxml.jackson.databind.util.ClassUtil$Ctor)> // 213 416:invokeinterface #96 <Method Object List.set(int, Object)> // 214 421:pop javatype1 = javatype; // 215 422:aload_1 // 216 423:astore 12 obj5 = obj1; // 217 425:aload 9 // 218 427:astore 13 break; // 219 429:goto 441 } i2++; // 220 432:iload 5 // 221 434:iconst_1 // 222 435:iadd // 223 436:istore 5 } while(true); // 224 438:goto 369 } } i1++; // 225 441:iload 4 // 226 443:iconst_1 // 227 444:iadd // 228 445:istore 4 javatype = javatype1; // 229 447:aload 12 // 230 449:astore_1 class1 = ((Class) (obj5)); // 231 450:aload 13 // 232 452:astore_2 } //* 233 453:goto 231 obj1 = ((Object) (javatype)); // 234 456:aload_1 // 235 457:astore 9 } int j1 = ((int) (flag)); // 236 459:iload 6 // 237 461:istore 4 if(obj1 != null) //* 238 463:aload 9 //* 239 465:ifnull 483 { _defaultConstructor = constructDefaultConstructor(((com.fasterxml.jackson.databind.util.ClassUtil.Ctor) (obj1)), ((com.fasterxml.jackson.databind.util.ClassUtil.Ctor) (null))); // 240 468:aload_0 // 241 469:aload_0 // 242 470:aload 9 // 243 472:aconst_null // 244 473:invokevirtual #75 <Method AnnotatedConstructor constructDefaultConstructor(com.fasterxml.jackson.databind.util.ClassUtil$Ctor, com.fasterxml.jackson.databind.util.ClassUtil$Ctor)> // 245 476:putfield #77 <Field AnnotatedConstructor _defaultConstructor> j1 = ((int) (flag)); // 246 479:iload 6 // 247 481:istore 4 } for(; j1 < j; j1++) //* 248 483:iload 4 //* 249 485:iload_3 //* 250 486:icmpge 540 if((AnnotatedConstructor)((List) (obj3)).get(j1) == null) //* 251 489:aload 10 //* 252 491:iload 4 //* 253 493:invokeinterface #83 <Method Object List.get(int)> //* 254 498:checkcast #98 <Class AnnotatedConstructor> //* 255 501:ifnonnull 531 ((List) (obj3)).set(j1, ((Object) (constructNonDefaultConstructor((com.fasterxml.jackson.databind.util.ClassUtil.Ctor)((List) (obj4)).get(j1), ((com.fasterxml.jackson.databind.util.ClassUtil.Ctor) (null)))))); // 256 504:aload 10 // 257 506:iload 4 // 258 508:aload_0 // 259 509:aload 11 // 260 511:iload 4 // 261 513:invokeinterface #83 <Method Object List.get(int)> // 262 518:checkcast #36 <Class com.fasterxml.jackson.databind.util.ClassUtil$Ctor> // 263 521:aconst_null // 264 522:invokevirtual #92 <Method AnnotatedConstructor constructNonDefaultConstructor(com.fasterxml.jackson.databind.util.ClassUtil$Ctor, com.fasterxml.jackson.databind.util.ClassUtil$Ctor)> // 265 525:invokeinterface #96 <Method Object List.set(int, Object)> // 266 530:pop // 267 531:iload 4 // 268 533:iconst_1 // 269 534:iadd // 270 535:istore 4 //* 271 537:goto 483 return ((List) (obj3)); // 272 540:aload 10 // 273 542:areturn } private List _findPotentialFactories(JavaType javatype, Class class1) { Method amethod[] = ClassUtil.getClassMethods(javatype.getRawClass()); // 0 0:aload_1 // 1 1:invokevirtual #28 <Method Class JavaType.getRawClass()> // 2 4:invokestatic #105 <Method Method[] ClassUtil.getClassMethods(Class)> // 3 7:astore 9 int l = amethod.length; // 4 9:aload 9 // 5 11:arraylength // 6 12:istore 4 boolean flag = false; // 7 14:iconst_0 // 8 15:istore 5 javatype = null; // 9 17:aconst_null // 10 18:astore_1 for(int i = 0; i < l; i++) //* 11 19:iconst_0 //* 12 20:istore_3 //* 13 21:iload_3 //* 14 22:iload 4 //* 15 24:icmpge 83 { Method method = amethod[i]; // 16 27:aload 9 // 17 29:iload_3 // 18 30:aaload // 19 31:astore 10 if(!Modifier.isStatic(method.getModifiers())) //* 20 33:aload 10 //* 21 35:invokevirtual #110 <Method int Method.getModifiers()> //* 22 38:invokestatic #116 <Method boolean Modifier.isStatic(int)> //* 23 41:ifne 47 continue; // 24 44:goto 76 Object obj = ((Object) (javatype)); // 25 47:aload_1 // 26 48:astore 8 if(javatype == null) //* 27 50:aload_1 //* 28 51:ifnonnull 63 obj = ((Object) (new ArrayList())); // 29 54:new #50 <Class ArrayList> // 30 57:dup // 31 58:invokespecial #53 <Method void ArrayList()> // 32 61:astore 8 ((List) (obj)).add(((Object) (method))); // 33 63:aload 8 // 34 65:aload 10 // 35 67:invokeinterface #59 <Method boolean List.add(Object)> // 36 72:pop javatype = ((JavaType) (obj)); // 37 73:aload 8 // 38 75:astore_1 } // 39 76:iload_3 // 40 77:iconst_1 // 41 78:iadd // 42 79:istore_3 //* 43 80:goto 21 if(javatype == null) //* 44 83:aload_1 //* 45 84:ifnonnull 91 return Collections.emptyList(); // 46 87:invokestatic #65 <Method List Collections.emptyList()> // 47 90:areturn int i1 = ((List) (javatype)).size(); // 48 91:aload_1 // 49 92:invokeinterface #68 <Method int List.size()> // 50 97:istore 6 ArrayList arraylist = new ArrayList(i1); // 51 99:new #50 <Class ArrayList> // 52 102:dup // 53 103:iload 6 // 54 105:invokespecial #71 <Method void ArrayList(int)> // 55 108:astore 9 for(int j = 0; j < i1; j++) //* 56 110:iconst_0 //* 57 111:istore_3 //* 58 112:iload_3 //* 59 113:iload 6 //* 60 115:icmpge 134 ((List) (arraylist)).add(((Object) (null))); // 61 118:aload 9 // 62 120:aconst_null // 63 121:invokeinterface #59 <Method boolean List.add(Object)> // 64 126:pop // 65 127:iload_3 // 66 128:iconst_1 // 67 129:iadd // 68 130:istore_3 //* 69 131:goto 112 l = ((int) (flag)); // 70 134:iload 5 // 71 136:istore 4 if(class1 != null) //* 72 138:aload_2 //* 73 139:ifnull 333 { Method amethod1[] = ClassUtil.getDeclaredMethods(class1); // 74 142:aload_2 // 75 143:invokestatic #119 <Method Method[] ClassUtil.getDeclaredMethods(Class)> // 76 146:astore 10 int j1 = amethod1.length; // 77 148:aload 10 // 78 150:arraylength // 79 151:istore 7 Object obj1 = null; // 80 153:aconst_null // 81 154:astore 8 int k = 0; // 82 156:iconst_0 // 83 157:istore_3 do { l = ((int) (flag)); // 84 158:iload 5 // 85 160:istore 4 if(k >= j1) break; // 86 162:iload_3 // 87 163:iload 7 // 88 165:icmpge 333 Method method1 = amethod1[k]; // 89 168:aload 10 // 90 170:iload_3 // 91 171:aaload // 92 172:astore 11 if(Modifier.isStatic(method1.getModifiers())) //* 93 174:aload 11 //* 94 176:invokevirtual #110 <Method int Method.getModifiers()> //* 95 179:invokestatic #116 <Method boolean Modifier.isStatic(int)> //* 96 182:ifne 188 //* 97 185:goto 326 { class1 = ((Class) (obj1)); // 98 188:aload 8 // 99 190:astore_2 if(obj1 == null) //* 100 191:aload 8 //* 101 193:ifnonnull 248 { obj1 = ((Object) (new MemberKey[i1])); // 102 196:iload 6 // 103 198:anewarray MemberKey[] // 104 201:astore 8 l = 0; // 105 203:iconst_0 // 106 204:istore 4 do { class1 = ((Class) (obj1)); // 107 206:aload 8 // 108 208:astore_2 if(l >= i1) break; // 109 209:iload 4 // 110 211:iload 6 // 111 213:icmpge 248 obj1[l] = new MemberKey((Method)((List) (javatype)).get(l)); // 112 216:aload 8 // 113 218:iload 4 // 114 220:new #79 <Class MemberKey> // 115 223:dup // 116 224:aload_1 // 117 225:iload 4 // 118 227:invokeinterface #83 <Method Object List.get(int)> // 119 232:checkcast #107 <Class Method> // 120 235:invokespecial #122 <Method void MemberKey(Method)> // 121 238:aastore l++; // 122 239:iload 4 // 123 241:iconst_1 // 124 242:iadd // 125 243:istore 4 } while(true); // 126 245:goto 206 } MemberKey memberkey = new MemberKey(method1); // 127 248:new #79 <Class MemberKey> // 128 251:dup // 129 252:aload 11 // 130 254:invokespecial #122 <Method void MemberKey(Method)> // 131 257:astore 12 l = 0; // 132 259:iconst_0 // 133 260:istore 4 do { obj1 = ((Object) (class1)); // 134 262:aload_2 // 135 263:astore 8 if(l >= i1) break; // 136 265:iload 4 // 137 267:iload 6 // 138 269:icmpge 326 if(memberkey.equals(((Object) (class1[l])))) //* 139 272:aload 12 //* 140 274:aload_2 //* 141 275:iload 4 //* 142 277:aaload //* 143 278:invokevirtual #89 <Method boolean MemberKey.equals(Object)> //* 144 281:ifeq 317 { ((List) (arraylist)).set(l, ((Object) (constructFactoryCreator((Method)((List) (javatype)).get(l), method1)))); // 145 284:aload 9 // 146 286:iload 4 // 147 288:aload_0 // 148 289:aload_1 // 149 290:iload 4 // 150 292:invokeinterface #83 <Method Object List.get(int)> // 151 297:checkcast #107 <Class Method> // 152 300:aload 11 // 153 302:invokevirtual #126 <Method AnnotatedMethod constructFactoryCreator(Method, Method)> // 154 305:invokeinterface #96 <Method Object List.set(int, Object)> // 155 310:pop obj1 = ((Object) (class1)); // 156 311:aload_2 // 157 312:astore 8 break; // 158 314:goto 326 } l++; // 159 317:iload 4 // 160 319:iconst_1 // 161 320:iadd // 162 321:istore 4 } while(true); // 163 323:goto 262 } k++; // 164 326:iload_3 // 165 327:iconst_1 // 166 328:iadd // 167 329:istore_3 } while(true); // 168 330:goto 158 } for(; l < i1; l++) //* 169 333:iload 4 //* 170 335:iload 6 //* 171 337:icmpge 390 if((AnnotatedMethod)((List) (arraylist)).get(l) == null) //* 172 340:aload 9 //* 173 342:iload 4 //* 174 344:invokeinterface #83 <Method Object List.get(int)> //* 175 349:checkcast #128 <Class AnnotatedMethod> //* 176 352:ifnonnull 381 ((List) (arraylist)).set(l, ((Object) (constructFactoryCreator((Method)((List) (javatype)).get(l), ((Method) (null)))))); // 177 355:aload 9 // 178 357:iload 4 // 179 359:aload_0 // 180 360:aload_1 // 181 361:iload 4 // 182 363:invokeinterface #83 <Method Object List.get(int)> // 183 368:checkcast #107 <Class Method> // 184 371:aconst_null // 185 372:invokevirtual #126 <Method AnnotatedMethod constructFactoryCreator(Method, Method)> // 186 375:invokeinterface #96 <Method Object List.set(int, Object)> // 187 380:pop // 188 381:iload 4 // 189 383:iconst_1 // 190 384:iadd // 191 385:istore 4 //* 192 387:goto 333 return ((List) (arraylist)); // 193 390:aload 9 // 194 392:areturn } private AnnotationMap collectAnnotations(com.fasterxml.jackson.databind.util.ClassUtil.Ctor ctor, com.fasterxml.jackson.databind.util.ClassUtil.Ctor ctor1) { AnnotationCollector annotationcollector = collectAnnotations(ctor.getConstructor().getDeclaredAnnotations()); // 0 0:aload_0 // 1 1:aload_1 // 2 2:invokevirtual #40 <Method Constructor com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getConstructor()> // 3 5:invokevirtual #137 <Method Annotation[] Constructor.getDeclaredAnnotations()> // 4 8:invokevirtual #140 <Method AnnotationCollector collectAnnotations(Annotation[])> // 5 11:astore_3 ctor = ((com.fasterxml.jackson.databind.util.ClassUtil.Ctor) (annotationcollector)); // 6 12:aload_3 // 7 13:astore_1 if(ctor1 != null) //* 8 14:aload_2 //* 9 15:ifnull 31 ctor = ((com.fasterxml.jackson.databind.util.ClassUtil.Ctor) (collectAnnotations(annotationcollector, ctor1.getConstructor().getDeclaredAnnotations()))); // 10 18:aload_0 // 11 19:aload_3 // 12 20:aload_2 // 13 21:invokevirtual #40 <Method Constructor com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getConstructor()> // 14 24:invokevirtual #137 <Method Annotation[] Constructor.getDeclaredAnnotations()> // 15 27:invokevirtual #143 <Method AnnotationCollector collectAnnotations(AnnotationCollector, Annotation[])> // 16 30:astore_1 return ((AnnotationCollector) (ctor)).asAnnotationMap(); // 17 31:aload_1 // 18 32:invokevirtual #149 <Method AnnotationMap AnnotationCollector.asAnnotationMap()> // 19 35:areturn } private final AnnotationMap collectAnnotations(AnnotatedElement annotatedelement, AnnotatedElement annotatedelement1) { AnnotationCollector annotationcollector = collectAnnotations(annotatedelement.getDeclaredAnnotations()); // 0 0:aload_0 // 1 1:aload_1 // 2 2:invokeinterface #153 <Method Annotation[] AnnotatedElement.getDeclaredAnnotations()> // 3 7:invokevirtual #140 <Method AnnotationCollector collectAnnotations(Annotation[])> // 4 10:astore_3 annotatedelement = ((AnnotatedElement) (annotationcollector)); // 5 11:aload_3 // 6 12:astore_1 if(annotatedelement1 != null) //* 7 13:aload_2 //* 8 14:ifnull 29 annotatedelement = ((AnnotatedElement) (collectAnnotations(annotationcollector, annotatedelement1.getDeclaredAnnotations()))); // 9 17:aload_0 // 10 18:aload_3 // 11 19:aload_2 // 12 20:invokeinterface #153 <Method Annotation[] AnnotatedElement.getDeclaredAnnotations()> // 13 25:invokevirtual #143 <Method AnnotationCollector collectAnnotations(AnnotationCollector, Annotation[])> // 14 28:astore_1 return ((AnnotationCollector) (annotatedelement)).asAnnotationMap(); // 15 29:aload_1 // 16 30:invokevirtual #149 <Method AnnotationMap AnnotationCollector.asAnnotationMap()> // 17 33:areturn } private AnnotationMap[] collectAnnotations(Annotation aannotation[][], Annotation aannotation1[][]) { int j = aannotation.length; // 0 0:aload_1 // 1 1:arraylength // 2 2:istore 4 AnnotationMap aannotationmap[] = new AnnotationMap[j]; // 3 4:iload 4 // 4 6:anewarray AnnotationMap[] // 5 9:astore 7 for(int i = 0; i < j; i++) //* 6 11:iconst_0 //* 7 12:istore_3 //* 8 13:iload_3 //* 9 14:iload 4 //* 10 16:icmpge 66 { AnnotationCollector annotationcollector1 = collectAnnotations(AnnotationCollector.emptyCollector(), aannotation[i]); // 11 19:aload_0 // 12 20:invokestatic #160 <Method AnnotationCollector AnnotationCollector.emptyCollector()> // 13 23:aload_1 // 14 24:iload_3 // 15 25:aaload // 16 26:invokevirtual #143 <Method AnnotationCollector collectAnnotations(AnnotationCollector, Annotation[])> // 17 29:astore 6 AnnotationCollector annotationcollector = annotationcollector1; // 18 31:aload 6 // 19 33:astore 5 if(aannotation1 != null) //* 20 35:aload_2 //* 21 36:ifnull 50 annotationcollector = collectAnnotations(annotationcollector1, aannotation1[i]); // 22 39:aload_0 // 23 40:aload 6 // 24 42:aload_2 // 25 43:iload_3 // 26 44:aaload // 27 45:invokevirtual #143 <Method AnnotationCollector collectAnnotations(AnnotationCollector, Annotation[])> // 28 48:astore 5 aannotationmap[i] = annotationcollector.asAnnotationMap(); // 29 50:aload 7 // 30 52:iload_3 // 31 53:aload 5 // 32 55:invokevirtual #149 <Method AnnotationMap AnnotationCollector.asAnnotationMap()> // 33 58:aastore } // 34 59:iload_3 // 35 60:iconst_1 // 36 61:iadd // 37 62:istore_3 //* 38 63:goto 13 return aannotationmap; // 39 66:aload 7 // 40 68:areturn } public static AnnotatedClass.Creators collectCreators(AnnotationIntrospector annotationintrospector, TypeResolutionContext typeresolutioncontext, JavaType javatype, Class class1) { return (new AnnotatedCreatorCollector(annotationintrospector, typeresolutioncontext)).collect(javatype, class1); // 0 0:new #2 <Class AnnotatedCreatorCollector> // 1 3:dup // 2 4:aload_0 // 3 5:aload_1 // 4 6:invokespecial #164 <Method void AnnotatedCreatorCollector(AnnotationIntrospector, TypeResolutionContext)> // 5 9:aload_2 // 6 10:aload_3 // 7 11:invokevirtual #168 <Method AnnotatedClass$Creators collect(JavaType, Class)> // 8 14:areturn } private static boolean isIncludableConstructor(Constructor constructor) { return constructor.isSynthetic() ^ true; // 0 0:aload_0 // 1 1:invokevirtual #172 <Method boolean Constructor.isSynthetic()> // 2 4:iconst_1 // 3 5:ixor // 4 6:ireturn } AnnotatedClass.Creators collect(JavaType javatype, Class class1) { List list = _findPotentialConstructors(javatype, class1); // 0 0:aload_0 // 1 1:aload_1 // 2 2:aload_2 // 3 3:invokespecial #175 <Method List _findPotentialConstructors(JavaType, Class)> // 4 6:astore 5 javatype = ((JavaType) (_findPotentialFactories(javatype, class1))); // 5 8:aload_0 // 6 9:aload_1 // 7 10:aload_2 // 8 11:invokespecial #177 <Method List _findPotentialFactories(JavaType, Class)> // 9 14:astore_1 if(_intr != null) //* 10 15:aload_0 //* 11 16:getfield #181 <Field AnnotationIntrospector _intr> //* 12 19:ifnull 163 { if(_defaultConstructor != null && _intr.hasIgnoreMarker(((AnnotatedMember) (_defaultConstructor)))) //* 13 22:aload_0 //* 14 23:getfield #77 <Field AnnotatedConstructor _defaultConstructor> //* 15 26:ifnull 48 //* 16 29:aload_0 //* 17 30:getfield #181 <Field AnnotationIntrospector _intr> //* 18 33:aload_0 //* 19 34:getfield #77 <Field AnnotatedConstructor _defaultConstructor> //* 20 37:invokevirtual #187 <Method boolean AnnotationIntrospector.hasIgnoreMarker(AnnotatedMember)> //* 21 40:ifeq 48 _defaultConstructor = null; // 22 43:aload_0 // 23 44:aconst_null // 24 45:putfield #77 <Field AnnotatedConstructor _defaultConstructor> int i = list.size(); // 25 48:aload 5 // 26 50:invokeinterface #68 <Method int List.size()> // 27 55:istore_3 do { int j = i - 1; // 28 56:iload_3 // 29 57:iconst_1 // 30 58:isub // 31 59:istore 4 if(j < 0) break; // 32 61:iload 4 // 33 63:iflt 107 i = j; // 34 66:iload 4 // 35 68:istore_3 if(_intr.hasIgnoreMarker((AnnotatedMember)list.get(j))) //* 36 69:aload_0 //* 37 70:getfield #181 <Field AnnotationIntrospector _intr> //* 38 73:aload 5 //* 39 75:iload 4 //* 40 77:invokeinterface #83 <Method Object List.get(int)> //* 41 82:checkcast #189 <Class AnnotatedMember> //* 42 85:invokevirtual #187 <Method boolean AnnotationIntrospector.hasIgnoreMarker(AnnotatedMember)> //* 43 88:ifeq 56 { list.remove(j); // 44 91:aload 5 // 45 93:iload 4 // 46 95:invokeinterface #192 <Method Object List.remove(int)> // 47 100:pop i = j; // 48 101:iload 4 // 49 103:istore_3 } } while(true); // 50 104:goto 56 i = ((List) (javatype)).size(); // 51 107:aload_1 // 52 108:invokeinterface #68 <Method int List.size()> // 53 113:istore_3 do { int k = i - 1; // 54 114:iload_3 // 55 115:iconst_1 // 56 116:isub // 57 117:istore 4 if(k < 0) break; // 58 119:iload 4 // 59 121:iflt 163 i = k; // 60 124:iload 4 // 61 126:istore_3 if(_intr.hasIgnoreMarker((AnnotatedMember)((List) (javatype)).get(k))) //* 62 127:aload_0 //* 63 128:getfield #181 <Field AnnotationIntrospector _intr> //* 64 131:aload_1 //* 65 132:iload 4 //* 66 134:invokeinterface #83 <Method Object List.get(int)> //* 67 139:checkcast #189 <Class AnnotatedMember> //* 68 142:invokevirtual #187 <Method boolean AnnotationIntrospector.hasIgnoreMarker(AnnotatedMember)> //* 69 145:ifeq 114 { ((List) (javatype)).remove(k); // 70 148:aload_1 // 71 149:iload 4 // 72 151:invokeinterface #192 <Method Object List.remove(int)> // 73 156:pop i = k; // 74 157:iload 4 // 75 159:istore_3 } } while(true); // 76 160:goto 114 } return new AnnotatedClass.Creators(_defaultConstructor, list, ((List) (javatype))); // 77 163:new #194 <Class AnnotatedClass$Creators> // 78 166:dup // 79 167:aload_0 // 80 168:getfield #77 <Field AnnotatedConstructor _defaultConstructor> // 81 171:aload 5 // 82 173:aload_1 // 83 174:invokespecial #197 <Method void AnnotatedClass$Creators(AnnotatedConstructor, List, List)> // 84 177:areturn } protected AnnotatedConstructor constructDefaultConstructor(com.fasterxml.jackson.databind.util.ClassUtil.Ctor ctor, com.fasterxml.jackson.databind.util.ClassUtil.Ctor ctor1) { if(_intr == null) //* 0 0:aload_0 //* 1 1:getfield #181 <Field AnnotationIntrospector _intr> //* 2 4:ifnonnull 29 return new AnnotatedConstructor(_typeContext, ctor.getConstructor(), _emptyAnnotationMap(), NO_ANNOTATION_MAPS); // 3 7:new #98 <Class AnnotatedConstructor> // 4 10:dup // 5 11:aload_0 // 6 12:getfield #15 <Field TypeResolutionContext _typeContext> // 7 15:aload_1 // 8 16:invokevirtual #40 <Method Constructor com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getConstructor()> // 9 19:invokestatic #201 <Method AnnotationMap _emptyAnnotationMap()> // 10 22:getstatic #205 <Field AnnotationMap[] NO_ANNOTATION_MAPS> // 11 25:invokespecial #208 <Method void AnnotatedConstructor(TypeResolutionContext, Constructor, AnnotationMap, AnnotationMap[])> // 12 28:areturn TypeResolutionContext typeresolutioncontext = _typeContext; // 13 29:aload_0 // 14 30:getfield #15 <Field TypeResolutionContext _typeContext> // 15 33:astore_3 Constructor constructor = ctor.getConstructor(); // 16 34:aload_1 // 17 35:invokevirtual #40 <Method Constructor com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getConstructor()> // 18 38:astore 4 AnnotationMap annotationmap = collectAnnotations(ctor, ctor1); // 19 40:aload_0 // 20 41:aload_1 // 21 42:aload_2 // 22 43:invokespecial #210 <Method AnnotationMap collectAnnotations(com.fasterxml.jackson.databind.util.ClassUtil$Ctor, com.fasterxml.jackson.databind.util.ClassUtil$Ctor)> // 23 46:astore 5 Annotation aannotation[][] = ctor.getConstructor().getParameterAnnotations(); // 24 48:aload_1 // 25 49:invokevirtual #40 <Method Constructor com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getConstructor()> // 26 52:invokevirtual #214 <Method Annotation[][] Constructor.getParameterAnnotations()> // 27 55:astore 6 if(ctor1 == null) //* 28 57:aload_2 //* 29 58:ifnonnull 69 ctor = ((com.fasterxml.jackson.databind.util.ClassUtil.Ctor) ((Annotation[][])null)); // 30 61:aconst_null // 31 62:checkcast #216 <Class Annotation[][]> // 32 65:astore_1 else //* 33 66:goto 77 ctor = ((com.fasterxml.jackson.databind.util.ClassUtil.Ctor) (ctor1.getConstructor().getParameterAnnotations())); // 34 69:aload_2 // 35 70:invokevirtual #40 <Method Constructor com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getConstructor()> // 36 73:invokevirtual #214 <Method Annotation[][] Constructor.getParameterAnnotations()> // 37 76:astore_1 return new AnnotatedConstructor(typeresolutioncontext, constructor, annotationmap, collectAnnotations(aannotation, ((Annotation [][]) (ctor)))); // 38 77:new #98 <Class AnnotatedConstructor> // 39 80:dup // 40 81:aload_3 // 41 82:aload 4 // 42 84:aload 5 // 43 86:aload_0 // 44 87:aload 6 // 45 89:aload_1 // 46 90:invokespecial #218 <Method AnnotationMap[] collectAnnotations(Annotation[][], Annotation[][])> // 47 93:invokespecial #208 <Method void AnnotatedConstructor(TypeResolutionContext, Constructor, AnnotationMap, AnnotationMap[])> // 48 96:areturn } protected AnnotatedMethod constructFactoryCreator(Method method, Method method1) { int i = method.getParameterTypes().length; // 0 0:aload_1 // 1 1:invokevirtual #222 <Method Class[] Method.getParameterTypes()> // 2 4:arraylength // 3 5:istore_3 if(_intr == null) //* 4 6:aload_0 //* 5 7:getfield #181 <Field AnnotationIntrospector _intr> //* 6 10:ifnonnull 33 return new AnnotatedMethod(_typeContext, method, _emptyAnnotationMap(), _emptyAnnotationMaps(i)); // 7 13:new #128 <Class AnnotatedMethod> // 8 16:dup // 9 17:aload_0 // 10 18:getfield #15 <Field TypeResolutionContext _typeContext> // 11 21:aload_1 // 12 22:invokestatic #201 <Method AnnotationMap _emptyAnnotationMap()> // 13 25:iload_3 // 14 26:invokestatic #226 <Method AnnotationMap[] _emptyAnnotationMaps(int)> // 15 29:invokespecial #229 <Method void AnnotatedMethod(TypeResolutionContext, Method, AnnotationMap, AnnotationMap[])> // 16 32:areturn if(i == 0) //* 17 33:iload_3 //* 18 34:ifne 59 return new AnnotatedMethod(_typeContext, method, collectAnnotations(((AnnotatedElement) (method)), ((AnnotatedElement) (method1))), NO_ANNOTATION_MAPS); // 19 37:new #128 <Class AnnotatedMethod> // 20 40:dup // 21 41:aload_0 // 22 42:getfield #15 <Field TypeResolutionContext _typeContext> // 23 45:aload_1 // 24 46:aload_0 // 25 47:aload_1 // 26 48:aload_2 // 27 49:invokespecial #231 <Method AnnotationMap collectAnnotations(AnnotatedElement, AnnotatedElement)> // 28 52:getstatic #205 <Field AnnotationMap[] NO_ANNOTATION_MAPS> // 29 55:invokespecial #229 <Method void AnnotatedMethod(TypeResolutionContext, Method, AnnotationMap, AnnotationMap[])> // 30 58:areturn TypeResolutionContext typeresolutioncontext = _typeContext; // 31 59:aload_0 // 32 60:getfield #15 <Field TypeResolutionContext _typeContext> // 33 63:astore 4 AnnotationMap annotationmap = collectAnnotations(((AnnotatedElement) (method)), ((AnnotatedElement) (method1))); // 34 65:aload_0 // 35 66:aload_1 // 36 67:aload_2 // 37 68:invokespecial #231 <Method AnnotationMap collectAnnotations(AnnotatedElement, AnnotatedElement)> // 38 71:astore 5 Annotation aannotation[][] = method.getParameterAnnotations(); // 39 73:aload_1 // 40 74:invokevirtual #232 <Method Annotation[][] Method.getParameterAnnotations()> // 41 77:astore 6 if(method1 == null) //* 42 79:aload_2 //* 43 80:ifnonnull 91 method1 = ((Method) ((Annotation[][])null)); // 44 83:aconst_null // 45 84:checkcast #216 <Class Annotation[][]> // 46 87:astore_2 else //* 47 88:goto 96 method1 = ((Method) (method1.getParameterAnnotations())); // 48 91:aload_2 // 49 92:invokevirtual #232 <Method Annotation[][] Method.getParameterAnnotations()> // 50 95:astore_2 return new AnnotatedMethod(typeresolutioncontext, method, annotationmap, collectAnnotations(aannotation, ((Annotation [][]) (method1)))); // 51 96:new #128 <Class AnnotatedMethod> // 52 99:dup // 53 100:aload 4 // 54 102:aload_1 // 55 103:aload 5 // 56 105:aload_0 // 57 106:aload 6 // 58 108:aload_2 // 59 109:invokespecial #218 <Method AnnotationMap[] collectAnnotations(Annotation[][], Annotation[][])> // 60 112:invokespecial #229 <Method void AnnotatedMethod(TypeResolutionContext, Method, AnnotationMap, AnnotationMap[])> // 61 115:areturn } protected AnnotatedConstructor constructNonDefaultConstructor(com.fasterxml.jackson.databind.util.ClassUtil.Ctor ctor, com.fasterxml.jackson.databind.util.ClassUtil.Ctor ctor1) { int i = ctor.getParamCount(); // 0 0:aload_1 // 1 1:invokevirtual #48 <Method int com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getParamCount()> // 2 4:istore_3 if(_intr == null) //* 3 5:aload_0 //* 4 6:getfield #181 <Field AnnotationIntrospector _intr> //* 5 9:ifnonnull 35 return new AnnotatedConstructor(_typeContext, ctor.getConstructor(), _emptyAnnotationMap(), _emptyAnnotationMaps(i)); // 6 12:new #98 <Class AnnotatedConstructor> // 7 15:dup // 8 16:aload_0 // 9 17:getfield #15 <Field TypeResolutionContext _typeContext> // 10 20:aload_1 // 11 21:invokevirtual #40 <Method Constructor com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getConstructor()> // 12 24:invokestatic #201 <Method AnnotationMap _emptyAnnotationMap()> // 13 27:iload_3 // 14 28:invokestatic #226 <Method AnnotationMap[] _emptyAnnotationMaps(int)> // 15 31:invokespecial #208 <Method void AnnotatedConstructor(TypeResolutionContext, Constructor, AnnotationMap, AnnotationMap[])> // 16 34:areturn if(i == 0) //* 17 35:iload_3 //* 18 36:ifne 64 return new AnnotatedConstructor(_typeContext, ctor.getConstructor(), collectAnnotations(ctor, ctor1), NO_ANNOTATION_MAPS); // 19 39:new #98 <Class AnnotatedConstructor> // 20 42:dup // 21 43:aload_0 // 22 44:getfield #15 <Field TypeResolutionContext _typeContext> // 23 47:aload_1 // 24 48:invokevirtual #40 <Method Constructor com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getConstructor()> // 25 51:aload_0 // 26 52:aload_1 // 27 53:aload_2 // 28 54:invokespecial #210 <Method AnnotationMap collectAnnotations(com.fasterxml.jackson.databind.util.ClassUtil$Ctor, com.fasterxml.jackson.databind.util.ClassUtil$Ctor)> // 29 57:getstatic #205 <Field AnnotationMap[] NO_ANNOTATION_MAPS> // 30 60:invokespecial #208 <Method void AnnotatedConstructor(TypeResolutionContext, Constructor, AnnotationMap, AnnotationMap[])> // 31 63:areturn Annotation aannotation[][] = ctor.getParameterAnnotations(); // 32 64:aload_1 // 33 65:invokevirtual #233 <Method Annotation[][] com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getParameterAnnotations()> // 34 68:astore 6 int j = aannotation.length; // 35 70:aload 6 // 36 72:arraylength // 37 73:istore 4 AnnotationMap aannotationmap[] = null; // 38 75:aconst_null // 39 76:astore 5 if(i != j) //* 40 78:iload_3 //* 41 79:iload 4 //* 42 81:icmpeq 273 { Object obj = ((Object) (ctor.getDeclaringClass())); // 43 84:aload_1 // 44 85:invokevirtual #236 <Method Class com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getDeclaringClass()> // 45 88:astore 7 if(((Class) (obj)).isEnum() && i == aannotation.length + 2) //* 46 90:aload 7 //* 47 92:invokevirtual #241 <Method boolean Class.isEnum()> //* 48 95:ifeq 152 //* 49 98:iload_3 //* 50 99:aload 6 //* 51 101:arraylength //* 52 102:iconst_2 //* 53 103:iadd //* 54 104:icmpne 152 { aannotationmap = ((AnnotationMap []) (new Annotation[aannotation.length + 2][])); // 55 107:aload 6 // 56 109:arraylength // 57 110:iconst_2 // 58 111:iadd // 59 112:anewarray Annotation[][] // 60 115:astore 5 System.arraycopy(((Object) (aannotation)), 0, ((Object) (aannotationmap)), 2, aannotation.length); // 61 117:aload 6 // 62 119:iconst_0 // 63 120:aload 5 // 64 122:iconst_2 // 65 123:aload 6 // 66 125:arraylength // 67 126:invokestatic #249 <Method void System.arraycopy(Object, int, Object, int, int)> obj = ((Object) (collectAnnotations(((Annotation [][]) (aannotationmap)), (Annotation[][])null))); // 68 129:aload_0 // 69 130:aload 5 // 70 132:aconst_null // 71 133:checkcast #216 <Class Annotation[][]> // 72 136:invokespecial #218 <Method AnnotationMap[] collectAnnotations(Annotation[][], Annotation[][])> // 73 139:astore 7 aannotation = ((Annotation [][]) (aannotationmap)); // 74 141:aload 5 // 75 143:astore 6 aannotationmap = ((AnnotationMap []) (obj)); // 76 145:aload 7 // 77 147:astore 5 } else //* 78 149:goto 221 if(((Class) (obj)).isMemberClass() && i == aannotation.length + 1) //* 79 152:aload 7 //* 80 154:invokevirtual #252 <Method boolean Class.isMemberClass()> //* 81 157:ifeq 221 //* 82 160:iload_3 //* 83 161:aload 6 //* 84 163:arraylength //* 85 164:iconst_1 //* 86 165:iadd //* 87 166:icmpne 221 { aannotationmap = ((AnnotationMap []) (new Annotation[aannotation.length + 1][])); // 88 169:aload 6 // 89 171:arraylength // 90 172:iconst_1 // 91 173:iadd // 92 174:anewarray Annotation[][] // 93 177:astore 5 System.arraycopy(((Object) (aannotation)), 0, ((Object) (aannotationmap)), 1, aannotation.length); // 94 179:aload 6 // 95 181:iconst_0 // 96 182:aload 5 // 97 184:iconst_1 // 98 185:aload 6 // 99 187:arraylength // 100 188:invokestatic #249 <Method void System.arraycopy(Object, int, Object, int, int)> aannotationmap[0] = NO_ANNOTATIONS; // 101 191:aload 5 // 102 193:iconst_0 // 103 194:getstatic #255 <Field Annotation[] NO_ANNOTATIONS> // 104 197:aastore AnnotationMap aannotationmap1[] = collectAnnotations(((Annotation [][]) (aannotationmap)), (Annotation[][])null); // 105 198:aload_0 // 106 199:aload 5 // 107 201:aconst_null // 108 202:checkcast #216 <Class Annotation[][]> // 109 205:invokespecial #218 <Method AnnotationMap[] collectAnnotations(Annotation[][], Annotation[][])> // 110 208:astore 7 aannotation = ((Annotation [][]) (aannotationmap)); // 111 210:aload 5 // 112 212:astore 6 aannotationmap = aannotationmap1; // 113 214:aload 7 // 114 216:astore 5 } //* 115 218:goto 221 if(aannotationmap == null) //* 116 221:aload 5 //* 117 223:ifnull 229 //* 118 226:goto 302 throw new IllegalStateException(String.format("Internal error: constructor for %s has mismatch: %d parameters; %d sets of annotations", new Object[] { ctor.getDeclaringClass().getName(), Integer.valueOf(i), Integer.valueOf(aannotation.length) })); // 119 229:new #257 <Class IllegalStateException> // 120 232:dup // 121 233:ldc2 #259 <String "Internal error: constructor for %s has mismatch: %d parameters; %d sets of annotations"> // 122 236:iconst_3 // 123 237:anewarray Object[] // 124 240:dup // 125 241:iconst_0 // 126 242:aload_1 // 127 243:invokevirtual #236 <Method Class com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getDeclaringClass()> // 128 246:invokevirtual #265 <Method String Class.getName()> // 129 249:aastore // 130 250:dup // 131 251:iconst_1 // 132 252:iload_3 // 133 253:invokestatic #271 <Method Integer Integer.valueOf(int)> // 134 256:aastore // 135 257:dup // 136 258:iconst_2 // 137 259:aload 6 // 138 261:arraylength // 139 262:invokestatic #271 <Method Integer Integer.valueOf(int)> // 140 265:aastore // 141 266:invokestatic #277 <Method String String.format(String, Object[])> // 142 269:invokespecial #280 <Method void IllegalStateException(String)> // 143 272:athrow } else { if(ctor1 == null) //* 144 273:aload_2 //* 145 274:ifnonnull 286 aannotationmap = ((AnnotationMap []) ((Annotation[][])null)); // 146 277:aconst_null // 147 278:checkcast #216 <Class Annotation[][]> // 148 281:astore 5 else //* 149 283:goto 292 aannotationmap = ((AnnotationMap []) (ctor1.getParameterAnnotations())); // 150 286:aload_2 // 151 287:invokevirtual #233 <Method Annotation[][] com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getParameterAnnotations()> // 152 290:astore 5 aannotationmap = collectAnnotations(aannotation, ((Annotation [][]) (aannotationmap))); // 153 292:aload_0 // 154 293:aload 6 // 155 295:aload 5 // 156 297:invokespecial #218 <Method AnnotationMap[] collectAnnotations(Annotation[][], Annotation[][])> // 157 300:astore 5 } return new AnnotatedConstructor(_typeContext, ctor.getConstructor(), collectAnnotations(ctor, ctor1), aannotationmap); // 158 302:new #98 <Class AnnotatedConstructor> // 159 305:dup // 160 306:aload_0 // 161 307:getfield #15 <Field TypeResolutionContext _typeContext> // 162 310:aload_1 // 163 311:invokevirtual #40 <Method Constructor com.fasterxml.jackson.databind.util.ClassUtil$Ctor.getConstructor()> // 164 314:aload_0 // 165 315:aload_1 // 166 316:aload_2 // 167 317:invokespecial #210 <Method AnnotationMap collectAnnotations(com.fasterxml.jackson.databind.util.ClassUtil$Ctor, com.fasterxml.jackson.databind.util.ClassUtil$Ctor)> // 168 320:aload 5 // 169 322:invokespecial #208 <Method void AnnotatedConstructor(TypeResolutionContext, Constructor, AnnotationMap, AnnotationMap[])> // 170 325:areturn } private AnnotatedConstructor _defaultConstructor; private final TypeResolutionContext _typeContext; }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
743e17485d5520cb9c5b67028fb8ee21e21b1bc8
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
/bin/modules/commerce-services/commerceservices/src/de/hybris/platform/commerceservices/search/solrfacetsearch/provider/impl/SolrFirstVariantCategoryManager.java
20ec5464d50f2d5a6d0b55ecdce626ebb5485819
[]
no_license
jp-developer0/hybrisTrail
82165c5b91352332a3d471b3414faee47bdb6cee
a0208ffee7fee5b7f83dd982e372276492ae83d4
refs/heads/master
2020-12-03T19:53:58.652431
2020-01-02T18:02:34
2020-01-02T18:02:34
231,430,332
0
4
null
2020-08-05T22:46:23
2020-01-02T17:39:15
null
UTF-8
Java
false
false
3,718
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.commerceservices.search.solrfacetsearch.provider.impl; import de.hybris.platform.variants.model.GenericVariantProductModel; import de.hybris.platform.variants.model.VariantValueCategoryModel; import de.hybris.platform.commerceservices.product.data.SolrFirstVariantCategoryEntryData; import de.hybris.platform.servicelayer.i18n.L10NService; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map.Entry; import java.util.SortedMap; import org.springframework.beans.factory.annotation.Required; /** * Class to process {@link de.hybris.platform.commerceservices.product.data.SolrFirstVariantCategoryEntryData} operations. */ public class SolrFirstVariantCategoryManager { protected static final String BEFORE_BEAN = "_SFVC_"; protected static final String FIELD_SEPARATOR = "_:_"; protected static final int TOTAL_FIELDS = 2; private L10NService l10NService; /** * Builds a String to be used in first category name list Solr property. * * @param categoryVariantPairs * Sorted pairs of {@link de.hybris.platform.variants.model.VariantValueCategoryModel} and {@link de.hybris.platform.variants.model.GenericVariantProductModel}.code. * @return String to be used in Solr property. */ public String buildSolrPropertyFromCategoryVariantPairs( final SortedMap<VariantValueCategoryModel, GenericVariantProductModel> categoryVariantPairs) { final StringBuilder builder = new StringBuilder(); if (categoryVariantPairs != null) { for (final Entry<VariantValueCategoryModel, GenericVariantProductModel> entry : categoryVariantPairs.entrySet()) { builder.append(BEFORE_BEAN + localizeForKey(entry.getKey().getName()) + FIELD_SEPARATOR + entry.getValue().getCode()); } } return builder.toString(); } /** * Generate a list of {@link de.hybris.platform.commerceservices.product.data.SolrFirstVariantCategoryEntryData} based on a Solr property String that holds the first * category name list. * * @param solrProperty * The first category name list. * @return List of {@link de.hybris.platform.commerceservices.product.data.SolrFirstVariantCategoryEntryData}; */ public List<SolrFirstVariantCategoryEntryData> buildFirstVariantCategoryListFromSolrProperty(final String solrProperty) { final List<SolrFirstVariantCategoryEntryData> entries = new ArrayList<>(); // Split by beans. Discard first entry in array, as it will be empty final String[] original = solrProperty.split(BEFORE_BEAN); if (original.length > 1) { final String[] propertyEntries = Arrays.copyOfRange(original, 1, original.length); for (final String propertyEntry : propertyEntries) { final String[] tokens = propertyEntry.split(FIELD_SEPARATOR); if (tokens != null && tokens.length == TOTAL_FIELDS) { for (int i = 0; i < tokens.length; i += TOTAL_FIELDS) { final SolrFirstVariantCategoryEntryData entry = new SolrFirstVariantCategoryEntryData(); entry.setCategoryName(tokens[i]); entry.setVariantCode(tokens[i + 1]); entries.add(entry); } } else { throw new IllegalArgumentException("The solrProperty [" + solrProperty + "] should have " + TOTAL_FIELDS + " fields separated by '" + FIELD_SEPARATOR + "'"); } } } return entries; } public String localizeForKey(final String key) { return getL10NService().getLocalizedString(key); } public L10NService getL10NService() { return l10NService; } @Required public void setL10NService(final L10NService l10NService) { this.l10NService = l10NService; } }
[ "juan.gonzalez.working@gmail.com" ]
juan.gonzalez.working@gmail.com
ecd01a12cf17400bfaabc0ffd02dfbebcdf1980c
752769cdbde5709ec894e46509ea26d072f63860
/jsf-utils/src/main/java/com/jsf/utils/sdk/fdfs/service/DefaultAppendFileStorageClient.java
69596f2db5b35f9877c4200634feb582a6dcddee
[ "BSD-3-Clause" ]
permissive
cjg208/JSF
dca375b472d16e2a7cb9ac56e939b63d60cc86cf
693041b6bb6a1b753d3be072c8ee7d879622e6b5
refs/heads/master
2023-01-01T08:39:47.925873
2020-10-27T08:35:08
2020-10-27T08:35:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,909
java
package com.jsf.utils.sdk.fdfs.service; import com.jsf.utils.sdk.fdfs.conn.ConnectionManager; import com.jsf.utils.sdk.fdfs.domain.StorageNode; import com.jsf.utils.sdk.fdfs.domain.StorageNodeInfo; import com.jsf.utils.sdk.fdfs.domain.StorePath; import com.jsf.utils.sdk.fdfs.proto.storage.StorageAppendFileCommand; import com.jsf.utils.sdk.fdfs.proto.storage.StorageModifyCommand; import com.jsf.utils.sdk.fdfs.proto.storage.StorageTruncateCommand; import com.jsf.utils.sdk.fdfs.proto.storage.StorageUploadFileCommand; import java.io.InputStream; /** * 存储服务客户端接口实现 * * @author tobato * */ public class DefaultAppendFileStorageClient extends DefaultGenerateStorageClient implements AppendFileStorageClient { public DefaultAppendFileStorageClient(TrackerClient trackerClient, ConnectionManager connectionManager) { super(trackerClient, connectionManager); } /** * 上传支持断点续传的文件 */ @Override public StorePath uploadAppenderFile(String groupName, InputStream inputStream, long fileSize, String fileExtName) { StorageNode client = trackerClient.getStoreStorage(groupName); StorageUploadFileCommand command = new StorageUploadFileCommand(client.getStoreIndex(), inputStream, fileExtName, fileSize, true); return connectionManager.executeFdfsCmd(client.getInetSocketAddress(), command); } /** * 继续上载文件 */ @Override public void appendFile(String groupName, String path, InputStream inputStream, long fileSize) { StorageNodeInfo client = trackerClient.getUpdateStorage(groupName, path); StorageAppendFileCommand command = new StorageAppendFileCommand(inputStream, fileSize, path); connectionManager.executeFdfsCmd(client.getInetSocketAddress(), command); } /** * 修改文件 */ @Override public void modifyFile(String groupName, String path, InputStream inputStream, long fileSize, long fileOffset) { StorageNodeInfo client = trackerClient.getUpdateStorage(groupName, path); StorageModifyCommand command = new StorageModifyCommand(path, inputStream, fileSize, fileOffset); connectionManager.executeFdfsCmd(client.getInetSocketAddress(), command); } /** * 清除文件 */ @Override public void truncateFile(String groupName, String path, long truncatedFileSize) { StorageNodeInfo client = trackerClient.getUpdateStorage(groupName, path); StorageTruncateCommand command = new StorageTruncateCommand(path, truncatedFileSize); connectionManager.executeFdfsCmd(client.getInetSocketAddress(), command); } /** * 清除文件 */ @Override public void truncateFile(String groupName, String path) { long truncatedFileSize = 0; truncateFile(groupName, path, truncatedFileSize); } }
[ "809573150@qq.com" ]
809573150@qq.com
e4179e63f226adbfded61efba811a6c89b207619
e4d7e3040887b64af97d9a3c7ab906acae7bdd95
/RTS_Source/src/com/rts/pojoclasses/AssetsThreatsVuln.java
9003866d56c671f52dba8418a40ea94577eb87fe
[]
no_license
TanujKumar29/Risk-Treatment-System
57b08ea5a49e829b2e74bfe356f0580e1fe8ddc2
82d030229648b3387e69ccea3258d1a5ceede69f
refs/heads/master
2021-01-10T15:11:30.938574
2016-04-08T01:55:30
2016-04-08T01:55:30
55,741,709
0
0
null
null
null
null
UTF-8
Java
false
false
1,444
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.rts.pojoclasses; /** * * @author gosavpus */ public class AssetsThreatsVuln { private int assetsThreatsVulnId; private Assets assets; private Threats threats; private Vulnarabilities vulnerabilities; public AssetsThreatsVuln(){ this.assets=new Assets(); this.threats=new Threats(); this.vulnerabilities=new Vulnarabilities(); } public Assets getAssets() { return assets; } public void setAssets(Assets assets) { this.assets = assets; } public int getAssetsThreatsVulnId() { return assetsThreatsVulnId; } public void setAssetsThreatsVulnId(int assetsThreatsVulnId) { this.assetsThreatsVulnId = assetsThreatsVulnId; } public Threats getThreats() { return threats; } public void setThreats(Threats threats) { this.threats = threats; } public Vulnarabilities getVulnerabilities() { return vulnerabilities; } public void setVulnerabilities(Vulnarabilities vulnerabilities) { this.vulnerabilities = vulnerabilities; } @Override public String toString() { return "AssetsThreatsVuln{" + "assetsThreatsVulnId=" + assetsThreatsVulnId + "assets=" + assets + "threats=" + threats + "vulnerabilities=" + vulnerabilities + '}'; } }
[ "tanuj49in@gmail.com" ]
tanuj49in@gmail.com
737a6aab708e92c5070e89596bee5d0fe8b89486
4f41000b4f35453a14ae16035fcf9c79385f872a
/src/main/java/com/helmet/application/admin/MgrAccessGroupNewProcess.java
b63ef1d526d19c10c1e3790d9bece64fabb71803
[]
no_license
InfomediaUK/testdb
4e229fc2121ad7e70d1f39d5a4b9e4ae5a237c40
1bf06309e5b0be07025d8c6b6d3675ae540e104e
refs/heads/master
2021-08-18T18:51:35.512500
2017-11-23T14:52:12
2017-11-23T14:52:12
103,923,546
0
0
null
null
null
null
UTF-8
Java
false
false
2,294
java
package com.helmet.application.admin; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionMessages; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.util.MessageResources; import org.apache.struts.validator.DynaValidatorForm; import com.helmet.api.AdminService; import com.helmet.api.ServiceFactory; import com.helmet.api.exceptions.DuplicateDataException; import com.helmet.application.admin.abztract.AdminAction; import com.helmet.bean.MgrAccessGroup; public class MgrAccessGroupNewProcess extends AdminAction { protected transient XLogger logger = XLoggerFactory.getXLogger(getClass()); public ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { DynaValidatorForm dynaForm = (DynaValidatorForm)form; logger.entry("In coming !!!"); MgrAccessGroup mgrAccessGroup = (MgrAccessGroup)dynaForm.get("mgrAccessGroup"); ActionMessages errors = new ActionMessages(); MessageResources messageResources = getResources(request); AdminService adminService = ServiceFactory.getInstance().getAdminService(); try { int rowCount = adminService.insertMgrAccessGroup(mgrAccessGroup, getAdministratorLoggedIn().getAdministratorId()); } catch (DuplicateDataException e) { errors.add("mgrAccessGroup", new ActionMessage("errors.duplicate", messageResources.getMessage("label." + e.getField()))); saveErrors(request, errors); return mapping.getInputForward(); } logger.exit("Out going !!!"); ActionForward actionForward = mapping.findForward("success"); return new ActionForward(actionForward.getName(), actionForward.getPath() + "?mgrAccessGroup.mgrAccessGroupId=" + mgrAccessGroup.getMgrAccessGroupId(), actionForward.getRedirect()); } }
[ "lyndon@infomediauk.net" ]
lyndon@infomediauk.net
cc6ceca9c08beaec7cff7e7c6b755919c3079bdb
56e4cfa167a5772e6f5904c4e8da71c6ea4ed7c8
/app/src/main/java/com/galleriafrique/model/GeneralStatusResponse.java
1a65578b8af2ba60de6aa07fca7fcc4d3bc568af
[]
no_license
anosikeosifo/galleriaafrique
ac1955d34503e333babda6c0786851cc10e139b3
406ea7df2e5525e6066e897d45757cb3246cd8f7
refs/heads/master
2020-04-16T09:17:18.936989
2015-08-26T13:09:59
2015-08-26T13:09:59
41,415,590
0
1
null
null
null
null
UTF-8
Java
false
false
540
java
package com.galleriafrique.model; import com.galleriafrique.util.CommonUtils; /** * Created by osifo on 8/21/15. */ public class GeneralStatusResponse { private boolean success; private String message; public boolean isSuccess() { return success; } public void setSuccess(boolean success) { this.success = success; } public String getMessage() { return CommonUtils.getSafeString(message); } public void setMessage(String message) { this.message = message; } }
[ "appdev.anosikeosifo@gmail.com" ]
appdev.anosikeosifo@gmail.com
4fccbb8615aa8e6873316cef5fbdf6c5e022855f
27ceb9728f25f76150e775845c002e901211c7c7
/Student Grading System/.history/src/Entities/Rubric_20210520011937.java
35dd82c7f561f61cfc8d6f6624f632b8ce2f17b9
[]
no_license
cormacmattimoe/SoftwareQualityAssuranceFinalCa
bd1f4f64fef3396e4dfdfac199d1876311841596
7d4d9e8b9d36b28e77b319d4e5061da93233a442
refs/heads/master
2023-05-06T11:50:58.072870
2021-05-21T09:04:55
2021-05-21T09:04:55
368,800,636
0
0
null
2021-05-21T09:04:56
2021-05-19T08:40:30
Java
UTF-8
Java
false
false
6,355
java
package Entities; import java.util.ArrayList; // Rubric is been described as having a student name // with an list of different criterias public class Rubric { private String rubricName; //Collection to represent Criterions private ArrayList<Criterion> criteria = new ArrayList<>(); //Collection to represent StudentGrades private ArrayList<StudentGrade> studentGrades = new ArrayList<StudentGrade>(); public Rubric() { } public Rubric(String rubricName, ArrayList<Criterion> criteria) { this.rubricName = rubricName; this.criteria = criteria; } public String getRubricName() { return rubricName; } public void setRubricName(String rubricName) { this.rubricName = rubricName; } public ArrayList<Criterion> getCriteria() { return criteria; } public void setCriteria(ArrayList<Criterion> criteria) { this.criteria = criteria; } public void addCriteria(Criterion criteria) { this.criteria.add(criteria); } //Method to return each studentGrades public ArrayList<StudentGrade> getGrades() { return this.studentGrades; } //total+=stu.getResponsesSum(); } //mean calculation double mean = (float)total/this.studentGrades.size(); //absoulute deviations at this point ArrayList<Double> absoultedev = new ArrayList<Double>(); for(StudentGrade sr : this.getResponses()) { //must be absolute value double abs = Math.abs(sr.getResponsesSum() - mean); absoultedev.add(abs); } //absoulute devaiation double totalabs = 0; for(double d:absoultedev) { totalabs+=d; } double aveDev = Math.round((float)totalabs/this.responses.size() * 100.0)/100.0; return aveDev; } public double getStandardDeviation() { //sum of each sum from a surevy response int total = 0; //iterates through each survey response in survey for(surveyResponse sr : this.getResponses()) { total+=sr.getResponsesSum(); } //mean calculation double mean = (float)total/this.responses.size(); //Gathering of the square of each value ArrayList<Double> squares = new ArrayList<Double>(); for(surveyResponse sr : this.getResponses()) { //square the result of each sum minus the sum double square = (sr.getResponsesSum()-mean) *(sr.getResponsesSum()-mean); squares.add(square); } //Total of squares double totalsquaress = 0; for(double d:squares) { totalsquaress+=d; } totalsquaress = totalsquaress/this.responses.size(); //Standard deviation by getting square root of the sum of squares double stanDev = Math.sqrt(totalsquaress); //rounded and returned return Math.round(stanDev* 100.0)/100.0; } public int getMaxium() { //value to represent max int max = 0; //list for all the values from each question ArrayList<Integer> values = new ArrayList<Integer>(); //adding question answer to list for(surveyResponse sr : this.getResponses()) { values.add(sr.getResponsesSum()); } //getting the max value and retunring it max = Collections.max(values); return max; } public int getMinimum() { //value to represent max int max = 0; //list for all the values from each question ArrayList<Integer> values = new ArrayList<Integer>(); //adding question answer to list for(surveyResponse sr : this.getResponses()) { values.add(sr.getResponsesSum()); } //getting the max value and retunring it max = Collections.min(values); return max; } public double averageDeviationQuestion(int index) { //sum of question values int total = 0; for(surveyResponse sr: this.responses) { //adds the values of the questions that have been selected total+= sr.questions.get(index).getAnswer(); } //mean calculation double mean = (float)total/this.responses.size(); //Gathering of absoulute deviations ArrayList<Double> absoultedev = new ArrayList<Double>(); for(surveyResponse sr: this.responses) { double abs = Math.abs(sr.questions.get(index).getAnswer() - mean); absoultedev.add(abs); } //absoulute devaiation double totalabs = 0; for(double d:absoultedev) { totalabs+=d; } //average deviation double aveDev = Math.round((float)totalabs/this.responses.size() * 100.0)/100.0; return Double.valueOf(aveDev); } public double StandardDeviationQuestion(int index) { //sum of question values int total = 0; //Looping through the values to get sum for(surveyResponse sr: this.responses) { //adds the values of the questions that have been selected total+= sr.questions.get(index).getAnswer(); } //mean calculation double mean = (float)total/this.responses.size(); //Gathering of the square of each value ArrayList<Double> squares = new ArrayList<Double>(); for(surveyResponse sr: this.responses) { double square = (sr.questions.get(index).getAnswer()-mean) *(sr.questions.get(index).getAnswer()-mean); squares.add(square); } //Total of squares double totalsquaress = 0; for(double d:squares) { totalsquaress+=d; } totalsquaress = totalsquaress/this.responses.size(); //Standard deviation by getting square root of the sum of squares double stanDev = Math.sqrt(totalsquaress); //rounded and returned return Math.round(stanDev* 100.0)/100.0; } public int getMaxiumQuestion(int index) { //value to represent max int max = 0; //list for all the values from each question ArrayList<Integer> values = new ArrayList<Integer>(); //adding question answer to list for(surveyResponse sr: this.responses) { values.add(sr.questions.get(index).getAnswer()); } //getting the max value and retunring it max = Collections.max(values); return max; } public int getMinimumQuestion(int index) { int min = 0; //value to represent ArrayList<Integer> values = new ArrayList<Integer>(); //list for all the values from each question //adding question answer to list for(surveyResponse sr: this.responses) { values.add(sr.questions.get(index).getAnswer()); } //getting the min value and retunring it min = Collections.min(values); return min; } */ @Override public String toString() { return "Rubric name from rubric class = " + rubricName; } }
[ "cormacmattimoe98@gmail.com" ]
cormacmattimoe98@gmail.com
15c173d9b4607a65c04f79e90eaa1c9fdf8ac4cc
58d9997a806407a09c14aa0b567e57d486b282d4
/com/planet_ink/coffee_mud/MOBS/Skeleton.java
4b83870a948182d6d8679d621cdf68aaed96e2e5
[ "Apache-2.0" ]
permissive
kudos72/DBZCoffeeMud
553bc8619a3542fce710ba43bac01144148fe2ed
19a3a7439fcb0e06e25490e19e795394da1df490
refs/heads/master
2021-01-10T07:57:01.862867
2016-03-17T23:04:25
2016-03-17T23:04:25
39,215,834
0
0
null
null
null
null
UTF-8
Java
false
false
2,315
java
package com.planet_ink.coffee_mud.MOBS; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2001-2014 Bo Zimmerman 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. */ public class Skeleton extends Undead { @Override public String ID(){return "Skeleton";} public Skeleton() { super(); username="a skeleton"; setDescription("A walking pile of bones..."); setDisplayText("a skeleton rattles as it walks."); setMoney(0); basePhyStats.setWeight(30); final Weapon sword=CMClass.getWeapon("Longsword"); if(sword!=null) { sword.wearAt(Wearable.WORN_WIELD); addItem(sword); } basePhyStats().setDamage(5); basePhyStats().setLevel(1); basePhyStats().setArmor(90); basePhyStats().setSpeed(1.0); baseCharStats().setMyRace(CMClass.getRace("Skeleton")); baseCharStats().getMyRace().startRacing(this,false); baseState.setHitPoints(CMLib.dice().roll(basePhyStats().level(),20,basePhyStats().level())); recoverMaxState(); resetToMaxState(); recoverPhyStats(); recoverCharStats(); } }
[ "kirk.narey@gmail.com" ]
kirk.narey@gmail.com
560c736aa2d21cb2b61cf8237e71ce44742506d9
8e37fe8e6557dac1b68c1bde446c09c6f682f578
/SampleWeatherApp/WeatherAdSdk/src/main/java/com/rahul/weatheradsdk/PermissionException.java
20b17f74827142c902cdb9fd8b256951020bddbc
[]
no_license
shadabkhan1988/sample-repo
2067d5703f3b656ed4a120f3bf8ba9ae666f32a3
2edc2ac3d78624173a0961cd0d5d74634ff162ea
refs/heads/master
2021-01-16T23:22:01.466398
2017-02-23T09:42:54
2017-02-23T09:42:54
82,902,092
0
0
null
null
null
null
UTF-8
Java
false
false
202
java
package com.rahul.weatheradsdk; /** * Created by rahul.hooda on 2/20/17. */ public class PermissionException extends Exception { public PermissionException(String s) { super(s); } }
[ "shadab.khan@ShadabKhanMac.local" ]
shadab.khan@ShadabKhanMac.local
9ac8b24d3e84b54a330fc513a588bd6bc0f1d73a
777d41c7dc3c04b17dfcb2c72c1328ea33d74c98
/DongCi_Android/app/src/main/java/com/wmlive/hhvideo/utils/MD5FileUtil.java
20e5de29623370bc279aef981b95d20d0469752e
[]
no_license
foryoung2018/videoedit
00fc132c688be6565efb373cae4564874f61d52a
7a316996ce1be0f08dbf4c4383da2c091447c183
refs/heads/master
2020-04-08T04:56:42.930063
2018-11-25T14:27:43
2018-11-25T14:27:43
159,038,966
2
0
null
null
null
null
UTF-8
Java
false
false
2,539
java
package com.wmlive.hhvideo.utils; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.nio.MappedByteBuffer; import java.nio.channels.FileChannel; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class MD5FileUtil { protected static char hexDigits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; protected static MessageDigest messagedigest = null; static { try { messagedigest = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { KLog.e("MD5FileUtil", "messagedigest初始化失败"); } } public static String getFileMD5String(File file) throws IOException { FileInputStream in = new FileInputStream(file); FileChannel ch = in.getChannel(); MappedByteBuffer byteBuffer = ch.map(FileChannel.MapMode.READ_ONLY, 0, file.length()); messagedigest.update(byteBuffer); return bufferToHex(messagedigest.digest()); } public static String getMD5String(String s) { return getMD5String(s.getBytes()); } public static String getMD5String(byte[] bytes) { messagedigest.update(bytes); return bufferToHex(messagedigest.digest()); } private static String bufferToHex(byte bytes[]) { return bufferToHex(bytes, 0, bytes.length); } private static String bufferToHex(byte bytes[], int m, int n) { StringBuffer stringbuffer = new StringBuffer(2 * n); int k = m + n; for (int l = m; l < k; l++) { appendHexPair(bytes[l], stringbuffer); } return stringbuffer.toString(); } private static void appendHexPair(byte bt, StringBuffer stringbuffer) { char c0 = hexDigits[(bt & 0xf0) >> 4]; char c1 = hexDigits[bt & 0xf]; stringbuffer.append(c0); stringbuffer.append(c1); } public static boolean checkPassword(String password, String md5PwdStr) { String s = getMD5String(password); return s.equals(md5PwdStr); } public static void main(String[] args) throws IOException { long begin = System.currentTimeMillis(); File big = new File("D:\\temp\\jre-7u11-linux-i586.tar.gz"); String md5 = getFileMD5String(big); long end = System.currentTimeMillis(); // System.out.println("md5:" + md5); // System.out.println("time:" + ((end - begin) / 1000) + "s"); } }
[ "1184394624@qq.com" ]
1184394624@qq.com
89a3f542e7e5e262a2a429b5a79b86a22c7fd40c
05caf15bcfd34537c1969c5364d6d6e178ff565d
/src/main/java/com/chaung/kafka/web/rest/vm/ManagedUserVM.java
5d4c8e466115f51f5a505a46a73fbc0d509b0e19
[]
no_license
minhchau110883/kafka-demo
301d8273bd9a453e5962514da942b987ba8dbdad
3940ffd6486ab4ce461f5b794e8755a08c813726
refs/heads/master
2021-06-27T11:50:42.385114
2018-07-20T03:27:01
2018-07-20T03:27:01
141,656,816
0
1
null
2020-09-18T10:02:12
2018-07-20T03:04:33
Java
UTF-8
Java
false
false
838
java
package com.chaung.kafka.web.rest.vm; import com.chaung.kafka.service.dto.UserDTO; import javax.validation.constraints.Size; /** * View Model extending the UserDTO, which is meant to be used in the user management UI. */ public class ManagedUserVM extends UserDTO { public static final int PASSWORD_MIN_LENGTH = 4; public static final int PASSWORD_MAX_LENGTH = 100; @Size(min = PASSWORD_MIN_LENGTH, max = PASSWORD_MAX_LENGTH) private String password; public ManagedUserVM() { // Empty constructor needed for Jackson. } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @Override public String toString() { return "ManagedUserVM{" + "} " + super.toString(); } }
[ "nguyen.min@ascendcorp.com" ]
nguyen.min@ascendcorp.com
62099812a7c6054669918984046b58efce31f71d
a4e2462e2bb26d74181b80e5327f2222e20e5b37
/src/jain/abc.java
b150a4acb584813caab399a3c54b120e52df6d49
[]
no_license
jainaditya91/hospital-database
445003499ecf8db15065f041ebb1e618f5200c11
b8204a28adbc93329e7eaa22f7997cec63da47e7
refs/heads/master
2021-05-12T18:28:51.158993
2018-01-11T08:34:47
2018-01-11T08:34:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
610
java
package jain; import java.sql.*; public class abc { public static void main(String args[]){ try{ Class.forName("org.postgresql.Driver"); Connection con = DriverManager.getConnection ("jdbc:postgresql://cop5725-postgresql.cs.fiu.edu:5432/fall16_ajain018", "fall16_ajain018", "5970907"); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery ("select fname from dbms.patients where pt_id in (1,2,3,4,5,6);"); while( rs.next() ) System.out.println(rs.getString(1)); rs.close(); stmt.close(); con.close(); } catch(Exception e){ System.err.println(e); } } }
[ "jaina@AdityaJain.(none)" ]
jaina@AdityaJain.(none)
ee5db7bc10c888e8b35d7335019de01d91c1fec0
9b261017859f81cc6ae789d194d4674c152888fb
/contentprovide内容提供者/src/main/java/com/itheima/binghua/contentprovide/ActivityContentProvide.java
64db5e5b288fbaf843fd78984ad01b9bcd0127b9
[]
no_license
shaycormac/Android_Studio2
34ac2aa5c1bc3adf888020b7d3ef73ee504a97a5
a4afbf9f39589b4119362dabbc5f56f91f69e4be
refs/heads/master
2021-01-10T03:48:17.816445
2015-12-31T09:06:12
2015-12-31T09:06:12
48,842,508
0
0
null
null
null
null
UTF-8
Java
false
false
347
java
package com.itheima.binghua.contentprovide; import android.app.Activity; import android.os.Bundle; public class ActivityContentProvide extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_content_provide); } }
[ "123@126.com" ]
123@126.com
2126d264dc7ba9b6235f96320c637b44bdb59bd4
83eb761059f61c645e76ddb26d296fb6952758bd
/src/main/java/example/parser/PlusOp.java
8e5598fc5bb528abb38c2d6e22922e809af2c872
[]
no_license
csun-tavlab/language_example_summer20
b669329305a0820e81b710c4149fe72ade64f3cf
7cb37ef14753a450496f6654f37854b074157ff4
refs/heads/master
2022-12-28T19:07:46.621481
2020-06-19T01:20:12
2020-06-19T01:20:12
269,160,134
1
0
null
2020-10-13T22:41:00
2020-06-03T18:07:33
Java
UTF-8
Java
false
false
466
java
package example.parser; public class PlusOp implements Op { @Override public boolean equals(final Object other) { return other instanceof PlusOp; } @Override public int hashCode() { return 0; } @Override public String toString() { return "+"; } public <A, E extends Throwable> A accept(final OpVisitor<A, E> visitor) throws E { return visitor.visitPlusOp(); } // accept } // PlusOp
[ "kyle.dewey@csun.edu" ]
kyle.dewey@csun.edu
17e18979c0230ab5fa57d39184356385689949c6
c404ecab43384cdac156dd986991d25ac82b2363
/app/src/main/java/com/fish/eFish/RegisterActivity.java
848fe0c7b42ec85a979e65bc3bb96dc463cc0af2
[]
no_license
nityanantan23/fish
72310455723076d168d252b4eeb8be23a2a67e07
627ee519cd78f32eda288e975c880843974bfa29
refs/heads/master
2022-09-07T09:28:20.466362
2020-05-20T09:43:14
2020-05-20T09:43:14
255,044,233
1
0
null
null
null
null
UTF-8
Java
false
false
5,382
java
package com.fish.eFish; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.EditText; import android.widget.Toast; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.OnFailureListener; import com.google.android.gms.tasks.OnSuccessListener; import com.google.android.gms.tasks.Task; import com.google.firebase.auth.AuthResult; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseUser; import com.google.firebase.firestore.DocumentReference; import com.google.firebase.firestore.FirebaseFirestore; import java.util.HashMap; import java.util.Map; import java.util.Objects; import es.dmoral.toasty.Toasty; import static com.fish.eFish.camera.CameraActivity.Fish_name; public class RegisterActivity extends AppCompatActivity { EditText e1,e2; FirebaseAuth auth; FirebaseUser firebaseUser; private View view; FirebaseFirestore db = FirebaseFirestore.getInstance(); Map<String, Object> user = new HashMap<>(); private static final String TAG = "fish_detail"; String Doc=""; String email=""; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_register); e1 = (EditText)findViewById(R.id.editText4); e2 = (EditText)findViewById(R.id.editText5); auth= FirebaseAuth.getInstance(); } public void Createuser(View view){ if (e1.getText().toString().isEmpty() || e2.getText().toString().isEmpty()){ Toast.makeText(getApplication(),"its Blank",Toast.LENGTH_SHORT).show(); } else { email = e1.getText().toString(); String password = e2.getText().toString(); Map<String, Object> user = new HashMap<>(); user.put("email", email); user.clear(); auth.createUserWithEmailAndPassword(email,password) .addOnCompleteListener(new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { if (task.isSuccessful()){ Toasty.success(getApplicationContext(),"User created succesfully!",Toast.LENGTH_SHORT).show(); Intent i = new Intent(getApplicationContext(),LoginActivity.class); startActivity(i); db.collection("Fish").document(auth.getUid()).set(user) .addOnSuccessListener(new OnSuccessListener<Void>() { @Override public void onSuccess(Void aVoid) { Toasty.success(getApplicationContext(),"Register success",Toast.LENGTH_SHORT).show(); } }); // // db.collection("Fish") // .add(Objects.requireNonNull(auth.getUid())) // .addOnSuccessListener(new OnSuccessListener<DocumentReference>() { // @Override // public void onSuccess(DocumentReference documentReference) { // Log.d(TAG, "DocumentSnapshot added with ID: " + documentReference.getId()); // //// SharedPreferences sharedPreferences = getSharedPreferences("ok", MODE_PRIVATE); //// SharedPreferences.Editor mEditor = sharedPreferences.edit(); //// mEditor.putString("ID",email); //// mEditor.apply(); // Toasty.success(getApplicationContext(), "Succesfuly added" + Fish_name, Toasty.LENGTH_SHORT).show(); // System.out.println(Doc); // } // }) // .addOnFailureListener(new OnFailureListener() { // @Override // public void onFailure(@NonNull Exception e) { // Log.w(TAG, "Error adding document", e); // // } // }); Toasty.success(getApplicationContext(), "Succesfuly added" + Fish_name, Toasty.LENGTH_SHORT).show(); FirebaseUser user = auth.getCurrentUser(); } else { Toasty.error(getApplicationContext(),"User not created ",Toast.LENGTH_SHORT).show(); } } }); } } }
[ "bnityanantan@gmail.com" ]
bnityanantan@gmail.com
5034eeb082915874978aca4129c796bf4e98862f
f389dc0b3ab76bb8786396bae9806272914abf97
/dockerTest/src/main/java/com/example/demo/repository/CompanyRepository.java
f73fd834907f174c0e97dc7b6c6ff465ecb0cf44
[]
no_license
WenhaoXu/dockerTest
7105f53c6255a0107d4e78778b60c4ba8d2e63e7
d3e15039078a1ce4e2b366a410f2a07a3f333e82
refs/heads/master
2020-03-24T09:54:53.634203
2018-07-28T05:32:33
2018-07-28T05:32:33
142,641,549
0
0
null
null
null
null
UTF-8
Java
false
false
278
java
package com.example.demo.repository; import com.example.demo.entity.Company; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface CompanyRepository extends JpaRepository<Company,Long> { }
[ "1787107003@qq.com" ]
1787107003@qq.com
886f8fb7ea6a128b258e38323289d578065dd860
2beac37c7dc0911140ecc1064410e8d76cb01db9
/src/com/company/lesson7/homework/someChars.java
5a5997575099d3c4adb78fe52d496fb182107c94
[]
no_license
Vivioza5/ideaFirst
781ba0a54e738c12dd42bab5be21948ff2be2fd0
5bccf74107ed6bc47df12f0107bc92c323dc21b2
refs/heads/master
2020-09-20T13:42:04.182729
2020-01-18T22:35:57
2020-01-18T22:35:57
224,499,108
0
0
null
2020-01-18T22:35:59
2019-11-27T19:05:15
Java
UTF-8
Java
false
false
461
java
package com.company.lesson7.homework; //Напишите программу Java, чтобы проверить, содержит ли указанная строка указанную последовательность значений символов. public class someChars { public static void main(String[] args) { String testString = "testing"; boolean test = testString.contains("st"); System.out.println(test); } }
[ "Vitaliyvivian12@gmail.com" ]
Vitaliyvivian12@gmail.com
62f3d8bb0dcf5b5ec604c5faee41d1f0239525b5
5cb5d1fc80c1f68ade44f0a26a02d1aeb118c64d
/ink-msgcenter/ink-msgcenter-api/src/main/java/com/ink/msgcenter/api/service/SmsService.java
b674e31133954177a1dd877e45aad32d7e77af0c
[]
no_license
gspandy/zx-parent
4350d1ef851d05eabdcf8c6c7049a46593e3c22e
5cdc52e645537887e86e5cbc117139ca1a56f55d
refs/heads/master
2023-08-31T15:29:50.763388
2016-08-11T09:17:29
2016-08-11T09:20:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
780
java
package com.ink.msgcenter.api.service; import com.ink.msgcenter.api.model.input.SmsExtInput; import com.ink.msgcenter.api.model.input.SmsInput; import com.ink.msgcenter.api.model.input.SmsMassInput; import com.ink.msgcenter.api.model.output.MsgOutput; /** * 短信发送接口 * Created by aiyungui on 2016/5/18. */ public interface SmsService { /** * 发送短信 * @param smsInput * @return */ public MsgOutput sendSms(SmsInput smsInput); /** * 发送短信(含扩展接口) * @param smsExtInput * @return */ public MsgOutput sendSmsWithExt(SmsExtInput smsExtInput); /** * 短信群发接口 * @param smsMassInput * @return */ public MsgOutput sendMassSms(SmsMassInput smsMassInput); }
[ "zxzhouxiang123@163.com" ]
zxzhouxiang123@163.com
b79cd2d4ce8a8c1369ed88dd971661c4f39dd0d2
3b7f3a38e955c312aedf62e82e5a60b565150ee7
/src/com/bug/controller/BoardController.java
28769f86c9e3918b6d30a096483a760aabbecb20
[]
no_license
gguro/boardSpringMVC
9bf7cd4918fdb3af46ee58fddc1f5bf895f38f07
27774a0a1c2c6aaef2a78f80244f4b1c91699e44
refs/heads/master
2021-08-14T09:52:13.680557
2017-11-15T08:52:48
2017-11-15T08:52:48
110,807,426
0
0
null
null
null
null
UTF-8
Java
false
false
6,731
java
package com.bug.controller; import java.util.List; import javax.annotation.Resource; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.Errors; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.bug.dao.BoardDAO; import com.bug.dto.BoardVO; import com.bug.service.BoardService; /** * BoardController : 게시판 리스트/등록/수정/삭제, 비밀번호 체크(수정/삭제시 필요) * @author 2-18 * @version 1.0 * @since 2017-11-09 */ @Controller public class BoardController { /* * DAO와 Service의 차이 * - DAO : 디비 처리에 필요한 쿼리문에 대한 메소드정의 * - Service : 디비 처리 외에 필요한 기능에 대한 메소드정의 * * 사용법 * - 선언하는 어노테이션이 다를뿐 방식은 동일 * - 선언한 멤버변수명.메소드() 호출 */ // 쿼리문 처리를 위한 객체 // 필요한 쿼리에 대한 메소드 호출은 dao.메소드() 형식으로 할 수 있다 @Resource(name = "boardDAO") private BoardDAO dao; // 서비스 실습을 위해 넣었다 // 메소드 호출시 boardService.메소드() 형식으로 할 수 있다 @Autowired private BoardService boardService; // 게시판 리스트 start @RequestMapping(value = "/boardList.do", method = RequestMethod.GET) public String list(Model model) { String view = "boardList"; System.out.println("BoardController list() >>>>>>>>>>"); List<BoardVO> list = dao.selectAllBoards(); // 모든 게시판글(BoardVO)을 리스트로 불러옴 System.out.println(list); System.out.println("<<<<<<<<<< BoardController list()"); model.addAttribute("boardList", list); // model에 뷰에서 보여줄 값 담기 return view; } // 게시판 리스트 end // 게시판 등록 start @RequestMapping(value = "/boardWriteForm.do", method = RequestMethod.GET) public String writeForm() { return "boardWrite"; // 게시판 등록 페이지 } @RequestMapping(value = "/boardWrite.do", method = RequestMethod.POST) public String write(@Valid @ModelAttribute("board") BoardVO bVo, Errors errors, Model model) { System.out.println("BoardController write() >>>>>>>>>>"); System.out.println("error : " + errors.getAllErrors()); // 오류 정보 확인(디버그 코드) System.out.println(bVo); System.out.println("<<<<<<<<<< BoardController write()"); if (errors.hasErrors()) { System.out.println("오류발생 boardWrite로 돌아감"); return "boardWrite"; } dao.insertBoard(bVo); // 글등록 return "redirect:boardList.do"; // 글리스트를 새로 받기위해 boardList.do 명령으로 리다이렉트 } // 게시판 등록 end // 게시판 상세보기 start @RequestMapping(value = "/boardView.do", method = RequestMethod.GET) public String view(String num, Model model) { String view = "boardView"; System.out.println("BoardController view() >>>>>>>>>>"); dao.updateReadCount(num); // 조회수증가 BoardVO bVo = dao.selectOneBoardByNum(num); // 글번호로 게시글(BoardVO) 불러오기 System.out.println(bVo); System.out.println("<<<<<<<<<< BoardController view()"); model.addAttribute("board", bVo); // model에 뷰에서 보여줄 값 담기 return view; } // 게시판 상세보기 end // 비밀번호 체크 start @RequestMapping(value = "/boardCheckPassForm.do", method = RequestMethod.GET) public String checkPassForm() { return "boardCheckPass"; // 비밀번호 확인 팝업 페이지 } @RequestMapping(value = "/boardCheckPass.do", method = RequestMethod.GET) public String checkPass(String num, String pass, Model model) { String view = "checkSuccess"; System.out.println("BoardController checkPass() >>>>>>>>>>"); BoardVO bVo = dao.selectOneBoardByNum(num); // 글 번호로 게시글(BoardVO) 조회 System.out.println(bVo); System.out.println("<<<<<<<<<< BoardController checkPass()"); // 서비스로 분리(서비스를 만들어서 사용해보기위해.. 간단한 코드이지만 분리하였다) // 비밀번호 일치 여부 boolean isPass = boardService.isCheckPass(bVo, pass); // isCheckPass() : 일치하면 true, 불일치하면 false 리턴하는 메소드 if (!isPass) { // 불일치하면 메세지를 model에 담아 다시 비밀번호 확인 팝업 페이지로 이동 model.addAttribute("message", "비밀번호가 틀렸습니다."); return "boardCheckPass"; } return view; // 일치시 성공처리 페이지로 이동 } // 비밀번호 체크 end // 게시판 수정 start @RequestMapping(value = "/boardUpdateForm.do", method = RequestMethod.GET) public String updateForm(String num, Model model) { String view = "boardUpdate"; System.out.println("BoardController updateForm() >>>>>>>>>>"); BoardVO bVo = dao.selectOneBoardByNum(num); // 등록된 게시글(BoardVO)을 불러옴 System.out.println(bVo); System.out.println("<<<<<<<<<< BoardController updateForm()"); model.addAttribute("board", bVo); // model에 뷰에서 보여줄 값 담기 return view; } @RequestMapping(value = "/boardUpdate.do", method = RequestMethod.POST) public String update(@Valid @ModelAttribute("board") BoardVO bVo, Errors errors, Model model) { String view = "boardView"; System.out.println("BoardController update() >>>>>>>>>>"); System.out.println("error : " + errors.getAllErrors()); // 오류 정보 확인(디버그 코드) System.out.println(bVo); System.out.println("<<<<<<<<<< BoardController update()"); if (errors.hasErrors()) { System.out.println("오류발생 boardUpdate로 돌아감"); return "boardUpdate"; } dao.updateBoard(bVo); // 글수정 return view; // 게시글 상세보기 페이지로 이동 } // 게시판 수정 end // 게시판 삭제 start @RequestMapping(value = "/boardDelete.do", method = RequestMethod.GET) public String delete(String num) { System.out.println("BoardController delete() >>>>>>>>>>"); dao.deleteBoard(num); // 글삭제 System.out.println(num + "번 글 삭제"); System.out.println("<<<<<<<<<< BoardController delete()"); return "redirect:boardList.do"; // 게시글리스트를 새로 받기위해 boardList.do 명령으로 리다이렉트 } // 게시판 삭제 end }
[ "2-4@192.168.0.16" ]
2-4@192.168.0.16
4a6e2cd418ea2cb1327dd4aa42a1d6fd66450039
07f05db88de20e1ee0f63a0e21c8220a79ab7b34
/src/day39_AccessModifers/CarObjects.java
942a56f1e4eb88df0d55c3309126ec8d85e5107b
[]
no_license
mnazeeri/Spring2020B18_Java
eabbd9de8eb3dc34ce1ab6f0a11c98f041db0115
2fcc55fade8aff9ff34b369d54839130a48d2266
refs/heads/master
2022-10-20T19:13:12.988201
2020-06-15T20:36:44
2020-06-15T20:36:44
258,565,284
0
0
null
null
null
null
UTF-8
Java
false
false
475
java
package day39_AccessModifers; public class CarObjects { public static void main(String[] args) { // new Constructor Car car1 = new Car("Toyota"); System.out.println(car1); Car car2 = new Car("BMW", "X6" ); System.out.println(car2); Car car3 = new Car("Lexus", "RX", 2020); System.out.println(car3); Car car4 = new Car("Tesla", "Model 3", 2020, 40_000); System.out.println(car4); } }
[ "mnazeeri@gmail.com" ]
mnazeeri@gmail.com
96238a98deb794da3377515994bbc2271ed0ee7e
ef56693628321009d1025d7d11f19a0e4d7119be
/src/interview/MeituanFour.java
4887b0234aff6885f85f9434b47b4cf8e01e1956
[]
no_license
LeBW/leetcode
b3aa893c3d5e386bfbc8851fe5670b9c35d4fcad
a854651b93941e3e270b616ad163b2abd06bf6dc
refs/heads/master
2023-05-12T09:33:02.551159
2021-09-22T01:44:53
2021-09-22T01:44:53
136,726,369
2
1
null
null
null
null
UTF-8
Java
false
false
1,532
java
package interview; import java.util.Arrays; import java.util.Scanner; /** * @author LBW */ public class MeituanFour { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int m = scanner.nextInt(); int start = scanner.nextInt(); int end = scanner.nextInt(); int[][] peopleDis = new int[n + 1][n + 1]; int[][] carDis = new int[n + 1][n + 1]; for (int i = 0; i < m; i++) { int x = scanner.nextInt(), y = scanner.nextInt(); carDis[x][y] = scanner.nextInt(); carDis[y][x] = carDis[x][y]; peopleDis[x][y] = scanner.nextInt(); peopleDis[y][x] = peopleDis[x][y]; } int[] wait = new int[n + 1]; for (int i = 1; i <= n; i++) { wait[i] = scanner.nextInt(); } if (start == end) { System.out.println(0); return; } int res = Integer.MAX_VALUE; for (int i = 1; i <= n; i++) { if (i == start) { if (carDis[start][end] > 0) { res = Math.min(res, wait[start] + carDis[start][end]); } continue; } if (peopleDis[start][i] > 0 && carDis[i][end] > 0) { int t = Math.max(peopleDis[start][i], wait[i]); t += carDis[i][end]; res = Math.min(res, t); } } System.out.println(res); } }
[ "27091925@qq.com" ]
27091925@qq.com
b03572032282157c589a51cfb191f6894c4280ce
abdd83f2b48f6aca5569c9a4e03af4a6b8babd62
/src/test/java/com/anand/program/web/rest/util/PaginationUtilUnitTest.java
576e24376b243635420bac57d2b3e63ee45bee1d
[]
no_license
anandguna/AnandTesting
2590156cddc3700b4b0f5740b147a8aade877e76
2b84da0ac188d131ab51ee235cbeff0d1efc06f6
refs/heads/master
2020-03-22T17:37:42.197628
2018-07-10T08:59:37
2018-07-10T08:59:37
140,405,525
0
0
null
null
null
null
UTF-8
Java
false
false
1,745
java
package com.anand.program.web.rest.util; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.List; import org.junit.Test; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.PageRequest; import org.springframework.http.HttpHeaders; /** * Tests based on parsing algorithm in app/components/util/pagination-util.service.js * * @see PaginationUtil */ public class PaginationUtilUnitTest { @Test public void generatePaginationHttpHeadersTest() { String baseUrl = "/api/_search/example"; List<String> content = new ArrayList<>(); Page<String> page = new PageImpl<>(content, PageRequest.of(6, 50), 400L); HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, baseUrl); List<String> strHeaders = headers.get(HttpHeaders.LINK); assertNotNull(strHeaders); assertTrue(strHeaders.size() == 1); String headerData = strHeaders.get(0); assertTrue(headerData.split(",").length == 4); String expectedData = "</api/_search/example?page=7&size=50>; rel=\"next\"," + "</api/_search/example?page=5&size=50>; rel=\"prev\"," + "</api/_search/example?page=7&size=50>; rel=\"last\"," + "</api/_search/example?page=0&size=50>; rel=\"first\""; assertEquals(expectedData, headerData); List<String> xTotalCountHeaders = headers.get("X-Total-Count"); assertTrue(xTotalCountHeaders.size() == 1); assertTrue(Long.valueOf(xTotalCountHeaders.get(0)).equals(400L)); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
dfab3ff9df0da4e971cb9de88440845471acd09e
526687f9b72498895bb9732af2777f4481b3c257
/test/hu/akusius/palenque/animation/op/PropToggleTest.java
6e9d795e0ae9c77f154fc1fcd3704850126d9145
[]
no_license
akusius/palenque-animation
0fb8344fc9bfeb9be3cf02043ee07ffdee731edf
0df51a4d279eff7b77c7e8d0a22db68d2f7644ea
refs/heads/master
2021-01-10T14:23:21.228128
2015-10-08T14:53:59
2015-10-08T14:53:59
43,689,992
0
0
null
null
null
null
UTF-8
Java
false
false
4,052
java
package hu.akusius.palenque.animation.op; import org.junit.Test; import util.EventTester; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.*; /** * * @author Bujdosó Ákos */ public class PropToggleTest { public PropToggleTest() { } @Test public void test1() { PropToggle p = new PropToggle(true); assertThat(p.isSelected(), is(true)); EventTester et = new EventTester(); p.addPropertyChangeListener(et.propertyChangeListener); p.setSelected(false); assertThat(p.isSelected(), is(false)); assertTrue(et.hadPropertyChange(PropToggle.PROP_SELECTED, true, false)); p.removePropertyChangeListener(et.propertyChangeListener); et.clear(); p.setSelected(true); assertThat(p.isSelected(), is(true)); assertFalse(et.hadAnyEvent()); } @Test public void test2() { PropToggle p = new PropToggle(true); assertThat(p.isSelected(), is(true)); p.setSelectedInternal(false); assertThat(p.isSelected(), is(false)); } @Test public void test3() { PropToggle p = new PropToggle(true); assertThat(p.isSelected(), equalTo(true)); EventTester et = new EventTester(); p.addPropertyChangeListener(et.propertyChangeListener); p.setSelected(false); assertThat(p.isSelected(), is(false)); assertTrue(et.hadPropertyChange(PropToggle.PROP_SELECTED, true, false)); et.clear(); p.setSelectedInternal(true); assertThat(p.isSelected(), is(true)); assertTrue(et.hadPropertyChange(PropToggle.PROP_SELECTED, false, true)); et.clear(); p.setSelectedInternal(false); assertThat(p.isSelected(), is(false)); assertTrue(et.hadPropertyChange(PropToggle.PROP_SELECTED, true, false)); } @Test public void test4() { PropToggle p = new PropToggle(true); assertThat(p.isSelected(), equalTo(true)); EventTester et = new EventTester(); p.addPropertyChangeListener(et.propertyChangeListener); p.setSelected(true); assertFalse(et.hadAnyEvent()); assertThat(p.isSelected(), equalTo(true)); assertFalse(et.hadAnyPropertyChange()); et.clear(); p.setSelectedInternal(false); assertThat(p.isSelected(), equalTo(false)); assertTrue(et.hadPropertyChange(PropToggle.PROP_SELECTED, true, false)); } @Test public void test5() { PropToggle p = new PropToggle(true); assertTrue(p.isEnabled()); assertTrue(p.isSelected()); p.setEnabled(false); assertFalse(p.isEnabled()); assertTrue(p.isSelected()); try { p.setSelected(false); fail(); } catch (IllegalStateException ex) { } assertTrue(p.isSelected()); p.setSelectedInternal(false); assertFalse(p.isSelected()); p.setEnabled(true); assertTrue(p.isEnabled()); assertFalse(p.isSelected()); p.setSelected(true); assertTrue(p.isEnabled()); assertTrue(p.isSelected()); } @Test public void test6() { PropToggle t1 = new PropToggle(true); PropToggle t2 = new PropToggle(false); PropToggle t3 = new PropToggle(false); assertFalse(t1.isInGroup()); assertFalse(t2.isInGroup()); assertFalse(t3.isInGroup()); PropToggle.configGroup(t1, t2, t3); assertTrue(t1.isInGroup()); assertTrue(t2.isInGroup()); assertTrue(t3.isInGroup()); try { t1.setSelected(false); fail(); } catch (IllegalStateException ex) { } assertTrue(t1.isSelected()); assertFalse(t2.isSelected()); assertFalse(t3.isSelected()); assertTrue(t1.isEnabled()); assertTrue(t2.isEnabled()); assertTrue(t3.isEnabled()); t2.setSelectedInternal(true); assertFalse(t1.isSelected()); assertTrue(t2.isSelected()); assertFalse(t3.isSelected()); t3.setSelected(true); assertFalse(t1.isSelected()); assertFalse(t2.isSelected()); assertTrue(t3.isSelected()); t1.setEnabled(false); t2.setEnabled(false); t1.setSelectedInternal(true); assertTrue(t1.isSelected()); assertFalse(t2.isSelected()); assertFalse(t3.isSelected()); } }
[ "akusiushu@gmail.com" ]
akusiushu@gmail.com
3d0330239ad4fac79e23f4eeafb3ae729b6ea04b
99c0ff15ca4f3088d271ffb0d60c620b52c8edee
/sales-taxes-client/src/main/java/test/exercise/parse/ShoppingBasketParser.java
71780b154a47729035bda9d73e51b65bfde6f096
[]
no_license
leghissa/sales-taxes
99acf3223785546a7f0818afab8c632d70841fea
0e3f3ed28f1f8698504c1ef87371cfa765d3c31a
refs/heads/master
2021-01-10T08:37:38.075650
2016-03-27T15:09:26
2016-03-27T15:09:26
54,775,043
0
0
null
null
null
null
UTF-8
Java
false
false
188
java
package test.exercise.parse; import test.exercise.model.ShoppingBasket; import java.util.List; public interface ShoppingBasketParser { ShoppingBasket parse(List<String> lines); }
[ "hermes@bskyb.com" ]
hermes@bskyb.com
d6d32cef6b7eaede2ca17aefb2bc1c842251ed4c
91e72ef337a34eb7e547fa96d99fca5a4a6dc89e
/subjects/jpush-api-java-client/results/evosuite/1564509231/0000/evosuite-tests/cn/jpush/api/schedule/model/TriggerPayload$Builder_ESTest_scaffolding.java
e3aced2e7e267ad77d634cf4bd17b565e1b79fbe
[]
no_license
STAMP-project/descartes-amplification-experiments
deda5e2f1a122b9d365f7c76b74fb2d99634aad4
a5709fd78bbe8b4a4ae590ec50704dbf7881e882
refs/heads/master
2021-06-27T04:13:17.035471
2020-10-14T08:17:05
2020-10-14T08:17:05
169,711,716
0
0
null
2020-10-14T08:17:07
2019-02-08T09:32:43
Java
UTF-8
Java
false
false
9,949
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Jul 30 17:54:58 GMT 2019 */ package cn.jpush.api.schedule.model; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class TriggerPayload$Builder_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "cn.jpush.api.schedule.model.TriggerPayload$Builder"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("user.dir", "/home/ubuntu/oscar/descartes-evosuite/subjects/jpush-api-java-client/results/evosuite/1564509231/0000"); java.lang.System.setProperty("java.io.tmpdir", "/tmp"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(TriggerPayload$Builder_ESTest_scaffolding.class.getClassLoader() , "com.google.gson.internal.bind.TimeTypeAdapter$1", "com.google.gson.reflect.TypeToken", "com.google.gson.internal.bind.TypeAdapters$23", "com.google.gson.internal.bind.TypeAdapters$24", "com.google.gson.internal.bind.TypeAdapters$25", "com.google.gson.internal.bind.TypeAdapters$26", "com.google.gson.internal.bind.TypeAdapters$20", "com.google.gson.TypeAdapter", "com.google.gson.internal.bind.JsonTreeWriter", "com.google.gson.internal.bind.TypeAdapters$21", "com.google.gson.JsonDeserializationContext", "com.google.gson.internal.bind.TypeAdapters$22", "com.google.gson.FieldNamingStrategy", "com.google.gson.internal.bind.TypeAdapters$28", "com.google.gson.internal.bind.TypeAdapters$29", "com.google.gson.internal.bind.SqlDateTypeAdapter", "cn.jpush.api.schedule.model.TriggerPayload$Type", "com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper", "com.google.gson.internal.bind.TimeTypeAdapter", "com.google.gson.ExclusionStrategy", "cn.jiguang.common.utils.TimeUtils", "cn.jpush.api.schedule.model.TriggerPayload$1", "cn.jiguang.common.utils.StringUtils", "com.google.gson.internal.bind.TypeAdapters$30", "com.google.gson.internal.bind.TypeAdapters$31", "com.google.gson.JsonArray", "com.google.gson.LongSerializationPolicy", "com.google.gson.internal.Excluder", "com.google.gson.annotations.Until", "com.google.gson.TypeAdapterFactory", "com.google.gson.internal.bind.TypeAdapters$EnumTypeAdapter", "com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter", "com.google.gson.stream.JsonReader$1", "com.google.gson.stream.JsonReader", "com.google.gson.internal.bind.MapTypeAdapterFactory", "com.google.gson.Gson$FutureTypeAdapter", "com.google.gson.stream.JsonWriter", "com.google.gson.internal.bind.ArrayTypeAdapter$1", "com.google.gson.internal.$Gson$Preconditions", "com.google.gson.internal.bind.TypeAdapters$12", "com.google.gson.internal.bind.TypeAdapters$13", "com.google.gson.internal.bind.TypeAdapters$14", "com.google.gson.internal.bind.TypeAdapters$15", "com.google.gson.internal.bind.TypeAdapters$10", "com.google.gson.internal.bind.TypeAdapters$11", "com.google.gson.stream.MalformedJsonException", "com.google.gson.internal.bind.ArrayTypeAdapter", "com.google.gson.stream.JsonToken", "com.google.gson.internal.bind.TypeAdapters$16", "com.google.gson.internal.ObjectConstructor", "com.google.gson.internal.bind.TypeAdapters$17", "com.google.gson.internal.bind.TypeAdapters$18", "com.google.gson.JsonNull", "com.google.gson.internal.bind.TypeAdapters$19", "com.google.gson.internal.bind.DateTypeAdapter$1", "com.google.gson.LongSerializationPolicy$1", "com.google.gson.LongSerializationPolicy$2", "com.google.gson.JsonObject", "com.google.gson.internal.bind.JsonTreeReader$1", "com.google.gson.TypeAdapter$1", "com.google.gson.Gson$2", "com.google.gson.Gson$3", "com.google.gson.internal.bind.ObjectTypeAdapter", "com.google.gson.Gson$4", "com.google.gson.Gson$5", "com.google.gson.internal.bind.DateTypeAdapter", "com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter", "com.google.gson.Gson$1", "com.google.gson.internal.bind.TypeAdapters$22$1", "com.google.gson.Gson", "cn.jpush.api.schedule.model.IModel", "com.google.gson.internal.bind.JsonAdapterAnnotationTypeAdapterFactory", "com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$BoundField", "com.google.gson.internal.bind.ReflectiveTypeAdapterFactory", "com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1", "com.google.gson.internal.Excluder$1", "com.google.gson.internal.bind.TypeAdapters$2", "com.google.gson.internal.bind.JsonTreeReader", "com.google.gson.internal.bind.TypeAdapters$1", "com.google.gson.internal.bind.JsonTreeWriter$1", "com.google.gson.internal.bind.SqlDateTypeAdapter$1", "com.google.gson.JsonIOException", "com.google.gson.internal.bind.TypeAdapters$8", "com.google.gson.internal.bind.TypeAdapters$7", "com.google.gson.internal.bind.TypeAdapters", "com.google.gson.internal.bind.TypeAdapters$9", "com.google.gson.internal.bind.TypeAdapters$4", "com.google.gson.internal.bind.TypeAdapters$3", "com.google.gson.internal.bind.TypeAdapters$6", "com.google.gson.internal.bind.TypeAdapters$5", "com.google.gson.internal.LazilyParsedNumber", "com.google.gson.internal.bind.ObjectTypeAdapter$1", "com.google.gson.JsonParseException", "cn.jpush.api.schedule.model.TriggerPayload$Builder", "com.google.gson.internal.ConstructorConstructor", "com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter", "cn.jiguang.common.utils.Preconditions", "com.google.gson.JsonElement", "com.google.gson.FieldNamingPolicy", "com.google.gson.internal.bind.CollectionTypeAdapterFactory", "cn.jiguang.common.TimeUnit", "cn.jpush.api.schedule.model.TriggerPayload", "com.google.gson.JsonSerializationContext", "com.google.gson.annotations.JsonAdapter", "com.google.gson.JsonPrimitive", "com.google.gson.JsonSyntaxException", "com.google.gson.FieldNamingPolicy$4", "com.google.gson.FieldNamingPolicy$3", "com.google.gson.annotations.Since", "com.google.gson.FieldNamingPolicy$5", "com.google.gson.internal.JsonReaderInternalAccess", "com.google.gson.FieldNamingPolicy$2", "com.google.gson.FieldNamingPolicy$1" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(TriggerPayload$Builder_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "cn.jpush.api.schedule.model.TriggerPayload$Builder", "cn.jiguang.common.utils.TimeUtils", "cn.jiguang.common.TimeUnit", "cn.jpush.api.schedule.model.TriggerPayload$Type", "cn.jpush.api.schedule.model.TriggerPayload$1", "cn.jiguang.common.utils.StringUtils", "cn.jiguang.common.utils.Preconditions" ); } }
[ "oscarlvp@gmail.com" ]
oscarlvp@gmail.com
eb5bca21fba0a76ed29a9a82ad0d01b5d862d474
2449f06d85887c2d71647bfa2e0b827bafc88df6
/clases/0407/clase/clase0410.java
e822d2b22e456d9363c3e2485f8da88f0c7ea6cc
[]
no_license
LeandroPennella/uces.prog3.clases
cedb55d7bd4ef094ab4d5e8907434ac63cde6b3d
d306eafb16f3e58cb1cc71811e949a842ba997ca
refs/heads/master
2021-03-19T17:02:34.586620
2016-12-12T14:49:09
2016-12-12T14:49:09
75,971,371
0
0
null
null
null
null
UTF-8
Java
false
false
44
java
package clase; public class clase0410 { }
[ "leandropennella@yahoo.com.ar" ]
leandropennella@yahoo.com.ar
463e28dcad428160bd1323d4b42b6abbe962a6a8
93e9d378687824c762d9326aaf59119cfc5dc990
/mwMain/src/main/java/com/aia/main/guestbook/service/RedisService.java
83e32671dd78c684d4ddc519eab2a85382136e01
[]
no_license
jechoiiii/MayWeather
d2dd2fe4c6fcd1497392431e48bff96a50976cef
1b1119f947492aaaec48cb6d9a12d8271174bdae
refs/heads/main
2023-04-01T02:46:38.126964
2021-04-04T13:04:39
2021-04-04T13:04:39
334,826,704
0
0
null
null
null
null
UTF-8
Java
false
false
2,171
java
package com.aia.main.guestbook.service; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.serializer.StringRedisSerializer; import org.springframework.stereotype.Service; import com.aia.main.guestbook.domain.LoginInfo; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; @Service public class RedisService { //private Logger logger = LoggerFactory.getLogger(this.getClass().getName()); //private String TAG = this.getClass().getName(); @Autowired private RedisTemplate<String, Object> redisTemplate; /** * Redis 에 사용자 정보를 등록한다. * * @param LoginInfo */ public void setUserInformation(LoginInfo loginInfo, HttpSession session ) { //public void setUserInformation(LoginInfo loginInfo, String jsessionId ) { //logger.debug("> setUserInformation", TAG); redisTemplate.setKeySerializer(new StringRedisSerializer()); redisTemplate.setValueSerializer(new StringRedisSerializer()); String key = session.getId(); //String key = jsessionId; Map<String, Object> mapMemberInfo = new HashMap<String, Object>(); mapMemberInfo.put("memIdx", loginInfo.getMemIdx()); mapMemberInfo.put("memName", loginInfo.getMemName()); mapMemberInfo.put("memPhoto", loginInfo.getMemPhoto()); redisTemplate.opsForHash().putAll(key, mapMemberInfo); } /** * Redis 에서 사용자 정보를 가져온다. * @param loginInfo * @return */ public LoginInfo getUserInformation(String sessionId) { String key = sessionId; LoginInfo result = null; redisTemplate.setKeySerializer(new StringRedisSerializer()); redisTemplate.setValueSerializer(new StringRedisSerializer()); String jsonString = (String) redisTemplate.opsForValue().get(key); if(jsonString != null) { Gson gson = new GsonBuilder().create(); result = gson.fromJson(jsonString, LoginInfo.class); } return result; } }
[ "jechoiiii@gmail.com" ]
jechoiiii@gmail.com
76a737a437c26eb164546da849714eda67b5f5fd
86ad45b7a8578aa197a0d0b581d9984f163a6a10
/coderjksNetty/src/main/java/io/netty/example/echo/EchoServerHandler.java
ceaddf1f84aa35cbe05874182ee73fca1b79d38c
[]
no_license
sundicide/coderjks-test
d6db8320a0ff44f0b32adaab0f8097a8add3a2f3
6c0d42f76aef6967707f3b949e12896695652e79
refs/heads/master
2020-06-14T07:38:28.392959
2019-07-15T09:37:09
2019-07-15T09:37:09
194,949,824
0
0
null
null
null
null
UTF-8
Java
false
false
1,571
java
package io.netty.example.echo; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; public class EchoServerHandler extends ChannelInboundHandlerAdapter { /** * client로 부터 새로운 데이터를 수신했을 때 호출된다. * 이번 예제에서 받은 메세지의 타입은 ByteBuf이다. */ @Override public void channelRead(ChannelHandlerContext ctx, Object msg) { /** * ChannelHandlerContext 객체는 다양한 I/O events와 operations을 실행할 수 있는 기능을 제공한다. * 여기에선 write(Object)를 사용했는데 이는 received message를 write한다는 의미이다. * 여기에선 DiscadServerHandler와 다르게 release를 안했다는 것을 주의해라. * written out to the wire 된다면 Netty가 알아서 release를 해주기 때문이다. */ ctx.write(msg); } @Override public void channelReadComplete(ChannelHandlerContext ctx) { /** * write가 message를 written out to the wire 해주진 않는다. * write는 단지 내부적으로 buffered 할 뿐이고 flush를 하고 나서야 flushed out 된다. * ctx.writeAndFlush(msg)로 이 두 문장을 한 번에 해결할 수 있다. */ ctx.flush(); } @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { // Close the connection when an exception is raised. cause.printStackTrace(); ctx.close(); } }
[ "ctbcban@gmail.com" ]
ctbcban@gmail.com
62a0b3d172ea41ebe4388c8911e7b65ad56dbbf8
a3b7863755bd7aef9245270240048c562c592459
/src/main/java/org/wonderland/dev/levi9/springboot/engine/output/PlacedBet.java
2b3382dfb60e8a55225e26cefc96459de2d26993
[]
no_license
srdjordjevic/Levi9Zadatak2
f85893be86a7436dd4da46c0f4da021a6ba429ea
607fbcce2f9665ca23550f3e0f6f7de734415fe0
refs/heads/master
2021-01-10T03:45:39.254716
2015-06-08T09:01:47
2015-06-08T09:01:47
36,490,148
0
0
null
null
null
null
UTF-8
Java
false
false
781
java
package org.wonderland.dev.levi9.springboot.engine.output; import org.wonderland.dev.levi9.springboot.engine.input.BetOffer; import org.wonderland.dev.levi9.springboot.engine.utils.BetType; public class PlacedBet { private BetOffer offer; private double bet; private BetType betType; public PlacedBet(BetOffer offer, double bet, BetType betType) { super(); this.offer = offer; this.bet = bet; this.betType = betType; } public BetOffer getOffer() { return offer; } public void setOffer(BetOffer offer) { this.offer = offer; } public double getBet() { return bet; } public void setBet(double bet) { this.bet = bet; } public BetType getBetType() { return betType; } public void setBetType(BetType betType) { this.betType = betType; } }
[ "sr.djordjevic@levi9.com" ]
sr.djordjevic@levi9.com
132c8a8feb8d52ebdff2ea92d92ba07206561fc8
057e3317f62fd2dbb97dfcc1cf1588e90e7c0024
/labSpringMVCTesting/src/main/java/com/tecsup/gestion/mapper/DepartmentMapper.java
bd163361e8c311fc380dec66ea82cebed628f15a
[]
no_license
kevingroque/Practica3
f139f06c58293be7e2f1a9cfc179f08c6db71385
6efb3684c12b3dadeb01ba271f1f7fc68f5b38ca
refs/heads/master
2021-08-07T18:22:38.125344
2017-11-08T18:06:31
2017-11-08T18:06:31
110,011,795
0
0
null
null
null
null
UTF-8
Java
false
false
585
java
package com.tecsup.gestion.mapper; import java.sql.ResultSet; import java.sql.SQLException; import org.springframework.jdbc.core.RowMapper; import com.tecsup.gestion.model.Department; public class DepartmentMapper implements RowMapper<Department>{ public Department mapRow(ResultSet rs, int rowNum) throws SQLException { Department dept = new Department(); dept.setDepartmentId(rs.getInt("department_id")); dept.setName(rs.getString("name")); dept.setDescription(rs.getString("description")); dept.setCity(rs.getString("city")); return dept; } }
[ "kevingroque@github.com" ]
kevingroque@github.com
6f9447aada7d1f0dd3fed8850e837339402d6d7f
183931eedd8ed7ff685e22cb055f86f12a54d707
/test/miscCode/src/main/java/oop/javarush/task2309/vo/NamedItem.java
4808afb383820cfbab5dca9ab149e7814f6b1de9
[]
no_license
cynepCTAPuk/headFirstJava
94a87be8f6958ab373cd1640a5bdb9c3cc3bf166
7cb45f6e2336bbc78852d297ad3474fd491e5870
refs/heads/master
2023-08-16T06:51:14.206516
2023-08-08T16:44:11
2023-08-08T16:44:11
154,661,091
0
1
null
2023-01-06T21:32:31
2018-10-25T11:40:54
Java
UTF-8
Java
false
false
585
java
package oop.javarush.task2309.vo; public class NamedItem { private int id; private String name; private String description; public NamedItem() { } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } }
[ "CTAPuk@gmail.com" ]
CTAPuk@gmail.com
aac916474df5511fc25b077f90be2a171e36710b
d1cf984ae2409e3522a83615449cf53d0efa0ccb
/code/metro/src/main/java/cn/zdmake/metro/base/model/CommonResponse.java
16d2b86a46f7f30468a3664c5962495004dbc728
[]
no_license
luojionghao/metro
10d85d2c3e9c348c3622f866ac2939dae87ce5db
11ed9ab23251783eabea67e8c1eb47b00d560188
refs/heads/master
2021-01-01T18:21:21.160320
2017-08-11T09:00:16
2017-08-11T09:00:16
98,320,298
0
0
null
null
null
null
UTF-8
Java
false
false
516
java
/** * */ package cn.zdmake.metro.base.model; /** * @className:CommonResponse.java * @author: luowq * @createTime: 2015年10月28日 */ public class CommonResponse { /** * 返回信息 */ private Object result; /** * 返回结果,成功:1,失败:0 */ private int code; public int getCode() { return code; } public void setCode(int code) { this.code = code; } public Object getResult() { return result; } public void setResult(Object result) { this.result = result; } }
[ "455709246@qq.com" ]
455709246@qq.com
5be0cf8af874629600b97d5f86895e2217bd7ebd
09ba775385d3715f2ecf77104ec6a42051899b7d
/SIPegawai/src/TampilData/ModelTampilPendidikan.java
dc596c68e60546068b8781a99b6b01f0c314a45b
[]
no_license
girahiir/Sistem-Informasi-Kepegawaian
610ccc2596ddfd31730b2a616d7c0b6e51a809fb
a1f3e95979ee687652f4c7f9aa25ffccf14ad844
refs/heads/master
2020-04-19T08:29:22.241139
2019-01-29T03:22:57
2019-01-29T03:22:57
168,078,662
0
0
null
null
null
null
UTF-8
Java
false
false
1,735
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 TampilData; /** * * @author lyandaf */ public class ModelTampilPendidikan { private String id; private String NIP; private String tingakatPendidikan; private String tempatPendidikan; private String jurusan; private String tglIjazah; private int thnMasuk; private int thnLulus; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getNIP() { return NIP; } public void setNIP(String NIP) { this.NIP = NIP; } public String getTingkatPendidikan() { return tingakatPendidikan; } public void setTingkatPendidikan(String Tingkat) { this.tingakatPendidikan = Tingkat; } public String getTempatPendidikan() { return tempatPendidikan; } public void setTempatPendidikan(String TempatPend) { this.tempatPendidikan = TempatPend; } public String getJurusan() { return jurusan; } public void setJurusan(String Jurusan) { this.jurusan = Jurusan; } public String getTglIjazah() { return tglIjazah; } public void setTglIjazah(String TglIjazah) { this.tglIjazah = TglIjazah; } public int getThnMasuk() { return thnMasuk; } public void setThnMasuk(int ThnMasuk) { this.thnMasuk = ThnMasuk; } public int getThnLulus() { return thnLulus; } public void setThnLulus(int ThnLulus) { this.thnLulus = ThnLulus; } }
[ "girahiir@gmail.com" ]
girahiir@gmail.com
ce1ddbf6c94699a98b56abddb6e01b0cc72b24b4
de8eca94dc4b263a14cbd10e75827719e8f21233
/dmn-test-cases/signavio/rdf/rdf2java/expected/java/literal/dmn/simple-decision-free-text-complex-literal-expression/Monthly.java
11fd3c25d3ce6da0497ca1ecdd83863767b5cc32
[ "Apache-2.0" ]
permissive
Mayank-Bhardwaj-404/jdmn
559dddac36b47075e97aad4dd69068a74c040d89
9dab9bf6e8952a30ff07e0771ef0ab4cd26c869f
refs/heads/master
2023-07-11T09:45:31.016832
2021-07-08T15:24:12
2021-07-08T15:24:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,590
java
import java.util.*; import java.util.stream.Collectors; @javax.annotation.Generated(value = {"signavio-decision.ftl", "monthly"}) @com.gs.dmn.runtime.annotation.DRGElement( namespace = "", name = "monthly", label = "Monthly", elementKind = com.gs.dmn.runtime.annotation.DRGElementKind.DECISION, expressionKind = com.gs.dmn.runtime.annotation.ExpressionKind.LITERAL_EXPRESSION, hitPolicy = com.gs.dmn.runtime.annotation.HitPolicy.UNKNOWN, rulesCount = -1 ) public class Monthly extends com.gs.dmn.signavio.runtime.DefaultSignavioBaseDecision { public static final com.gs.dmn.runtime.listener.DRGElement DRG_ELEMENT_METADATA = new com.gs.dmn.runtime.listener.DRGElement( "", "monthly", "Monthly", com.gs.dmn.runtime.annotation.DRGElementKind.DECISION, com.gs.dmn.runtime.annotation.ExpressionKind.LITERAL_EXPRESSION, com.gs.dmn.runtime.annotation.HitPolicy.UNKNOWN, -1 ); public Monthly() { } public java.math.BigDecimal apply(String loan, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_) { try { return apply((loan != null ? com.gs.dmn.serialization.JsonSerializer.OBJECT_MAPPER.readValue(loan, new com.fasterxml.jackson.core.type.TypeReference<type.LoanImpl>() {}) : null), annotationSet_, new com.gs.dmn.runtime.listener.LoggingEventListener(LOGGER), new com.gs.dmn.runtime.external.DefaultExternalFunctionExecutor(), new com.gs.dmn.runtime.cache.DefaultCache()); } catch (Exception e) { logError("Cannot apply decision 'Monthly'", e); return null; } } public java.math.BigDecimal apply(String loan, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { try { return apply((loan != null ? com.gs.dmn.serialization.JsonSerializer.OBJECT_MAPPER.readValue(loan, new com.fasterxml.jackson.core.type.TypeReference<type.LoanImpl>() {}) : null), annotationSet_, eventListener_, externalExecutor_, cache_); } catch (Exception e) { logError("Cannot apply decision 'Monthly'", e); return null; } } public java.math.BigDecimal apply(type.Loan loan, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_) { return apply(loan, annotationSet_, new com.gs.dmn.runtime.listener.LoggingEventListener(LOGGER), new com.gs.dmn.runtime.external.DefaultExternalFunctionExecutor(), new com.gs.dmn.runtime.cache.DefaultCache()); } public java.math.BigDecimal apply(type.Loan loan, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { try { // Start decision 'monthly' long monthlyStartTime_ = System.currentTimeMillis(); com.gs.dmn.runtime.listener.Arguments monthlyArguments_ = new com.gs.dmn.runtime.listener.Arguments(); monthlyArguments_.put("Loan", loan); eventListener_.startDRGElement(DRG_ELEMENT_METADATA, monthlyArguments_); // Evaluate decision 'monthly' java.math.BigDecimal output_ = evaluate(loan, annotationSet_, eventListener_, externalExecutor_, cache_); // End decision 'monthly' eventListener_.endDRGElement(DRG_ELEMENT_METADATA, monthlyArguments_, output_, (System.currentTimeMillis() - monthlyStartTime_)); return output_; } catch (Exception e) { logError("Exception caught in 'monthly' evaluation", e); return null; } } protected java.math.BigDecimal evaluate(type.Loan loan, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) { return numericDivide(numericDivide(numericMultiply(((java.math.BigDecimal)(loan != null ? loan.getPrincipal() : null)), ((java.math.BigDecimal)(loan != null ? loan.getRate() : null))), number("12")), numericSubtract(number("1"), numericExponentiation(numericAdd(number("1"), numericDivide(((java.math.BigDecimal)(loan != null ? loan.getRate() : null)), number("12"))), numericUnaryMinus(((java.math.BigDecimal)(loan != null ? loan.getTerm() : null)))))); } }
[ "opatrascoiu@yahoo.com" ]
opatrascoiu@yahoo.com
29a55d9c6699cbfd6eca842f48cadc3a1a13c3a2
54cbf87434d5107019e219b889554e77a695e82b
/app/src/main/java/com/example/heyikun/heheshenghuo/modle/requestmodle/IRequestModle.java
f1563d79543960743907d20587b88b1e36854315
[]
no_license
zhangchao1215/HeheTong
f7a5adff400db5938ebab91d711f7a0a37fc95ef
5db688e04a92e32ecbbea30b3273a0c45dcdae36
refs/heads/master
2020-04-13T18:35:45.526530
2018-12-28T06:17:40
2018-12-28T06:17:40
163,379,186
0
0
null
null
null
null
UTF-8
Java
false
false
228
java
package com.example.heyikun.heheshenghuo.modle.requestmodle; /** * * 类描述: * 创建人: localadmin * 创建时间: 2017/9/8 12:40 * 修改人: * 修改内容: * 修改时间: */ public interface IRequestModle { }
[ "670290530@qq.com" ]
670290530@qq.com
d879cb235bb03fedc34ef1084e43bd324f279e9d
ea65710a42cfd1a0d4c4141ac5ba297c5e6287aa
/FoodSpoty/FoodSpoty/src/com/google/android/gms/games/snapshot/SnapshotMetadataChange.java
c0fcbb55e1e3f2db6b79abf626cb6680bbb0ac3b
[]
no_license
kanwarbirsingh/ANDROID
bc27197234c4c3295d658d73086ada47a0833d07
f84b29f0f6bd483d791983d5eeae75555e997c36
refs/heads/master
2020-03-18T02:26:55.720337
2018-05-23T18:05:47
2018-05-23T18:05:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,039
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.google.android.gms.games.snapshot; import android.graphics.Bitmap; import android.net.Uri; import com.google.android.gms.common.data.a; // Referenced classes of package com.google.android.gms.games.snapshot: // SnapshotMetadataChangeEntity, SnapshotMetadata public abstract class SnapshotMetadataChange { public static final class Builder { private String UO; private Long afb; private a afc; private Uri afd; public SnapshotMetadataChange build() { return new SnapshotMetadataChangeEntity(UO, afb, afc, afd); } public Builder fromMetadata(SnapshotMetadata snapshotmetadata) { UO = snapshotmetadata.getDescription(); afb = Long.valueOf(snapshotmetadata.getPlayedTime()); if (afb.longValue() == -1L) { afb = null; } afd = snapshotmetadata.getCoverImageUri(); if (afd != null) { afc = null; } return this; } public Builder setCoverImage(Bitmap bitmap) { afc = new a(bitmap); afd = null; return this; } public Builder setDescription(String s) { UO = s; return this; } public Builder setPlayedTimeMillis(long l) { afb = Long.valueOf(l); return this; } public Builder() { } } public static final SnapshotMetadataChange EMPTY_CHANGE = new SnapshotMetadataChangeEntity(); protected SnapshotMetadataChange() { } public abstract Bitmap getCoverImage(); public abstract String getDescription(); public abstract Long getPlayedTimeMillis(); public abstract a mT(); }
[ "singhkanwar235@gmail.com" ]
singhkanwar235@gmail.com
0626ffa9a84f1cf83674e234783e1b24cb6e8ad7
7b9342a257f404f844a7986fae60ecd6d9df9886
/app/src/main/java/com/example/performancetestappnativeandroid/AccelerometerTest.java
d882e42a2b92ef02241fde78bb11a7f2895321c3
[]
no_license
slimyjimmy/PerformanceTestAppNativeAndroid
c311e99fecea209688dcf4ec9a12dd84c128eab0
f4670ef5b54830b0cd99eacdc3da4e76e2b83384
refs/heads/master
2022-11-16T18:06:25.406807
2020-07-09T12:30:05
2020-07-09T12:30:05
277,514,466
0
0
null
null
null
null
UTF-8
Java
false
false
1,836
java
package com.example.performancetestappnativeandroid; import android.app.Activity; import android.content.Context; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Bundle; import androidx.annotation.Nullable; public class AccelerometerTest extends Activity implements SensorEventListener { private static Stopwatch stopwatch; public static Stopwatch getStopwatch() { return stopwatch; } @Override public void onSensorChanged(SensorEvent sensorEvent) { Sensor sensor = sensorEvent.sensor; if (sensor.getType() == Sensor.TYPE_ACCELEROMETER) { ((SensorManager) getSystemService(Context.SENSOR_SERVICE)).unregisterListener(this); stopwatch.stop(System.nanoTime()); } } @Override public void onAccuracyChanged(Sensor sensor, int i) { } class CustomException extends Exception { public CustomException(String errorMessage) { super(errorMessage); } } @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { test(); } catch (CustomException e) { e.printStackTrace(); } } private void test() throws CustomException { SensorManager sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); Sensor accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); if (accelerometer == null) { throw new CustomException("moin"); } stopwatch = new Stopwatch(System.nanoTime()); sensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_FASTEST); } }
[ "50664914+slimyjimmy@users.noreply.github.com" ]
50664914+slimyjimmy@users.noreply.github.com
23238109331bc605c4a1e869f7737a04703b17bb
6234757cfaa619977f7adde266b06ebffd923ae2
/src/main/java/com/goosen/commons/dao/OrdersMapper.java
b0f6de2be1c9ab571d4754efdd2da803de925719
[ "MIT" ]
permissive
goosen123/mp-demo2
b42f1e02f4dfae95b1d602e1f91fc965353683fd
e37a388f05acf72f2a79d9607ad41990b0e00374
refs/heads/master
2020-03-22T19:44:14.833097
2018-07-27T09:21:52
2018-07-27T09:21:52
140,547,440
0
0
null
null
null
null
UTF-8
Java
false
false
445
java
package com.goosen.commons.dao; import java.util.List; import java.util.Map; import com.goosen.commons.model.po.Orders; import com.goosen.commons.utils.MyMapper; /** * 订单 * @author Goosen * 2018年7月9日 -下午3:08:52 */ public interface OrdersMapper extends MyMapper<Orders>{ public List<Map<String, Object>> findByParams(Map<String, Object> params); public List<String> createOrdersCode(Map<String, Object> params); }
[ "2630344884@qq.com" ]
2630344884@qq.com
3feae628456aaec9a72e7a2fcfecbfc4b1f03c30
9b690f7029a8fcd3c274767a8c7fabe3a7469d30
/app/src/main/java/com/example/agilesynergy/adapter/purchasehistoryAdapter.java
62197ae96b38a4e32ea5519d18d5a616a45dbceb
[]
no_license
AbirajTimalsina/agileSynergy
7e79a136b44c02f43f836f94b87ca77cbfc026e5
7775781cc87e6563bc93c48470df6e48e8217345
refs/heads/master
2022-12-07T03:14:26.051180
2020-08-21T16:23:45
2020-08-21T16:23:45
271,959,376
0
0
null
null
null
null
UTF-8
Java
false
false
1,878
java
package com.example.agilesynergy.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.example.agilesynergy.R; import com.example.agilesynergy.models.purchasehistory; import java.util.List; public class purchasehistoryAdapter extends RecyclerView.Adapter<purchasehistoryAdapter.purchasehistoryViewHolder> { Context mcontext; List<purchasehistory> purchasehistoryList; public purchasehistoryAdapter(Context mcontext, List<purchasehistory> purchasehistoryList) { this.mcontext = mcontext; this.purchasehistoryList = purchasehistoryList; } @NonNull @Override public purchasehistoryViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_purchasehsitroy, parent, false); return new purchasehistoryViewHolder(view); } @Override public void onBindViewHolder(@NonNull purchasehistoryViewHolder holder, int position) { purchasehistory purchasehistory = purchasehistoryList.get(position); holder.tvitemname.setText(purchasehistory.getItemname()); holder.tvitemprice.setText(purchasehistory.getItemprice()); } @Override public int getItemCount() { return purchasehistoryList.size(); } public class purchasehistoryViewHolder extends RecyclerView.ViewHolder { TextView tvitemname, tvitemprice; public purchasehistoryViewHolder(@NonNull View itemView) { super(itemView); tvitemname = itemView.findViewById(R.id.tvitemname); tvitemprice = itemView.findViewById(R.id.tvitemprice); } } }
[ "sabingautam05@gmail.com" ]
sabingautam05@gmail.com
9dc770506353c33dc31a9f5d33672043a25bc612
0a3d0b0816a2b27a2c5aa97a5e50b4f5e259874e
/src/main/java/com/applane/resourceoriented/hris/SalarySheetServlet.java
7ddbc5e655e5c8ae556fbda0ffbb20430262ed52
[]
no_license
kapil-daffodil/NodeJS_HRIS
578518025de6e54c1ddf68ce2c9e46b1992289c8
364e842c77ac26ffdc9ea32998b84da6dcbd58c9
refs/heads/master
2020-04-13T10:23:52.879763
2013-11-01T10:42:04
2013-11-01T10:42:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,815
java
package com.applane.resourceoriented.hris; import java.io.IOException; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import com.applane.databaseengine.ApplaneDatabaseEngine; import com.applane.databaseengine.ApplaneDatabaseEngineIMPL; import com.applane.databaseengine.LogUtility; import com.applane.databaseengine.exception.BusinessLogicException; import com.applane.databaseengine.shared.constants.Data; import com.applane.databaseengine.utils.ExceptionUtils; import com.google.apphosting.api.DeadlineExceededException; public class SalarySheetServlet extends HttpServlet { static ApplaneDatabaseEngine ResourceEngine = ApplaneDatabaseEngineIMPL.getApplaneDatabaseEngine(); public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { System.err.println("Call on MonthlyAttendanceServlet doPost()...."); generateSalarySheet(req, resp); } protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { System.err.println("In doGet Method..."); } public static void generateSalarySheet(HttpServletRequest req, HttpServletResponse resp) { System.err.println("SalarySheetServlet class ---->generateSalarySheet Method call..."); Map<String, Object> paramMap = req.getParameterMap(); try { if (paramMap == null || paramMap.size() == 0) { System.err.println("No Parameters found....."); resp.getWriter().write("No parameter found in Attendance servlet.."); } else { System.err.println("Parameters found..."); String empId = ((String[]) paramMap.get("employeeid"))[0]; System.err.println("empId is : >> " + empId); long employeeId = 0; if (empId != null && empId.length() > 0) { System.err.println("empId not equal to null..."); employeeId = Long.parseLong(empId); System.err.println("employeeId is : >> " + employeeId); } String monthIdInString = ((String[]) paramMap.get("monthid"))[0]; System.err.println("monthIdInString is : >> " + monthIdInString); long monthId = 0; if (monthIdInString != null && monthIdInString.length() > 0) { System.err.println("monthIdInString not equal to null..."); monthId = Long.parseLong(monthIdInString); System.err.println("monthId is : >> " + monthId); } String yearIdInString = ((String[]) paramMap.get("yearid"))[0]; System.err.println("yearIdInString is : >> " + yearIdInString); long yearId = 0; if (yearIdInString != null && yearIdInString.length() > 0) { System.err.println("yearIdInString not equal to null..."); yearId = Long.parseLong(yearIdInString); System.err.println("yearId is : >> " + yearId); } String branchIdInstring = ((String[]) paramMap.get("branchid"))[0]; System.err.println("branchIdInstring is : >> " + branchIdInstring); long branchId = 0; if (branchIdInstring != null && branchIdInstring.length() > 0) { System.err.println("branchIdInstring not equal to null..."); branchId = Long.parseLong(branchIdInstring); System.err.println("branchId is : >> " + branchId); } JSONArray monthlyattendanceArray = getEmployeeMonthlyAttendanceRecords(employeeId, monthId, yearId); System.err.println("monthlyattendanceArray is : >>> " + monthlyattendanceArray); int monthlyattendanceArrayCount = (monthlyattendanceArray == null || monthlyattendanceArray.length() == 0) ? 0 : monthlyattendanceArray.length(); System.err.println("monthlyattendanceArrayCount is : >> " + monthlyattendanceArrayCount); if (monthlyattendanceArrayCount > 0) { System.err.println("monthlyattendanceArrayCount is greater than zero....."); Object monthlyAttendanceId = monthlyattendanceArray.getJSONObject(0).opt("__key__"); System.err.println("monthlyAttendanceId is : >>> " + monthlyAttendanceId); Object presentDays = monthlyattendanceArray.getJSONObject(0).opt("presentdays") == null ? 0.0 : monthlyattendanceArray.getJSONObject(0).opt("presentdays"); System.err.println("presentDays is : >> " + presentDays); Object absentDays = monthlyattendanceArray.getJSONObject(0).opt("absents") == null ? 0.0 : monthlyattendanceArray.getJSONObject(0).opt("absents"); System.err.println("absentDays is ; >> " + absentDays); Object leaves = monthlyattendanceArray.getJSONObject(0).opt("leaves") == null ? 0.0 : monthlyattendanceArray.getJSONObject(0).opt("leaves"); System.err.println("leaves is : >> " + leaves); Object extraWorkingDays = monthlyattendanceArray.getJSONObject(0).opt("extraworkingdays") == null ? 0.0 : monthlyattendanceArray.getJSONObject(0).opt("extraworkingdays"); System.err.println("extraWorkingDays is : >>> " + extraWorkingDays); updateAttendanceInSalarySheet(employeeId, monthId, yearId, presentDays, absentDays, leaves, extraWorkingDays); } else { System.err.println("No monthly attendance found for employee [" + employeeId + "]"); } } } catch (DeadlineExceededException e) { System.err.println("Throw deadline exception."); String message = ExceptionUtils.getExceptionTraceMessage("SalarySheetServlet", e); System.err.println("message is : >> " + message); LogUtility.writeError(message); throw e; } catch (BusinessLogicException e) { System.err.println("Throw business logic exception"); String message = ExceptionUtils.getExceptionTraceMessage("SalarySheetServlet", e); System.err.println("message is : >> " + message); LogUtility.writeError(message); throw e; } catch (Exception e) { e.printStackTrace(); String message = ExceptionUtils.getExceptionTraceMessage("SalarySheetServlet", e); System.err.println("message is : >> " + message); LogUtility.writeError(message); throw new BusinessLogicException("Some unknown error occured while update employee salary sheet."); } } private static void updateAttendanceInSalarySheet(long employeeId, long monthId, long yearId, Object presentDays, Object absentDays, Object leaves, Object extraWorkingDays) throws JSONException { System.err.println("updateAttendanceInSalarySheet Method call...."); JSONObject updates = new JSONObject(); updates.put(Data.Query.RESOURCE, "salarysheet"); JSONObject row = new JSONObject(); row.put("employeeid", employeeId); row.put("monthid", monthId); row.put("yearid", yearId); row.put("present", presentDays); row.put("absent", absentDays); row.put("leaves", leaves); row.put("extraworkingday", extraWorkingDays); updates.put(Data.Update.UPDATES, row); ResourceEngine.update(updates); System.err.println("updateAttendanceInSalarySheet succesfully...."); } private static JSONArray getEmployeeMonthlyAttendanceRecords(long employeeId, long monthId, long yearId) throws JSONException { System.err.println("getEmployeeMonthlyAttendanceRecords Method call...."); JSONObject query = new JSONObject(); query.put(Data.Query.RESOURCE, "employeemonthlyattendance"); JSONArray columnArray = new JSONArray(); columnArray.put("__key__"); columnArray.put("presentdays"); columnArray.put("absents"); columnArray.put("leaves"); columnArray.put("extraworkingdays"); query.put(Data.Query.FILTERS, "employeeid = " + employeeId + " and yearid = " + yearId + " and monthid = " + monthId); JSONObject object; object = ResourceEngine.query(query); JSONArray rows = object.getJSONArray("employeemonthlyattendance"); return rows; } }
[ "kapil.dalal@daffodilsw.com" ]
kapil.dalal@daffodilsw.com