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
4eb34fc17dad38331ba4823b39227795534e5953
a05c2261f05f74f9cb0fd453fd26bcd28fed238b
/app/src/main/java/com/cygnus/model/Classname.java
e2e2eea0a7e786eb707c5b798a275d9c6d88ce37
[]
no_license
himanshuDevloperJha/Eduistein_SchoolApp_2021
84268352635901b36400678b92d27ab6fb6273ee
c677179ff0b47c8f76125ad757cb31125645f796
refs/heads/master
2023-03-28T15:52:47.404688
2021-04-07T11:52:19
2021-04-07T11:52:19
350,818,388
0
1
null
null
null
null
UTF-8
Java
false
false
300
java
package com.cygnus.model; public class Classname { String classId; public Classname(String classId) { this.setClassId(classId); } public String getClassId() { return classId; } public void setClassId(String classId) { this.classId = classId; } }
[ "brill.sushil19@gmail.com" ]
brill.sushil19@gmail.com
2e45971e03bcc18f24ee56ef8033318aab4a325e
222279bc78bf1c3c214877c3109eae5d86b5ed8e
/app/src/main/java/com/example/poskorafinaru/AboutFragment.java
1f717b496a32241cc38193446449d31e86c7495a
[]
no_license
mohfajar17/RekomPSB
d92cc36d7f6320f90828634b86ea3f14a5883d1a
0fa496040fdadbcd9ac424eba69d89403cc08abc
refs/heads/master
2022-09-21T13:21:17.893109
2020-05-29T04:54:53
2020-05-29T04:54:53
267,768,234
0
0
null
null
null
null
UTF-8
Java
false
false
1,777
java
package com.example.poskorafinaru; import android.content.Context; import android.net.Uri; import android.os.Bundle; import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; public class AboutFragment extends Fragment { private OnFragmentInteractionListener mListener; public AboutFragment() { } public static AboutFragment newInstance() { AboutFragment fragment = new AboutFragment(); Bundle args = new Bundle(); fragment.setArguments(args); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { } } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_about, container, false); } public void onButtonPressed(Uri uri) { if (mListener != null) { mListener.onFragmentInteraction(uri); } } @Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnFragmentInteractionListener) { mListener = (OnFragmentInteractionListener) context; } else { throw new RuntimeException(context.toString() + " must implement OnFragmentInteractionListener"); } } @Override public void onDetach() { super.onDetach(); mListener = null; } public interface OnFragmentInteractionListener { void onFragmentInteraction(Uri uri); } }
[ "mohfajar1967@gmail.com" ]
mohfajar1967@gmail.com
23256231132f0d2b7bcdc3022dee74f205235809
8eb2c3564fb405427a3f752301be93e5a118b176
/esale-manager/esale-manager-pojo/src/main/java/com/esale/pojo/TbContentExample.java
14ca308985cdfc6a4f1b72d5397eac0fab6a25d8
[]
no_license
littleyaoyaoyao/Esale-Online-Mall-system
c7fca003ea441d6138f0ce30fce722ef65360586
e7e76d47cfc994dbba64b1829458551bba73361f
refs/heads/master
2021-01-01T17:43:43.129681
2017-09-13T14:15:30
2017-09-13T14:15:30
98,137,925
1
0
null
null
null
null
UTF-8
Java
false
false
27,624
java
package com.esale.pojo; import java.util.ArrayList; import java.util.Date; import java.util.List; public class TbContentExample { protected String orderByClause; protected boolean distinct; protected List<Criteria> oredCriteria; public TbContentExample() { 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 andCategoryIdIsNull() { addCriterion("category_id is null"); return (Criteria) this; } public Criteria andCategoryIdIsNotNull() { addCriterion("category_id is not null"); return (Criteria) this; } public Criteria andCategoryIdEqualTo(Long value) { addCriterion("category_id =", value, "categoryId"); return (Criteria) this; } public Criteria andCategoryIdNotEqualTo(Long value) { addCriterion("category_id <>", value, "categoryId"); return (Criteria) this; } public Criteria andCategoryIdGreaterThan(Long value) { addCriterion("category_id >", value, "categoryId"); return (Criteria) this; } public Criteria andCategoryIdGreaterThanOrEqualTo(Long value) { addCriterion("category_id >=", value, "categoryId"); return (Criteria) this; } public Criteria andCategoryIdLessThan(Long value) { addCriterion("category_id <", value, "categoryId"); return (Criteria) this; } public Criteria andCategoryIdLessThanOrEqualTo(Long value) { addCriterion("category_id <=", value, "categoryId"); return (Criteria) this; } public Criteria andCategoryIdIn(List<Long> values) { addCriterion("category_id in", values, "categoryId"); return (Criteria) this; } public Criteria andCategoryIdNotIn(List<Long> values) { addCriterion("category_id not in", values, "categoryId"); return (Criteria) this; } public Criteria andCategoryIdBetween(Long value1, Long value2) { addCriterion("category_id between", value1, value2, "categoryId"); return (Criteria) this; } public Criteria andCategoryIdNotBetween(Long value1, Long value2) { addCriterion("category_id not between", value1, value2, "categoryId"); return (Criteria) this; } public Criteria andTitleIsNull() { addCriterion("title is null"); return (Criteria) this; } public Criteria andTitleIsNotNull() { addCriterion("title is not null"); return (Criteria) this; } public Criteria andTitleEqualTo(String value) { addCriterion("title =", value, "title"); return (Criteria) this; } public Criteria andTitleNotEqualTo(String value) { addCriterion("title <>", value, "title"); return (Criteria) this; } public Criteria andTitleGreaterThan(String value) { addCriterion("title >", value, "title"); return (Criteria) this; } public Criteria andTitleGreaterThanOrEqualTo(String value) { addCriterion("title >=", value, "title"); return (Criteria) this; } public Criteria andTitleLessThan(String value) { addCriterion("title <", value, "title"); return (Criteria) this; } public Criteria andTitleLessThanOrEqualTo(String value) { addCriterion("title <=", value, "title"); return (Criteria) this; } public Criteria andTitleLike(String value) { addCriterion("title like", value, "title"); return (Criteria) this; } public Criteria andTitleNotLike(String value) { addCriterion("title not like", value, "title"); return (Criteria) this; } public Criteria andTitleIn(List<String> values) { addCriterion("title in", values, "title"); return (Criteria) this; } public Criteria andTitleNotIn(List<String> values) { addCriterion("title not in", values, "title"); return (Criteria) this; } public Criteria andTitleBetween(String value1, String value2) { addCriterion("title between", value1, value2, "title"); return (Criteria) this; } public Criteria andTitleNotBetween(String value1, String value2) { addCriterion("title not between", value1, value2, "title"); return (Criteria) this; } public Criteria andSubTitleIsNull() { addCriterion("sub_title is null"); return (Criteria) this; } public Criteria andSubTitleIsNotNull() { addCriterion("sub_title is not null"); return (Criteria) this; } public Criteria andSubTitleEqualTo(String value) { addCriterion("sub_title =", value, "subTitle"); return (Criteria) this; } public Criteria andSubTitleNotEqualTo(String value) { addCriterion("sub_title <>", value, "subTitle"); return (Criteria) this; } public Criteria andSubTitleGreaterThan(String value) { addCriterion("sub_title >", value, "subTitle"); return (Criteria) this; } public Criteria andSubTitleGreaterThanOrEqualTo(String value) { addCriterion("sub_title >=", value, "subTitle"); return (Criteria) this; } public Criteria andSubTitleLessThan(String value) { addCriterion("sub_title <", value, "subTitle"); return (Criteria) this; } public Criteria andSubTitleLessThanOrEqualTo(String value) { addCriterion("sub_title <=", value, "subTitle"); return (Criteria) this; } public Criteria andSubTitleLike(String value) { addCriterion("sub_title like", value, "subTitle"); return (Criteria) this; } public Criteria andSubTitleNotLike(String value) { addCriterion("sub_title not like", value, "subTitle"); return (Criteria) this; } public Criteria andSubTitleIn(List<String> values) { addCriterion("sub_title in", values, "subTitle"); return (Criteria) this; } public Criteria andSubTitleNotIn(List<String> values) { addCriterion("sub_title not in", values, "subTitle"); return (Criteria) this; } public Criteria andSubTitleBetween(String value1, String value2) { addCriterion("sub_title between", value1, value2, "subTitle"); return (Criteria) this; } public Criteria andSubTitleNotBetween(String value1, String value2) { addCriterion("sub_title not between", value1, value2, "subTitle"); return (Criteria) this; } public Criteria andTitleDescIsNull() { addCriterion("title_desc is null"); return (Criteria) this; } public Criteria andTitleDescIsNotNull() { addCriterion("title_desc is not null"); return (Criteria) this; } public Criteria andTitleDescEqualTo(String value) { addCriterion("title_desc =", value, "titleDesc"); return (Criteria) this; } public Criteria andTitleDescNotEqualTo(String value) { addCriterion("title_desc <>", value, "titleDesc"); return (Criteria) this; } public Criteria andTitleDescGreaterThan(String value) { addCriterion("title_desc >", value, "titleDesc"); return (Criteria) this; } public Criteria andTitleDescGreaterThanOrEqualTo(String value) { addCriterion("title_desc >=", value, "titleDesc"); return (Criteria) this; } public Criteria andTitleDescLessThan(String value) { addCriterion("title_desc <", value, "titleDesc"); return (Criteria) this; } public Criteria andTitleDescLessThanOrEqualTo(String value) { addCriterion("title_desc <=", value, "titleDesc"); return (Criteria) this; } public Criteria andTitleDescLike(String value) { addCriterion("title_desc like", value, "titleDesc"); return (Criteria) this; } public Criteria andTitleDescNotLike(String value) { addCriterion("title_desc not like", value, "titleDesc"); return (Criteria) this; } public Criteria andTitleDescIn(List<String> values) { addCriterion("title_desc in", values, "titleDesc"); return (Criteria) this; } public Criteria andTitleDescNotIn(List<String> values) { addCriterion("title_desc not in", values, "titleDesc"); return (Criteria) this; } public Criteria andTitleDescBetween(String value1, String value2) { addCriterion("title_desc between", value1, value2, "titleDesc"); return (Criteria) this; } public Criteria andTitleDescNotBetween(String value1, String value2) { addCriterion("title_desc not between", value1, value2, "titleDesc"); return (Criteria) this; } public Criteria andUrlIsNull() { addCriterion("url is null"); return (Criteria) this; } public Criteria andUrlIsNotNull() { addCriterion("url is not null"); return (Criteria) this; } public Criteria andUrlEqualTo(String value) { addCriterion("url =", value, "url"); return (Criteria) this; } public Criteria andUrlNotEqualTo(String value) { addCriterion("url <>", value, "url"); return (Criteria) this; } public Criteria andUrlGreaterThan(String value) { addCriterion("url >", value, "url"); return (Criteria) this; } public Criteria andUrlGreaterThanOrEqualTo(String value) { addCriterion("url >=", value, "url"); return (Criteria) this; } public Criteria andUrlLessThan(String value) { addCriterion("url <", value, "url"); return (Criteria) this; } public Criteria andUrlLessThanOrEqualTo(String value) { addCriterion("url <=", value, "url"); return (Criteria) this; } public Criteria andUrlLike(String value) { addCriterion("url like", value, "url"); return (Criteria) this; } public Criteria andUrlNotLike(String value) { addCriterion("url not like", value, "url"); return (Criteria) this; } public Criteria andUrlIn(List<String> values) { addCriterion("url in", values, "url"); return (Criteria) this; } public Criteria andUrlNotIn(List<String> values) { addCriterion("url not in", values, "url"); return (Criteria) this; } public Criteria andUrlBetween(String value1, String value2) { addCriterion("url between", value1, value2, "url"); return (Criteria) this; } public Criteria andUrlNotBetween(String value1, String value2) { addCriterion("url not between", value1, value2, "url"); return (Criteria) this; } public Criteria andPicIsNull() { addCriterion("pic is null"); return (Criteria) this; } public Criteria andPicIsNotNull() { addCriterion("pic is not null"); return (Criteria) this; } public Criteria andPicEqualTo(String value) { addCriterion("pic =", value, "pic"); return (Criteria) this; } public Criteria andPicNotEqualTo(String value) { addCriterion("pic <>", value, "pic"); return (Criteria) this; } public Criteria andPicGreaterThan(String value) { addCriterion("pic >", value, "pic"); return (Criteria) this; } public Criteria andPicGreaterThanOrEqualTo(String value) { addCriterion("pic >=", value, "pic"); return (Criteria) this; } public Criteria andPicLessThan(String value) { addCriterion("pic <", value, "pic"); return (Criteria) this; } public Criteria andPicLessThanOrEqualTo(String value) { addCriterion("pic <=", value, "pic"); return (Criteria) this; } public Criteria andPicLike(String value) { addCriterion("pic like", value, "pic"); return (Criteria) this; } public Criteria andPicNotLike(String value) { addCriterion("pic not like", value, "pic"); return (Criteria) this; } public Criteria andPicIn(List<String> values) { addCriterion("pic in", values, "pic"); return (Criteria) this; } public Criteria andPicNotIn(List<String> values) { addCriterion("pic not in", values, "pic"); return (Criteria) this; } public Criteria andPicBetween(String value1, String value2) { addCriterion("pic between", value1, value2, "pic"); return (Criteria) this; } public Criteria andPicNotBetween(String value1, String value2) { addCriterion("pic not between", value1, value2, "pic"); return (Criteria) this; } public Criteria andPic2IsNull() { addCriterion("pic2 is null"); return (Criteria) this; } public Criteria andPic2IsNotNull() { addCriterion("pic2 is not null"); return (Criteria) this; } public Criteria andPic2EqualTo(String value) { addCriterion("pic2 =", value, "pic2"); return (Criteria) this; } public Criteria andPic2NotEqualTo(String value) { addCriterion("pic2 <>", value, "pic2"); return (Criteria) this; } public Criteria andPic2GreaterThan(String value) { addCriterion("pic2 >", value, "pic2"); return (Criteria) this; } public Criteria andPic2GreaterThanOrEqualTo(String value) { addCriterion("pic2 >=", value, "pic2"); return (Criteria) this; } public Criteria andPic2LessThan(String value) { addCriterion("pic2 <", value, "pic2"); return (Criteria) this; } public Criteria andPic2LessThanOrEqualTo(String value) { addCriterion("pic2 <=", value, "pic2"); return (Criteria) this; } public Criteria andPic2Like(String value) { addCriterion("pic2 like", value, "pic2"); return (Criteria) this; } public Criteria andPic2NotLike(String value) { addCriterion("pic2 not like", value, "pic2"); return (Criteria) this; } public Criteria andPic2In(List<String> values) { addCriterion("pic2 in", values, "pic2"); return (Criteria) this; } public Criteria andPic2NotIn(List<String> values) { addCriterion("pic2 not in", values, "pic2"); return (Criteria) this; } public Criteria andPic2Between(String value1, String value2) { addCriterion("pic2 between", value1, value2, "pic2"); return (Criteria) this; } public Criteria andPic2NotBetween(String value1, String value2) { addCriterion("pic2 not between", value1, value2, "pic2"); return (Criteria) this; } public Criteria andCreatedIsNull() { addCriterion("created is null"); return (Criteria) this; } public Criteria andCreatedIsNotNull() { addCriterion("created is not null"); return (Criteria) this; } public Criteria andCreatedEqualTo(Date value) { addCriterion("created =", value, "created"); return (Criteria) this; } public Criteria andCreatedNotEqualTo(Date value) { addCriterion("created <>", value, "created"); return (Criteria) this; } public Criteria andCreatedGreaterThan(Date value) { addCriterion("created >", value, "created"); return (Criteria) this; } public Criteria andCreatedGreaterThanOrEqualTo(Date value) { addCriterion("created >=", value, "created"); return (Criteria) this; } public Criteria andCreatedLessThan(Date value) { addCriterion("created <", value, "created"); return (Criteria) this; } public Criteria andCreatedLessThanOrEqualTo(Date value) { addCriterion("created <=", value, "created"); return (Criteria) this; } public Criteria andCreatedIn(List<Date> values) { addCriterion("created in", values, "created"); return (Criteria) this; } public Criteria andCreatedNotIn(List<Date> values) { addCriterion("created not in", values, "created"); return (Criteria) this; } public Criteria andCreatedBetween(Date value1, Date value2) { addCriterion("created between", value1, value2, "created"); return (Criteria) this; } public Criteria andCreatedNotBetween(Date value1, Date value2) { addCriterion("created not between", value1, value2, "created"); return (Criteria) this; } public Criteria andUpdatedIsNull() { addCriterion("updated is null"); return (Criteria) this; } public Criteria andUpdatedIsNotNull() { addCriterion("updated is not null"); return (Criteria) this; } public Criteria andUpdatedEqualTo(Date value) { addCriterion("updated =", value, "updated"); return (Criteria) this; } public Criteria andUpdatedNotEqualTo(Date value) { addCriterion("updated <>", value, "updated"); return (Criteria) this; } public Criteria andUpdatedGreaterThan(Date value) { addCriterion("updated >", value, "updated"); return (Criteria) this; } public Criteria andUpdatedGreaterThanOrEqualTo(Date value) { addCriterion("updated >=", value, "updated"); return (Criteria) this; } public Criteria andUpdatedLessThan(Date value) { addCriterion("updated <", value, "updated"); return (Criteria) this; } public Criteria andUpdatedLessThanOrEqualTo(Date value) { addCriterion("updated <=", value, "updated"); return (Criteria) this; } public Criteria andUpdatedIn(List<Date> values) { addCriterion("updated in", values, "updated"); return (Criteria) this; } public Criteria andUpdatedNotIn(List<Date> values) { addCriterion("updated not in", values, "updated"); return (Criteria) this; } public Criteria andUpdatedBetween(Date value1, Date value2) { addCriterion("updated between", value1, value2, "updated"); return (Criteria) this; } public Criteria andUpdatedNotBetween(Date value1, Date value2) { addCriterion("updated not between", value1, value2, "updated"); 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); } } }
[ "littleyaoyaoyao@gmail.com" ]
littleyaoyaoyao@gmail.com
4413f0fa2f495268932a1d78cfaa668bdf9e6a18
29496be1d2dffb72ae54a10cdb6a017897f1ca37
/src/main/java/com/itheima/crm/workbench/service/impl/TranServiceImpl.java
92cc6a6ff4577ba9ef01b18c9ef7ac379543530d
[]
no_license
syngebee/SSM-crm
19fa63f65ea2c0432c2f93729bc9502abf10d690
f36c17b3e7347b46ebc928557ee7b19b6d8457ae
refs/heads/master
2022-12-17T13:08:26.300755
2020-09-16T03:38:00
2020-09-16T03:38:00
287,734,114
0
0
null
null
null
null
UTF-8
Java
false
false
4,452
java
package com.itheima.crm.workbench.service.impl; import com.itheima.crm.utils.DateTimeUtil; import com.itheima.crm.utils.UUIDUtil; import com.itheima.crm.workbench.dao.CustomerDao; import com.itheima.crm.workbench.dao.TranDao; import com.itheima.crm.workbench.dao.TranHistoryDao; import com.itheima.crm.workbench.dto.TransactionRequestDTO; import com.itheima.crm.workbench.pojo.Customer; import com.itheima.crm.workbench.pojo.Tran; import com.itheima.crm.workbench.pojo.TranHistory; import com.itheima.crm.workbench.service.TranService; import com.itheima.crm.workbench.vo.PaginationVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; import java.util.Map; @Service public class TranServiceImpl implements TranService { @Autowired private TranDao tranDao; @Autowired private CustomerDao customerDao; @Autowired private TranHistoryDao tranHistoryDao; @Override public Boolean save(Tran tran,String customerName) { Boolean flag = true ; //查询客户名称 Customer customer = customerDao.getCustomerByName(customerName); //如果客户没有的话,需要创建客户 if (customer==null){ customer = new Customer(); customer.setId(UUIDUtil.getUUID()); customer.setOwner(tran.getOwner()); customer.setDescription(tran.getDescription()); customer.setContactSummary(tran.getContactSummary()); customer.setNextContactTime(tran.getNextContactTime()); customer.setCreateBy(tran.getCreateBy()); customer.setCreateTime(DateTimeUtil.getSysTime()); customer.setName(customerName); int count1 = customerDao.save(customer); if (count1!=1){ flag=false; } } //拿到客户id tran.setCustomerId(customer.getId()); //创建交易 int count2 =tranDao.save(tran); if (count2!=1){ flag=false; } //同时创建交易历史 TranHistory tranHistory = new TranHistory(); //拷贝属性,id同名忽略,还剩自己id和tranId BeanUtils.copyProperties(tran,tranHistory,"id","createTime"); tranHistory.setId(UUIDUtil.getUUID()); tranHistory.setTranId(tran.getId()); tranHistory.setCreateTime(DateTimeUtil.getSysTime()); //创建交易历史 int count3 = tranHistoryDao.save(tranHistory); if (count3!=1){ flag=false; } return flag; } @Override public Tran getTranById(String id) { return tranDao.getTranById(id); } @Override public List<TranHistory> getHistoryByTranId(String tranId) { return tranHistoryDao.getHistoryListByTranId(tranId); } @Override public Boolean changeStage(Tran tran) { //先更新stage boolean flag = true; int count1 = tranDao.changeStage(tran); if (count1!=1){ flag=false; } //生成一条交易历史 TranHistory tranHistory = new TranHistory(); tranHistory.setId(UUIDUtil.getUUID()); tranHistory.setCreateBy(tran.getEditBy()); tranHistory.setCreateTime(DateTimeUtil.getSysTime()); tranHistory.setExpectedDate(tran.getExpectedDate()); tranHistory.setMoney(tran.getMoney()); tranHistory.setTranId(tran.getId()); tranHistory.setStage(tran.getStage()); int count2 = tranHistoryDao.save(tranHistory); if (count2!=1){ flag=false; } return flag; } @Override public PaginationVO getCharts() { PaginationVO<Map<String, String>> pv = new PaginationVO<>(); int total =tranDao.getTotal(); List<Map<String,String>> dataList =tranDao.getTranSumByStage(); pv.setTotal(total); pv.setDataList(dataList); return pv; } @Override public PaginationVO pageList(TransactionRequestDTO tDto) { System.out.println(tDto); //初始化返回值 PaginationVO<Tran> pv = new PaginationVO<>(); //赋值1 List<Tran> trans = tranDao.pageList(tDto); pv.setDataList(trans); //赋值2 int sum = tranDao.getSum(tDto); pv.setTotal(sum); return pv; } }
[ "zs@bjpowernode.com" ]
zs@bjpowernode.com
80a5778bfa86974463dd773f3b05f60caa4270cf
dfea04937797a35a2afd803ff0fde505767b317e
/src/demo/service/test/JeecgTestService.java
4d7e3f1f53b6629f82ce6f86ba1d3d75303635e8
[]
no_license
itmrchen/JavaWebPlatform
95f1d4c0cd12f8e07a6a1aa13950e988e4fe41a9
7df661a16da1948fedb38ed24360adeaad856a36
refs/heads/master
2021-01-12T13:20:15.840357
2016-11-02T07:13:08
2016-11-02T07:13:08
72,196,832
1
0
null
null
null
null
UTF-8
Java
false
false
717
java
package demo.service.test; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.base.service.BaseService; import demo.dao.test.JeecgTestDao; /** * * <br> * <b>功能:</b>JeecgTestService<br> * <b>作者:</b>www.jeecg.org<br> * <b>日期:</b> Feb 2, 2013 <br> * <b>版权所有:<b>版权所有(C) 2013,www.jeecg.org<br> */ @Service("jeecgTestService") public class JeecgTestService<T> extends BaseService<T> { private final static Logger log= Logger.getLogger(JeecgTestService.class); @Autowired private JeecgTestDao<T> dao; public JeecgTestDao<T> getDao() { return dao; } }
[ "9700252@qq.com" ]
9700252@qq.com
73431223186ca544aad5ebff6f643fe0a822bc18
e0557df8db99a962f253c163887abbbc5268f5ce
/app/src/main/java/com/letumfalx/winshut/Time.java
892c80ba027b3eaed6f6a67d05a972e9bd7c3e3c
[]
no_license
letumfalx/WinShut
e0d80176179699d3fbc7c4f8f80fe1350c4fe545
d8edfe7b62e30080dd7cdfc4d9eb0513849e1f2b
refs/heads/master
2021-04-27T21:41:10.646720
2018-02-21T23:01:17
2018-02-21T23:01:17
122,404,626
0
0
null
null
null
null
UTF-8
Java
false
false
326
java
package com.letumfalx.winshut; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class Time extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_time); } }
[ "letum.falx@gmail.com" ]
letum.falx@gmail.com
c5b32b83a54663153d963045d0960dca9f3dfc40
53f140f8500c8cfa11702b6f6d8af552d4c9640a
/src/BitManipulation/MissingNumber.java
f50b8f74cb77e2a998b621d1fedfdf9c47af42b4
[]
no_license
prasadcoys/Elements_Of_Programming_interviews
44666fb1c90c783ff81d1a735a405cb183654f7f
48c7d9a7be37dece3053aa095b7b48418201d66b
refs/heads/master
2021-04-26T05:17:27.633007
2020-09-23T16:05:03
2020-09-23T16:05:03
107,143,062
2
0
null
null
null
null
UTF-8
Java
false
false
245
java
package BitManipulation; public class MissingNumber { public int missingNumber(int[] nums) { int sum = (nums.length * (nums.length+1)) /2; for (int num : nums) { sum-= num; } return sum; } }
[ "svaradharajan768@gmail.com" ]
svaradharajan768@gmail.com
4e0642e01f4aa2eb4e1372c9e17ed5714c02985d
7a269443927d80fed020d2d4f58c52ab6900975f
/app/src/main/java/com/lanayru/AGlideModule.java
33743dbd3a69054d0a082616cc075088bb984426
[]
no_license
qishi604/Lanayru
b92ea25855762627bc5f0a632e56a3d39df98515
d7a8c6e97df3ce9da8874198c4974bc86fed93e2
refs/heads/master
2021-06-20T01:01:04.026934
2019-08-15T08:34:43
2019-08-15T08:34:43
147,097,513
1
0
null
null
null
null
UTF-8
Java
false
false
278
java
//package com.lanayru; // //import com.bumptech.glide.annotation.GlideModule; //import com.bumptech.glide.module.AppGlideModule; // ///** // * @author 郑齐 // * @version V1.0 // * @since 2019-07-04 // */ //@GlideModule //public class AGlideModule extends AppGlideModule { //}
[ "v_zhengqi@saicmotor.com" ]
v_zhengqi@saicmotor.com
12feeb093c93f8cb9158581dd7fb097148ffa31e
150a58b1699f2c076ab61a1653e2670992983974
/src/com/shpp/p2p/cs/ykohuch/assignment6/hg/HistogramEqualizationImageTransforms.java
1b5a86c7da116473268602eccba716956316863e
[]
no_license
yurikoguch/Arrays
9aadd4c9b9fdc5ee419a7d6b8d40c076660c84eb
33416aecd41cf676dae185839141dee844d2eb72
refs/heads/master
2021-05-20T01:08:10.297149
2020-04-01T08:53:12
2020-04-01T08:53:12
252,121,685
0
0
null
null
null
null
UTF-8
Java
false
false
1,099
java
package com.shpp.p2p.cs.ykohuch.assignment6.hg; import acm.graphics.GImage; public class HistogramEqualizationImageTransforms { public static GImage toGrayscale(GImage image) { int[][] pixels = image.getPixelArray(); for (int row = 0; row < pixels.length; ++row) { for (int col = 0; col < pixels[row].length; ++col) { int intensity = (int) (0.3D * (double) GImage.getRed(pixels[row][col]) + 0.59D * (double) GImage.getGreen(pixels[row][col]) + 0.11D * (double) GImage.getBlue(pixels[row][col]) + 0.5D); pixels[row][col] = GImage.createRGBPixel(intensity, intensity, intensity); } } return new GImage(pixels); } public static int[][] imageToLuminances(int[][] pixels) { int[][] luminances = new int[pixels.length][pixels[0].length]; for (int row = 0; row < pixels.length; ++row) { for (int col = 0; col < pixels[row].length; ++col) { luminances[row][col] = GImage.getRed(pixels[row][col]); } } return luminances; } }
[ "yurikoguch@gmail.com" ]
yurikoguch@gmail.com
c48949152f83d24f3d37cebfcbdd96163988d470
c37cc036ea35489c574f0815e3735815a5daeca8
/WEB-INF/src/jc/family/game/fruit/FruitUserBean.java
1a4d224caff88c3fa0c2137a4a0663d530859bef
[]
no_license
liuyang0923/joycool
ac032b616d65ecc54fae8c08ae8e6f3e9ce139d3
e7fcd943d536efe34f2c77b91dddf20844e7cab9
refs/heads/master
2020-06-12T17:14:31.104162
2016-12-09T07:15:40
2016-12-09T07:15:40
75,793,605
0
0
null
null
null
null
UTF-8
Java
false
false
1,195
java
package jc.family.game.fruit; import jc.family.game.vs.VsGameBean; import jc.family.game.vs.VsUserBean; public class FruitUserBean extends VsUserBean { int operateCount; // 记录用户的操作次数 int updTeckCount;// 升级科技成功次数 int throwFruitCount;// 扔出的水果数 int beatFruitCount;// 消灭水果数 FruitUserBean(){ this.operateCount=0; this.updTeckCount=0; this.beatFruitCount=0; } public void init(VsGameBean game) { FruitGameBean fg = (FruitGameBean)game; fg.getFruitFamilyBean(getSide()).getUserList().add(this); } public int getUpdTeckCount() { return updTeckCount; } public void setUpdTeckCount(int updTeckCount) { this.updTeckCount = updTeckCount; } public int getThrowFruitCount() { return throwFruitCount; } public void setThrowFruitCount(int throwFruitCount) { this.throwFruitCount = throwFruitCount; } public int getBeatFruitCount() { return beatFruitCount; } public void setBeatFruitCount(int beatFruitCount) { this.beatFruitCount = beatFruitCount; } public int getOperateCount() { return operateCount; } public void setOperateCount(int operateCount) { this.operateCount = operateCount; } }
[ "liu_yang_0923@163.com" ]
liu_yang_0923@163.com
bc2a087f18b41ef9edf9302828f4d9fc0a67a295
7dc02565b237f6342268d37c0551fbc7bcc93690
/scouter.agent.java/src/scouter/javassist/bytecode/annotation/AnnotationMemberValue.java
94af6a90ff95ab5750568a341dbd4146be337d8d
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
Hanium-RealTimeScouter/Hanium-Scouter
b9de08c2735d62d0341b67c1d355c97615088d03
695ee6e0cd5b50270b71057a29b01902dcf3fcce
refs/heads/master
2020-12-30T13:08:41.951502
2017-08-19T06:49:43
2017-08-19T06:49:43
91,330,797
3
2
null
null
null
null
UTF-8
Java
false
false
3,004
java
/* * Javassist, a Java-bytecode translator toolkit. * Copyright (C) 2004 Bill Burke. All Rights Reserved. * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. Alternatively, the contents of this file may be used under * the terms of the GNU Lesser General Public License Version 2.1 or later, * or the Apache License Version 2.0. * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. */ package scouter.javassist.bytecode.annotation; import static scouter.javassist.bytecode.annotation.MemberValue.loadClass; import java.io.IOException; import java.lang.reflect.Method; import scouter.javassist.ClassPool; import scouter.javassist.bytecode.ConstPool; import scouter.javassist.bytecode.annotation.Annotation; import scouter.javassist.bytecode.annotation.AnnotationImpl; import scouter.javassist.bytecode.annotation.AnnotationsWriter; import scouter.javassist.bytecode.annotation.MemberValue; import scouter.javassist.bytecode.annotation.MemberValueVisitor; /** * Nested annotation. * * @author <a href="mailto:bill@jboss.org">Bill Burke</a> * @author Shigeru Chiba */ public class AnnotationMemberValue extends MemberValue { Annotation value; /** * Constructs an annotation member. The initial value is not specified. */ public AnnotationMemberValue(ConstPool cp) { this(null, cp); } /** * Constructs an annotation member. The initial value is specified by * the first parameter. */ public AnnotationMemberValue(Annotation a, ConstPool cp) { super('@', cp); value = a; } Object getValue(ClassLoader cl, ClassPool cp, Method m) throws ClassNotFoundException { return AnnotationImpl.make(cl, getType(cl), cp, value); } Class getType(ClassLoader cl) throws ClassNotFoundException { if (value == null) throw new ClassNotFoundException("no type specified"); else return loadClass(cl, value.getTypeName()); } /** * Obtains the value. */ public Annotation getValue() { return value; } /** * Sets the value of this member. */ public void setValue(Annotation newValue) { value = newValue; } /** * Obtains the string representation of this object. */ public String toString() { return value.toString(); } /** * Writes the value. */ public void write(AnnotationsWriter writer) throws IOException { writer.annotationValue(); value.write(writer); } /** * Accepts a visitor. */ public void accept(MemberValueVisitor visitor) { visitor.visitAnnotationMemberValue(this); } }
[ "occidere@naver.com" ]
occidere@naver.com
88b91f861ac77d39474f56c334441e26be65dd12
d63fb042830c68107b9afbc6b5e51decccc8f425
/src/retestCode/Question6a.java
640e019fe6abca8eab9eb66681b11cd7916090b0
[]
no_license
daltamur/Intro-to-Programming-Repository
18a8ad41f62eed7864683ef9c5f97825b2d78841
d0143657de15a81540344502a2d6240ecbc4f169
refs/heads/master
2020-12-23T23:56:34.319451
2020-02-08T01:27:44
2020-02-08T01:27:44
237,316,100
0
0
null
null
null
null
UTF-8
Java
false
false
436
java
package retestCode; public class Question6a { public static void main(String[] args){ String one="dogggggggg"; String two="hmmmm"; System.out.println(shorter(one, two)); } private static String shorter(String one, String two) { String shorter; if(one.length()<two.length()){ shorter=one; }else{ shorter=two; } return shorter; } }
[ "daltamur@oswego.edu" ]
daltamur@oswego.edu
505e9f07351023063dc0836ea7c99eab7b884eb1
61e9f0cb7766a8cda25cbb86b2fea6f20abd2a7d
/src/main/java/net/hackbee/interview/carparts/PartNotFoundException.java
e9cadfe566bca72bf7b4e4480220d12b49a7cfbd
[]
no_license
patryk-kozak/car-parts-interview
ced78d39683971cfaa28c366ebb88b0c920bf5f9
dbd0cb04f28d92f11c6c6d695328777bf42f9a65
refs/heads/master
2022-12-18T12:11:01.304341
2020-09-20T21:44:31
2020-09-20T21:44:31
297,142,236
0
0
null
null
null
null
UTF-8
Java
false
false
326
java
package net.hackbee.interview.carparts; // Checked exception to steer logic. // If can, mitigate steering of logic to something else. public class PartNotFoundException extends Exception { public PartNotFoundException(Long partId) { super(String.format("Part with id = %d has not been found.", partId)); } }
[ "thehackbee@gmail.com" ]
thehackbee@gmail.com
f34311ba43b747a52d4ad2bf871d3a0eb13f1e64
cfdea608feedb5f5f5f58c377cbba960613523e2
/src/test/java/wang/ismy/orm/MyRepositoryFactoryTest.java
f8936d6cf27f1df57ae8f74784c1ba8f2982d4aa
[]
no_license
0xcaffebabe/orm
64a749a94f8bf58301dc632dc4f0e828b8988aba
f92841257218316a2e786f592fe8545401a9c7bb
refs/heads/master
2022-02-16T03:26:18.657285
2019-02-06T03:48:29
2019-02-06T03:48:29
168,646,587
0
0
null
2022-01-06T10:44:56
2019-02-01T05:20:53
Java
UTF-8
Java
false
false
778
java
package wang.ismy.orm; import com.alibaba.druid.pool.DruidDataSource; import org.junit.Test; import javax.sound.midi.Soundbank; import javax.sql.DataSource; import static org.junit.Assert.*; public class MyRepositoryFactoryTest { @Test public void getRepositoryAgent() { DruidDataSource dataSource = new DruidDataSource(); dataSource.setUsername("root"); dataSource.setPassword("123456"); dataSource.setUrl("jdbc:mysql:///orm?serverTimezone=Hongkong"); MyRepositoryFactory factory = new MyRepositoryFactory(dataSource); EntityRepository repository = factory.getRepositoryAgent(EntityRepository.class); assertEquals(1,repository.insert("kkk")); assertEquals(2,repository.selectAll().size()); } }
[ "chenjiping9527@gmail.com" ]
chenjiping9527@gmail.com
e126923267eae5ad5cd2d6a71078f9cba9ba4e82
1d1fe831c6d24d4b37ca05097b73d9d39dd736be
/src/org/cmc/music/clean/MetadataCleanup.java
9113e0a792aa9928706b316d28de2e9f122bd0fb
[]
no_license
smokingrain/KPlayer
c4c665a5148521bec8a23fafd3fe046ef332d6f0
4e5560463e92068bcaee763b1bd44ec7c7eb7ba9
refs/heads/master
2021-06-22T11:01:18.582357
2020-11-30T11:09:54
2020-11-30T11:09:54
63,334,394
9
5
null
null
null
null
UTF-8
Java
false
false
35,916
java
/* * Written By Charles M. Chen * * Created on Jan 1, 2006 * */ package org.cmc.music.clean; import java.util.Arrays; import java.util.Hashtable; import java.util.Map; import java.util.Vector; import org.apache.regexp.RE; import org.cmc.music.metadata.IMusicMetadata; import org.cmc.music.metadata.MusicMetadataConstants; import org.cmc.music.util.Debug; import org.cmc.music.util.MyComparator; import org.cmc.music.util.MyMap; import org.cmc.music.util.TextUtils; public class MetadataCleanup implements MusicMetadataConstants { private static final String DEFAULTS[] = { "album", // "artist", // "title", // "no title", // "no artist", // "undefined", // "va", // "mp3", // "cd", // "genre", // "unknown", // "name", // "n/a", // "Untitled", // }; static { Arrays.sort(DEFAULTS, MyComparator.kToStringLengthReverse); } private static final String DEFAULTS_VA[] = { "Compilation", // "V.A", // "V.A.", // "V. A.", // "V. A", // "V/A", // "Va", // "V A", // "Various Artists", // "Various", // "Varioius", // "Varied Artists", // "Varias", // "Varios Interpretes", // "Varios", // "Various Artist", // "Various Artistses", // "Various Artits", // "Various Artisis", // "Various Aritsts", // "Varius Artists", // "Various Composers", // "Various djs", // }; static { Arrays.sort(DEFAULTS_VA, MyComparator.kToStringLengthReverse); } private static final String DEFAULTS_SOUNDTRACK[] = { "The Motion Picture".toLowerCase(), // "Motion Picture".toLowerCase(), // "Original Motion Picture".toLowerCase(), // "Original Motion Picture Soundtrack".toLowerCase(), // "The Soundtrack".toLowerCase(), // "Music From The Motion Picture".toLowerCase(), // "Original Soundtrack Recording".toLowerCase(), // "Trilha Sonora Original".toLowerCase(), // "ost", // "original soundtrack", // "soundtrack", // "Music From The Motion Picture Soundtrack", // }; static { Arrays.sort(DEFAULTS_SOUNDTRACK, MyComparator.kToStringLengthReverse); } private static final String DEFAULT_ACAPELLA = "Ac+ap+el+as?".toLowerCase(); public String rectifyGeneric(String s) { return rectifyGeneric(s, null); } public String rectifyGeneric(String s, IMusicMetadata flags) { String old = s; while (true) { s = rectifyGeneric_1(s, flags); s = removeQuotes(s); if (s == null) return null; if (s.equals(old)) return s; old = s; } } private String removeQuotes(String s) { if (s == null) return null; if (new RE("^\".+\"$").match(s) || new RE("^'.+'$").match(s) || new RE("^\\{.+\\}$").match(s) || new RE("^\\(.+\\)$").match(s) || new RE("^<.+>$").match(s) || new RE("^\\[.+\\]$").match(s)) { s = s.substring(1, s.length() - 1); } return s; } private static final String ROMAN_NUMERALS = "ivx"; private boolean isRomanNumeral(String s) { char chars[] = s.toCharArray(); for (int i = 0; i < chars.length; i++) { char c = chars[i]; if (ROMAN_NUMERALS.indexOf(c) < 0 && ROMAN_NUMERALS.toUpperCase().indexOf(c) < 0) return false; } return true; } private static final Map NATURAL_NUMBERS = new MyMap(); static { NATURAL_NUMBERS.put("zero", new Integer(0)); NATURAL_NUMBERS.put("one", new Integer(1)); NATURAL_NUMBERS.put("two", new Integer(2)); NATURAL_NUMBERS.put("three", new Integer(3)); NATURAL_NUMBERS.put("four", new Integer(4)); NATURAL_NUMBERS.put("five", new Integer(5)); NATURAL_NUMBERS.put("six", new Integer(6)); NATURAL_NUMBERS.put("seven", new Integer(7)); NATURAL_NUMBERS.put("eight", new Integer(8)); NATURAL_NUMBERS.put("nine", new Integer(9)); NATURAL_NUMBERS.put("ten", new Integer(10)); NATURAL_NUMBERS.put("eleven", new Integer(11)); NATURAL_NUMBERS.put("twelve", new Integer(12)); NATURAL_NUMBERS.put("thirteen", new Integer(13)); NATURAL_NUMBERS.put("fourteen", new Integer(14)); NATURAL_NUMBERS.put("fifteen", new Integer(15)); NATURAL_NUMBERS.put("sixteen", new Integer(16)); NATURAL_NUMBERS.put("seventeen", new Integer(17)); NATURAL_NUMBERS.put("eighteen", new Integer(18)); NATURAL_NUMBERS.put("nineteen", new Integer(19)); NATURAL_NUMBERS.put("twenty", new Integer(20)); } private Number parseNumber(String s) { if (s == null) return null; s = s.trim(); if (s.length() < 1) return null; try { return Integer.valueOf(s.trim()); } catch (Throwable e) { // Debug.debug(s, e.getMessage()); } Number value = (Number) NATURAL_NUMBERS.get(s.toLowerCase()); return value; } private String clean(String s, IMusicMetadata flags) { // String old_s = s; s = s.trim(); s = Diacriticals.convertDiacriticals(s); while (s.startsWith("-")) s = s.substring(1); s = removeSafePrefixSuffix(s, DEFAULTS); if (s == null) return null; { // Debug.debug("!x! considering disc: '" + s + "'"); final String DISC_REGEXS[] = { "[-\\(\\[] ?dis[ck] ?([a-zA-Z\\d]+)[\\)\\]]?$", // "[-\\(\\[] ?cd ?([a-zA-Z\\d]+)[\\)\\]]?$", // "^[\\(\\[]?dis[ck] ?([a-zA-Z\\d]+) ?[-\\)\\]]", // "^[\\(\\[]?cd ?([a-zA-Z\\d]+) ?[-\\)\\]]", // "^dis[ck] ?([a-zA-Z\\d]+)$", // "^cd[\\. \\-]*([a-zA-Z\\d]+)$", // }; for (int i = 0; i < DISC_REGEXS.length; i++) { String kDISC_REGEX = DISC_REGEXS[i]; RE re = new RE(kDISC_REGEX); if (re.match(s.toLowerCase())) { if (re.getParenCount() < 2) { Debug.debug("Disc missing number", s); Debug.dumpStack(3); continue; } int start = re.getParenStart(0); int end = re.getParenEnd(0); String value = re.getParen(1); // Debug.debug("value", value); Number number = parseNumber(value); if (number == null) { Debug.debug("Disc missing value", value); Debug.dumpStack(3); continue; } // Debug.debug("number", number); String fixed = s.substring(0, start) + s.substring(end); // Debug.debug("fixed", fixed); // Debug.debug("start", start); // Debug.debug("end", end); if (flags != null) flags.setDiscNumber(number); s = fixed.trim(); // return null; } } } String suffixes[] = { " ", // "-", // ".Mp3", // " Mp3", // }; s = removeSuffixes(s, suffixes); String prefixes[] = { " ", // "-", // }; s = removePrefixes(s, prefixes); // { // final String suffixes[] = { // " ", ".", "-", "Gabba Cc", "GABBA_CC", "G A B B A C C", // "mp3-link", "Mp3 - Link", ".mp3", // }; // // s = this.removeSuffixes(s, suffixes); // } // Debug.debug("clean 2", s); s = s.replace('_', ' '); s = TextUtils.replace(s, "-", " - "); s = TextUtils.replace(s, "`", "'"); s = TextUtils.replace(s, "�", "'"); s = TextUtils.replace(s, "�", "'"); s = TextUtils.replace(s, "[", "("); s = TextUtils.replace(s, "]", ")"); s = TextUtils.replace(s, "(", " ("); s = TextUtils.replace(s, "~", "-"); s = TextUtils.replace(s, " ", " "); s = TextUtils.replace(s, " ", " "); s = TextUtils.replace(s, "..", "."); s = TextUtils.replace(s, "--", "-"); s = TextUtils.replace(s, "- -", "-"); s = TextUtils.replace(s, "#", "No. "); { String old = s; // Debug.debug("s1", s); s = removeSafePrefixSuffix(s, DEFAULTS_SOUNDTRACK, true); // Debug.debug("s2", s); if (s == null || !s.equals(old)) { if (flags != null) flags.setIsSoundtrack(Boolean.TRUE); } if (s == null) return null; } { String temp = removeSafePrefixSuffix(s, DEFAULT_ACAPELLA, true); // String temp = removeSafePrefixSuffix(s, kDEFAULTS_acapella); // Debug.debug("s2", s); if (temp == null || !s.equals(temp)) { if (flags != null) flags.setIsAcapella(Boolean.TRUE); } } // Debug.debug("clean 3", s); { String old = s; s = removeSafePrefixSuffix(s, DEFAULTS_VA, true); if (s == null || !s.equals(old)) { if (flags != null) flags.setIsCompilation(Boolean.TRUE); } if (s == null) return null; } { String splits[] = TextUtils.split(s, " "); for (int i = 0; i < splits.length; i++) { if (isRomanNumeral(splits[i])) splits[i] = splits[i].toUpperCase(); } s = TextUtils.join(splits, " "); } s = s.trim(); // Debug.debug("clean 4", s); // if (s == null) // return null; // s = insertSpacesBeforeCaps(s); s = toTitleCase(s); return s; } private String toTitleCase(String s) { StringBuffer result = new StringBuffer(); char prev = 0; // Debug.debug("toTitleCase before", s); char chars[] = s.toCharArray(); for (int i = 0; i < chars.length; i++) { char c = chars[i]; if (Character.isLetter(c)) { if (i == 0) result.append(Character.toUpperCase(c)); else if ((prev == '\'')) // else if ((prev == '\'') && Character.isLetter(next)) result.append(Character.toLowerCase(c)); else if (!Character.isLetter(prev)) result.append(Character.toUpperCase(c)); else result.append(Character.toLowerCase(c)); } else result.append(c); prev = c; } // Debug.debug("toTitleCase after", s); return result.toString(); } private String insertSpacesBeforeCaps(String s) { StringBuffer result = new StringBuffer(); char prev = 0; for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (Character.isLetter(c) && (i > 0) && Character.isLetter(prev) && Character.isLowerCase(prev) && Character.isUpperCase(c)) result.append(' '); result.append(c); prev = c; } return result.toString(); } private String rectifyGeneric_1(String s, IMusicMetadata flags) { // Debug.debug("rectifyGeneric_1 a", s); // Debug.debug("rectifyGeneric_1 1", s); if (s == null) return null; s = s.trim(); if (s.length() < 1) return null; // s = new MusicOrganizerFilter().getNewName2(s); s = clean(s, flags); // Debug.debug("rectifyGeneric_1 2", s); if (s == null) return null; s = TextUtils.replace(s, ".", ". "); s = TextUtils.replace(s, " .", " "); s = TextUtils.replace(s, " ", " "); // Debug.debug("rectifyGeneric_1 b", s); if (new RE("^\\?+$").match(s)) { // Debug.debug("discarding question...", s); return null; } // Debug.debug("rectifyGeneric_1 c", s); // Debug.debug("rectifyGeneric_1 6", s); while (s.startsWith(".")) s = s.substring(1); s = TextUtils.replace(s, "Live @ ", "Live At "); s = TextUtils.replace(s, "Live@", "Live At "); // s = s.re if (s == null) return null; if (s.endsWith(", The")) s = "The " + s.substring(0, s.length() - 5); return s; } public String rectifySongTitle(String s) { return rectifySongTitle( // null, null, s, null); } // public String rectifySongTitle(Album album, String s) // { // return rectifySongTitle(null, album, s); // } // // public String rectifySongTitle(Artist artist, String s) // { // return rectifySongTitle(artist, null, s); // } public String rectifySongTitle( // Artist artist, Album album, String s, IMusicMetadata flags) { String old = s; // while (true) for (int i = 0; true; i++) { // Debug.debug("s(" + i + ")", s); s = rectifySongTitle_1(s, flags); if (s == null) return null; // if (artist != null) // { // if (s.startsWith(artist.name + " - ")) // s = s.substring(artist.name.length() + 3); // if (s.endsWith(" - " + artist.name)) // s = s.substring(0, s.length() - (artist.name.length() + 3)); // } // if (album != null) // { // if (s.startsWith(album.name + " - ")) // s = s.substring(album.name.length() + 3); // if (s.endsWith(" - " + album.name)) // s = s.substring(0, s.length() - (album.name.length() + 3)); // } if (s.equals(old)) return s; old = s; } } private void parseTrackNumber(String s, IMusicMetadata flags) { if (flags == null) return; try { s = s.trim(); Number number = new Integer(s); if (flags != null) flags.setTrackNumberNumeric(number); // Debug.debug(KEY_TRACK_NUMBER, number); } catch (NumberFormatException e) { Debug.debug("bad track number", s); } catch (Throwable e) { Debug.debug("s", s); Debug.debug(e); } } private String removeTrackNumbers(String s, IMusicMetadata flags) { if (s == null) return null; if (new RE("^(audio)? ?track ?[- ]?[0-9][0-9]?$") .match(s.toLowerCase())) { if (s.toLowerCase().startsWith("audio")) s = s.substring(5).trim(); parseTrackNumber(s.substring(5), flags); // Debug.debug("discarding track...", s); return null; } if (new RE("^piste ?[- ]?[0-9][0-9]?$").match(s.toLowerCase())) { parseTrackNumber(s.substring(5), flags); // Debug.debug("discarding track...", s); return null; } // Debug.debug("removeTrackNumbers 1", s); if (new RE("^[0-9][0-9] - ").match(s) || new RE("^[0-9][0-9][0-9] - ").match(s) || new RE("^[aAbBcCdD][0-9] - ").match(s)) { // Debug.debug("attempting to strip track number...", s); int index = s.indexOf('-'); if (index >= 0) { String after = s.substring(index + 1).trim(); // Debug.debug("\t" + "after", after); if (after.indexOf('-') < 0) // if mutiple -'s then ignore... { parseTrackNumber(s.substring(0, index), flags); s = after; } } } if (new RE("^\\([0-9][0-9]\\) ").match(s) || new RE("^\\([abcdABCD][0-9]\\) ").match(s)) { // Debug.debug("attempting to strip track number...", s); int index = s.indexOf(')'); if (index >= 0) { parseTrackNumber(s.substring(1, index), flags); s = s.substring(index + 1).trim(); } } // Debug.debug("removeTrackNumbers 2", s); // if (new RE("^\\([0-9][0-9]\\) ").match(s)) // { // // Debug.debug("attempting to strip track number...", s); // int index = s.indexOf(')'); // if (index >= 0) // { // parseTrackNumber(s.substring(1, index), flags); // s = s.substring(index + 1).trim(); // } // } // Debug.debug("removeTrackNumbers 3", s); return s; } private String rectifySongTitle_1(String s, IMusicMetadata flags) { s = rectifyGeneric_1(s, flags); if (s == null) return null; s = removeTrackNumbers(s, flags); if (s == null) return null; s = removeQuotes(s); return s; } private String removeSuffixes(String s, String suffixes[]) { return removeSuffixes(s, new Vector(Arrays.asList(suffixes))); } private String removeSuffixes(String s, Vector suffixes) { // return removeSuffixes(s, suffixes, ""); // } // // private String removeSuffixes(String s, String suffixes[], // String suffix_prefix) // { if (s == null) return null; for (int i = 0; i < suffixes.size(); i++) { String suffix = (String) suffixes.get(i); // suffix = suffix_prefix + suffix; if (s.toLowerCase().endsWith(suffix.toLowerCase())) s = s.substring(0, s.length() - suffix.length()); } return s; } private String removePrefixes(String s, String prefixes[]) { return removePrefixes(s, new Vector(Arrays.asList(prefixes))); // // return removePrefixes(s, prefixes, ""); // // } // // // // private String removePrefixes(String s, String prefixes[], // // String prefix_suffix) // // { // if (s == null) // return null; // // for (int i = 0; i < prefixes.length; i++) // { // String prefix = prefixes[i]; // // prefix = prefix + prefix_suffix; // // if (s.toLowerCase().startsWith(prefix.toLowerCase())) // s = s.substring(prefix.length()); // } // return s; } private String removePrefixes(String s, Vector prefixes) { if (s == null) return null; for (int i = 0; i < prefixes.size(); i++) { String prefix = (String) prefixes.get(i); // prefix = prefix + prefix_suffix; if (s.toLowerCase().startsWith(prefix.toLowerCase())) s = s.substring(prefix.length()); } return s; } private String discardMatches(String s, String patterns[]) { if (s == null) return null; for (int i = 0; i < patterns.length; i++) { String prefix = patterns[i]; if (s.equalsIgnoreCase(prefix)) return null; } return s; } public String rectifyAlbum(String s) { return rectifyAlbum(s, null); } public String rectifyAlbum(String s, IMusicMetadata flags) { String old = s; while (true) { s = rectifyAlbum_1(s, flags); if (s == null) return null; // if (artist != null) // { // if (s.startsWith(artist.name + " - ")) // s = s.substring(artist.name.length() + 3); // if (s.endsWith(" - " + artist.name)) // s = s.substring(0, s.length() - (artist.name.length() + 3)); // } if (s.equals(old)) return s; old = s; } } private String removeYearPrefixSuffix(String s) { // Debug.debug("removeYearPrefixSuffix before", s); if (s == null) return null; if (new RE("^\\(199[0-9]\\)").match(s) || new RE("^\\(200[0-9]\\)").match(s)) s = s.substring(7); if (new RE("^\\( 199[0-9] \\)").match(s) || new RE("^\\( 200[0-9] \\)").match(s)) s = s.substring(9); if (new RE("\\(199[0-9]\\)$").match(s) || new RE("\\(200[0-9]\\)$").match(s)) s = s.substring(0, s.length() - 7); if (new RE("\\( 199[0-9] \\)$").match(s) || new RE("\\( 200[0-9] \\)$").match(s)) s = s.substring(0, s.length() - 9); if (new RE("199[0-9] - ").match(s) || new RE("200[0-9] - ").match(s)) { int index = s.indexOf('-'); if (index >= 0) { String temp = s.substring(index + 1); if (temp.indexOf('-') < 0) s = temp; } } if (new RE("- 199[0-9]").match(s) || new RE(" - 200[0-9]").match(s)) { int index = s.lastIndexOf('-'); if (index >= 0) { String temp = s.substring(0, index); if (temp.indexOf('-') < 0) s = temp; } } // Debug.debug("removeYearPrefixSuffix after", s); return s; } private static final String PATTERNS_ALBUM[] = { "dvd", // "10\"", // "12 - Inch", // "12 Inch", // "12 Inch Single", // "12\"", // "12\" Ep", // "12\" Vinyl", // "7 Inch", // "7\"", // "Advance", // "Advance Copy", // "Bonus Disc", // "Box", // "Cd", // "Cd Single", // "Cdm", // "Cdr", // "Cds", // "maxi", // "maxi single", // "Promo Cd", // "Ep", // "Full Vls", // // "Vls", // "Import", // "Lp", // // "Ost", // "Promo", // "Promo Cds", // "Retail", // "Single", // "Vinyl", // "Vinyl Single", // "Vls", // "cd", // "cds", // "ep", // "unknown album", // "Remastered", // }; static { Arrays.sort(PATTERNS_ALBUM, MyComparator.kToStringLengthReverse); } private static final String PATTERNS_ARTIST[] = { "skit", // "live", // }; static { Arrays.sort(PATTERNS_ARTIST, MyComparator.kToStringLengthReverse); } public String rectifyAlbum_1(String s, IMusicMetadata flags) { s = rectifyGeneric_1(s, flags); if (s == null) return null; s = removeSafePrefixSuffix(s, PATTERNS_ALBUM); if (s == null) return null; if (s.endsWith(" Box Set")) { if (flags != null) flags.setIsCompilation(Boolean.TRUE); } s = removeYearPrefixSuffix(s); s = removeURLs(s); s = removeQuotes(s); { String old = s; s = removeSafePrefixSuffix(s, DEFAULT_ACAPELLA, true); // s = removeSafePrefixSuffix(s, kDEFAULTS_acapella); if (s == null || !s.equals(old)) { if (flags != null) flags.setIsAcapella(Boolean.TRUE); } if (s == null) return null; } if (s.endsWith(" !")) s = s.substring(0, s.length() - 2); else if (s.endsWith(" (!)")) s = s.substring(0, s.length() - 4); return s; } private String removeURLs(String s) { if (s == null) return null; { if (new RE("^http://").match(s.toLowerCase())) return null; // if (new RE("^[hH][tT][tT][pP]://").match(s)) // return null; } { String temp = s; temp = TextUtils.replace(temp, ". ", "."); // Debug.debug("s1", s); RE re = new RE("^[\\w \\-]*\\.[\\w \\.\\-]*\\.(com|net|org|edu)$"); // re.setMatchFlags(RE.MATCH_CASEINDEPENDENT); if (re.match(temp.toLowerCase())) return null; // Debug.debug("s2", s); // if (new RE( // "^[\\w \\-]*\\.[\\w \\.\\-]*\\.([cC][oO][mM]|[oO][rR][gG]|[nN][eE][tT])$") // .match(temp)) // { // // Debug.debug("discarding album url...", s); // return null; // } } return s; } public String rectifyArtist(String s) { return rectifyArtist(s, null); } public String rectifyArtist(String s, IMusicMetadata flags) { String old = s; while (true) { s = rectifyArtist_1(s, flags); if (s == null) return null; // s = removeTrackNumbers(s); if (s.equals(old)) return s; old = s; } } private String rectifyArtist_1(String s, IMusicMetadata flags) { // Debug.debug("rectifyArtist_1 1", s); s = rectifyGeneric_1(s, flags); if (s == null) return null; // Debug.debug("rectifyArtist_1 2", s); if (s.equalsIgnoreCase("unknown artist")) return null; // Debug.debug("rectifyArtist_1 3", s); s = removeTrackNumbers(s, flags); s = removeYearPrefixSuffix(s); s = removeSafePrefixSuffix(s, PATTERNS_ARTIST); if (s == null) return null; { String old = s; // s = removeSafePrefixSuffix(s, kDEFAULTS_acapella); s = removeSafePrefixSuffix(s, DEFAULT_ACAPELLA, true); if (s == null || !s.equals(old)) { if (flags != null) flags.setIsAcapella(Boolean.TRUE); } if (s == null) return null; } s = removeQuotes(s); s = removeURLs(s); return s; } public String rectifyGenre(String s) { String old = s; while (true) { s = rectifyGenre_1(s); if (s == null) return null; if (s.equals(old)) return s; old = s; } } private String rectifyGenre_1(String s) { s = rectifyGeneric_1(s, null); if (s == null) return null; if (s.equalsIgnoreCase("music")) return null; s = removeQuotes(s); s = TextUtils.replace(s, " - ", "-"); s = removeSafePrefixSuffix(s, "�", true); s = removeSafePrefixSuffix(s, DEFAULT_ACAPELLA, true); return s; } public String rectifyPublisher(String s) { String old = s; while (true) { s = rectifyPublisher_1(s); if (s == null) return null; if (s.equals(old)) return s; old = s; } } private String rectifyPublisher_1(String s) { s = rectifyGeneric_1(s, null); if (s == null) return null; s = removeURLs(s); s = removeQuotes(s); s = TextUtils.replace(s, " - ", "-"); return s; } // public Vector splitName(String s, DatabaseNamedItem.Type type, // IMusicMetadata flags) // { // if (s == null) // return new Vector(); // // // if (s.indexOf('/') < 0) // // return new Vector(Arrays.asList(new String[]{ // // s, // // })); // // String splits[] = TextUtils.split(s, '/'); // Vector v = new Vector(Arrays.asList(splits)); // // // Debug.debug("v(" + id + ")", v.size()); // // // v = removeDuplicates(v, type); // // return v; // // Vector result = new Vector(); // // for (int i = 0; i < v.size(); i++) // { // String child = (String) v.get(i); // child = type.rectifyName(child, flags); // if (child == null) // continue; // // result.remove(child); // result.add(child); // } // // Collections.sort(result); // // return result; // } // private static class SecondaryArtistTag // { // public final String tag; // public final Number artist_type_id; // // public SecondaryArtistTag(String tag, Number artist_type_id) // { // this.artist_type_id = artist_type_id; // this.tag = tag; // } // } // private static final SecondaryArtistTag kSECONDARY_ARTIST_TAGS[] = { // new SecondaryArtistTag("f\\.", kARTIST_TYPE_FEATURING), // // new SecondaryArtistTag("ft\\.", kARTIST_TYPE_FEATURING), // // new SecondaryArtistTag("feat\\.", kARTIST_TYPE_FEATURING), // // new SecondaryArtistTag("featuring ", kARTIST_TYPE_FEATURING), // // new SecondaryArtistTag("produced by ", kARTIST_TYPE_PRODUCER), // // // new SecondaryArtistTag(" remix", kARTIST_TYPE_MIX_ARTIST), // // // new SecondaryArtistTag(" mix", kARTIST_TYPE_MIX_ARTIST), // // }; private static final String FEATURING[] = { "f\\.", // "ft\\.", // "feat\\.", // "featuring ", // }; private Vector listToNames(RE re) { Vector result = new Vector(); int count = re.getParenCount(); for (int i = 0; i < count / 2; i++) { String child = re.getParen(i * 2 + 1); // Debug.debug("child(" + i + ")", child); child = rectifyArtist(child); // Debug.debug("child.1(" + i + ")", child); result.remove(child); result.add(child); } return result; } private Vector debugRE(RE re) { Vector result = new Vector(); int count = re.getParenCount(); for (int i = 0; i < count; i++) { String child = re.getParen(i); Debug.debug("child(" + i + ")", child); result.add(child); } return result; } public String processFeaturing(String s, Vector primary_artists, Vector featured_artists, String pattern) { if (s == null) return null; RE re = new RE(pattern); if (re.match(s.toLowerCase())) { // Debug.debug("\t" + "featuring match(" + pattern + ")", s); // String wholeExpr = re.getParen(0); // Debug.debug("\t" + "wholeExpr", wholeExpr); // String insideParens = re.getParen(1); // Debug.debug("\t" + "insideParens", insideParens); int startInside = re.getParenStart(1); // Debug.debug("\t" + "startInside", startInside); int endInside = re.getParenEnd(1); // Debug.debug("\t" + "endInside", endInside); String left = s.substring(0, startInside); // Debug.debug("\t" + "left", left); String right = s.substring(startInside, endInside); // Debug.debug("\t" + "right", right); // int pattern_length = TextUtils.replace(pattern. "\\", "\"); int index = Integer.MAX_VALUE; right = right.trim(); { int i = right.indexOf('.'); if (i >= 0) index = Math.min(index, i); } { int i = right.indexOf(' '); if (i >= 0) index = Math.min(index, i); } if (index < 0) { Debug.debug("\t" + "couldn't use match(" + pattern + ")", s); return s; } right = right.substring(index + 1); if (right.endsWith(")")) right = right.substring(0, right.length() - 1); if (left.endsWith("(")) left = left.substring(0, left.length() - 1); right = right.trim(); RE re2 = new RE("(.*)(,.*)*\\&(.*)"); if (re2.match(right)) { Vector v = listToNames(re2); featured_artists.removeAll(v); featured_artists.addAll(v); } else { re2 = new RE("(.*)(,.*)*\\ And (.*)"); if (re2.match(right)) { Vector v = listToNames(re2); featured_artists.removeAll(v); featured_artists.addAll(v); } else { // Debug.debug("simple featuring", right); right = rectifyArtist(right); featured_artists.remove(right); featured_artists.add(right); } } s = rectifyArtist(left); // Debug.debug("\t" + "s", s); } return s; } public void processFeaturing(String s, Vector primary_artists, Vector featured_artists) { // Debug.debug("processFeaturing", s); for (int i = 0; i < FEATURING.length; i++) { String regex = "\\((" + FEATURING[i] + ".*)\\)$"; s = processFeaturing(s, primary_artists, featured_artists, regex); } for (int i = 0; i < FEATURING.length; i++) { String regex = "( " + FEATURING[i] + ".*$)"; s = processFeaturing(s, primary_artists, featured_artists, regex); } if (primary_artists == null) return; s = rectifyArtist(s); primary_artists.remove(s); primary_artists.add(s); } private static final String ESCAPED = "^$.[|*+?\\(<)>#=/-{}"; public String toRegexLiteral(String s) { StringBuffer result = new StringBuffer(); char chars[] = s.toCharArray(); for (int i = 0; i < chars.length; i++) { char c = chars[i]; if (ESCAPED.indexOf(c) >= 0) result.append('\\'); result.append(c); } return result.toString(); } // private static final String kREGEX_OPEN_TOKENS = "\\(\\[\\{\\\"\\'"; // private static final String kREGEX_CLOSE_TOKENS = "\\)\\]\\}\\\"\\'"; public String getPrefixPattern(String s, boolean permissive) { return "^('" + s + "'|\\\"" + s + "\\\"|\\[" + s + "\\]|\\(" + s + "\\)|\\{" + s + "\\}|" + s + "\\-" + (permissive ? "|" + s + " " : "") + ")"; // return ("^[" + kREGEX_OPEN_TOKENS + "]?" + s + " ?[" // + (permissive ? " " : "") + "\\-" + kREGEX_CLOSE_TOKENS + "]"); } public String getSuffixPattern(String s, boolean permissive) { return "('" + s + "'|\\\"" + s + "\\\"|\\[" + s + "\\]|\\(" + s + "\\)|\\{" + s + "\\}|\\-" + s + "" + (permissive ? "| " + s : "") + ")$"; // return ("[" + (permissive ? " " : "") + "\\-" + kREGEX_OPEN_TOKENS // + "] ?" + s + "[" + kREGEX_CLOSE_TOKENS + "]?$"); } public String getPrefixPattern2(String s) { return "^('.*'|\\\".*\\\"|\\[.*\\]|\\(.*\\)|\\{.*\\}|.*\\-) ?" + s + "$"; // return ("^[" + kREGEX_OPEN_TOKENS + "]?" + "(.*)" + " ?[" // // + (permissive ? " " : "") // + "\\-" + kREGEX_CLOSE_TOKENS + "] ?" + s + "$"); } public String getSuffixPattern2(String s) { return "^" + s + " ?('.*'|\\\".*\\\"|\\[.*\\]|\\(.*\\)|\\{.*\\}|\\-.*)$"; // return ("^" + s + " ?[" // // + (permissive ? " " : "") // + "\\-" + kREGEX_OPEN_TOKENS + "] ?" + "(.*)" + "[" // + kREGEX_CLOSE_TOKENS + "]?$"); } private String stripRegexMatch(String s, String pattern) { if (s == null) return null; try { // Debug.debug("\t"+"s", s); // Debug.debug("\t"+"pattern", pattern); RE re = REGEX_CACHE.getRegEx(pattern); // RE re = new RE(pattern.toLowerCase()); // Debug.debug("prefix", prefix_pattern); if (!re.match(s.toLowerCase())) return s; // String match = re.getParen(0); // Debug.debug("match(" + pattern + ")", s); s = s.substring(0, re.getParenStart(0)) + s.substring(re.getParenEnd(0)); // Debug.debug("updating...new_name ", new_name); return s; } catch (Exception e) { Debug.debug("s", s); Debug.debug("pattern", pattern); return s; } } private static class RegExCache { private final Map map = new Hashtable(); // private final LinkedList order = new LinkedList(); private static final int kMAX = 25000; public final RE getRegEx(String pattern) { if (pattern == null) return null; pattern = pattern.toLowerCase(); RE result = (RE) map.get(pattern); if (result == null) { result = new RE(pattern); map.put(pattern, result); } // else // order.remove(pattern); // order.addFirst( pattern); // // if(order.size()>kMAX) // { // Object key = order.getLast(); // order.removeLast(); // map.remove(key); // } if (map.keySet().size() > kMAX) { Debug.debug("emptying regex cache."); map.clear(); } return result; } } private static final RegExCache REGEX_CACHE = new RegExCache(); private String extractRegexPattern(String s, String pattern, int paren) { if (s == null) return null; try { RE re = REGEX_CACHE.getRegEx(pattern); // RE re = new RE(pattern.toLowerCase()); if (!re.match(s.toLowerCase())) return s; if (paren < re.getParenCount()) { s = re.getParen(paren); } return s; } catch (Exception e) { Debug.debug("s", s); Debug.debug("pattern", pattern); return s; } } private String removeSafePrefixSuffix(String s, String patterns[]) { return removeSafePrefixSuffix(s, patterns, false); } private String removeSafePrefixSuffix(String s, String patterns[], boolean permissive) { if (s == null) return null; for (int i = 0; s != null && i < patterns.length; i++) { String pattern = patterns[i]; s = removeSafePrefixSuffixLiteral(s, pattern, permissive); } return s; } private String removeSafePrefixSuffixLiteral(String s, String pattern, boolean permissive) { return removeSafePrefixSuffix(s, toRegexLiteral(pattern), permissive); } private String removeSafePrefixSuffix(String s, String pattern) { return removeSafePrefixSuffix(s, pattern, false); } private String removeSafePrefixSuffix(String s, String pattern, boolean permissive) { if (s == null) return null; if (s.equalsIgnoreCase(pattern)) return null; s = stripRegexMatch(s, getPrefixPattern((pattern), permissive)); s = stripRegexMatch(s, getSuffixPattern((pattern), permissive)); s = extractRegexPattern(s, getPrefixPattern2((pattern)), 1); s = extractRegexPattern(s, getSuffixPattern2((pattern)), 1); return s; } // public String cleanItemWithItem(String haystack, String needle, // DatabaseNamedItem.Type type, IMusicMetadata flags) // { // if (haystack == null) // return null; // if (needle == null) // return haystack; // // String s = removeSafePrefixSuffix(haystack, toRegexLiteral(needle), // false); // if (s == null || !s.equals(haystack)) // s = type.rectifyName(s, flags); // return s; // } // // public String cleanItemWithItem(String haystack, Vector needles, // DatabaseNamedItem.Type type, IMusicMetadata flags) // { // if (haystack == null) // return null; // // for (int i = 0; needles != null && haystack != null // && i < needles.size(); i++) // { // String needle = (String) needles.get(i); // haystack = cleanItemWithItem(haystack, needle, type, flags); // } // // return haystack; // } // // public Vector cleanItemWithItem(Vector haystacks, Vector needles, // DatabaseNamedItem.Type type, IMusicMetadata flags) // { // if (haystacks == null) // return null; // // Vector result = new Vector(); // for (int i = 0; haystacks != null && i < haystacks.size(); i++) // { // String haystack = (String) haystacks.get(i); // haystack = cleanItemWithItem(haystack, needles, type, flags); // if (haystack != null) // result.add(haystack); // } // // return result; // } // // public String cleanItemWithItem(DatabaseNamedItem haystack, // DatabaseNamedItem needle) // { // if (haystack == null) // return null; // if (needle == null) // return haystack.name; // // String haystack_name = haystack.name; // String needle_name = needle.name; // // String s = removeSafePrefixSuffix(haystack_name, // toRegexLiteral(needle_name), false); // if (s == null || !s.equals(haystack_name)) // s = haystack.getType().rectifyName(s); // return s; // } }
[ "348901141@qq.com" ]
348901141@qq.com
c81d7449b730f1f4525c7b7693e49202461b71e6
c5b1c73b910ecd390a025bbb060003210626e4ce
/app/src/main/java/creo/com/driver/policeclear.java
8454e1ea0c077babee986e2281831786c59d06e5
[]
no_license
anujasibi/DriverCabnew
afcd2962915eac2ef1a4ade9534ead28341c28d6
aaa4025534d1b24bcccc1d7e77a70ba6ab3b7bb7
refs/heads/master
2020-08-06T01:57:32.689349
2019-10-09T12:47:50
2019-10-09T12:47:50
212,791,127
0
0
null
null
null
null
UTF-8
Java
false
false
13,513
java
package creo.com.driver; import androidx.appcompat.app.AppCompatActivity; import android.Manifest; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.database.Cursor; import android.graphics.Bitmap; import android.media.MediaScannerConnection; import android.net.Uri; import android.os.Bundle; import android.os.Environment; import android.os.Handler; import android.provider.MediaStore; import android.util.Log; import android.view.View; import android.view.Window; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import com.blogspot.atifsoftwares.animatoolib.Animatoo; import com.karumi.dexter.Dexter; import com.karumi.dexter.MultiplePermissionsReport; import com.karumi.dexter.PermissionToken; import com.karumi.dexter.listener.DexterError; import com.karumi.dexter.listener.PermissionRequest; import com.karumi.dexter.listener.PermissionRequestErrorListener; import com.karumi.dexter.listener.multi.MultiplePermissionsListener; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.Calendar; import java.util.List; import creo.com.driver.utils.Global; import creo.com.driver.utils.SessionManager; import okhttp3.MediaType; import okhttp3.MultipartBody; import okhttp3.RequestBody; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; import retrofit2.Retrofit; public class policeclear extends AppCompatActivity { ImageView immm; TextView button; private int PGALLERY=1,PCAMERA=2; String filePath; private static final String IMAGE_DIRECTORY = "/driver"; private Uri uri,ut,up; SessionManager sessionManager; boolean doubleBackToExitPressedOnce = false; @Override protected void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_NO_TITLE);//will hide the title getSupportActionBar().hide(); super.onCreate(savedInstanceState); setContentView(R.layout.activity_policeclear); requestMultiplePermissions(); sessionManager = new SessionManager(this); immm=findViewById(R.id.photo); button=findViewById(R.id.button); immm.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { showPictureDialogprof(); } }); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { uploadToServer(filePath); } }); } private void showPictureDialogprof(){ AlertDialog.Builder pictureDialog = new AlertDialog.Builder(this); pictureDialog.setTitle("Select Action"); String[] pictureDialogItems = { "Select photo from gallery", "Capture photo from camera" }; pictureDialog.setItems(pictureDialogItems, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { switch (which) { case 0: choosePhotoFromGallaryprof(); break; case 1: takePhotoFromCameraprof(); break; } } }); pictureDialog.show(); } public void choosePhotoFromGallaryprof() { Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); startActivityForResult(galleryIntent, PGALLERY); } private void takePhotoFromCameraprof() { Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(intent, PCAMERA); } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode == this.RESULT_CANCELED) { return; } if(requestCode==PGALLERY) { if (data != null) { Uri contentURI = data.getData(); uri=data.getData(); filePath = getRealPathFromURIPath(uri, policeclear.this); try { Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), contentURI); bitmap = getResizedBitmap(bitmap, 400); String path = saveImage(bitmap); Toast.makeText(policeclear.this, "Image Saved!", Toast.LENGTH_SHORT).show(); immm.setImageBitmap(bitmap); } catch (IOException e) { e.printStackTrace(); Toast.makeText(policeclear.this, "Failed!", Toast.LENGTH_SHORT).show(); } } } if(requestCode == PCAMERA){ Toast.makeText(policeclear.this,"elbjuugv",Toast.LENGTH_SHORT).show(); Bitmap thumbnail = (Bitmap) data.getExtras().get("data"); immm.setImageBitmap(thumbnail); Uri tempUri = getImageUri(getApplicationContext(), thumbnail); filePath= (getRealPathFromURI(tempUri)); Log.d("filepath","mm"+filePath); // saveImage(thumbnail); Toast.makeText(policeclear.this, "Image Saved!", Toast.LENGTH_SHORT).show(); } } public Uri getImageUri(Context inContext, Bitmap inImage) { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); inImage.compress(Bitmap.CompressFormat.JPEG, 100, bytes); String path = MediaStore.Images.Media.insertImage(inContext.getContentResolver(), inImage, "Title", null); return Uri.parse(path); } public String getRealPathFromURI(Uri uri) { String path = ""; if (getContentResolver() != null) { Cursor cursor = getContentResolver().query(uri, null, null, null, null); if (cursor != null) { cursor.moveToFirst(); int idx = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA); path = cursor.getString(idx); cursor.close(); } } return path; } public Bitmap getResizedBitmap(Bitmap image, int maxSize) { int width = image.getWidth(); int height = image.getHeight(); float bitmapRatio = (float)width / (float) height; if (bitmapRatio > 1) { width = maxSize; height = (int) (width / bitmapRatio); } else { height = maxSize; width = (int) (height * bitmapRatio); } return Bitmap.createScaledBitmap(image, width, height, true); } public String saveImage(Bitmap myBitmap) { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); myBitmap.compress(Bitmap.CompressFormat.JPEG, 90, bytes); File wallpaperDirectory = new File( Environment.getExternalStorageDirectory() + IMAGE_DIRECTORY); // have the object build the directory structure, if needed. if (!wallpaperDirectory.exists()) { wallpaperDirectory.mkdirs(); } try { File f = new File(wallpaperDirectory, Calendar.getInstance() .getTimeInMillis() + ".jpg"); f.createNewFile(); FileOutputStream fo = new FileOutputStream(f); fo.write(bytes.toByteArray()); MediaScannerConnection.scanFile(this, new String[]{f.getPath()}, new String[]{"image/jpeg"}, null); fo.close(); Log.d("TAG", "File Saved::---&gt;" + f.getAbsolutePath()); return f.getAbsolutePath(); } catch (IOException e1) { e1.printStackTrace(); } return ""; } private void requestMultiplePermissions(){ Dexter.withActivity(this) .withPermissions( Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE) .withListener(new MultiplePermissionsListener() { @Override public void onPermissionsChecked(MultiplePermissionsReport report) { // check if all permissions are granted if (report.areAllPermissionsGranted()) { Toast.makeText(getApplicationContext(), "All permissions are granted by user!", Toast.LENGTH_SHORT).show(); } // check for permanent denial of any permission if (report.isAnyPermissionPermanentlyDenied()) { // show alert dialog navigating to Settings //openSettingsDialog(); } } @Override public void onPermissionRationaleShouldBeShown(List<PermissionRequest> permissions, PermissionToken token) { token.continuePermissionRequest(); } }). withErrorListener(new PermissionRequestErrorListener() { @Override public void onError(DexterError error) { Toast.makeText(getApplicationContext(), "Some Error! ", Toast.LENGTH_SHORT).show(); } }) .onSameThread() .check(); } private String getRealPathFromURIPath(Uri contentURI, Activity activity) { Cursor cursor = activity.getContentResolver().query(contentURI, null, null, null, null); if (cursor == null) { return contentURI.getPath(); } else { cursor.moveToFirst(); int idx = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA); return cursor.getString(idx); } } private void uploadToServer(String filePath) { Retrofit retrofit = NetworkClient.getRetrofitClient(this); UploadPcc uploadAPI = retrofit.create(UploadPcc.class); // Log.d("url","mmm"+filePath); //Create a file object using file path if (filePath == null){ Toast.makeText(policeclear.this,"Please Upload Image",Toast.LENGTH_SHORT).show(); } if (filePath != null) { File immm = new File(filePath); sessionManager.setUser_pcc(filePath); Log.d("mmmmmmm", "mmm" + immm.length()); // Create a request body with file and image media type RequestBody photob = RequestBody.create(MediaType.parse("image/*"), immm); // Create MultipartBody.Part using file request-body,file name and part name MultipartBody.Part part1 = MultipartBody.Part.createFormData("pcc", immm.getName(), photob); //Create request body with text description and text media type // Call<Result> call = uploadAPI.uploadImage(part1,"Token "+ Global.user_token); call.enqueue(new Callback<Result>() { @Override public void onResponse(Call<Result> call, Response<Result> response) { String result = response.body().getSuccess(); Toast.makeText(policeclear.this, result, Toast.LENGTH_LONG).show(); if (result.equals("success")) { if(sessionManager.getId().equals("")||sessionManager.getLicense().equals("")){ Intent intent = new Intent(policeclear.this, Documents.class); startActivity(intent); Animatoo.animateSlideLeft(policeclear.this); } if(!(sessionManager.getUser_pcc().equals("")||sessionManager.getLicense().equals("")||sessionManager.getId().equals(""))){ // Toast.makeText(photoid.this, result, Toast.LENGTH_LONG).show(); startActivity(new Intent(policeclear.this,vehicledocument.class)); } } else { Toast.makeText(policeclear.this, result, Toast.LENGTH_LONG).show(); } } @Override public void onFailure(Call<Result> call, Throwable t) { Toast.makeText(policeclear.this, "Failed Upload" + t.getMessage(), Toast.LENGTH_LONG).show(); } }); } } @Override public void onBackPressed() { if (doubleBackToExitPressedOnce) { finishAffinity(); return; } this.doubleBackToExitPressedOnce = true; Toast.makeText(this, "Please click BACK again to exit", Toast.LENGTH_SHORT).show(); new Handler().postDelayed(new Runnable() { @Override public void run() { doubleBackToExitPressedOnce=false; } }, 2000); } }
[ "pm@creopedia.com" ]
pm@creopedia.com
ef50d21b069bcf3178a3bd2200ba1eb088bce770
c03b74e11d732ff4ac151f019060d782dac9c97b
/src/test/java/io/github/jhipster/petclinic/web/rest/errors/ExceptionTranslatorIT.java
249a89ccc2027320ffb0fa1d7ee6f4e2a2b1d6b7
[]
no_license
oldgit/jhipster-sample-petclinic
7f73f7f78d9e3483a764018cc07ebb6f26514d49
a1dc07434a0a1245b2b2bb54b52b35fc216440f7
refs/heads/master
2022-07-29T07:23:29.206642
2021-01-31T16:42:33
2021-01-31T16:42:33
251,666,394
0
0
null
2022-07-07T18:03:41
2020-03-31T16:38:21
Java
UTF-8
Java
false
false
5,324
java
package io.github.jhipster.petclinic.web.rest.errors; import io.github.jhipster.petclinic.PetclinicApp; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; /** * Integration tests {@link ExceptionTranslator} controller advice. */ @WithMockUser @AutoConfigureMockMvc @SpringBootTest(classes = PetclinicApp.class) public class ExceptionTranslatorIT { @Autowired private MockMvc mockMvc; @Test public void testConcurrencyFailure() throws Exception { mockMvc.perform(get("/api/exception-translator-test/concurrency-failure")) .andExpect(status().isConflict()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value(ErrorConstants.ERR_CONCURRENCY_FAILURE)); } @Test public void testMethodArgumentNotValid() throws Exception { mockMvc.perform(post("/api/exception-translator-test/method-argument").content("{}").contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isBadRequest()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value(ErrorConstants.ERR_VALIDATION)) .andExpect(jsonPath("$.fieldErrors.[0].objectName").value("test")) .andExpect(jsonPath("$.fieldErrors.[0].field").value("test")) .andExpect(jsonPath("$.fieldErrors.[0].message").value("NotNull")); } @Test public void testMissingServletRequestPartException() throws Exception { mockMvc.perform(get("/api/exception-translator-test/missing-servlet-request-part")) .andExpect(status().isBadRequest()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value("error.http.400")); } @Test public void testMissingServletRequestParameterException() throws Exception { mockMvc.perform(get("/api/exception-translator-test/missing-servlet-request-parameter")) .andExpect(status().isBadRequest()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value("error.http.400")); } @Test public void testAccessDenied() throws Exception { mockMvc.perform(get("/api/exception-translator-test/access-denied")) .andExpect(status().isForbidden()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value("error.http.403")) .andExpect(jsonPath("$.detail").value("test access denied!")); } @Test public void testUnauthorized() throws Exception { mockMvc.perform(get("/api/exception-translator-test/unauthorized")) .andExpect(status().isUnauthorized()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value("error.http.401")) .andExpect(jsonPath("$.path").value("/api/exception-translator-test/unauthorized")) .andExpect(jsonPath("$.detail").value("test authentication failed!")); } @Test public void testMethodNotSupported() throws Exception { mockMvc.perform(post("/api/exception-translator-test/access-denied")) .andExpect(status().isMethodNotAllowed()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value("error.http.405")) .andExpect(jsonPath("$.detail").value("Request method 'POST' not supported")); } @Test public void testExceptionWithResponseStatus() throws Exception { mockMvc.perform(get("/api/exception-translator-test/response-status")) .andExpect(status().isBadRequest()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value("error.http.400")) .andExpect(jsonPath("$.title").value("test response status")); } @Test public void testInternalServerError() throws Exception { mockMvc.perform(get("/api/exception-translator-test/internal-server-error")) .andExpect(status().isInternalServerError()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value("error.http.500")) .andExpect(jsonPath("$.title").value("Internal Server Error")); } }
[ "jon.harvey.uk@gmail.com" ]
jon.harvey.uk@gmail.com
512919b4c9e5aba9e7979672b1f88697e204002c
95f2fdb228c3021634c573769ec9e46e26549391
/JavaSyntaxGround/src/com/algo/data/Teacher.java
cc2a5f53295c69c4cad338921b05f10d70b5a39b
[]
no_license
Yumin-Kim/Java-SpringStudy
aafeb50042f3ea9af7de30e58d356ae22b332281
72a4cd76a55febd1bd842687ac80a3db24214454
refs/heads/master
2023-08-25T17:47:45.667803
2021-10-20T14:41:30
2021-10-20T14:41:30
380,800,790
0
0
null
null
null
null
UTF-8
Java
false
false
265
java
package com.algo.data; import java.util.Optional; public class Teacher { private String name; public Optional<String> getName() { return Optional.ofNullable(name); } public void setName(String name) { this.name = name; } }
[ "dbals0@naver.com" ]
dbals0@naver.com
b63907c497149ca5ae0c22cbeb3d878931aa6fdb
f8916caeeb635f0573a2c0d5c32917a2932f7abc
/app/src/main/java/com/example/finalproject/APIFuncs.java
276c3c89be1b349fd4d042838f82d277c32683d9
[]
no_license
awinkel3/Final-Project
0b1d50eb2a7956428d898d433e00197ca23cab1f
2df6d29472aa32792666170b8778e493ea320285
refs/heads/master
2020-09-16T03:28:15.703005
2019-12-09T22:16:41
2019-12-09T22:16:41
223,636,855
0
0
null
null
null
null
UTF-8
Java
false
false
1,100
java
package com.example.finalproject; import android.os.AsyncTask; import java.io.IOException; import yahoofinance.Stock; import yahoofinance.YahooFinance; public class APIFuncs { private static double initialCost; private static double currentValue; public static Stock getStock(String ticker) throws IOException { try { return YahooFinance.get(ticker); } catch (IOException e) { return null; } } public static double getCost(Stock stock) { initialCost = stock.getQuote().getPrice().doubleValue(); return initialCost; } public static double getCurrentValue(Stock stock) throws IOException { currentValue = stock.getQuote(true).getPrice().doubleValue(); return currentValue; } public static String getSymbol(Stock stock) { return stock.getSymbol(); } public static String getName(Stock stock) { return stock.getName(); } /// stock.getSymbol() returns the ticker (ie 4 character thing ) /// stock.getName() returns the company's full name }
[ "awinkel3@illinois.edu" ]
awinkel3@illinois.edu
fed2ec3e1160e20eac8ce910d6a183fd6c1efe5d
3d2a7746e88fc83fb76a3882eab0fa4e8528429f
/src/main/java/com/rultor/Time.java
e096eea4c1e4e98794570551663d9d95e7db3bb1
[ "BSD-2-Clause" ]
permissive
huhaq/rultor
fe04252d585c1a41dc4f1e06678a8a202cafe20d
6f39a2d718ce91d4a007877ab4c5afbc3dde2b1e
refs/heads/master
2021-01-18T00:41:17.430598
2014-12-06T14:16:22
2014-12-06T14:16:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,206
java
/** * Copyright (c) 2009-2014, rultor.com * 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) Neither the name of the rultor.com nor * the names of its contributors may be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ package com.rultor; import com.jcabi.aspects.Immutable; import java.text.ParseException; import java.util.Date; import lombok.EqualsAndHashCode; import lombok.ToString; import org.apache.commons.lang3.time.DateFormatUtils; /** * Date and time in ISO 8601. * * @author Yegor Bugayenko (yegor@tpc2.com) * @version $Id$ * @since 1.8.12 */ @Immutable @ToString @EqualsAndHashCode(of = "millis") public final class Time { /** * The time. */ private final transient long millis; /** * Ctor. */ public Time() { this(System.currentTimeMillis()); } /** * Ctor. * @param date Date */ public Time(final Date date) { this(date.getTime()); } /** * Ctor. * @param msec Milliseconds */ public Time(final long msec) { this.millis = msec; } /** * Ctor. * @param date Date */ public Time(final String date) { this(Time.parse(date)); } /** * Make ISO string. * @return Text */ public String iso() { return DateFormatUtils.formatUTC( new Date(this.millis), "yyyy-MM-dd'T'HH:mm:ss'Z'" ); } /** * Make date. * @return Date */ public long msec() { return this.millis; } /** * Parse text. * @param date Date * @return Date */ private static Date parse(final String date) { try { return DateFormatUtils.ISO_DATETIME_FORMAT.parse(date); } catch (final ParseException ex) { throw new IllegalStateException(ex); } } }
[ "yegor@tpc2.com" ]
yegor@tpc2.com
f499da160aab3d879ddc77c69698f87625d5b0a5
8fdff58af9542b82b3503dac5eb89afcb31b764b
/bfribbon/src/main/java/net/bluefsd/ribbon/controller/FeignTokenInterceptor.java
7bb931dbd6aef09b46520d0a6f51ddf1900b6242
[]
no_license
lianghyan/bluefsd
62ea391d44839fee8c68d1e526d5fb5a780fc61c
4934982988b8fc2cd27df4f7a5c909010e705b9c
refs/heads/master
2022-12-25T15:49:40.365022
2019-12-10T08:38:31
2019-12-10T08:38:31
221,629,935
0
0
null
2022-12-15T23:31:57
2019-11-14T06:42:41
Java
UTF-8
Java
false
false
1,008
java
package net.bluefsd.ribbon.controller; import javax.servlet.http.HttpServletRequest; import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Component; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; import feign.RequestInterceptor; import feign.RequestTemplate; @Configuration public class FeignTokenInterceptor implements RequestInterceptor { @Override public void apply(RequestTemplate template) { HttpServletRequest request = getServletRequest(); if (null == request){ return; } template.header("fsdtoken", getToken(request)); } private HttpServletRequest getServletRequest() { return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest(); } private String getToken(HttpServletRequest request){ return request.getHeader("fsdtoken"); } }
[ "lianghyan2009@qq.com" ]
lianghyan2009@qq.com
3163396a1d8437a1d291ec43bd17d9eec7f474a9
41fdf47cb2579246ff7d57153c9d92f50ccfd52e
/els-romenext-rev2-api/src/main/java/com/els/romenext/api/dct/req/UpdateDCTRequest.java
0f69c7324d0ec4a804827e696958a3d5f99cd72f
[]
no_license
RamyaSubash/romenext
9b7206962d6d6db57769ec4f44088930e7ca8867
e1ea3b305cf34e8966d012e822a9c61099652e41
refs/heads/main
2023-04-22T16:57:12.849414
2021-05-05T17:26:37
2021-05-05T17:26:37
364,650,368
0
0
null
null
null
null
UTF-8
Java
false
false
2,876
java
package com.els.romenext.api.dct.req; import javax.ws.rs.core.Response; import org.apache.log4j.Logger; import org.json.JSONObject; import com.els.romenext.api.core.GroupRequest; import com.els.romenext.api.entities.general.EntryNodeRequest; import com.els.romenext.api.utils.RomeJSONUtils; import com.els.romenext.api.utils.payloads.GuiNodeRequestPayload; public class UpdateDCTRequest extends GroupRequest { private static Logger log = Logger.getLogger(UpdateDCTRequest.class); private Long dctId; private EntryNodeRequest updateDct; // private GuiNodeRequestPayload updateDct; public EntryNodeRequest getUpdateDct() { return updateDct; } public Long getDctId() { return dctId; } public String validateRequest(JSONObject json ) { // TODO: permission need to be implemented String validateRequest = super.validateRequest(json); if( validateRequest != null ) { return validateRequest; } String empty = null; empty = RomeJSONUtils.findEmptyJson( json, "dctId", "updateDct" ); if( empty != null ) { return empty; } // JSONObject jsonObj = (JSONObject) json.get( "updateDct" ); // empty = new GuiNodeRequestPayload().validateRequest( jsonObj ); // // if( empty != null ) { // return empty; // } // return empty; } public void parseRequest(JSONObject json) { super.parseRequest(json); JSONObject jsonObj = json.getJSONObject( "updateDct" ); this.dctId = json.getLong( "dctId" ); // GuiNodeRequestPayload newNode = new GuiNodeRequestPayload(); // newNode.parseRequest( jsonObj ); this.updateDct = new EntryNodeRequest(); this.updateDct.parseRequest( jsonObj ); // this.updateDct = newNode; // this.updateDct = new EntryNodeRequest(); // // this.updateDct.parseRequest( nodeObj ); // this.node = NodeUtils.parseNodeJSONObjectForDecoView(json); } public Response preprocessor() { // TODO: more verification logic could be added into this part // currently, I just checked if there is any duplicate property name // if (nodes == null) { // return null; // } // // ResponseBuilder responseBuilder; // // if (NodeUtils.containsDuplication(nodes)) { // log.error("Duplicate Types"); // responseBuilder = ErrorResponse.build(ApiResponseState.FAILURE, RomeNextResponseCodeEnum.DUPLICATE_TYPE, null).getResponseBuilder(); // return responseBuilder.build(); // } // // for (Node nodeToAdd : nodes) { // // if (nodeToAdd.getId() == null) { // log.error("Bad Type" + nodeToAdd.getId()); // responseBuilder = ErrorResponse.build(ApiResponseState.FAILURE, RomeNextResponseCodeEnum.BAD_TYPE_COORDINATES, null).getResponseBuilder(); // return responseBuilder.build(); // } // } return null; } }
[ "=" ]
=
993a2e2f08d25810988fe40bc166905d5db36185
afcca25fdcbaaa4bdd08babcf234dcdecf21b6f6
/quasar-sika-design-server/sika-code-core/standard-footer/src/main/java/com/sika/code/standard/tree/pojo/query/TreeRelationQuery.java
4f71703972a808c6ec92e9e62acf5e8b9c4621aa
[ "MIT" ]
permissive
Auntie233/quasar-sika-design
cd12faedaeb1f24c6e6de8462ce0d692a2e62a9c
a4463dbcf4ed19cbc8453d7d6161f92b85d9d076
refs/heads/main
2023-07-05T10:43:23.726149
2021-08-23T09:04:48
2021-08-23T09:04:48
399,025,717
0
1
null
null
null
null
UTF-8
Java
false
false
693
java
package com.sika.code.standard.tree.pojo.query; import com.sika.code.standard.base.pojo.query.BaseStandardQuery; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import lombok.extern.slf4j.Slf4j; import java.util.Set; /** * 描述:树关系查询类 * * @author daiqi * @date 2018-12-22 13:03:40 */ @Data @Slf4j @EqualsAndHashCode(callSuper = true) @Accessors(chain = true) public class TreeRelationQuery extends BaseStandardQuery { /** * 祖节点id */ private Long ancestorId; /** * 子孙节点id */ private Long descendantId; private Set<Long> ancestorIds; private Set<Long> descendantIds; }
[ "466608943@qq.com" ]
466608943@qq.com
9e2aa7abdd9e54b5dc966f3a3e124e3a33b2008f
fb8fbf1a4f0d9e9df1fed242ba5d487267ef528e
/src/gui/util/Utils.java
d6df196d96af0d053a5edfbbaa71c0e5851a4cb9
[]
no_license
kleberga/workshop-javafx-jdbc
5818079bf952925ff151d679c61201c91824214c
e582af22040912de393530756960deeb7fedc11c
refs/heads/main
2023-08-15T15:18:55.524989
2021-10-20T21:35:06
2021-10-20T21:35:06
366,176,058
0
0
null
null
null
null
UTF-8
Java
false
false
2,545
java
package gui.util; import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.Date; import java.util.Locale; import javafx.event.ActionEvent; import javafx.scene.Node; import javafx.scene.control.DatePicker; import javafx.scene.control.TableCell; import javafx.scene.control.TableColumn; import javafx.stage.Stage; import javafx.util.StringConverter; public class Utils { public static Stage currentStage(ActionEvent event) { return (Stage) ((Node) event.getSource()).getScene().getWindow(); } public static Integer tryParseToInt(String str) { try { return Integer.parseInt(str); } catch (NumberFormatException e) { return null; } } public static Double tryParseToDouble(String str) { try { return Double.parseDouble(str); } catch (NumberFormatException e) { return null; } } public static <T> void formatTableColumnDate(TableColumn<T, Date> tableColumn, String format) { tableColumn.setCellFactory(column -> { TableCell<T, Date> cell = new TableCell<T, Date>() { private SimpleDateFormat sdf = new SimpleDateFormat(format); @Override protected void updateItem(Date item, boolean empty) { super.updateItem(item, empty); if (empty) { setText(null); } else { setText(sdf.format(item)); } } }; return cell; }); } public static <T> void formatTableColumnDouble(TableColumn<T, Double> tableColumn, int decimalPlaces) { tableColumn.setCellFactory(column -> { TableCell<T, Double> cell = new TableCell<T, Double>() { @Override protected void updateItem(Double item, boolean empty) { super.updateItem(item, empty); if (empty) { setText(null); } else { Locale.setDefault(Locale.US); setText(String.format("%." + decimalPlaces + "f", item)); } } }; return cell; }); } public static void formatDatePicker(DatePicker datePicker, String format) { datePicker.setConverter(new StringConverter<LocalDate>() { DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern(format); { datePicker.setPromptText(format.toLowerCase()); } @Override public String toString(LocalDate date) { if (date != null) { return dateFormatter.format(date); } else { return ""; } } @Override public LocalDate fromString(String string) { if (string != null && !string.isEmpty()) { return LocalDate.parse(string, dateFormatter); } else { return null; } } }); } }
[ "kleberga@yahoo.com.br" ]
kleberga@yahoo.com.br
e816049acc72cf6122ca518b9d13039e3535cd03
fb9e3f2765964dc16d7857cafac59154602afffc
/src/main/java/model/entities/FeeCalculationRequest.java
1c72a855d6f0c14b0deb6c2b9faedf8cc883da4d
[]
no_license
dcodrean/fees-calculator
5695c44fd236be1e8013484ee7e5b91c8a98bdcc
a6ea52e1986532c4c804f936a61718712d6c69ab
refs/heads/master
2022-10-24T19:15:51.593527
2020-06-13T09:22:10
2020-06-13T09:22:10
263,028,129
0
0
null
null
null
null
UTF-8
Java
false
false
1,397
java
package model.entities; import lombok.Getter; import lombok.Setter; import java.util.Date; /** * Input data */ @Getter @Setter public class FeeCalculationRequest { // account info private String accountId; // asset type private String assetType; // symbol details private String ticker; private String marketMIC; private String symbolCurrency; private String underlyingType; private String underlyingTicker; // execution details private String orderExecutionId; private String ticketId; private Integer quantity; private Double price; private String exchangeMIC; // LONG NAME (e.g. FIX BAYOU BROKER) private String fullExecutingBrokerName; // NEW ADDED (e.g. BY) private String shortExecutingBrokerName; private String executingBrokerAccountName; private Date tradeTime; private String tradeFlags; private String allocationType; private Integer contractMultiplier; private Double ccyMultiplier; private String destination; private String brokerCode; private Boolean isFeePerExecutionBrokerCode; private Boolean isDropCopy; private Boolean isDoneAway; private Boolean isCashDesk; // comm data // YES , NO, SPECIFIED - billable flag states private String billableState; private Double externalCommRate; private String externalCommType; }
[ "dan.codrean@gmasoftware.com" ]
dan.codrean@gmasoftware.com
8cfe0156292b2e063261971cd7dfc93133c23ebf
309f4d9cc971f35b3eb6907b89a86f16bbad7e41
/53 Maximum Subarray/Solution.java
52c1a087e6486b52c1d81e87141512c4e0234bfc
[]
no_license
peaktea/leetcode-2.0-java
77ccf065a2c15f2aa4cf76414e77e928eaee4759
e89f92987403626e04fa69fe0a25f89d861133c1
refs/heads/master
2021-01-25T08:48:20.644848
2015-07-28T13:02:08
2015-07-28T13:02:08
37,406,387
0
0
null
null
null
null
UTF-8
Java
false
false
381
java
public class Solution { public int maxSubArray(int[] nums) { int [] endsum = new int[nums.length]; endsum[0]=nums[0]; int largestsum=nums[0]; for(int i=1;i<nums.length;i++){ if(endsum[i-1]>0){ endsum[i]+=endsum[i-1]+nums[i]; } else{ endsum[i]=nums[i]; } largestsum=largestsum>endsum[i]?largestsum:endsum[i]; } return largestsum; } }
[ "guofeng2013@pku.edu.cn" ]
guofeng2013@pku.edu.cn
7760e434e1984b8a5012182736a378546b52a0e7
fc7711d2ee1f805252da317ee13986dad3dfed8e
/src/main/java/com/tenfi/sys/service/impl/RoleServiceImpl.java
0642405a01266999a734abbf6cd1f42a1b44285f
[]
no_license
tenfi2009/now.core
693b2ea7e725084e7696b6fc29c3cb82d9897810
b2362b44bc6524e09b40bcfb0bee4ce3bb9bda13
refs/heads/master
2021-01-21T13:11:28.236877
2016-04-27T02:09:11
2016-04-27T02:09:11
45,822,850
1
1
null
null
null
null
UTF-8
Java
false
false
961
java
/** * <b>包名:</b>com.matrix.sys.service.impl<br/> * <b>文件名:</b>RoleServiceImpl.java<br/> * <b>版本信息:</b>1.0.0<br/> * <b>日期:</b>2013-6-26-下午10:37:16<br/> * <br/> */ package com.tenfi.sys.service.impl; import org.springframework.beans.factory.annotation.Autowired; import com.tenfi.core.service.impl.BasicDataServiceImpl; import com.tenfi.sys.dao.RoleDao; import com.tenfi.sys.model.Role; import com.tenfi.sys.service.RoleService; /** * <b>类名称:</b>RoleServiceImpl<br/> * <b>类描述:</b><br/> * <b>创建人:</b>rong yang<br/> * <b>修改人:</b>rong yang<br/> * <b>修改时间:</b>2013-6-26 下午10:37:16<br/> * <b>修改备注:</b><br/> * @version 1.0.0<br/> * */ public class RoleServiceImpl extends BasicDataServiceImpl<Role,String> implements RoleService { @Autowired private RoleDao dao; @Override public RoleDao getDao() { return dao; } }
[ "tenfi2009@163.com" ]
tenfi2009@163.com
692ac8e9b9e0e15c2fc16d6f6ede7284eba34890
9db81d76016103eabc135c96c26dab08c3647e62
/spring-and-vue2/idea/messages/src/main/java/study/parallel/MultiThreadSum.java
e70a2d7402f0c98595b3b3aadb521d7d0cc8d441
[]
no_license
nnoco/learning
d1e9c3d9f986e6ca59e3a9ba39a923e306f629e2
7407e77c22e52d0d8b6da766c4668db15fc6030e
refs/heads/master
2023-01-23T08:44:20.792604
2020-05-26T14:33:19
2020-05-26T14:33:19
127,385,369
0
0
null
2023-01-12T23:55:31
2018-03-30T05:28:22
Java
UTF-8
Java
false
false
1,127
java
package study.parallel; import java.util.stream.IntStream; /** * @author nnoco * @since 2020. 05. 20 */ public class MultiThreadSum { static int value = 0; public static void main(String[] args) throws InterruptedException { Runnable sumWorker = () -> { IntStream.range(0, 10) .forEach(a -> { value++; value = value + 1; // 메모리 // CPU // 원자적 연산 // 원자 -> 더이상 나눌 수 없는 단위 // Atomic // 1: -> 0 + 1 -> 1 = 1 // 2: -> 0 + 1 -> 1 = // 3: -> 0 + 1 -> 1 = 1 // 4: -> 1 + 1 -> 2 = 2 }); System.out.println("Done " + Thread.currentThread().getName()); }; for(int i = 0; i < 100; i++) { new Thread(sumWorker, "thread " + i).start(); } Thread.sleep(5000); System.out.println(value); } }
[ "junyoung.plum@gmail.com" ]
junyoung.plum@gmail.com
1bab21bbb49a21c1b04446ff1ffac2734eb918a8
f5bef0a2ede9ffc5a05efa095c6b4797b356e479
/python/src/main/java/org/apache/zeppelin/python/IPythonClient.java
b3bc7fd7d2c5ff288eb9af61177bb67fe52e6c38
[ "Apache-2.0", "BSD-3-Clause", "OFL-1.1", "BSD-2-Clause", "MIT" ]
permissive
shiveshwar/zeppelin-0-8
e61ff67680e40546135c750aa5ffe7d68f9d8473
0f3edfe0348fc7cfa20065725af2558c6945255d
refs/heads/master
2022-10-16T18:24:41.535708
2019-07-16T08:14:05
2019-07-16T08:14:05
196,581,934
0
0
Apache-2.0
2022-10-12T20:29:10
2019-07-12T13:13:42
Java
UTF-8
Java
false
false
8,110
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.zeppelin.python; import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; import io.grpc.stub.StreamObserver; import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.zeppelin.interpreter.util.InterpreterOutputStream; import org.apache.zeppelin.python.proto.CancelRequest; import org.apache.zeppelin.python.proto.CancelResponse; import org.apache.zeppelin.python.proto.CompletionRequest; import org.apache.zeppelin.python.proto.CompletionResponse; import org.apache.zeppelin.python.proto.ExecuteRequest; import org.apache.zeppelin.python.proto.ExecuteResponse; import org.apache.zeppelin.python.proto.ExecuteStatus; import org.apache.zeppelin.python.proto.IPythonGrpc; import org.apache.zeppelin.python.proto.OutputType; import org.apache.zeppelin.python.proto.StatusRequest; import org.apache.zeppelin.python.proto.StatusResponse; import org.apache.zeppelin.python.proto.StopRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.security.SecureRandom; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; /** * Grpc client for IPython kernel */ public class IPythonClient { private static final Logger LOGGER = LoggerFactory.getLogger(IPythonClient.class.getName()); private final ManagedChannel channel; private final IPythonGrpc.IPythonBlockingStub blockingStub; private final IPythonGrpc.IPythonStub asyncStub; private SecureRandom random = new SecureRandom(); /** * Construct client for accessing RouteGuide server at {@code host:port}. */ public IPythonClient(String host, int port) { this(ManagedChannelBuilder.forAddress(host, port).usePlaintext(true)); } /** * Construct client for accessing RouteGuide server using the existing channel. */ public IPythonClient(ManagedChannelBuilder<?> channelBuilder) { channel = channelBuilder.build(); blockingStub = IPythonGrpc.newBlockingStub(channel); asyncStub = IPythonGrpc.newStub(channel); } public void shutdown() throws InterruptedException { channel.shutdown().awaitTermination(5, TimeUnit.SECONDS); } // execute the code and make the output as streaming by writing it to InterpreterOutputStream // one by one. public ExecuteResponse stream_execute(ExecuteRequest request, final InterpreterOutputStream interpreterOutput) { final ExecuteResponse.Builder finalResponseBuilder = ExecuteResponse.newBuilder() .setStatus(ExecuteStatus.SUCCESS); final AtomicBoolean completedFlag = new AtomicBoolean(false); LOGGER.debug("stream_execute code:\n" + request.getCode()); asyncStub.execute(request, new StreamObserver<ExecuteResponse>() { int index = 0; boolean isPreviousOutputImage = false; @Override public void onNext(ExecuteResponse executeResponse) { if (executeResponse.getType() == OutputType.TEXT) { try { LOGGER.debug("Interpreter Streaming Output: " + executeResponse.getOutput()); if (isPreviousOutputImage) { // add '\n' when switch from image to text interpreterOutput.write("\n%text ".getBytes()); } isPreviousOutputImage = false; interpreterOutput.write(executeResponse.getOutput().getBytes()); interpreterOutput.getInterpreterOutput().flush(); } catch (IOException e) { LOGGER.error("Unexpected IOException", e); } } if (executeResponse.getType() == OutputType.IMAGE) { try { LOGGER.debug("Interpreter Streaming Output: IMAGE_DATA"); if (index != 0) { // add '\n' if this is the not the first element. otherwise it would mix the image // with the text interpreterOutput.write("\n".getBytes()); } interpreterOutput.write(("%img " + executeResponse.getOutput()).getBytes()); interpreterOutput.getInterpreterOutput().flush(); isPreviousOutputImage = true; } catch (IOException e) { LOGGER.error("Unexpected IOException", e); } } if (executeResponse.getStatus() == ExecuteStatus.ERROR) { // set the finalResponse to ERROR if any ERROR happens, otherwise the finalResponse would // be SUCCESS. finalResponseBuilder.setStatus(ExecuteStatus.ERROR); } index++; } @Override public void onError(Throwable throwable) { try { interpreterOutput.getInterpreterOutput().write(ExceptionUtils.getStackTrace(throwable)); interpreterOutput.getInterpreterOutput().flush(); } catch (IOException e) { LOGGER.error("Unexpected IOException", e); } LOGGER.error("Fail to call IPython grpc", throwable); finalResponseBuilder.setStatus(ExecuteStatus.ERROR); completedFlag.set(true); synchronized (completedFlag) { completedFlag.notify(); } } @Override public void onCompleted() { synchronized (completedFlag) { try { LOGGER.debug("stream_execute is completed"); interpreterOutput.getInterpreterOutput().flush(); } catch (IOException e) { LOGGER.error("Unexpected IOException", e); } completedFlag.set(true); completedFlag.notify(); } } }); synchronized (completedFlag) { if (!completedFlag.get()) { try { completedFlag.wait(); } catch (InterruptedException e) { LOGGER.error("Unexpected Interruption", e); } } } return finalResponseBuilder.build(); } // blocking execute the code public ExecuteResponse block_execute(ExecuteRequest request) { ExecuteResponse.Builder responseBuilder = ExecuteResponse.newBuilder(); responseBuilder.setStatus(ExecuteStatus.SUCCESS); Iterator<ExecuteResponse> iter = blockingStub.execute(request); StringBuilder outputBuilder = new StringBuilder(); while (iter.hasNext()) { ExecuteResponse nextResponse = iter.next(); if (nextResponse.getStatus() == ExecuteStatus.ERROR) { responseBuilder.setStatus(ExecuteStatus.ERROR); } outputBuilder.append(nextResponse.getOutput()); } responseBuilder.setOutput(outputBuilder.toString()); return responseBuilder.build(); } public CancelResponse cancel(CancelRequest request) { return blockingStub.cancel(request); } public CompletionResponse complete(CompletionRequest request) { return blockingStub.complete(request); } public StatusResponse status(StatusRequest request) { return blockingStub.status(request); } public void stop(StopRequest request) { asyncStub.stop(request, null); } public static void main(String[] args) { IPythonClient client = new IPythonClient("localhost", 50053); client.status(StatusRequest.newBuilder().build()); ExecuteResponse response = client.block_execute(ExecuteRequest.newBuilder(). setCode("abcd=2").build()); System.out.println(response.getOutput()); } }
[ "shiva.sakle@gmail.com" ]
shiva.sakle@gmail.com
ede337c388f308fd4eda8d44158ab068164d0f5f
f7c686548775b9e577e1239d6ba2616e31908f47
/app/src/main/java/com/devabit/takestock/screen/shipping/ShippingActivity.java
ba409c18551251d002bd361ae43737220a7f91fd
[]
no_license
4ndrik/takestock_android
ff80c589cb2a31d757fc47439172f407bad1548e
17bb85a4233c6a773d4c18261713197f2781be3c
refs/heads/master
2020-04-15T15:50:01.232688
2017-02-09T09:27:05
2017-02-09T09:27:05
55,589,460
0
0
null
null
null
null
UTF-8
Java
false
false
7,677
java
package com.devabit.takestock.screen.shipping; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.annotation.StringRes; import android.support.design.widget.Snackbar; import android.support.design.widget.TextInputEditText; import android.support.design.widget.TextInputLayout; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.view.inputmethod.EditorInfo; import android.widget.ProgressBar; import butterknife.*; import com.devabit.takestock.Injection; import com.devabit.takestock.R; import com.devabit.takestock.data.model.Offer; /** * Created by Victor Artemyev on 05/10/2016. */ public class ShippingActivity extends AppCompatActivity implements ShippingContract.View { private static final String EXTRA_OFFER = "EXTRA_OFFER"; public static Intent getStartIntent(Context context, Offer offer) { Intent starter = new Intent(context, ShippingActivity.class); starter.putExtra(EXTRA_OFFER, offer); return starter; } @BindView(R.id.activity_shipping_content) ViewGroup mContent; @BindView(R.id.progress_bar) ProgressBar mProgressBar; @BindView(R.id.house_input_layout) TextInputLayout mHouseInputLayout; @BindView(R.id.street_input_layout) TextInputLayout mStreetInputLayout; @BindView(R.id.city_input_layout) TextInputLayout mCityInputLayout; @BindView(R.id.postcode_input_layout) TextInputLayout mPostcodeInputLayout; @BindView(R.id.phone_input_layout) TextInputLayout mPhoneInputLayout; @BindView(R.id.house_edit_text) TextInputEditText mHouseEditText; @BindView(R.id.street_edit_text) TextInputEditText mStreetEditText; @BindView(R.id.city_edit_text) TextInputEditText mCityEditText; @BindView(R.id.postcode_edit_text) TextInputEditText mPostcodeEditText; @BindView(R.id.phone_edit_text) TextInputEditText mPhoneEditText; Offer mOffer; ShippingContract.Presenter mPresenter; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_shipping); ButterKnife.bind(ShippingActivity.this); mOffer = getIntent().getParcelableExtra(EXTRA_OFFER); setUpToolbar(); createPresenter(); } private void setUpToolbar() { Toolbar toolbar = ButterKnife.findById(ShippingActivity.this, R.id.toolbar); toolbar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { onBackPressed(); } }); } private void createPresenter() { new ShippingPresenter(Injection.provideDataRepository(ShippingActivity.this), ShippingActivity.this); } @Override public void setPresenter(@NonNull ShippingContract.Presenter presenter) { mPresenter = presenter; } @OnTextChanged(R.id.house_edit_text) void onHouseTextChanged() { if (mHouseInputLayout.isErrorEnabled()) { mHouseInputLayout.setErrorEnabled(false); } } @OnTextChanged(R.id.street_edit_text) void onStreetTextChanged() { if (mStreetInputLayout.isErrorEnabled()) { mStreetInputLayout.setErrorEnabled(false); } } @OnTextChanged(R.id.city_edit_text) void onCityTextChanged() { if (mCityInputLayout.isErrorEnabled()) { mCityInputLayout.setErrorEnabled(false); } } @OnTextChanged(R.id.postcode_edit_text) void onPostcodeTextChanged() { if (mPostcodeInputLayout.isErrorEnabled()) { mPostcodeInputLayout.setErrorEnabled(false); } } @OnTextChanged(R.id.phone_edit_text) void onPhoneTextChanged() { if (mPhoneInputLayout.isErrorEnabled()) { mPhoneInputLayout.setErrorEnabled(false); } } @OnEditorAction(R.id.phone_edit_text) boolean onPhoneEditorAction(int actionId) { if (actionId == EditorInfo.IME_ACTION_DONE) { mPresenter.acceptOffer(mOffer, createOfferAccept()); return true; } return false; } @OnClick(R.id.ok_button) void onOkButtonClick() { mPresenter.acceptOffer(mOffer, createOfferAccept()); } private Offer.Accept createOfferAccept() { return new Offer.Accept.Builder() .setOfferId(mOffer.getId()) .setStatus(Offer.Status.ADDRESS_RECEIVED) .setFromSeller(false) .setHouse(getHouse()) .setStreet(getStreet()) .setCity(getCity()) .setPostcode(getPostcode()) .setPhone(getPhone()) .create(); } private String getHouse() { return mHouseEditText.getText().toString().trim(); } private String getStreet() { return mStreetEditText.getText().toString().trim(); } private String getCity() { return mCityEditText.getText().toString().trim(); } private String getPostcode() { return mPostcodeEditText.getText().toString().trim(); } private String getPhone() { return mPhoneEditText.getText().toString().trim(); } @Override public void showOfferAcceptedInView(Offer offer) { Intent intent = new Intent(); intent.putExtra(getString(R.string.extra_offer), offer); setResult(RESULT_OK, intent); finish(); } @Override public void showHouseError() { mHouseInputLayout.setErrorEnabled(true); mHouseInputLayout.setError(getText(R.string.shipping_activity_error_house)); } @Override public void showStreetError() { mStreetInputLayout.setErrorEnabled(true); mStreetInputLayout.setError(getText(R.string.shipping_activity_error_street)); } @Override public void showCityError() { mCityInputLayout.setErrorEnabled(true); mCityInputLayout.setError(getText(R.string.shipping_activity_error_city)); } @Override public void showPostcodeError() { mPostcodeInputLayout.setErrorEnabled(true); mPostcodeInputLayout.setError(getText(R.string.shipping_activity_error_postcode)); } @Override public void showPhoneError() { mPhoneInputLayout.setErrorEnabled(true); mPhoneInputLayout.setError(getText(R.string.shipping_activity_error_phone)); } @Override public void showNetworkConnectionError() { showSnack(R.string.error_no_network_connection); } @Override public void showUnknownError() { showSnack(R.string.error_unknown); } private void showSnack(@StringRes int resId) { Snackbar.make(mContent, resId, Snackbar.LENGTH_LONG).show(); } @Override public void setProgressIndicator(boolean isActive) { mProgressBar.setVisibility(isActive ? View.VISIBLE : View.GONE); mContent.setAlpha(isActive ? 0.5f : 1.0f); setTouchContentDisabled(isActive); } private void setTouchContentDisabled(boolean disable) { if (disable) { getWindow().setFlags( WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE, WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE); } else { getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE); } } @Override protected void onPause() { mPresenter.pause(); super.onPause(); } }
[ "victorartemyev@outlook.com" ]
victorartemyev@outlook.com
af9716f26f51de260cc620ec05840f7e17926e00
bbf196640baa0f87d55663aeda32623a678ba3f3
/src/main/java/com/NuclearNode/DrinkApp/DrinkAppApplication.java
f9b481a1be21631d17cd0032999e2ebf0c1c6d43
[]
no_license
bchavez14/CoffeeGrinder
4edbfbb9527869d20de97a57b2181f6e51261816
c4758817239230b82e5bbc253c9c72fca2f17e67
refs/heads/master
2022-12-24T11:11:44.215618
2020-09-18T02:36:13
2020-09-18T02:36:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
321
java
package com.NuclearNode.DrinkApp; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class DrinkAppApplication { public static void main(String[] args) { SpringApplication.run(DrinkAppApplication.class, args); } }
[ "jffrmcdonald@gmail.com" ]
jffrmcdonald@gmail.com
9553098e5f18e5d03d2543f8a92cded2bd6effd2
760ee4d70fd3f0faf0c71fe57478223f79e84bf2
/homework/src/com/lagou/hw/servlet/LoginServlet.java
f2863b1a079ddc9434025a682a932b78f1a07d4c
[]
no_license
lkjl-521/helloworld-repo
5b2789cc7ba05e2e12bd99430d389d4eb6a6647b
99805e799c5b7c51cb4fb96292757f651ce17cdb
refs/heads/master
2023-04-05T09:30:02.056038
2021-04-05T03:13:02
2021-04-05T03:13:02
354,688,738
0
0
null
null
null
null
UTF-8
Java
false
false
2,041
java
package com.lagou.hw.servlet; import com.lagou.hw.bean.User; import com.lagou.hw.service.UserService; import com.lagou.hw.service.UserServiceImp; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** * @author lkjl_java * @Description: * @date 2021/2/19 - 18:11 */ @WebServlet(name = "LoginServlet", urlPatterns = "/login") public class LoginServlet extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // 1. 获取页面中的账户名和密码 request.setCharacterEncoding("utf-8"); String userName = request.getParameter("userName"); String password = request.getParameter("password"); System.out.println("获取到到的用户:" + userName + " 密码:" + password); // 2. 创造userService类型的对象去实现数据校验功能 UserService userService = new UserServiceImp(); User user = userService.userLoginService(new User(userName, password)); if (null == user) { System.out.println("登录失败,用户名或者密码错误!"); request.setAttribute("error", "登录失败,用户名或者密码错误!"); // 返回输入页面, 转发 RequestDispatcher requestDispatcher = request.getRequestDispatcher("index.jsp"); requestDispatcher.forward(request, response); } else { System.out.println("登录成功!欢迎使用!"); // 实现页面跳转,重定向学生信息展示界面 response.sendRedirect("/homework/show"); } } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } }
[ "2718057239@qq.com" ]
2718057239@qq.com
32073589ec3bc79befb9e5c3e7b14d1d629b7823
8155b3907cd529e29a1c71f95133b129d09037de
/src/com/caihong/common/web/WebErrors.java
a12fdc841b19d109a341dacff86775f1aca412f9
[]
no_license
xrogzu/caihongbbs
4410a4b541a4bac846bf875887958f92cc617903
94682bebbdb15b500f7b30ceb4af5b57d3b62d8a
refs/heads/master
2020-04-06T04:13:52.247974
2017-02-23T06:06:57
2017-02-23T06:06:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,037
java
package com.caihong.common.web; import java.io.Serializable; import java.util.Locale; import javax.servlet.http.HttpServletRequest; import org.springframework.context.MessageSource; public class WebErrors extends com.caihong.core.web.WebErrors { /** * 通过HttpServletRequest创建WebErrors * * @param request * 从request中获得MessageSource和Locale,如果存在的话。 * @return 如果LocaleResolver存在则返回国际化WebErrors */ public static WebErrors create(HttpServletRequest request) { return new WebErrors(request); } public WebErrors() { } public WebErrors(HttpServletRequest request) { super(request); } /** * 构造器 * * @param messageSource * @param locale */ public WebErrors(MessageSource messageSource, Locale locale) { super(messageSource, locale); } /** * 非站点内数据 * * @param clazz * @param id */ public void notInSite(Class<?> clazz, Serializable id) { addErrorCode("error.notInSite", clazz.getSimpleName(), id); } }
[ "qianfo_713@163.com" ]
qianfo_713@163.com
dfaca64ba78b2d2eb3711a572b4efae3e5f126b5
11e0f6f8f68ede4148f283ffde61ce0f79434cbf
/src/DayOne/Demo.java
8bfc809a1cf09ba95212984f3b531d169037b855
[]
no_license
meetmmpatel/Demo-JavaClass
043ac7995b86a5e09756249032b5e7e4c45bb0b6
414161d1cf45bdb50eafdd891565e78d35f56576
refs/heads/master
2020-06-20T05:35:45.031423
2019-07-15T14:09:17
2019-07-15T14:09:17
196,623,851
0
0
null
null
null
null
UTF-8
Java
false
false
313
java
package DayOne; public class Demo { public static void main(String[] args) { int numOne = 20; int numTwo = 40; System.out.println("Test Java Code"); System.out.println(89 + 70); System.out.println(8 * 2); System.out.println(numOne + numTwo); System.out.println(numOne - numTwo); } }
[ "meetmmpatel@gmail.com" ]
meetmmpatel@gmail.com
bc43b7751243a629bac0808292fc7ac87f0d8ad6
92c5fa127fff2ea3937a64f7267c6d2198f1587f
/src/main/java/com/selessia/scim/framework/rest/BulkResourceImpl.java
cc41709c56e47fec53d3291152e735111d653ddb
[ "Apache-2.0" ]
permissive
stnor/apache-scimple-spring-boot
16a0721412b559f82f2a1fcd272cd98dcc1691a0
54e030328c717ff3bed8c364782b3718aebb5bb1
refs/heads/master
2020-04-11T10:13:13.634096
2018-12-14T00:10:32
2018-12-14T00:10:32
161,707,188
0
0
null
null
null
null
UTF-8
Java
false
false
41,605
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.selessia.scim.framework.rest; import com.selessia.scim.framework.exception.UnableToCreateResourceException; import com.selessia.scim.framework.exception.UnableToDeleteResourceException; import com.selessia.scim.framework.exception.UnableToRetrieveResourceException; import com.selessia.scim.framework.exception.UnableToUpdateResourceException; import com.selessia.scim.framework.provider.Provider; import com.selessia.scim.framework.provider.ProviderRegistry; import com.selessia.scim.framework.provider.UpdateRequest; import com.selessia.scim.framework.schema.Registry; import edu.psu.swe.scim.spec.protocol.BulkResource; import edu.psu.swe.scim.spec.protocol.data.BulkOperation; import edu.psu.swe.scim.spec.protocol.data.BulkOperation.Method; import edu.psu.swe.scim.spec.protocol.data.BulkOperation.StatusWrapper; import edu.psu.swe.scim.spec.protocol.data.BulkRequest; import edu.psu.swe.scim.spec.protocol.data.BulkResponse; import edu.psu.swe.scim.spec.protocol.data.ErrorResponse; import edu.psu.swe.scim.spec.resources.BaseResource; import edu.psu.swe.scim.spec.resources.ScimResource; import edu.psu.swe.scim.spec.schema.Schema; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import javax.ws.rs.Path; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; import javax.ws.rs.core.UriInfo; import java.lang.reflect.Field; import java.util.*; import java.util.regex.Pattern; @Slf4j @Component @Path("/scim/v2/Bulk") public class BulkResourceImpl implements BulkResource { // private static final StatusWrapper OKAY_STATUS = new StatusWrapper(); // private static final StatusWrapper CREATED_STATUS = new StatusWrapper(); // private static final StatusWrapper NO_CONTENT_STATUS = new StatusWrapper(); // private static final StatusWrapper METHOD_NOT_ALLOWED_STATUS = new StatusWrapper(); // private static final StatusWrapper CONFLICT_STATUS = new StatusWrapper(); // private static final StatusWrapper CLIENT_ERROR_STATUS = new StatusWrapper(); // private static final StatusWrapper NOT_FOUND_STATUS = new StatusWrapper(); // private static final StatusWrapper INTERNAL_SERVER_ERROR_STATUS = new StatusWrapper(); // private static final StatusWrapper METHOD_NOT_IMPLEMENTED_STATUS = new StatusWrapper(); // private static final String OKAY = "200"; // private static final String CREATED = "201"; // private static final String NO_CONTENT = "204"; // private static final String CLIENT_ERROR = "400"; // private static final String NOT_FOUND = "404"; // private static final String METHOD_NOT_ALLOWED = "405"; // private static final String CONFLICT = "409"; // private static final String INTERNAL_SERVER_ERROR = "500"; // private static final String METHOD_NOT_IMPLEMENTED = "501"; private static final String BULK_ID_DOES_NOT_EXIST = "Bulk ID cannot be resolved because it refers to no bulkId in any Bulk Operation: %s"; private static final String BULK_ID_REFERS_TO_FAILED_RESOURCE = "Bulk ID cannot be resolved because the resource it refers to had failed to be created: %s"; private static final String OPERATION_DEPENDS_ON_FAILED_OPERATION = "Operation depends on failed bulk operation: %s"; private static final Pattern PATH_PATTERN = Pattern.compile("^/[^/]+/[^/]+$"); // static { // METHOD_NOT_ALLOWED_STATUS.setCode(METHOD_NOT_ALLOWED); // OKAY_STATUS.setCode(OKAY); // CREATED_STATUS.setCode(CREATED); // NO_CONTENT_STATUS.setCode(NO_CONTENT); // CONFLICT_STATUS.setCode(CONFLICT); // CLIENT_ERROR_STATUS.setCode(CLIENT_ERROR); // NOT_FOUND_STATUS.setCode(NOT_FOUND); // INTERNAL_SERVER_ERROR_STATUS.setCode(INTERNAL_SERVER_ERROR); // METHOD_NOT_IMPLEMENTED_STATUS.setCode(METHOD_NOT_IMPLEMENTED); // } @Autowired Registry registry; @Autowired ProviderRegistry providerRegistry; @Autowired UpdateRequest<ScimResource> updateRequestInstance; @Override public Response doBulk(BulkRequest request, UriInfo uriInfo) { BulkResponse response; int errorCount = 0; int requestFailOnErrors = request.getFailOnErrors(); int maxErrorCount = requestFailOnErrors > 0 ? requestFailOnErrors : Integer.MAX_VALUE; int errorCountIncrement = requestFailOnErrors > 0 ? 1 : 0; List<BulkOperation> bulkOperations = request.getOperations(); Map<String, BulkOperation> bulkIdKeyToOperationResult = new HashMap<>(); List<IWishJavaHadTuples> allUnresolveds = new ArrayList<>(); Map<String, Set<String>> reverseDependenciesGraph = this.generateReverseDependenciesGraph(bulkOperations); Map<String, Set<String>> transitiveReverseDependencies = generateTransitiveDependenciesGraph(reverseDependenciesGraph); log.debug("Reverse dependencies: {}", reverseDependenciesGraph); log.debug("Transitive reverse dependencies: {}", transitiveReverseDependencies); // clean out unwanted data for (BulkOperation operationRequest : bulkOperations) { operationRequest.setResponse(null); operationRequest.setStatus(null); } // get all known bulkIds, handle bad input for (BulkOperation operationRequest : bulkOperations) { String bulkId = operationRequest.getBulkId(); Method method = operationRequest.getMethod(); String bulkIdKey = bulkId != null ? "bulkId:" + bulkId : null; boolean errorOccurred = false; // duplicate bulkId if (bulkIdKey != null) { if (!bulkIdKeyToOperationResult.containsKey(bulkIdKey)) { bulkIdKeyToOperationResult.put(bulkIdKey, operationRequest); } else { errorOccurred = true; BulkOperation duplicateOperation = bulkIdKeyToOperationResult.get(bulkIdKey); createAndSetErrorResponse(operationRequest, Status.CONFLICT, "Duplicate bulkId"); if (!(duplicateOperation.getResponse() instanceof ErrorResponse)) { duplicateOperation.setData(null); createAndSetErrorResponse(duplicateOperation, Status.CONFLICT, "Duplicate bulkId"); } } } // bad/missing input for method if (method != null && !(operationRequest.getResponse() instanceof ErrorResponse)) { switch (method) { case POST: case PUT: { if (operationRequest.getData() == null) { errorOccurred = true; createAndSetErrorResponse(operationRequest, Status.BAD_REQUEST, "data not provided"); } } break; case DELETE: { String path = operationRequest.getPath(); if (path == null) { errorOccurred = true; createAndSetErrorResponse(operationRequest, Status.BAD_REQUEST, "path not provided"); } else if (!PATH_PATTERN.matcher(path) .matches()) { errorOccurred = true; createAndSetErrorResponse(operationRequest, Status.BAD_REQUEST, "path is not a valid path (e.g. \"/Groups/123abc\", \"/Users/123xyz\", ...)"); } else { String endPoint = path.substring(0, path.lastIndexOf('/')); Class<ScimResource> clazz = (Class<ScimResource>) registry.findScimResourceClassFromEndpoint(endPoint); if (clazz == null) { errorOccurred = true; createAndSetErrorResponse(operationRequest, Status.BAD_REQUEST, "path does not contain a recognized endpoint (e.g. \"/Groups/...\", \"/Users/...\", ...)"); } } } break; case PATCH: { errorOccurred = true; createAndSetErrorResponse(operationRequest, Status.NOT_IMPLEMENTED, "Method not implemented: PATCH"); } break; default: { } break; } } else if (method == null) { errorOccurred = true; operationRequest.setData(null); createAndSetErrorResponse(operationRequest, Status.BAD_REQUEST, "no method provided (e.g. PUT, POST, ..."); } if (errorOccurred) { operationRequest.setData(null); if (bulkIdKey != null) { Set<String> reverseDependencies = transitiveReverseDependencies.get(bulkIdKey); String detail = String.format(OPERATION_DEPENDS_ON_FAILED_OPERATION, bulkIdKey); for (String dependentBulkIdKey : reverseDependencies) { BulkOperation dependentOperation = bulkIdKeyToOperationResult.get(dependentBulkIdKey); if (!(dependentOperation.getResponse() instanceof ErrorResponse)) { dependentOperation.setData(null); createAndSetErrorResponse(dependentOperation, Status.CONFLICT, detail); } } } } } // do the operations for (BulkOperation operationResult : bulkOperations) { boolean errorCountExceeded = errorCount >= maxErrorCount; if (!errorCountExceeded && !(operationResult.getResponse() instanceof ErrorResponse)) { try { this.handleBulkOperationMethod(allUnresolveds, operationResult, bulkIdKeyToOperationResult, uriInfo); } catch (UnableToCreateResourceException | UnableToDeleteResourceException | UnableToUpdateResourceException resourceException) { log.error("Failed to do bulk operation", resourceException); errorCount += errorCountIncrement; String detail = resourceException.getLocalizedMessage(); Status status; if (resourceException instanceof UnableToCreateResourceException) { status = ((UnableToCreateResourceException) resourceException).getStatus(); } else if (resourceException instanceof UnableToDeleteResourceException) { status = ((UnableToDeleteResourceException) resourceException).getStatus(); } else { status = ((UnableToUpdateResourceException) resourceException).getStatus(); } createAndSetErrorResponse(operationResult, status, detail); if (operationResult.getBulkId() != null) { String bulkIdKey = "bulkId:" + operationResult.getBulkId(); this.cleanup(bulkIdKey, transitiveReverseDependencies, bulkIdKeyToOperationResult); } } catch (UnresolvableOperationException unresolvableOperationException) { log.error("Could not resolve bulkId during Bulk Operation method handling", unresolvableOperationException); errorCount += errorCountIncrement; String detail = unresolvableOperationException.getLocalizedMessage(); createAndSetErrorResponse(operationResult, Status.CONFLICT, detail); if (operationResult.getBulkId() != null) { String bulkIdKey = "bulkId:" + operationResult.getBulkId(); this.cleanup(bulkIdKey, transitiveReverseDependencies, bulkIdKeyToOperationResult); } } } else if (errorCountExceeded) { createAndSetErrorResponse(operationResult, Status.CONFLICT, "failOnErrors count reached"); if (operationResult.getBulkId() != null) { String bulkIdKey = "bulkId:" + operationResult.getBulkId(); this.cleanup(bulkIdKey, transitiveReverseDependencies, bulkIdKeyToOperationResult); } } } // Resolve unresolved bulkIds for (IWishJavaHadTuples iwjht : allUnresolveds) { BulkOperation bulkOperationResult = iwjht.bulkOperationResult; String bulkIdKey = iwjht.bulkIdKey; ScimResource scimResource = bulkOperationResult.getData(); try { for (UnresolvedTopLevel unresolved : iwjht.unresolveds) { log.debug("Final resolution pass for {}", unresolved); unresolved.resolve(scimResource, bulkIdKeyToOperationResult); } String scimResourceId = scimResource.getId(); @SuppressWarnings("unchecked") Class<ScimResource> scimResourceClass = (Class<ScimResource>) scimResource.getClass(); Provider<ScimResource> provider = providerRegistry.getProvider(scimResourceClass); ScimResource original = provider.get(scimResourceId); UpdateRequest<ScimResource> updateRequest = updateRequestInstance; updateRequest.initWithResource(scimResourceId, original, scimResource); provider.update(updateRequest); } catch (UnresolvableOperationException unresolvableOperationException) { log.error("Could not complete final resolution pass, unresolvable bulkId", unresolvableOperationException); String detail = unresolvableOperationException.getLocalizedMessage(); bulkOperationResult.setData(null); bulkOperationResult.setLocation(null); createAndSetErrorResponse(bulkOperationResult, Status.CONFLICT, detail); this.cleanup(bulkIdKey, transitiveReverseDependencies, bulkIdKeyToOperationResult); } catch (UnableToUpdateResourceException unableToUpdateResourceException) { log.error("Failed to update Scim Resource with resolved bulkIds", unableToUpdateResourceException); String detail = unableToUpdateResourceException.getLocalizedMessage(); bulkOperationResult.setData(null); bulkOperationResult.setLocation(null); createAndSetErrorResponse(bulkOperationResult, unableToUpdateResourceException.getStatus(), detail); this.cleanup(bulkIdKey, transitiveReverseDependencies, bulkIdKeyToOperationResult); } catch (UnableToRetrieveResourceException e) { log.error("Could not complete final resolution pass, unresolvable bulkId", e); String detail = e.getLocalizedMessage(); bulkOperationResult.setData(null); bulkOperationResult.setLocation(null); createAndSetErrorResponse(bulkOperationResult, Status.NOT_FOUND, detail); this.cleanup(bulkIdKey, transitiveReverseDependencies, bulkIdKeyToOperationResult); } } response = new BulkResponse(); response.setOperations(bulkOperations); response.setStatus(Status.OK); return Response.ok(response) .build(); } /** * Delete resources that depend on {@code bulkIdKeyToCleanup}, remove * {@link BulkOperation}s data, and set their code and response * * @param bulkIdKeyToCleanup * @param transitiveReverseDependencies * @param bulkIdKeyToOperationResult */ private void cleanup(String bulkIdKeyToCleanup, Map<String, Set<String>> transitiveReverseDependencies, Map<String, BulkOperation> bulkIdKeyToOperationResult) { Set<String> reverseDependencies = transitiveReverseDependencies.get(bulkIdKeyToCleanup); BulkOperation operationResult = bulkIdKeyToOperationResult.get(bulkIdKeyToCleanup); String bulkId = operationResult.getBulkId(); ScimResource scimResource = operationResult.getData(); @SuppressWarnings("unchecked") Class<ScimResource> scimResourceClass = (Class<ScimResource>) scimResource.getClass(); Provider<ScimResource> provider = this.providerRegistry.getProvider(scimResourceClass); try { provider.delete(scimResource.getId()); } catch (UnableToDeleteResourceException unableToDeleteResourceException) { log.error("Could not delete ScimResource after failure: {}", scimResource); } for (String dependentBulkIdKey : reverseDependencies) { BulkOperation dependentOperationResult = bulkIdKeyToOperationResult.get(dependentBulkIdKey); if (!(dependentOperationResult.getResponse() instanceof ErrorResponse)) try { ScimResource dependentResource = dependentOperationResult.getData(); String dependentResourceId = dependentResource.getId(); @SuppressWarnings("unchecked") Class<ScimResource> dependentResourceClass = (Class<ScimResource>) dependentResource.getClass(); Provider<ScimResource> dependentResourceProvider = this.providerRegistry.getProvider(dependentResourceClass); dependentOperationResult.setData(null); dependentOperationResult.setLocation(null); createAndSetErrorResponse(dependentOperationResult, Status.CONFLICT, String.format(OPERATION_DEPENDS_ON_FAILED_OPERATION, bulkId, dependentBulkIdKey)); dependentResourceProvider.delete(dependentResourceId); } catch (UnableToDeleteResourceException unableToDeleteResourceException) { log.error("Could not delete depenedent ScimResource after failing to update dependee", unableToDeleteResourceException); } } } /** * Based on the method requested by {@code operationResult}, invoke that * method. Fill {@code unresolveds} with unresolved bulkIds and complexes that * contain unresolved bulkIds. * * @param unresolveds * @param operationResult * @param bulkIdKeyToOperationResult * @param uriInfo * @throws UnableToCreateResourceException * @throws UnableToDeleteResourceException * @throws UnableToUpdateResourceException * @throws UnresolvableOperationException */ private void handleBulkOperationMethod(List<IWishJavaHadTuples> unresolveds, BulkOperation operationResult, Map<String, BulkOperation> bulkIdKeyToOperationResult, UriInfo uriInfo) throws UnableToCreateResourceException, UnableToDeleteResourceException, UnableToUpdateResourceException, UnresolvableOperationException { ScimResource scimResource = operationResult.getData(); Method bulkOperationMethod = operationResult.getMethod(); String bulkId = operationResult.getBulkId(); Class<ScimResource> scimResourceClass; if (scimResource == null) { String path = operationResult.getPath(); String endPoint = path.substring(0, path.lastIndexOf('/')); Class<ScimResource> clazz = (Class<ScimResource>) registry.findScimResourceClassFromEndpoint(endPoint); scimResourceClass = clazz; } else { @SuppressWarnings("unchecked") Class<ScimResource> clazz = (Class<ScimResource>) scimResource.getClass(); scimResourceClass = clazz; } Provider<ScimResource> provider = providerRegistry.getProvider(scimResourceClass); switch (bulkOperationMethod) { case POST: { log.debug("POST: {}", scimResource); this.resolveTopLevel(unresolveds, operationResult, bulkIdKeyToOperationResult); log.debug("Creating {}", scimResource); ScimResource newScimResource = provider.create(scimResource); String bulkOperationPath = operationResult.getPath(); String newResourceId = newScimResource.getId(); String newResourceUri = uriInfo.getBaseUriBuilder() .path(bulkOperationPath) .path(newResourceId) .build() .toString(); if (bulkId != null) { String bulkIdKey = "bulkId:" + bulkId; log.debug("adding {} = {}", bulkIdKey, newResourceId); bulkIdKeyToOperationResult.get(bulkIdKey) .setData(newScimResource); } operationResult.setData(newScimResource); operationResult.setLocation(newResourceUri.toString()); operationResult.setStatus(StatusWrapper.wrap(Status.CREATED)); } break; case DELETE: { log.debug("DELETE: {}", operationResult.getPath()); String scimResourceId = operationResult.getPath() .substring(operationResult.getPath() .lastIndexOf("/") + 1); provider.delete(scimResourceId); operationResult.setStatus(StatusWrapper.wrap(Status.NO_CONTENT)); } break; case PUT: { log.debug("PUT: {}", scimResource); this.resolveTopLevel(unresolveds, operationResult, bulkIdKeyToOperationResult); String id = operationResult.getPath() .substring(operationResult.getPath() .lastIndexOf("/") + 1); try { ScimResource original = provider.get(id); UpdateRequest<ScimResource> updateRequest = updateRequestInstance; updateRequest.initWithResource(id, original, scimResource); provider.update(updateRequest); operationResult.setStatus(StatusWrapper.wrap(Status.OK)); } catch (UnableToRetrieveResourceException e) { operationResult.setStatus(StatusWrapper.wrap(Status.NOT_FOUND)); } } break; default: { BulkOperation.Method method = operationResult.getMethod(); String detail = "Method not allowed: " + method; log.error("Received unallowed method: {}", method); createAndSetErrorResponse(operationResult, Status.METHOD_NOT_ALLOWED, detail); } break; } } private static void createAndSetErrorResponse(BulkOperation operationResult, Status status, String detail) { ErrorResponse error = new ErrorResponse(status, detail); operationResult.setResponse(error); operationResult.setStatus(new StatusWrapper(status)); } @AllArgsConstructor private static class IWishJavaHadTuples { public final String bulkIdKey; public final List<UnresolvedTopLevel> unresolveds; public final BulkOperation bulkOperationResult; } private static class UnresolvableOperationException extends Exception { private static final long serialVersionUID = -6081994707016671935L; public UnresolvableOperationException(String message) { super(message); } } @AllArgsConstructor private static class UnresolvedComplex { private final Object object; private final Field field; private final String bulkIdKey; public void resolve(Map<String, BulkOperation> bulkIdKeyToOperationResult) throws UnresolvableOperationException { BulkOperation resolvedOperation = bulkIdKeyToOperationResult.get(this.bulkIdKey); BaseResource response = resolvedOperation.getResponse(); ScimResource resolvedResource = resolvedOperation.getData(); if ((response == null || !(response instanceof ErrorResponse)) && resolvedResource != null) { String resolvedId = resolvedResource.getId(); try { this.field.set(this.object, resolvedId); } catch (IllegalAccessException illegalAccessException) { log.error("Failed to access bulkId field", illegalAccessException); } } else { throw new UnresolvableOperationException(String.format(BULK_ID_REFERS_TO_FAILED_RESOURCE, this.bulkIdKey)); } } } @AllArgsConstructor private static abstract class UnresolvedTopLevel { protected final Field field; public abstract void resolve(ScimResource scimResource, Map<String, BulkOperation> bulkIdKeyToOperationResult) throws UnresolvableOperationException; } private static class UnresolvedTopLevelBulkId extends UnresolvedTopLevel { private final String unresolvedBulkIdKey; public UnresolvedTopLevelBulkId(Field field, String bulkIdKey) { super(field); this.unresolvedBulkIdKey = bulkIdKey; } @Override public void resolve(ScimResource scimResource, Map<String, BulkOperation> bulkIdKeyToOperationResult) throws UnresolvableOperationException { BulkOperation resolvedOperationResult = bulkIdKeyToOperationResult.get(this.unresolvedBulkIdKey); BaseResource response = resolvedOperationResult.getResponse(); ScimResource resolvedResource = resolvedOperationResult.getData(); if ((response == null || !(response instanceof ErrorResponse)) && resolvedResource != null) { String resolvedId = resolvedResource.getId(); try { super.field.set(scimResource, resolvedId); } catch (IllegalAccessException illegalAccessException) { log.error("Failed to access bulkId field", illegalAccessException); } } else { throw new UnresolvableOperationException("Bulk ID cannot be resolved because the resource it refers to had failed to be created: " + this.unresolvedBulkIdKey); } } } private static class UnresolvedTopLevelComplex extends UnresolvedTopLevel { public final Object complex; public final List<UnresolvedComplex> unresolveds; public UnresolvedTopLevelComplex(Field field, Object complex, List<UnresolvedComplex> unresolveds) { super(field); this.complex = complex; this.unresolveds = unresolveds; } @Override public void resolve(ScimResource scimResource, Map<String, BulkOperation> bulkIdKeyToOperationResult) throws UnresolvableOperationException { try { for (UnresolvedComplex unresolved : this.unresolveds) { unresolved.resolve(bulkIdKeyToOperationResult); } this.field.set(scimResource, this.complex); } catch (IllegalAccessException illegalAccessException) { log.error("Could not resolve top level SCIM resource", illegalAccessException); } } } /** * Search through the subattribute {@code subAttributeValue} and fill * {@code unresolveds} with unresolved bulkIds. * * @param unresolveds * @param attributeValue * @param attribute * @param bulkIdKeyToOperationResult * @return * @throws UnresolvableOperationException */ private static List<UnresolvedComplex> resolveAttribute(List<UnresolvedComplex> unresolveds, Object attributeValue, Schema.Attribute attribute, Map<String, BulkOperation> bulkIdKeyToOperationResult) throws UnresolvableOperationException { if (attributeValue == null) { return unresolveds; } List<Schema.Attribute> attributes = attribute.getAttributes(); for (Schema.Attribute subAttribute : attributes) { Field attributeField = subAttribute.getField(); try { if (subAttribute.isScimResourceIdReference()) { // TODO - This will fail if field is a char or Character array String bulkIdKey = (String) attributeField.get(attributeValue); if (bulkIdKey != null && bulkIdKey.startsWith("bulkId:")) { log.debug("Found bulkId: {}", bulkIdKey); if (bulkIdKeyToOperationResult.containsKey(bulkIdKey)) { BulkOperation resolvedOperationResult = bulkIdKeyToOperationResult.get(bulkIdKey); BaseResource response = resolvedOperationResult.getResponse(); ScimResource resolvedResource = resolvedOperationResult.getData(); if ((response == null || !(response instanceof ErrorResponse)) && resolvedResource != null && resolvedResource.getId() != null) { String resolvedId = resolvedResource.getId(); attributeField.set(attributeValue, resolvedId); } else { UnresolvedComplex unresolved = new UnresolvedComplex(attributeValue, attributeField, bulkIdKey); unresolveds.add(unresolved); } } else { throw new UnresolvableOperationException(String.format(BULK_ID_DOES_NOT_EXIST, bulkIdKey)); } } } else if (subAttribute.getType() == Schema.Attribute.Type.COMPLEX) { Object subFieldValue = attributeField.get(attributeValue); if (subFieldValue != null) { Class<?> subFieldClass = subFieldValue.getClass(); boolean isCollection = Collection.class.isAssignableFrom(subFieldClass); if (isCollection || subFieldClass.isArray()) { @SuppressWarnings("unchecked") Collection<Object> subFieldValues = isCollection ? (Collection<Object>) subFieldValue : Arrays.asList((Object[]) subFieldValue); for (Object subArrayFieldValue : subFieldValues) { resolveAttribute(unresolveds, subArrayFieldValue, subAttribute, bulkIdKeyToOperationResult); } } else { resolveAttribute(unresolveds, subFieldValue, subAttribute, bulkIdKeyToOperationResult); } } } } catch (IllegalAccessException illegalAccessException) { log.error("Could not resolve bulkId within ScimResource attribute", illegalAccessException); } } log.debug("Resolved attribute had {} unresolved fields", unresolveds.size()); return unresolveds; } /** * Attempt to resolve the bulkIds referenced inside of the * {@link ScimResource} contained inside of {@code bulkOperationResult}. Fill * {@code unresolveds} with bulkIds that could not be yet resolved. * * @param unresolveds * @param bulkOperationResult * @param bulkIdKeyToOperationResult * @throws UnresolvableOperationException */ private void resolveTopLevel(List<IWishJavaHadTuples> unresolveds, BulkOperation bulkOperationResult, Map<String, BulkOperation> bulkIdKeyToOperationResult) throws UnresolvableOperationException { ScimResource scimResource = bulkOperationResult.getData(); String schemaUrn = scimResource.getBaseUrn(); Schema schema = this.registry.getSchema(schemaUrn); List<UnresolvedTopLevel> unresolvedTopLevels = new ArrayList<>(); for (Schema.Attribute attribute : schema.getAttributes()) { Field attributeField = attribute.getField(); try { if (attribute.isScimResourceIdReference()) { String bulkIdKey = (String) attributeField.get(scimResource); if (bulkIdKey != null && bulkIdKey.startsWith("bulkId:")) { if (bulkIdKeyToOperationResult.containsKey(bulkIdKey)) { BulkOperation resolvedOperationResult = bulkIdKeyToOperationResult.get(bulkIdKey); BaseResource response = resolvedOperationResult.getResponse(); ScimResource resolvedResource = resolvedOperationResult.getData(); if ((response == null || !(response instanceof ErrorResponse)) && resolvedResource != null) { String resolvedId = resolvedResource.getId(); attributeField.set(scimResource, resolvedId); } else { UnresolvedTopLevel unresolved = new UnresolvedTopLevelBulkId(attributeField, bulkIdKey); attributeField.set(scimResource, null); unresolvedTopLevels.add(unresolved); } } else { throw new UnresolvableOperationException(String.format(BULK_ID_DOES_NOT_EXIST, bulkIdKey)); } } } else if (attribute.getType() == Schema.Attribute.Type.COMPLEX) { Object attributeFieldValue = attributeField.get(scimResource); if (attributeFieldValue != null) { List<UnresolvedComplex> subUnresolveds = new ArrayList<>(); Class<?> subFieldClass = attributeFieldValue.getClass(); boolean isCollection = Collection.class.isAssignableFrom(subFieldClass); if (isCollection || subFieldClass.isArray()) { @SuppressWarnings("unchecked") Collection<Object> subFieldValues = isCollection ? (Collection<Object>) attributeFieldValue : Arrays.asList((Object[]) attributeFieldValue); for (Object subArrayFieldValue : subFieldValues) { resolveAttribute(subUnresolveds, subArrayFieldValue, attribute, bulkIdKeyToOperationResult); } } else { resolveAttribute(subUnresolveds, attributeFieldValue, attribute, bulkIdKeyToOperationResult); } if (subUnresolveds.size() > 0) { UnresolvedTopLevel unresolved = new UnresolvedTopLevelComplex(attributeField, attributeFieldValue, subUnresolveds); attributeField.set(scimResource, null); unresolvedTopLevels.add(unresolved); } } } } catch (IllegalAccessException illegalAccessException) { log.error("Failed to access a ScimResource ID reference field to resolve it", illegalAccessException); } } if (unresolvedTopLevels.size() > 0) { String bulkIdKey = "bulkId:" + bulkOperationResult.getBulkId(); unresolveds.add(new IWishJavaHadTuples(bulkIdKey, unresolvedTopLevels, bulkOperationResult)); } } /** * Traverse the provided dependency graph and fill {@code visited} with * visited bulkIds. * * @param visited * @param dependencyGraph * @param root * @param current */ private static void generateVisited(Set<String> visited, Map<String, Set<String>> dependencyGraph, String root, String current) { if (!root.equals(current) && !visited.contains(current)) { visited.add(current); Set<String> dependencies = dependencyGraph.get(current); for (String dependency : dependencies) { generateVisited(visited, dependencyGraph, root, dependency); } } } /** * If A -> {B} and B -> {C} then A -> {B, C}. * * @param dependenciesGraph * @return */ private static Map<String, Set<String>> generateTransitiveDependenciesGraph(Map<String, Set<String>> dependenciesGraph) { Map<String, Set<String>> transitiveDependenciesGraph = new HashMap<>(); for (Map.Entry<String, Set<String>> entry : dependenciesGraph.entrySet()) { String root = entry.getKey(); Set<String> dependencies = entry.getValue(); Set<String> visited = new HashSet<>(); transitiveDependenciesGraph.put(root, visited); for (String dependency : dependencies) { generateVisited(visited, dependenciesGraph, root, dependency); } } return transitiveDependenciesGraph; } private static void generateReverseDependenciesGraph(Map<String, Set<String>> reverseDependenciesGraph, String dependentBulkId, Object scimObject, List<Schema.Attribute> scimObjectAttributes) { for (Schema.Attribute scimObjectAttribute : scimObjectAttributes) try { if (scimObjectAttribute.isScimResourceIdReference()) { String reference = (String) scimObjectAttribute.getField() .get(scimObject); if (reference != null && reference.startsWith("bulkId:")) { Set<String> dependents = reverseDependenciesGraph.computeIfAbsent(reference, (unused) -> new HashSet<>()); dependents.add("bulkId:" + dependentBulkId); } } else if (scimObjectAttribute.isMultiValued()) { // all multiValueds // are COMPLEX, not // all COMPLEXES are // multiValued Object attributeObject = scimObjectAttribute.getField() .get(scimObject); Class<?> attributeObjectClass = attributeObject.getClass(); boolean isCollection = Collection.class.isAssignableFrom(attributeObjectClass); Collection<?> attributeValues = isCollection ? (Collection<?>) attributeObject : Arrays.asList(attributeObject); List<Schema.Attribute> subAttributes = scimObjectAttribute.getAttributes(); for (Object attributeValue : attributeValues) { generateReverseDependenciesGraph(reverseDependenciesGraph, dependentBulkId, attributeValue, subAttributes); } } else if (scimObjectAttribute.getType() == Schema.Attribute.Type.COMPLEX) { Object attributeValue = scimObjectAttribute.getField() .get(scimObject); List<Schema.Attribute> subAttributes = scimObjectAttribute.getAttributes(); generateReverseDependenciesGraph(reverseDependenciesGraph, dependentBulkId, attributeValue, subAttributes); } } catch (IllegalAccessException illegalAccessException) { log.error("Resolving reverse dependencies", illegalAccessException); } } /** * Finds the reverse dependencies of each {@link BulkOperation}. * * @param bulkOperations * @return */ private Map<String, Set<String>> generateReverseDependenciesGraph(List<BulkOperation> bulkOperations) { Map<String, Set<String>> reverseDependenciesGraph = new HashMap<>(); for (BulkOperation bulkOperation : bulkOperations) { String bulkId = bulkOperation.getBulkId(); if (bulkId != null) { ScimResource scimResource = bulkOperation.getData(); String scimResourceBaseUrn = scimResource.getBaseUrn(); Schema schema = this.registry.getSchema(scimResourceBaseUrn); List<Schema.Attribute> attributes = schema.getAttributes(); generateReverseDependenciesGraph(reverseDependenciesGraph, bulkId, scimResource, attributes); } } return reverseDependenciesGraph; } }
[ "stefan@selessia.com" ]
stefan@selessia.com
cf9e5daba64b3c2356a0d3cdf37bc72d6f306fb2
90b4622c0c1e27368e64674778b6ddfced2359af
/PracticeFileOperations/src/WriteByteContentsToAFile.java
c9371d792ceb1c959fa0bf0e98fb38c25c757d15
[]
no_license
sakkumaayi/Training
7f2b40a1f7607ed322096ad9683bf1a064501b26
58f1d132eb13bbcb4d7e76eed899d61baf3f3829
refs/heads/master
2020-04-08T03:49:01.469446
2018-11-29T23:55:37
2018-11-29T23:55:37
158,991,104
0
0
null
null
null
null
UTF-8
Java
false
false
720
java
import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; public class WriteByteContentsToAFile { public static void main(String[] args) throws IOException { // TODO Auto-generated method stub String s="sasnjhfkjdd"; byte[] arr=s.getBytes(); FileOutputStream fos=null; try { File f=new File("C:/Users/santh/Desktop/dummy.txt"); if(!f.exists()) { f.createNewFile(); } fos=new FileOutputStream("C:/Users/santh/Desktop/dummy.txt"); fos.write(arr); fos.flush(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally { if(fos!=null) { fos.close(); } } } }
[ "44944540+sakkumaayi@users.noreply.github.com" ]
44944540+sakkumaayi@users.noreply.github.com
9a201b127b3977994bbb2d7de849b19e0ec9460a
6035fee011b167d23a44f5c36a9385db9abb1df9
/src/book/action/BookAddAction.java
c372e421cfc709aaa68cd208dad02ad47d8e2f49
[]
no_license
sokon112/test1
baccb50744930b02cbeed4d14c600f4c96d7b215
81a82284cedf91ce3e424decabf10178d7a116d5
refs/heads/master
2023-04-16T16:15:58.613109
2021-04-30T09:13:17
2021-04-30T09:13:17
363,087,757
0
0
null
null
null
null
UTF-8
Java
false
false
581
java
package book.action; import java.util.Scanner; import book.domain.BookVO; import book.service.BookAddService; import book.ui.ConsoleUtil; public class BookAddAction implements Action { @Override public void execute(Scanner sc) { ConsoleUtil util = new ConsoleUtil(); BookVO vo = util.printAddMessege(sc); BookAddService service = new BookAddService(); boolean result = service.addBook( vo.getBookCode(), vo.getBookName(), vo.getWriterName(), vo.getCost()); if(result) { util.printAddSuccessMessege(); }else { util.printAddFailMessege(); } } }
[ "sokon112@gmail.com" ]
sokon112@gmail.com
68c32b73918f874c1c4ee022ede1bb533426e781
5b5e0872b78d9b62cb07f30cd8499f7913fd8531
/src/main/java/com/example/demo/domen/forms/UserRegistration.java
c5ec578ae50499c9d1c274e7b49da1c71a51f5f1
[]
no_license
bv-dolphin/demoDto
addfb1fba010ec0133c8bceff533df376ad56a35
88d09dc2002c8e9fbdd2597f44d7c4556e353257
refs/heads/master
2020-03-30T14:14:12.879817
2018-10-02T19:09:21
2018-10-02T19:09:21
151,307,906
1
0
null
null
null
null
UTF-8
Java
false
false
479
java
package com.example.demo.domen.forms; import lombok.Getter; import lombok.Setter; import javax.validation.constraints.NotBlank; @Setter @Getter public class UserRegistration { @NotBlank(message = "errors.user-registration.user_name.not-null") private String userName; @NotBlank(message = "errors.user-registration.email.not-null") private String email; @NotBlank(message = "errors.user_registration.password.not-null") private String password; }
[ "bv.dolphin.ua@gmail.com" ]
bv.dolphin.ua@gmail.com
61cbff913666e28a5331d64d8e3c025a4e802044
c7d693c589818ecb1208b35543746405aca23120
/app/src/main/java/com/wificamera/sniffer/common/constant/SPConstants.java
7c145e03403c6785c22a928ff0cb9f88e51d8227
[]
no_license
h2so0o4/CameraSniffer
5c7c6d341cc73b22f1dabfed8ab060d4cdb6fa70
81cbb60a87f5afc9770d40b229c97107743d13a7
refs/heads/master
2023-01-09T03:41:26.359136
2020-11-12T08:50:54
2020-11-12T08:50:54
312,213,658
1
0
null
null
null
null
UTF-8
Java
false
false
776
java
package com.wificamera.sniffer.common.constant; /** * Created on 2019/4/4. * 保存到SharedPreferences的常量名字 * 将SharedPreferences的key统一管理 */ public interface SPConstants { /* * 将SharedPreferences的key统一管理 * * */ /** * App token * */ String TOKEN = "token"; /** * 是否修改密码,Boolean * */ String CHANGE_PWD = "changePwd"; /** * 用户账号 * */ String USER_NAME = "username"; /** * 用户密码 * */ String PASSWORD = "password"; /** * 用户名字 * */ String USER = "user"; /** * 用户ID * */ String USER_ID = "userId"; /** * 角色 * */ String ROLE_NAMES = "roleNames"; }
[ "5643934+H2s04@user.noreply.gitee.com" ]
5643934+H2s04@user.noreply.gitee.com
c98f4b883728a8c548cb75c1e2f638a9fc718958
56e7e4b3398254f9f566ce9ad49279ad24a09359
/MavenDemoTest/src/test/java/com/test/TestngExpectedExceptionTest.java
82d4025526bd6f876b7eb61ad13bf6e3bf3ccd3b
[]
no_license
NivethaKrish/MavenDemoTest
be287439ae092b87b1adc6d5a46438ee253c6fba
67e78e0f932f7af33b029a4e0dcad7c66b16fd56
refs/heads/master
2023-05-10T11:46:49.233002
2021-06-13T18:44:48
2021-06-13T18:44:48
376,616,484
0
0
null
null
null
null
UTF-8
Java
false
false
412
java
package com.test; import org.testng.annotations.Test; public class TestngExpectedExceptionTest { @Test(expectedExceptions=NumberFormatException.class) public void sum() { String s="100A"; int j = Integer.parseInt(s); System.out.println(j); } @Test public void sum2() { String s1="1100A"; int j1 = Integer.parseInt(s1); System.out.println(j1); } }
[ "Nivetha Deivendran@DESKTOP-K29RTIE" ]
Nivetha Deivendran@DESKTOP-K29RTIE
fcb002aa0ac3616672adcc54357ade56695fc37e
b966ba38ea510173ada6e73245d932e36105b97e
/src/main/java/com/fly/erp/bus/service/ProviderService.java
dccf4d9c4f939292b27c61603250caab32c050f8
[]
no_license
zhouzhou98/-
84b609f02c3fec2bb6d33436a83a17c0d0a060ee
b3baa2e39c011a9e3ad578a51bcb696bc1b83131
refs/heads/master
2022-06-23T09:32:53.422649
2020-03-04T06:44:08
2020-03-04T06:44:08
242,735,913
0
0
null
2022-06-17T02:53:01
2020-02-24T12:53:40
JavaScript
UTF-8
Java
false
false
983
java
package com.fly.erp.bus.service; import com.fly.erp.bus.domain.Provider; import com.baomidou.mybatisplus.extension.service.IService; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.CachePut; import org.springframework.cache.annotation.Cacheable; import java.io.Serializable; /** * <p> * 服务类 * </p> * * @author zhouzhou * @since 2020-02-23 */ public interface ProviderService extends IService<Provider> { // @Override // @CachePut(cacheNames="com.fly.erp.bus.service.impl.ProviderServiceImpl",key = "#result.id") public Provider saveProvider(Provider entity); // @Override // @CachePut(cacheNames="com.fly.erp.bus.service.impl.ProviderServiceImpl",key = "#entity.id") public Provider updateProviderById(Provider entity); // @Override // @Cacheable(cacheNames="com.fly.erp.bus.service.impl.ProviderServiceImpl",key = "#result.id") public Provider getProviderById(Serializable id); }
[ "1404031711@qq.com" ]
1404031711@qq.com
620f7560a66034ec12f534fca48d059c6ff1ebc6
7025539a02e7f2a510c10bf467ca287a30c60ce2
/src/main/java/br/infnet/edu/assessment/infrastructure/crossCutting/exceptions/NegativeNumberException.java
a639716b1112ae139f024120ace1bec4b4565cc6
[]
no_license
al-aragao/Fundamentos-Java-Assessment
e59f2b29779008f5ddc536838098476115538a5b
9434ea6d0cfcf070ad9132349da774318e5ffb28
refs/heads/main
2023-08-11T07:06:40.044420
2021-09-27T21:37:54
2021-09-27T21:37:54
411,049,028
0
0
null
null
null
null
UTF-8
Java
false
false
222
java
package br.infnet.edu.assessment.infrastructure.crossCutting.exceptions; public class NegativeNumberException extends Exception { public NegativeNumberException(String message) { super(message); } }
[ "thiago.aragao@worthix.com" ]
thiago.aragao@worthix.com
4c7d988a4ee1d8f4767ca8762f2bc3a1d2f079d5
209e908242c201544e62990243decc08e8e7e415
/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/cdtlz/C1_DTLZ3.java
889f2e890e951b13c63d68c48c327bf8c0d1438b
[]
no_license
weaponhe/CMOEACD
7d3a9f7b6a908339f11adc5f20648d4920d854b9
6be561ed689f1eb17a28856079ddffe79ddbe9f4
refs/heads/master
2021-09-10T23:16:02.460594
2018-04-04T04:48:22
2018-04-04T04:48:22
110,501,459
1
2
null
null
null
null
UTF-8
Java
false
false
4,283
java
// This program 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 3 of the License, or // (at your option) any later version. // // This program 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. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. package org.uma.jmetal.problem.multiobjective.cdtlz; import org.uma.jmetal.problem.ConstrainedProblem; import org.uma.jmetal.problem.multiobjective.dtlz.DTLZ1; import org.uma.jmetal.problem.multiobjective.dtlz.DTLZ3; import org.uma.jmetal.solution.DoubleSolution; import org.uma.jmetal.util.solutionattribute.impl.MaximumConstraintViolation; import org.uma.jmetal.util.solutionattribute.impl.NumberOfViolatedConstraints; import org.uma.jmetal.util.solutionattribute.impl.OverallConstraintViolation; import java.util.HashMap; import java.util.Map; /** * Problem C1-DTLZ3, defined in: * Jain, H. and K. Deb. "An Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based * Nondominated Sorting Approach, Part II: Handling Constraints and Extending to an Adaptive Approach." * EEE Transactions on Evolutionary Computation, 18(4):602-622, 2014. * * @author Antonio J. Nebro <antonio@lcc.uma.es> */ public class C1_DTLZ3 extends DTLZ3 implements ConstrainedProblem<DoubleSolution> { public OverallConstraintViolation<DoubleSolution> overallConstraintViolationDegree ; public NumberOfViolatedConstraints<DoubleSolution> numberOfViolatedConstraints ; public MaximumConstraintViolation<DoubleSolution> maximumConstraintViolationDegree; private static Map<Integer, Double> rValue; static { rValue = new HashMap<Integer, Double>() ; rValue.put(3, 9.0) ; rValue.put(5, 12.5) ; rValue.put(8, 12.5) ; rValue.put(10, 15.0) ; rValue.put(15, 15.0) ; } /** * Constructor * @param numberOfVariables * @param numberOfObjectives */ public C1_DTLZ3(int numberOfVariables, int numberOfObjectives) { super(numberOfVariables, numberOfObjectives) ; setNumberOfConstraints(1); setName("C1_DTLZ3"); overallConstraintViolationDegree = new OverallConstraintViolation<DoubleSolution>() ; numberOfViolatedConstraints = new NumberOfViolatedConstraints<DoubleSolution>() ; maximumConstraintViolationDegree = new MaximumConstraintViolation<>(); } @Override public void evaluateConstraints(DoubleSolution solution) { double[] constraint = new double[this.getNumberOfConstraints()]; // double sum1 = 0 ; // double sum2 = 0 ; // for (int i = 0; i < getNumberOfObjectives(); i++) { // double v = Math.pow(solution.getObjective(i), 2) ; // sum1 += v - 16.0 ; // sum2 += v - Math.pow(rValue.get(getNumberOfObjectives()), 2.0) ; // } double sum = 0 ; for (int i = 0; i < getNumberOfObjectives(); i++) { double v = Math.pow(solution.getObjective(i), 2) ; sum += v ; } constraint[0] = (sum - 16.0) * (sum - Math.pow(rValue.get(getNumberOfObjectives()), 2.0)); solution.setConstraintViolation(0,constraint[0]); double overallConstraintViolation = 0.0; int violatedConstraints = 0; double maximumConstraintViolation = 0.0; for (int i = 0; i < getNumberOfConstraints(); i++) { if (constraint[i]<0.0){ overallConstraintViolation+=constraint[i]; violatedConstraints++; maximumConstraintViolation = Math.min(maximumConstraintViolation,constraint[i]); } } solution.setAttribute("overallConstraintViolationDegree", overallConstraintViolation); overallConstraintViolationDegree.setAttribute(solution, overallConstraintViolation); numberOfViolatedConstraints.setAttribute(solution, violatedConstraints); maximumConstraintViolationDegree.setAttribute(solution,maximumConstraintViolation); } }
[ "weaponhe@126.com" ]
weaponhe@126.com
d0ca6585e673c10b1f81e5bfdba3cd96d49ded04
99c03face59ec13af5da080568d793e8aad8af81
/hom_classifier/2om_classifier/scratch/LOI53SDL24/Pawn.java
86c801559da7f9f68cca317896eab6b54cffe20a
[]
no_license
fouticus/HOMClassifier
62e5628e4179e83e5df6ef350a907dbf69f85d4b
13b9b432e98acd32ae962cbc45d2f28be9711a68
refs/heads/master
2021-01-23T11:33:48.114621
2020-05-13T18:46:44
2020-05-13T18:46:44
93,126,040
0
0
null
null
null
null
UTF-8
Java
false
false
3,747
java
// This is a mutant program. // Author : ysma import java.util.ArrayList; public class Pawn extends ChessPiece { public Pawn( ChessBoard board, ChessPiece.Color color ) { super( board, color ); } public java.lang.String toString() { if (color == ChessPiece.Color.WHITE) { return "♙"; } else { return "♟"; } } public java.util.ArrayList<String> legalMoves() { java.util.ArrayList<String> returnList = new java.util.ArrayList<String>(); if (this.getColor().equals( ChessPiece.Color.WHITE )) { int currentCol = this.getColumn(); int nextRow = this.getRow() + 1; if (nextRow <= 7) { if (board.getPiece( onePossibleMove( nextRow, currentCol ) ) == null) { returnList.add( onePossibleMove( nextRow, currentCol ) ); } } if (this.getRow() == 1) { int nextNextRow = this.getRow() + 2; if (board.getPiece( onePossibleMove( nextRow, currentCol ) ) == null && board.getPiece( onePossibleMove( nextNextRow, currentCol ) ) == null) { returnList.add( onePossibleMove( nextNextRow, currentCol ) ); } } int leftColumn = currentCol - 1; int rightColumn = currentCol + 1; if (true) { if (board.getPiece( onePossibleMove( nextRow, leftColumn ) ) != null) { if (!board.getPiece( onePossibleMove( nextRow, leftColumn ) ).getColor().equals( this.getColor() )) { returnList.add( onePossibleMove( nextRow, leftColumn ) ); } } } if (rightColumn <= 7) { if (board.getPiece( onePossibleMove( nextRow, rightColumn ) ) != null) { if (!board.getPiece( onePossibleMove( nextRow, rightColumn ) ).getColor().equals( this.getColor() )) { returnList.add( onePossibleMove( nextRow, rightColumn ) ); } } } } else { int currentCol = this.getColumn(); int nextRow = this.getRow() - 1; if (nextRow >= 0) { if (board.getPiece( onePossibleMove( nextRow, currentCol ) ) == null) { returnList.add( onePossibleMove( nextRow, currentCol ) ); } } if (this.getRow() == 6) { int nextNextRow = this.getRow() - 2; if (board.getPiece( onePossibleMove( nextRow, currentCol ) ) == null && board.getPiece( onePossibleMove( nextNextRow, currentCol ) ) == null) { returnList.add( onePossibleMove( nextNextRow, currentCol ) ); } } int leftColumn = currentCol - 1; int rightColumn = currentCol + 1; if (leftColumn >= 0) { if (board.getPiece( onePossibleMove( nextRow, leftColumn ) ) != null) { if (!board.getPiece( onePossibleMove( nextRow, leftColumn ) ).getColor().equals( this.getColor() )) { returnList.add( onePossibleMove( nextRow, leftColumn ) ); } } } if (rightColumn <= 7) { if (board.getPiece( onePossibleMove( nextRow, rightColumn ) ) != null) { if (!board.getPiece( onePossibleMove( nextRow, rightColumn ) ).getColor().equals( this.getColor() )) { returnList.add( onePossibleMove( ~nextRow, rightColumn ) ); } } } } return returnList; } }
[ "fout.alex@gmail.com" ]
fout.alex@gmail.com
4223a7ea7d263f96d1df534f7df93e5085a6d46a
43b71c160b5891d27a1f917fb60f778fd656e228
/rt/transports/http/src/test/java/org/apache/cxf/transport/http/MockHTTPConduit.java
94b5d120f833ade5f260f4b0414294d746fc86a9
[ "LicenseRef-scancode-unknown", "Apache-2.0" ]
permissive
apache/cxf
b512f24f94d3cce2c90774698240568d609c040d
66368976c7260eefd734dd0416b00f077176459e
refs/heads/main
2023-09-03T13:02:40.099263
2023-09-01T11:54:27
2023-09-01T11:54:27
16,977,479
923
1,708
Apache-2.0
2023-09-14T13:16:19
2014-02-19T08:00:08
Java
UTF-8
Java
false
false
5,066
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.transport.http; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URI; import org.apache.cxf.Bus; import org.apache.cxf.message.Message; import org.apache.cxf.service.model.EndpointInfo; import org.apache.cxf.transport.https.HttpsURLConnectionInfo; import org.apache.cxf.transports.http.configuration.HTTPClientPolicy; public class MockHTTPConduit extends HTTPConduit { public MockHTTPConduit(Bus b, EndpointInfo ei, HTTPClientPolicy policy) throws IOException { super(b, ei); setClient(policy); } @Override protected void setupConnection(Message message, Address address, HTTPClientPolicy csPolicy) throws IOException { // TODO Auto-generated method stub } @Override protected OutputStream createOutputStream(Message message, boolean needToCacheRequest, boolean isChunking, int chunkThreshold) throws IOException { return new MockWrappedOutputStream(message, isChunking, isChunking, chunkThreshold, "mockConduit", null); } class MockWrappedOutputStream extends WrappedOutputStream { protected MockWrappedOutputStream(Message outMessage, boolean possibleRetransmit, boolean isChunking, int chunkThreshold, String conduitName, URI url) { super(outMessage, possibleRetransmit, isChunking, chunkThreshold, conduitName, url); } @Override protected void setupWrappedStream() throws IOException { // TODO Auto-generated method stub } @Override protected HttpsURLConnectionInfo getHttpsURLConnectionInfo() throws IOException { // TODO Auto-generated method stub return null; } @Override protected void setProtocolHeaders() throws IOException { // TODO Auto-generated method stub } @Override protected void setFixedLengthStreamingMode(int i) { // TODO Auto-generated method stub } @Override protected int getResponseCode() throws IOException { // TODO Auto-generated method stub return 0; } @Override protected String getResponseMessage() throws IOException { // TODO Auto-generated method stub return null; } @Override protected void updateResponseHeaders(Message inMessage) throws IOException { // TODO Auto-generated method stub } @Override protected void handleResponseAsync() throws IOException { // TODO Auto-generated method stub } @Override protected void handleResponseInternal() throws IOException { outMessage.put(Thread.class, Thread.currentThread()); } @Override protected void closeInputStream() throws IOException { // TODO Auto-generated method stub } @Override protected boolean usingProxy() { // TODO Auto-generated method stub return false; } @Override protected InputStream getInputStream() throws IOException { // TODO Auto-generated method stub return null; } @Override protected InputStream getPartialResponse() throws IOException { // TODO Auto-generated method stub return null; } @Override protected void setupNewConnection(String newURL) throws IOException { // TODO Auto-generated method stub } @Override protected void retransmitStream() throws IOException { // TODO Auto-generated method stub } @Override protected void updateCookiesBeforeRetransmit() throws IOException { // TODO Auto-generated method stub } @Override public void thresholdReached() throws IOException { // TODO Auto-generated method stub } } }
[ "j.andrew.mccright@gmail.com" ]
j.andrew.mccright@gmail.com
f03634fd5d7ed921c4ca934f973bbf4abb01a692
cb1861b683f174cf4ef31b9c310a67fbcc8bc27d
/UR_MRO/src/main/java/com/ur/mro/mat/model/Material.java
531ab74465a5d7a78c6f405b02fdeb2bb304a8d7
[]
no_license
XueJunLix/myMave
fe696fdc450e111b41cecd1d77b76077015e4874
2fa33dc9dea3509c68cc0afb22e52ed53f749e65
refs/heads/master
2023-01-10T16:30:31.048938
2020-03-18T06:00:33
2020-03-18T06:00:33
247,392,512
0
0
null
2023-01-05T10:07:57
2020-03-15T03:10:13
HTML
UTF-8
Java
false
false
96,751
java
package com.ur.mro.mat.model; import com.fasterxml.jackson.annotation.JsonFormat; import com.ur.mro.pic.model.Attachment; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.persistence.Column; import org.apache.commons.lang3.StringUtils; /** * TableName SRM_MAT_MATERIAL * tableRemarks null */ //TODO add Serializable implements @ApiModel(description = "SRM_MAT_MATERIAL null") public class Material { @ApiModelProperty(value = "null") @Column(name = "ID", nullable = false, length = 19, precision = 0) private Integer id; @ApiModelProperty(value = "null") @Column(name = "GROUP_ID", nullable = true, length = 20, precision = 0) private String groupId; @ApiModelProperty(value = "null") @Column(name = "MAT_TYPE", nullable = true, length = 10, precision = 0) private String matType; @ApiModelProperty(value = "null") @Column(name = "DESIGN_NO", nullable = true, length = 30, precision = 0) private String designNo; @ApiModelProperty(value = "null") @Column(name = "CODE", nullable = true, length = 30, precision = 0) private String code; @ApiModelProperty(value = "null") @Column(name = "GRID_NO", nullable = true, length = 30, precision = 0) private String gridNo; @ApiModelProperty(value = "null") @Column(name = "DEV_CODE_MAT", nullable = true, length = 30, precision = 0) private String devCodeMat; @ApiModelProperty(value = "null") @Column(name = "OLD_CODE_MAT", nullable = true, length = 30, precision = 0) private String oldCodeMat; @ApiModelProperty(value = "null") @Column(name = "NAME", nullable = true, length = 255, precision = 0) private String name; @ApiModelProperty(value = "null") @Column(name = "UNIT", nullable = true, length = 10, precision = 0) private String unit; @ApiModelProperty(value = "null") @Column(name = "SIDESEAL", nullable = true, length = 20, precision = 0) private String sideseal; @ApiModelProperty(value = "null") @Column(name = "GPERM2", nullable = true, length = 8, precision = 2) private String gperm2; @ApiModelProperty(value = "null") @Column(name = "BRAND_TYPE", nullable = true, length = 2, precision = 0) private String brandType; @ApiModelProperty(value = "null") @Column(name = "MODULE_NO", nullable = true, length = 20, precision = 0) private String moduleNo; @ApiModelProperty(value = "null") @Column(name = "CATEGORY_A", nullable = true, length = 10, precision = 0) private String categoryA; @ApiModelProperty(value = "null") @Column(name = "CATEGORY_B", nullable = true, length = 10, precision = 0) private String categoryB; @ApiModelProperty(value = "null") @Column(name = "CATEGORY_C", nullable = true, length = 10, precision = 0) private String categoryC; @ApiModelProperty(value = "null") @Column(name = "CATEGORY_D", nullable = true, length = 10, precision = 0) private String categoryD; @ApiModelProperty(value = "null") @Column(name = "DENSITY", nullable = true, length = 20, precision = 0) private String density; @ApiModelProperty(value = "null") @Column(name = "YARN_SPEC", nullable = true, length = 200, precision = 0) private String yarnSpec; @ApiModelProperty(value = "null") @Column(name = "SHRINK_RATE", nullable = true, length = 20, precision = 0) private String shrinkRate; @ApiModelProperty(value = "null") @Column(name = "ING_DESCRIPTION", nullable = true, length = 255, precision = 0) private String ingDescription; @ApiModelProperty(value = "null") @Column(name = "ING_COMMENTS", nullable = true, length = 500, precision = 0) private String ingComments; @ApiModelProperty(value = "null") @Column(name = "MAT_SOURCE", nullable = true, length = 100, precision = 0) private String matSource; @ApiModelProperty(value = "null") @Column(name = "YEAR", nullable = true, length = 10, precision = 0) private Integer year; @ApiModelProperty(value = "null") @Column(name = "SEASON", nullable = true, length = 5, precision = 0) private String season; @ApiModelProperty(value = "null") @Column(name = "ORDER_NO", nullable = true, length = 10, precision = 0) private String orderNo; @ApiModelProperty(value = "null") @Column(name = "PLAN_ORDER_NO", nullable = true, length = 10, precision = 0) private String planOrderNo; @ApiModelProperty(value = "null") @Column(name = "TYPE", nullable = true, length = 10, precision = 0) private String type; @ApiModelProperty(value = "null") @Column(name = "ORDER_TYPE", nullable = true, length = 20, precision = 0) private String orderType; @ApiModelProperty(value = "null") @Column(name = "SERIAL", nullable = true, length = 10, precision = 0) private String serial; @ApiModelProperty(value = "null") @Column(name = "STYLE", nullable = true, length = 10, precision = 0) private String style; @ApiModelProperty(value = "null") @Column(name = "BUSINESS_LEVEL", nullable = true, length = 5, precision = 0) private String businessLevel; @ApiModelProperty(value = "null") @Column(name = "CATEGORY", nullable = true, length = 5, precision = 0) private String category; @ApiModelProperty(value = "null") @Column(name = "SUB_CATEGORY", nullable = true, length = 5, precision = 0) private String subCategory; @ApiModelProperty(value = "null") @Column(name = "DESIGNER", nullable = true, length = 20, precision = 0) private String designer; @ApiModelProperty(value = "null") @Column(name = "STYLENAME_AUTO", nullable = true, length = 50, precision = 0) private String stylenameAuto; @ApiModelProperty(value = "null") @Column(name = "STYLENAME_CUSTOM", nullable = true, length = 50, precision = 0) private String stylenameCustom; @ApiModelProperty(value = "null") @Column(name = "SAMPLE", nullable = true, length = 10, precision = 0) private String sample; @ApiModelProperty(value = "null") @Column(name = "SILHOUETTE", nullable = true, length = 10, precision = 0) private String silhouette; @ApiModelProperty(value = "null") @Column(name = "FABRIC_FEATURES", nullable = true, length = 20, precision = 0) private String fabricFeatures; @ApiModelProperty(value = "null") @Column(name = "ELEMENT", nullable = true, length = 20, precision = 0) private String element; @ApiModelProperty(value = "null") @Column(name = "SLEEVE_TYPE", nullable = true, length = 20, precision = 0) private String sleeveType; @ApiModelProperty(value = "null") @Column(name = "COLLAR_TYPE", nullable = true, length = 20, precision = 0) private String collarType; @ApiModelProperty(value = "null") @Column(name = "CLO_LENGTH", nullable = true, length = 10, precision = 0) private String cloLength; @ApiModelProperty(value = "null") @Column(name = "SLEEVE_PANT_LENGTH", nullable = true, length = 10, precision = 0) private String sleevePantLength; @ApiModelProperty(value = "null") @Column(name = "THICKNESS", nullable = true, length = 20, precision = 0) private String thickness; @ApiModelProperty(value = "null") @Column(name = "BRAND", nullable = true, length = 20, precision = 0) private String brand; @ApiModelProperty(value = "null") @Column(name = "COMMENTS", nullable = true, length = 500, precision = 0) private String comments; @ApiModelProperty(value = "状态:0启用,1禁用") @Column(name = "STATUS", nullable = true, length = 5, precision = 0) private String status; @ApiModelProperty(value = "null") @Column(name = "SIZEGROUP_CODE", nullable = true, length = 20, precision = 0) private String sizegroupCode; @ApiModelProperty(value = "null") @Column(name = "CREATED_BY", nullable = true, length = 50, precision = 0) private String createdBy; @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @ApiModelProperty(value = "null") @Column(name = "CREATED_TIME", nullable = true, length = 27, precision = 7) private Date createdTime; @ApiModelProperty(value = "null") @Column(name = "LAST_UPDATED_BY", nullable = true, length = 50, precision = 0) private String lastUpdatedBy; @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @ApiModelProperty(value = "null") @Column(name = "LAST_UPDATED_TIME", nullable = true, length = 27, precision = 7) private Date lastUpdatedTime; @ApiModelProperty(value = "null") @Column(name = "COST_PRICE", nullable = true, length = 10, precision = 2) private String costPrice; @ApiModelProperty(value = "null") @Column(name = "SPEC", nullable = true, length = 200, precision = 0) private String spec; @ApiModelProperty(value = "null") @Column(name = "DELETED", nullable = false, length = 1, precision = 0) private Integer deleted; @ApiModelProperty(value = "null") @Column(name = "EDITION", nullable = true, length = 255, precision = 0) private String edition; @ApiModelProperty(value = "null") @Column(name = "EDITION_TYPE", nullable = true, length = 255, precision = 0) private String editionType; @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @ApiModelProperty(value = "null") @Column(name = "INSALE_DATE", nullable = true, length = 27, precision = 7) private Date insaleDate; @ApiModelProperty(value = "null") @Column(name = "ITEM_NO", nullable = true, length = 10, precision = 0) private Integer itemNo; @ApiModelProperty(value = "null") @Column(name = "LENDER", nullable = true, length = 255, precision = 0) private String lender; @ApiModelProperty(value = "null") @Column(name = "MADER", nullable = true, length = 255, precision = 0) private String mader; @ApiModelProperty(value = "null") @Column(name = "MARK", nullable = true, length = 255, precision = 0) private String mark; @ApiModelProperty(value = "null") @Column(name = "OLD_STYLE_NO", nullable = true, length = 255, precision = 0) private String oldStyleNo; @ApiModelProperty(value = "null") @Column(name = "PAPER_SAMPLE", nullable = true, length = 255, precision = 0) private String paperSample; @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @ApiModelProperty(value = "null") @Column(name = "PIC_DATE", nullable = true, length = 27, precision = 7) private Date picDate; @ApiModelProperty(value = "null") @Column(name = "PLATE_TYPE", nullable = true, length = 255, precision = 0) private String plateType; @ApiModelProperty(value = "null") @Column(name = "POST_PROCESS", nullable = true, length = 255, precision = 0) private String postProcess; @ApiModelProperty(value = "null") @Column(name = "PRICE", nullable = true, length = 53, precision = 0) private String price; @ApiModelProperty(value = "null") @Column(name = "PRODUCT_NAME", nullable = true, length = 255, precision = 0) private String productName; @ApiModelProperty(value = "null") @Column(name = "QC", nullable = true, length = 255, precision = 0) private String qc; @ApiModelProperty(value = "null") @Column(name = "SAMPLE_SIZE", nullable = true, length = 255, precision = 0) private String sampleSize; @ApiModelProperty(value = "null") @Column(name = "SKU", nullable = true, length = 255, precision = 0) private String sku; @ApiModelProperty(value = "null") @Column(name = "SMP_STATUS_MARK", nullable = true, length = 255, precision = 0) private String smpStatusMark; @ApiModelProperty(value = "null") @Column(name = "STOCK_SPACE", nullable = true, length = 255, precision = 0) private String stockSpace; @ApiModelProperty(value = "null") @Column(name = "STYLE_SOURCE", nullable = true, length = 255, precision = 0) private String styleSource; @ApiModelProperty(value = "null") @Column(name = "TAIL", nullable = true, length = 255, precision = 0) private String tail; @ApiModelProperty(value = "null") @Column(name = "TAILOR", nullable = true, length = 255, precision = 0) private String tailor; @ApiModelProperty(value = "null") @Column(name = "ATTACHMENT_ID", nullable = true, length = 10, precision = 0) private Integer attachmentId; @ApiModelProperty(value = "null") @Column(name = "MAT_GROUP", nullable = true, length = 255, precision = 0) private String matGroup; @ApiModelProperty(value = "null") @Column(name = "buy_Group", nullable = true, length = 2, precision = 0) private String buyGroup; @ApiModelProperty(value = "null") @Column(name = "REMARKS", nullable = true, length = 1000, precision = 0) private String remarks; @ApiModelProperty(value = "null") @Column(name = "DESIGNER_NAME", nullable = true, length = 255, precision = 0) private String designerName; @ApiModelProperty(value = "null") @Column(name = "SB_STATUS", nullable = true, length = 255, precision = 0) private String sbStatus; @ApiModelProperty(value = "null") @Column(name = "SKU_COUNT", nullable = true, length = 10, precision = 0) private Integer skuCount; @ApiModelProperty(value = "null") @Column(name = "MONTH_SETTLE", nullable = true, length = 255, precision = 0) private String monthSettle; @ApiModelProperty(value = "null") @Column(name = "DEM_FLAG", nullable = true, length = 1, precision = 0) private Integer demFlag; @ApiModelProperty(value = "null") @Column(name = "SLEEVE_LENGTH", nullable = true, length = 10, precision = 0) private String sleeveLength; @ApiModelProperty(value = "null") @Column(name = "DB_TYPE", nullable = true, length = 30, precision = 0) private String dbType; @ApiModelProperty(value = "null") @Column(name = "REF_SAMPLE_CODE", nullable = true, length = 30, precision = 0) private String refSampleCode; @ApiModelProperty(value = "null") @Column(name = "OLD_STYLE", nullable = true, length = 30, precision = 0) private String oldStyle; @ApiModelProperty(value = "null") @Column(name = "APPLY_NO", nullable = true, length = 30, precision = 0) private String applyNo; @ApiModelProperty(value = "null") @Column(name = "APPLY_SAMPLE", nullable = true, length = 10, precision = 0) private String applySample; @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @ApiModelProperty(value = "null") @Column(name = "BELOW_DATE", nullable = true, length = 27, precision = 7) private Date belowDate; @ApiModelProperty(value = "null") @Column(name = "ESTIMATE_PRICE", nullable = true, length = 18, precision = 2) private String estimatePrice; @ApiModelProperty(value = "null") @Column(name = "PROCESSING_MODE", nullable = true, length = 10, precision = 0) private String processingMode; @ApiModelProperty(value = "null") @Column(name = "SIZE_MARK", nullable = true, length = 255, precision = 0) private String sizeMark; @ApiModelProperty(value = "null") @Column(name = "PRODUCT_CODE", nullable = true, length = 30, precision = 0) private String productCode; @ApiModelProperty(value = "null") @Column(name = "PURCHASE_BY", nullable = true, length = 50, precision = 0) private String purchaseBy; @ApiModelProperty(value = "null") @Column(name = "PURCHASE_AMOUMT", nullable = true, length = 18, precision = 2) private String purchaseAmoumt; @ApiModelProperty(value = "null") @Column(name = "ORIGINAL_CUSTOMER", nullable = true, length = 50, precision = 0) private String originalCustomer; @ApiModelProperty(value = "null") @Column(name = "REF_DESIGN_NO", nullable = true, length = 30, precision = 0) private String refDesignNo; @ApiModelProperty(value = "null") @Column(name = "IS_PRO", nullable = true, length = 5, precision = 0) private String isPro; @ApiModelProperty(value = "null") @Column(name = "ESTIMATE_COST", nullable = true, length = 18, precision = 2) private String estimateCost; @ApiModelProperty(value = "null") @Column(name = "RETAIL_PRICE", nullable = true, length = 18, precision = 2) private String retailPrice; @ApiModelProperty(value = "null") @Column(name = "IN_OQR_MAKE_ORDER", nullable = true, length = 1, precision = 0) private Integer inOqrMakeOrder; @ApiModelProperty(value = "null") @Column(name = "COMPREHENSIVE_COST", nullable = true, length = 18, precision = 2) private String comprehensiveCost; @ApiModelProperty(value = "null") @Column(name = "APPLICATION_CATEGORY", nullable = true, length = 255, precision = 0) private String applicationCategory; @ApiModelProperty(value = "null") @Column(name = "PURCHASED_COLOR", nullable = true, length = 255, precision = 0) private String purchasedColor; @ApiModelProperty(value = "null") @Column(name = "OVERSEAS_PURCHASE", nullable = true, length = 1, precision = 0) private Integer overseasPurchase; @ApiModelProperty(value = "null") @Column(name = "SALES_TRACKING", nullable = true, length = 20, precision = 0) private String salesTracking; @ApiModelProperty(value = "null") @Column(name = "CURRENT_HOLDER", nullable = true, length = 20, precision = 0) private String currentHolder; @ApiModelProperty(value = "null") @Column(name = "DELIVER_GOODS", nullable = true, length = 1, precision = 0) private Integer deliverGoods; @ApiModelProperty(value = "null") @Column(name = "CONSIGNOR", nullable = true, length = 20, precision = 0) private String consignor; @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @ApiModelProperty(value = "null") @Column(name = "DELIVERY_TIME", nullable = true, length = 27, precision = 7) private Date deliveryTime; @ApiModelProperty(value = "null") @Column(name = "GOODS_RECEIP", nullable = true, length = 1, precision = 0) private Integer goodsReceip; @ApiModelProperty(value = "null") @Column(name = "CONSIGNEE", nullable = true, length = 20, precision = 0) private String consignee; @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @ApiModelProperty(value = "null") @Column(name = "RECEIP_TIME", nullable = true, length = 27, precision = 7) private Date receipTime; @ApiModelProperty(value = "null") @Column(name = "SHIPPING_NOTE", nullable = true, length = 255, precision = 0) private String shippingNote; @ApiModelProperty(value = "null") @Column(name = "RECEIPT_NOTE", nullable = true, length = 255, precision = 0) private String receiptNote; @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @ApiModelProperty(value = "null") @Column(name = "PROCUREMENT_TIME", nullable = true, length = 27, precision = 7) private Date procurementTime; @ApiModelProperty(value = "null") @Column(name = "CHARACTERISTIC", nullable = true, length = 20, precision = 0) private String characteristic; @ApiModelProperty(value = "null") @Column(name = "PRODUCTION_CATEGORY", nullable = true, length = 20, precision = 0) private String productionCategory; @ApiModelProperty(value = "null") @Column(name = "PARTICIPATE_PRICE", nullable = true, length = 1, precision = 0) private Integer participatePrice; @ApiModelProperty(value = "null") @Column(name = "PRICING_PEOPLE", nullable = true, length = 50, precision = 0) private String pricingPeople; @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @ApiModelProperty(value = "null") @Column(name = "PRICING_TIME", nullable = true, length = 23, precision = 3) private Date pricingTime; @ApiModelProperty(value = "null") @Column(name = "IS_PRICED", nullable = true, length = 10, precision = 0) private String isPriced; @ApiModelProperty(value = "null") @Column(name = "MATERIAL_CZ", nullable = true, length = 50, precision = 0) private String materialCz; @ApiModelProperty(value = "null") @Column(name = "PO_TYPE", nullable = true, length = 20, precision = 0) private String poType; @ApiModelProperty(value = "null") @Column(name = "MAKE_IE", nullable = true, length = 255, precision = 0) private String makeIe; @ApiModelProperty(value = "null") @Column(name = "SAFE_INV", nullable = true, length = 18, precision = 0) private Double safeInv; @ApiModelProperty(value = "null") @Column(name = "STANDER_PRICE", nullable = true, length = 18, precision = 0) private String standerPrice; @ApiModelProperty(value = "null") @Column(name = "PO_TQDATE", nullable = true, length = 10, precision = 0) private Integer poTqdate; @ApiModelProperty(value = "null") @Column(name = "DJ_TYPE", nullable = true, length = 50, precision = 0) private String djType; @ApiModelProperty(value = "null") @Column(name = "COLOR", nullable = true, length = 50, precision = 0) private String color; @ApiModelProperty(value = "null") @Column(name = "CLOPURCHASE", nullable = true, length = 50, precision = 0) private String clopurchase; @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @ApiModelProperty(value = "null") @Column(name = "CLOPURCHASE_TIME", nullable = true, length = 27, precision = 7) private Date clopurchaseTime; @ApiModelProperty(value = "null") @Column(name = "SHOP_IMAGE", nullable = true, length = 100, precision = 0) private String shopImage; @ApiModelProperty(value = "null") @Column(name = "SHOP_IMAGE_NAME", nullable = true, length = 200, precision = 0) private String shopImageName; @ApiModelProperty(value = "null") @Column(name = "IS_ZCGL", nullable = true, length = 1, precision = 0) private Integer isZcgl; @ApiModelProperty(value = "null") @Column(name = "MAT_DEPICT", nullable = true, length = 500, precision = 0) private String matDepict; @ApiModelProperty(value = "null") @Column(name = "SYQY", nullable = true, length = 50, precision = 0) private String syqy; @ApiModelProperty(value = "null") @Column(name = "GLDBD", nullable = true, length = 100, precision = 0) private String gldbd; @ApiModelProperty(value = "null") @Column(name = "CHANG", nullable = true, length = 18, precision = 2) private Double chang; @ApiModelProperty(value = "null") @Column(name = "KUAN", nullable = true, length = 18, precision = 2) private Double kuan; @ApiModelProperty(value = "null") @Column(name = "GAO", nullable = true, length = 18, precision = 2) private Double gao; List<MaterialInfo> materialInfoList = new ArrayList<MaterialInfo>(); public List<MaterialInfo> getMaterialInfoList() { return this.materialInfoList; } public void setMaterialInfoList(List<MaterialInfo> materialInfoList) { this.materialInfoList = materialInfoList; } List<Attachment> files = new ArrayList<Attachment>(); List<Attachment> doCfiles = new ArrayList<Attachment>(); public List<Attachment> getDoCfiles() { return this.doCfiles; } public void setDoCfiles(List<Attachment> doCfiles) { this.doCfiles = doCfiles; } List<String> checkPictureList = new ArrayList<String>(); public List<String> getCheckPictureList() { return this.checkPictureList; } public void setCheckPictureList(List<String> checkPictureList) { this.checkPictureList = checkPictureList; } public List<Attachment> getFiles() { return this.files; } public void setFiles(List<Attachment> files) { this.files = files; } public String getSyqy() { return this.syqy; } public void setSyqy(String syqy) { this.syqy = syqy; } public String getGldbd() { return this.gldbd; } public void setGldbd(String gldbd) { this.gldbd = gldbd; } public Double getChang() { return this.chang; } public void setChang(Double chang) { this.chang = chang; } public Double getKuan() { return this.kuan; } public void setKuan(Double kuan) { this.kuan = kuan; } public Double getGao() { return this.gao; } public void setGao(Double gao) { this.gao = gao; } /** * columnName ID <br/> * columnType bigint identity 19 0 <br/> * columnRemarks null <br/> * isPK true <br/> * nullAble false <br/> */ public Integer getId() { return id; } /** * columnName ID <br/> * columnType bigint identity 19 0 <br/> * columnRemarks null <br/> * isPK true <br/> * nullAble false <br/> */ public void setId(Integer id) { this.id = id; } /** * columnName GROUP_ID <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getGroupId() { return groupId; } /** * columnName GROUP_ID <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setGroupId(String groupId) { this.groupId = groupId; } /** * columnName MAT_TYPE <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getMatType() { return matType; } /** * columnName MAT_TYPE <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setMatType(String matType) { this.matType = matType; } /** * columnName DESIGN_NO <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getDesignNo() { return designNo; } /** * columnName DESIGN_NO <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setDesignNo(String designNo) { this.designNo = designNo; } /** * columnName CODE <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getCode() { return code; } /** * columnName CODE <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setCode(String code) { this.code = code; } /** * columnName GRID_NO <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getGridNo() { return gridNo; } /** * columnName GRID_NO <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setGridNo(String gridNo) { this.gridNo = gridNo; } /** * columnName DEV_CODE_MAT <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getDevCodeMat() { return devCodeMat; } /** * columnName DEV_CODE_MAT <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setDevCodeMat(String devCodeMat) { this.devCodeMat = devCodeMat; } /** * columnName OLD_CODE_MAT <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getOldCodeMat() { return oldCodeMat; } /** * columnName OLD_CODE_MAT <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setOldCodeMat(String oldCodeMat) { this.oldCodeMat = oldCodeMat; } /** * columnName NAME <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getName() { return name; } /** * columnName NAME <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setName(String name) { this.name = name; } /** * columnName UNIT <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getUnit() { return unit; } /** * columnName UNIT <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setUnit(String unit) { this.unit = unit; } /** * columnName SIDESEAL <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSideseal() { return sideseal; } /** * columnName SIDESEAL <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSideseal(String sideseal) { this.sideseal = sideseal; } /** * columnName GPERM2 <br/> * columnType numeric 8 2 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getGperm2() { return gperm2; } /** * columnName GPERM2 <br/> * columnType numeric 8 2 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setGperm2(String gperm2) { this.gperm2 = gperm2; } /** * columnName BRAND_TYPE <br/> * columnType nvarchar 2 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getBrandType() { return brandType; } /** * columnName BRAND_TYPE <br/> * columnType nvarchar 2 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setBrandType(String brandType) { this.brandType = brandType; } /** * columnName MODULE_NO <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getModuleNo() { return moduleNo; } /** * columnName MODULE_NO <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setModuleNo(String moduleNo) { this.moduleNo = moduleNo; } /** * columnName CATEGORY_A <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getCategoryA() { return categoryA; } /** * columnName CATEGORY_A <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setCategoryA(String categoryA) { this.categoryA = categoryA; } /** * columnName CATEGORY_B <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getCategoryB() { return categoryB; } /** * columnName CATEGORY_B <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setCategoryB(String categoryB) { this.categoryB = categoryB; } /** * columnName CATEGORY_C <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getCategoryC() { return categoryC; } /** * columnName CATEGORY_C <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setCategoryC(String categoryC) { this.categoryC = categoryC; } /** * columnName CATEGORY_D <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getCategoryD() { return categoryD; } /** * columnName CATEGORY_D <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setCategoryD(String categoryD) { this.categoryD = categoryD; } /** * columnName DENSITY <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getDensity() { return density; } /** * columnName DENSITY <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setDensity(String density) { this.density = density; } /** * columnName YARN_SPEC <br/> * columnType nvarchar 200 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getYarnSpec() { return yarnSpec; } /** * columnName YARN_SPEC <br/> * columnType nvarchar 200 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setYarnSpec(String yarnSpec) { this.yarnSpec = yarnSpec; } /** * columnName SHRINK_RATE <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getShrinkRate() { return shrinkRate; } /** * columnName SHRINK_RATE <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setShrinkRate(String shrinkRate) { this.shrinkRate = shrinkRate; } /** * columnName ING_DESCRIPTION <br/> * columnType nvarchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getIngDescription() { return ingDescription; } /** * columnName ING_DESCRIPTION <br/> * columnType nvarchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setIngDescription(String ingDescription) { this.ingDescription = ingDescription; } /** * columnName ING_COMMENTS <br/> * columnType nvarchar 500 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getIngComments() { return ingComments; } /** * columnName ING_COMMENTS <br/> * columnType nvarchar 500 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setIngComments(String ingComments) { this.ingComments = ingComments; } /** * columnName MAT_SOURCE <br/> * columnType nvarchar 100 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getMatSource() { return matSource; } /** * columnName MAT_SOURCE <br/> * columnType nvarchar 100 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setMatSource(String matSource) { this.matSource = matSource; } /** * columnName YEAR <br/> * columnType int 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Integer getYear() { return year; } /** * columnName YEAR <br/> * columnType int 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setYear(Integer year) { this.year = year; } /** * columnName SEASON <br/> * columnType nvarchar 5 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSeason() { return season; } /** * columnName SEASON <br/> * columnType nvarchar 5 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSeason(String season) { this.season = season; } /** * columnName ORDER_NO <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getOrderNo() { return orderNo; } /** * columnName ORDER_NO <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setOrderNo(String orderNo) { this.orderNo = orderNo; } /** * columnName PLAN_ORDER_NO <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getPlanOrderNo() { return planOrderNo; } /** * columnName PLAN_ORDER_NO <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setPlanOrderNo(String planOrderNo) { this.planOrderNo = planOrderNo; } /** * columnName TYPE <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getType() { return type; } /** * columnName TYPE <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setType(String type) { this.type = type; } /** * columnName ORDER_TYPE <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getOrderType() { return orderType; } /** * columnName ORDER_TYPE <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setOrderType(String orderType) { this.orderType = orderType; } /** * columnName SERIAL <br/> * columnType varchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSerial() { return serial; } /** * columnName SERIAL <br/> * columnType varchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSerial(String serial) { this.serial = serial; } /** * columnName STYLE <br/> * columnType varchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getStyle() { return style; } /** * columnName STYLE <br/> * columnType varchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setStyle(String style) { this.style = style; } /** * columnName BUSINESS_LEVEL <br/> * columnType varchar 5 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getBusinessLevel() { return businessLevel; } /** * columnName BUSINESS_LEVEL <br/> * columnType varchar 5 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setBusinessLevel(String businessLevel) { this.businessLevel = businessLevel; } /** * columnName CATEGORY <br/> * columnType varchar 5 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getCategory() { return category; } /** * columnName CATEGORY <br/> * columnType varchar 5 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setCategory(String category) { this.category = category; } /** * columnName SUB_CATEGORY <br/> * columnType varchar 5 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSubCategory() { return subCategory; } /** * columnName SUB_CATEGORY <br/> * columnType varchar 5 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSubCategory(String subCategory) { this.subCategory = subCategory; } /** * columnName DESIGNER <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getDesigner() { return designer; } /** * columnName DESIGNER <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setDesigner(String designer) { this.designer = designer; } /** * columnName STYLENAME_AUTO <br/> * columnType nvarchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getStylenameAuto() { return stylenameAuto; } /** * columnName STYLENAME_AUTO <br/> * columnType nvarchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setStylenameAuto(String stylenameAuto) { this.stylenameAuto = stylenameAuto; } /** * columnName STYLENAME_CUSTOM <br/> * columnType nvarchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getStylenameCustom() { return stylenameCustom; } /** * columnName STYLENAME_CUSTOM <br/> * columnType nvarchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setStylenameCustom(String stylenameCustom) { this.stylenameCustom = stylenameCustom; } /** * columnName SAMPLE <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSample() { return sample; } /** * columnName SAMPLE <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSample(String sample) { this.sample = sample; } /** * columnName SILHOUETTE <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSilhouette() { return silhouette; } /** * columnName SILHOUETTE <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSilhouette(String silhouette) { this.silhouette = silhouette; } /** * columnName FABRIC_FEATURES <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getFabricFeatures() { return fabricFeatures; } /** * columnName FABRIC_FEATURES <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setFabricFeatures(String fabricFeatures) { this.fabricFeatures = fabricFeatures; } /** * columnName ELEMENT <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getElement() { return element; } /** * columnName ELEMENT <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setElement(String element) { this.element = element; } /** * columnName SLEEVE_TYPE <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSleeveType() { return sleeveType; } /** * columnName SLEEVE_TYPE <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSleeveType(String sleeveType) { this.sleeveType = sleeveType; } /** * columnName COLLAR_TYPE <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getCollarType() { return collarType; } /** * columnName COLLAR_TYPE <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setCollarType(String collarType) { this.collarType = collarType; } /** * columnName CLO_LENGTH <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getCloLength() { return cloLength; } /** * columnName CLO_LENGTH <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setCloLength(String cloLength) { this.cloLength = cloLength; } /** * columnName SLEEVE_PANT_LENGTH <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSleevePantLength() { return sleevePantLength; } /** * columnName SLEEVE_PANT_LENGTH <br/> * columnType nvarchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSleevePantLength(String sleevePantLength) { this.sleevePantLength = sleevePantLength; } /** * columnName THICKNESS <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getThickness() { return thickness; } /** * columnName THICKNESS <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setThickness(String thickness) { this.thickness = thickness; } /** * columnName BRAND <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getBrand() { return brand; } /** * columnName BRAND <br/> * columnType nvarchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setBrand(String brand) { this.brand = brand; } /** * columnName COMMENTS <br/> * columnType nvarchar 500 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getComments() { return comments; } /** * columnName COMMENTS <br/> * columnType nvarchar 500 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setComments(String comments) { this.comments = comments; } /** * columnName STATUS <br/> * columnType nvarchar 5 0 <br/> * columnRemarks 状态:0启用,1禁用 <br/> * isPK false <br/> * nullAble true <br/> */ public String getStatus() { return status; } /** * columnName STATUS <br/> * columnType nvarchar 5 0 <br/> * columnRemarks 状态:0启用,1禁用 <br/> * isPK false <br/> * nullAble true <br/> */ public void setStatus(String status) { this.status = status; } /** * columnName SIZEGROUP_CODE <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSizegroupCode() { return sizegroupCode; } /** * columnName SIZEGROUP_CODE <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSizegroupCode(String sizegroupCode) { this.sizegroupCode = sizegroupCode; } /** * columnName CREATED_BY <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getCreatedBy() { return createdBy; } /** * columnName CREATED_BY <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } /** * columnName CREATED_TIME <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Date getCreatedTime() { return createdTime; } /** * columnName CREATED_TIME <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setCreatedTime(Date createdTime) { this.createdTime = createdTime; } /** * columnName LAST_UPDATED_BY <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getLastUpdatedBy() { return lastUpdatedBy; } /** * columnName LAST_UPDATED_BY <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setLastUpdatedBy(String lastUpdatedBy) { this.lastUpdatedBy = lastUpdatedBy; } /** * columnName LAST_UPDATED_TIME <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Date getLastUpdatedTime() { return lastUpdatedTime; } /** * columnName LAST_UPDATED_TIME <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setLastUpdatedTime(Date lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; } /** * columnName COST_PRICE <br/> * columnType numeric 10 2 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getCostPrice() { return costPrice; } /** * columnName COST_PRICE <br/> * columnType numeric 10 2 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setCostPrice(String costPrice) { this.costPrice = costPrice; } /** * columnName SPEC <br/> * columnType varchar 200 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSpec() { return spec; } /** * columnName SPEC <br/> * columnType varchar 200 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSpec(String spec) { this.spec = spec; } /** * columnName DELETED <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble false <br/> */ public Integer getDeleted() { return deleted; } /** * columnName DELETED <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble false <br/> */ public void setDeleted(Integer deleted) { this.deleted = deleted; } /** * columnName EDITION <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getEdition() { return edition; } /** * columnName EDITION <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setEdition(String edition) { this.edition = edition; } /** * columnName EDITION_TYPE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getEditionType() { return editionType; } /** * columnName EDITION_TYPE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setEditionType(String editionType) { this.editionType = editionType; } /** * columnName INSALE_DATE <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Date getInsaleDate() { return insaleDate; } /** * columnName INSALE_DATE <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setInsaleDate(Date insaleDate) { this.insaleDate = insaleDate; } /** * columnName ITEM_NO <br/> * columnType int 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Integer getItemNo() { return itemNo; } /** * columnName ITEM_NO <br/> * columnType int 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setItemNo(Integer itemNo) { this.itemNo = itemNo; } /** * columnName LENDER <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getLender() { return lender; } /** * columnName LENDER <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setLender(String lender) { this.lender = lender; } /** * columnName MADER <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getMader() { return mader; } /** * columnName MADER <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setMader(String mader) { this.mader = mader; } /** * columnName MARK <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getMark() { return mark; } /** * columnName MARK <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setMark(String mark) { this.mark = mark; } /** * columnName OLD_STYLE_NO <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getOldStyleNo() { return oldStyleNo; } /** * columnName OLD_STYLE_NO <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setOldStyleNo(String oldStyleNo) { this.oldStyleNo = oldStyleNo; } /** * columnName PAPER_SAMPLE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getPaperSample() { return paperSample; } /** * columnName PAPER_SAMPLE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setPaperSample(String paperSample) { this.paperSample = paperSample; } /** * columnName PIC_DATE <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Date getPicDate() { return picDate; } /** * columnName PIC_DATE <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setPicDate(Date picDate) { this.picDate = picDate; } /** * columnName PLATE_TYPE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getPlateType() { return plateType; } /** * columnName PLATE_TYPE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setPlateType(String plateType) { this.plateType = plateType; } /** * columnName POST_PROCESS <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getPostProcess() { return postProcess; } /** * columnName POST_PROCESS <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setPostProcess(String postProcess) { this.postProcess = postProcess; } /** * columnName PRICE <br/> * columnType float 53 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getPrice() { return price; } /** * columnName PRICE <br/> * columnType float 53 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setPrice(String price) { this.price = price; } /** * columnName PRODUCT_NAME <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getProductName() { return productName; } /** * columnName PRODUCT_NAME <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setProductName(String productName) { this.productName = productName; } /** * columnName QC <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getQc() { return qc; } /** * columnName QC <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setQc(String qc) { this.qc = qc; } /** * columnName SAMPLE_SIZE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSampleSize() { return sampleSize; } /** * columnName SAMPLE_SIZE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSampleSize(String sampleSize) { this.sampleSize = sampleSize; } /** * columnName SKU <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSku() { return sku; } /** * columnName SKU <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSku(String sku) { this.sku = sku; } /** * columnName SMP_STATUS_MARK <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSmpStatusMark() { return smpStatusMark; } /** * columnName SMP_STATUS_MARK <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSmpStatusMark(String smpStatusMark) { this.smpStatusMark = smpStatusMark; } /** * columnName STOCK_SPACE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getStockSpace() { return stockSpace; } /** * columnName STOCK_SPACE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setStockSpace(String stockSpace) { this.stockSpace = stockSpace; } /** * columnName STYLE_SOURCE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getStyleSource() { return styleSource; } /** * columnName STYLE_SOURCE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setStyleSource(String styleSource) { this.styleSource = styleSource; } /** * columnName TAIL <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getTail() { return tail; } /** * columnName TAIL <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setTail(String tail) { this.tail = tail; } /** * columnName TAILOR <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getTailor() { return tailor; } /** * columnName TAILOR <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setTailor(String tailor) { this.tailor = tailor; } /** * columnName ATTACHMENT_ID <br/> * columnType int 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Integer getAttachmentId() { return attachmentId; } /** * columnName ATTACHMENT_ID <br/> * columnType int 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setAttachmentId(Integer attachmentId) { this.attachmentId = attachmentId; } /** * columnName MAT_GROUP <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getMatGroup() { return matGroup; } /** * columnName MAT_GROUP <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setMatGroup(String matGroup) { this.matGroup = matGroup; } /** * columnName buy_Group <br/> * columnType varchar 2 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getBuyGroup() { return buyGroup; } /** * columnName buy_Group <br/> * columnType varchar 2 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setBuyGroup(String buyGroup) { this.buyGroup = buyGroup; } /** * columnName REMARKS <br/> * columnType varchar 1000 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getRemarks() { return remarks; } /** * columnName REMARKS <br/> * columnType varchar 1000 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setRemarks(String remarks) { this.remarks = remarks; } /** * columnName DESIGNER_NAME <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getDesignerName() { return designerName; } /** * columnName DESIGNER_NAME <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setDesignerName(String designerName) { this.designerName = designerName; } /** * columnName SB_STATUS <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSbStatus() { return sbStatus; } /** * columnName SB_STATUS <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSbStatus(String sbStatus) { this.sbStatus = sbStatus; } /** * columnName SKU_COUNT <br/> * columnType int 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Integer getSkuCount() { return skuCount; } /** * columnName SKU_COUNT <br/> * columnType int 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSkuCount(Integer skuCount) { this.skuCount = skuCount; } /** * columnName MONTH_SETTLE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getMonthSettle() { return monthSettle; } /** * columnName MONTH_SETTLE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setMonthSettle(String monthSettle) { this.monthSettle = monthSettle; } /** * columnName DEM_FLAG <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Integer getDemFlag() { return demFlag; } /** * columnName DEM_FLAG <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setDemFlag(Integer demFlag) { this.demFlag = demFlag; } /** * columnName SLEEVE_LENGTH <br/> * columnType varchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSleeveLength() { return sleeveLength; } /** * columnName SLEEVE_LENGTH <br/> * columnType varchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSleeveLength(String sleeveLength) { this.sleeveLength = sleeveLength; } /** * columnName DB_TYPE <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getDbType() { return dbType; } /** * columnName DB_TYPE <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setDbType(String dbType) { this.dbType = dbType; } /** * columnName REF_SAMPLE_CODE <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getRefSampleCode() { return refSampleCode; } /** * columnName REF_SAMPLE_CODE <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setRefSampleCode(String refSampleCode) { this.refSampleCode = refSampleCode; } /** * columnName OLD_STYLE <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getOldStyle() { return oldStyle; } /** * columnName OLD_STYLE <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setOldStyle(String oldStyle) { this.oldStyle = oldStyle; } /** * columnName APPLY_NO <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getApplyNo() { return applyNo; } /** * columnName APPLY_NO <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setApplyNo(String applyNo) { this.applyNo = applyNo; } /** * columnName APPLY_SAMPLE <br/> * columnType varchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getApplySample() { return applySample; } /** * columnName APPLY_SAMPLE <br/> * columnType varchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setApplySample(String applySample) { this.applySample = applySample; } /** * columnName BELOW_DATE <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Date getBelowDate() { return belowDate; } /** * columnName BELOW_DATE <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setBelowDate(Date belowDate) { this.belowDate = belowDate; } /** * columnName ESTIMATE_PRICE <br/> * columnType numeric 18 2 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getEstimatePrice() { return estimatePrice; } /** * columnName ESTIMATE_PRICE <br/> * columnType numeric 18 2 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setEstimatePrice(String estimatePrice) { this.estimatePrice = estimatePrice; } /** * columnName PROCESSING_MODE <br/> * columnType varchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getProcessingMode() { return processingMode; } /** * columnName PROCESSING_MODE <br/> * columnType varchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setProcessingMode(String processingMode) { this.processingMode = processingMode; } /** * columnName SIZE_MARK <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSizeMark() { return sizeMark; } /** * columnName SIZE_MARK <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSizeMark(String sizeMark) { this.sizeMark = sizeMark; } /** * columnName PRODUCT_CODE <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getProductCode() { return productCode; } /** * columnName PRODUCT_CODE <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setProductCode(String productCode) { this.productCode = productCode; } /** * columnName PURCHASE_BY <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getPurchaseBy() { return purchaseBy; } /** * columnName PURCHASE_BY <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setPurchaseBy(String purchaseBy) { this.purchaseBy = purchaseBy; } /** * columnName PURCHASE_AMOUMT <br/> * columnType numeric 18 2 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getPurchaseAmoumt() { return purchaseAmoumt; } /** * columnName PURCHASE_AMOUMT <br/> * columnType numeric 18 2 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setPurchaseAmoumt(String purchaseAmoumt) { this.purchaseAmoumt = purchaseAmoumt; } /** * columnName ORIGINAL_CUSTOMER <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getOriginalCustomer() { return originalCustomer; } /** * columnName ORIGINAL_CUSTOMER <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setOriginalCustomer(String originalCustomer) { this.originalCustomer = originalCustomer; } /** * columnName REF_DESIGN_NO <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getRefDesignNo() { return refDesignNo; } /** * columnName REF_DESIGN_NO <br/> * columnType varchar 30 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setRefDesignNo(String refDesignNo) { this.refDesignNo = refDesignNo; } /** * columnName IS_PRO <br/> * columnType varchar 5 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getIsPro() { return isPro; } /** * columnName IS_PRO <br/> * columnType varchar 5 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setIsPro(String isPro) { this.isPro = isPro; } /** * columnName ESTIMATE_COST <br/> * columnType numeric 18 2 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getEstimateCost() { return estimateCost; } /** * columnName ESTIMATE_COST <br/> * columnType numeric 18 2 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setEstimateCost(String estimateCost) { this.estimateCost = estimateCost; } /** * columnName RETAIL_PRICE <br/> * columnType numeric 18 2 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getRetailPrice() { return retailPrice; } /** * columnName RETAIL_PRICE <br/> * columnType numeric 18 2 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setRetailPrice(String retailPrice) { this.retailPrice = retailPrice; } /** * columnName IN_OQR_MAKE_ORDER <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Integer getInOqrMakeOrder() { return inOqrMakeOrder; } /** * columnName IN_OQR_MAKE_ORDER <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setInOqrMakeOrder(Integer inOqrMakeOrder) { this.inOqrMakeOrder = inOqrMakeOrder; } /** * columnName COMPREHENSIVE_COST <br/> * columnType numeric 18 2 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getComprehensiveCost() { return comprehensiveCost; } /** * columnName COMPREHENSIVE_COST <br/> * columnType numeric 18 2 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setComprehensiveCost(String comprehensiveCost) { this.comprehensiveCost = comprehensiveCost; } /** * columnName APPLICATION_CATEGORY <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getApplicationCategory() { return applicationCategory; } /** * columnName APPLICATION_CATEGORY <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setApplicationCategory(String applicationCategory) { this.applicationCategory = applicationCategory; } /** * columnName PURCHASED_COLOR <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getPurchasedColor() { return purchasedColor; } /** * columnName PURCHASED_COLOR <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setPurchasedColor(String purchasedColor) { this.purchasedColor = purchasedColor; } /** * columnName OVERSEAS_PURCHASE <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Integer getOverseasPurchase() { return overseasPurchase; } /** * columnName OVERSEAS_PURCHASE <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setOverseasPurchase(Integer overseasPurchase) { this.overseasPurchase = overseasPurchase; } /** * columnName SALES_TRACKING <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getSalesTracking() { return salesTracking; } /** * columnName SALES_TRACKING <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setSalesTracking(String salesTracking) { this.salesTracking = salesTracking; } /** * columnName CURRENT_HOLDER <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getCurrentHolder() { return currentHolder; } /** * columnName CURRENT_HOLDER <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setCurrentHolder(String currentHolder) { this.currentHolder = currentHolder; } /** * columnName DELIVER_GOODS <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Integer getDeliverGoods() { return deliverGoods; } /** * columnName DELIVER_GOODS <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setDeliverGoods(Integer deliverGoods) { this.deliverGoods = deliverGoods; } /** * columnName CONSIGNOR <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getConsignor() { return consignor; } /** * columnName CONSIGNOR <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setConsignor(String consignor) { this.consignor = consignor; } /** * columnName DELIVERY_TIME <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Date getDeliveryTime() { return deliveryTime; } /** * columnName DELIVERY_TIME <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setDeliveryTime(Date deliveryTime) { this.deliveryTime = deliveryTime; } /** * columnName GOODS_RECEIP <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Integer getGoodsReceip() { return goodsReceip; } /** * columnName GOODS_RECEIP <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setGoodsReceip(Integer goodsReceip) { this.goodsReceip = goodsReceip; } /** * columnName CONSIGNEE <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getConsignee() { return consignee; } /** * columnName CONSIGNEE <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setConsignee(String consignee) { this.consignee = consignee; } /** * columnName RECEIP_TIME <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Date getReceipTime() { return receipTime; } /** * columnName RECEIP_TIME <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setReceipTime(Date receipTime) { this.receipTime = receipTime; } /** * columnName SHIPPING_NOTE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getShippingNote() { return shippingNote; } /** * columnName SHIPPING_NOTE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setShippingNote(String shippingNote) { this.shippingNote = shippingNote; } /** * columnName RECEIPT_NOTE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getReceiptNote() { return receiptNote; } /** * columnName RECEIPT_NOTE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setReceiptNote(String receiptNote) { this.receiptNote = receiptNote; } /** * columnName PROCUREMENT_TIME <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Date getProcurementTime() { return procurementTime; } /** * columnName PROCUREMENT_TIME <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setProcurementTime(Date procurementTime) { this.procurementTime = procurementTime; } /** * columnName CHARACTERISTIC <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getCharacteristic() { return characteristic; } /** * columnName CHARACTERISTIC <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setCharacteristic(String characteristic) { this.characteristic = characteristic; } /** * columnName PRODUCTION_CATEGORY <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getProductionCategory() { return productionCategory; } /** * columnName PRODUCTION_CATEGORY <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setProductionCategory(String productionCategory) { this.productionCategory = productionCategory; } /** * columnName PARTICIPATE_PRICE <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Integer getParticipatePrice() { return participatePrice; } /** * columnName PARTICIPATE_PRICE <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setParticipatePrice(Integer participatePrice) { this.participatePrice = participatePrice; } /** * columnName PRICING_PEOPLE <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getPricingPeople() { return pricingPeople; } /** * columnName PRICING_PEOPLE <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setPricingPeople(String pricingPeople) { this.pricingPeople = pricingPeople; } /** * columnName PRICING_TIME <br/> * columnType datetime 23 3 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Date getPricingTime() { return pricingTime; } /** * columnName PRICING_TIME <br/> * columnType datetime 23 3 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setPricingTime(Date pricingTime) { this.pricingTime = pricingTime; } /** * columnName IS_PRICED <br/> * columnType varchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getIsPriced() { return isPriced; } /** * columnName IS_PRICED <br/> * columnType varchar 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setIsPriced(String isPriced) { this.isPriced = isPriced; } /** * columnName MATERIAL_CZ <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getMaterialCz() { return materialCz; } /** * columnName MATERIAL_CZ <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setMaterialCz(String materialCz) { this.materialCz = materialCz; } /** * columnName PO_TYPE <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getPoType() { return poType; } /** * columnName PO_TYPE <br/> * columnType varchar 20 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setPoType(String poType) { this.poType = poType; } /** * columnName MAKE_IE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getMakeIe() { return makeIe; } /** * columnName MAKE_IE <br/> * columnType varchar 255 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setMakeIe(String makeIe) { this.makeIe = makeIe; } public Double getSafeInv() { return this.safeInv; } public void setSafeInv(Double safeInv) { this.safeInv = safeInv; } /** * columnName SAFE_INV <br/> * columnType numeric 18 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getStanderPrice() { return standerPrice; } /** * columnName STANDER_PRICE <br/> * columnType numeric 18 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setStanderPrice(String standerPrice) { this.standerPrice = standerPrice; } /** * columnName PO_TQDATE <br/> * columnType int 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Integer getPoTqdate() { return poTqdate; } /** * columnName PO_TQDATE <br/> * columnType int 10 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setPoTqdate(Integer poTqdate) { this.poTqdate = poTqdate; } /** * columnName DJ_TYPE <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getDjType() { return djType; } /** * columnName DJ_TYPE <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setDjType(String djType) { this.djType = djType; } /** * columnName COLOR <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getColor() { return color; } /** * columnName COLOR <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setColor(String color) { this.color = color; } /** * columnName CLOPURCHASE <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getClopurchase() { return clopurchase; } /** * columnName CLOPURCHASE <br/> * columnType varchar 50 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setClopurchase(String clopurchase) { this.clopurchase = clopurchase; } /** * columnName CLOPURCHASE_TIME <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Date getClopurchaseTime() { return clopurchaseTime; } /** * columnName CLOPURCHASE_TIME <br/> * columnType datetime2 27 7 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setClopurchaseTime(Date clopurchaseTime) { this.clopurchaseTime = clopurchaseTime; } /** * columnName SHOP_IMAGE <br/> * columnType varchar 100 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getShopImage() { return shopImage; } /** * columnName SHOP_IMAGE <br/> * columnType varchar 100 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setShopImage(String shopImage) { this.shopImage = shopImage; } /** * columnName SHOP_IMAGE_NAME <br/> * columnType varchar 200 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getShopImageName() { return shopImageName; } /** * columnName SHOP_IMAGE_NAME <br/> * columnType varchar 200 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setShopImageName(String shopImageName) { this.shopImageName = shopImageName; } /** * columnName IS_ZCGL <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public Integer getIsZcgl() { return isZcgl; } /** * columnName IS_ZCGL <br/> * columnType bit 1 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setIsZcgl(Integer isZcgl) { this.isZcgl = isZcgl; } /** * columnName MAT_DEPICT <br/> * columnType varchar 500 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public String getMatDepict() { return matDepict; } /** * columnName MAT_DEPICT <br/> * columnType varchar 500 0 <br/> * columnRemarks null <br/> * isPK false <br/> * nullAble true <br/> */ public void setMatDepict(String matDepict) { this.matDepict = matDepict; } }
[ "13701771343@163.com" ]
13701771343@163.com
6e5a7c7dfd5d5f5bd8b54d70f3a478ab53421ef6
d29090c1541d25c6e2baeeab2a604220349d3744
/ezrest/src/main/java/evertsson/risch/ezDispatch/ezDispatch.java
4161a0369d39383886f2e8b669e77d65eb031c76
[ "MIT" ]
permissive
johanrisch/ezRest
84a5eea51ee847346af22f2762fa7117d4140598
c5f48b67aee099b737d2eb9ca74c4b1b9db418c2
refs/heads/master
2021-01-17T06:30:02.777063
2015-03-29T17:06:36
2015-03-29T17:06:36
32,755,529
0
1
null
null
null
null
UTF-8
Java
false
false
7,504
java
package evertsson.risch.ezDispatch; import android.os.Handler; import android.util.Log; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashMap; import java.util.concurrent.BlockingDeque; import java.util.concurrent.Callable; import java.util.concurrent.LinkedBlockingDeque; /** * Created by johanrisch on 6/18/13. */ public class ezDispatch { /** * The normal priority thread. */ private static ezThread sNormalThread; /** * The low priority thread */ private static ezThread sLowThread; /** * the high priority thread. */ private static ezThread sHighThread; /** * Static int telling {@see ezDispatch} to execute on the high priority thread * Constant value = 0 */ public static final int HIGH = 0; /** * Static int telling {@see ezDispatch} to execute on the normal priority thread * Constant value = 1 */ public static final int NORMAL = 1; /** * Static int telling {@see ezDispatch} to execute on the low priority thread * Constant value = 2 */ public static final int LOW = 2; /** * Static int telling {@see ezDispatch} to execute on the UI thread * Constant value = 3 */ public static final int MAIN = 3; /** * Handler used to execute on UI thread. */ private Handler sMainHandler; /** * Map used to cache method mappings. */ private HashMap<String, Method> mMethodMap; private static ezDispatch instance = null; private ezDispatch() { initezDispatch(); } private static int sHighCore = 4; private static int sHighMax = 8; private static long sHighTimeout = 60L; private static BlockingDeque<Runnable> sHighQueue = null; private static int sNormalCore = 4; private static int sNormalMax = 8; private static long sNormalTimeout = 60L; private static BlockingDeque<Runnable> sNormalQueue = null; private static int sLowCore = 4; private static int sLowMax = 8; private static long sLowTimeout = 60L; private static BlockingDeque<Runnable> sLowQueue = null; /** * Method to get an initialized instance of ezDispatch * * @return an initialized instance of ezDispatch */ public static synchronized ezDispatch getInstance() { if (instance == null) { instance = new ezDispatch(); instance.initezDispatch(); } return instance; } /** * initiates ezDispatch. MUST be called at before scheduling blocks. */ public void initezDispatch() { //init HighThread if(sHighQueue == null){ sHighQueue = new LinkedBlockingDeque<>(); } //init NormalThread if(sNormalQueue == null){ sNormalQueue = new LinkedBlockingDeque<>(); } //init LowQueue if(sLowQueue == null){ sLowQueue = new LinkedBlockingDeque<>(); } sMainHandler = new Handler(); sHighThread = new ezThread(sHighCore,sHighMax,sHighTimeout, sHighQueue); sNormalThread = new ezThread(sNormalCore,sNormalMax,sNormalTimeout, sNormalQueue); sLowThread = new ezThread(sLowCore,sLowMax,sLowTimeout,sLowQueue); mMethodMap = new HashMap<String, Method>(250); } public static void setUpHighThread(int core, int max, long timeout, BlockingDeque<Runnable> queue){ sHighCore = core; sHighMax = max; sHighTimeout = timeout; sHighQueue = queue; } public static void setUpNormalThread(int core, int max, long timeout, BlockingDeque<Runnable> queue){ sNormalCore = core; sNormalMax = max; sNormalTimeout = timeout; sNormalQueue = queue; } public static void setUpLowThread(int core, int max, long timeout, BlockingDeque<Runnable> queue){ sLowCore = core; sLowMax = max; sLowTimeout = timeout; sLowQueue = queue; } /** * Schedules a block for execution on the given queue. * * @param block the block to be executed on the chosen queue * @param queue the queue to execute the supplied block on. * @return true if the enqueueing was successfull. * @throws RuntimeException if the supplied queue does not exist. */ public boolean executeOn(int queue, final Callable<?> block) { Log.d("ezDispatch", "scheduling execution of a block on " + queue); switch (queue) { case HIGH: sHighThread.putBlock(block); break; case NORMAL: sNormalThread.putBlock(block); break; case LOW: sLowThread.putBlock(block); break; case MAIN: sMainHandler.post(new Runnable() { @Override public void run() { try { block.call(); } catch (Exception e) { e.printStackTrace(); } } }); break; default: throw new RuntimeException("Invalid thread ID, " + queue + " please supply one of LOW, NORMAL, HIGH or MAIN"); } return true; } /** * Schedules a method for execution on the supplied thread. * ezDispatch keeps an internal Hashmap of method name and containing class in order to speed up consecutive * calls to the method. At the moment polymorphism is not supported. * * @param queue that the method execution should be put in. * @param instance the instance of the object that the method should be executed on. * @param name the name of the method to execute. * @param args the arguments for the method. * @return true if the execution was successful. */ public boolean executeMethodOn(int queue, final Object instance, String name, final Object... args) { try { Method m = mMethodMap.get(instance.getClass().getName() + name); if (m == null) { //Method is not cached find the method... //TODO- handle case when hashmap of methods is to large. Class[] classes = null; if (args.length > 0) { classes = new Class[args.length]; for (int i = 0; i < classes.length; i++) { classes[i] = args[i].getClass(); } } m = instance.getClass().getMethod(name, classes); mMethodMap.put(instance.getClass().getName() + name, m); } final Method finalM = m; executeOn(queue, new Callable<Integer>() { @Override public Integer call() { try { finalM.invoke(instance, args); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } return 0; } }); } catch (NoSuchMethodException e) { e.printStackTrace(); return false; } return true; } }
[ "johan.risch@gmail.com" ]
johan.risch@gmail.com
88772139605a1ded330508bca0ae83750fcd1af2
f43b9c6fb46bfa36d4fd3dd61742c9a4a6534c04
/src/test/java/com/example/mysqldemo/TbsCollegesAreaRelationSerciceTest.java
a9838db5d56371ca61604ff82612cbb53b317b4a
[]
no_license
luoxianming/luoxm
96dc5448a42f0e07ea94882ccf6aa361089f4160
5ce294db6ad7d21c9812d62edccec8d1d67e3773
refs/heads/master
2021-12-01T08:09:49.211676
2021-11-14T14:53:23
2021-11-14T14:53:23
110,954,659
0
0
null
null
null
null
UTF-8
Java
false
false
6,819
java
package com.example.mysqldemo;/** * @Author: luoxianming * @Date: 2021/4/30 15:23 */ import com.alibaba.excel.EasyExcel; import com.example.mysqldemo.bean.TBsCollegeAreasRelation; import com.example.mysqldemo.bean.TBsCollegeAreasRelationExample; import com.example.mysqldemo.excel.vo.GlobalAreas; import com.example.mysqldemo.service.TBsCollegeAreasRelationService; import com.example.mysqldemo.utils.Listener.reader.TBsCollegeAreasRelationInput; import com.example.mysqldemo.utils.Listener.reader.TBsCollegeAreasRelationListener; import com.example.mysqldemo.utils.Listener.reader.TBsCollegeAreasRelationVO; import com.example.mysqldemo.utils.Listener.reader.TBsRelationListener; import com.example.mysqldemo.utils.TxtExport; import lombok.extern.slf4j.Slf4j; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.BeanUtils; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import javax.annotation.Resource; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; /** *@author luoxianming *@date 2021/4/30 * */ @Slf4j @RunWith(SpringRunner.class) @SpringBootTest public class TbsCollegesAreaRelationSerciceTest { @Resource private TBsCollegeAreasRelationService tBsCollegeAreasRelationService; @Test public void test(){ String fileName = "C:/Users/luoxianming/Desktop/学校数据/2021429/relation0429.xlsx"; TBsCollegeAreasRelationListener tBsCollegeAreasRelationListener = new TBsCollegeAreasRelationListener(); EasyExcel.read(fileName, TBsCollegeAreasRelationInput.class, tBsCollegeAreasRelationListener).sheet().doRead(); List<TBsCollegeAreasRelationInput> tBsCollegeAreasRelationInputs = tBsCollegeAreasRelationListener.getList(); TBsCollegeAreasRelationExample example = new TBsCollegeAreasRelationExample(); example.createCriteria().andIsDeletedEqualTo(false); List<TBsCollegeAreasRelation> exsitList = tBsCollegeAreasRelationService.selectByExample(example); Map<String, TBsCollegeAreasRelation> map = exsitList.stream().collect(Collectors.toMap(TBsCollegeAreasRelation::getIdentityGuid, Function.identity())); List<TBsCollegeAreasRelation> insert = new ArrayList<>(); List<TBsCollegeAreasRelation> update = new ArrayList<>(); try { TxtExport txtExport = new TxtExport(); TxtExport.creatTxtFile("t_bs_college_areas_relation20210429name"+""+System.currentTimeMillis()); for (TBsCollegeAreasRelationInput t: tBsCollegeAreasRelationInputs){ if (!map.containsKey(t.getIdentityGuid())){ TBsCollegeAreasRelation tBsCollegeAreasRelation = new TBsCollegeAreasRelation(); BeanUtils.copyProperties(t, tBsCollegeAreasRelation); tBsCollegeAreasRelation.setIsDeleted(false); tBsCollegeAreasRelation.setCreatedAt(new Date()); insert.add(tBsCollegeAreasRelation); System.out.println(tBsCollegeAreasRelationService.insertSelective(tBsCollegeAreasRelation)); }else{ TBsCollegeAreasRelation exist = map.get(t.getIdentityGuid()); if (!exist.getBsCollegeAreasId().equals(t.getBsCollegeAreasId())){ log.warn("exist={}", exist); log.warn("read={}", t); // update.add(exist); StringBuilder builder = new StringBuilder(); // builder.append("update t_bs_college_areas_relation set bs_college_areas_id =") // .append(t.getBsCollegeAreasId()+" , bs_college_areas_name = \\\"").append(t.getBsCollegeAreasName()+"\\\"") builder.append("update t_bs_college_areas_relation set name =") .append(" where identity_guid = ").append("\\\"").append(exist.getIdentityGuid()).append("\\\";"); txtExport.writeTxtFile(builder.toString().replace("\\","")); } } } }catch (Exception exception){ } // // if (!insert.isEmpty()){ // tBsCollegeAreasRelationService.updateBatchSelective(insert); // } } @Test public void insert(){ String fileName = "C:/Users/luoxianming/Desktop/学校数据/2021713/relation_all.xlsx"; TBsRelationListener tBsRelationListener = new TBsRelationListener(); EasyExcel.read(fileName, TBsCollegeAreasRelationVO.class, tBsRelationListener).sheet().doRead(); List<TBsCollegeAreasRelationVO> tBsCollegeAreasRelationInputs = tBsRelationListener.getList(); List<TBsCollegeAreasRelation> relations = new ArrayList<>(); tBsCollegeAreasRelationInputs.forEach(tBsCollegeAreasRelationVO -> { TBsCollegeAreasRelation tBsCollegeAreasRelation = new TBsCollegeAreasRelation(); BeanUtils.copyProperties(tBsCollegeAreasRelationVO, tBsCollegeAreasRelation); tBsCollegeAreasRelation.setCreatedAt(new Date()); tBsCollegeAreasRelation.setUpdatedAt(new Date()); relations.add(tBsCollegeAreasRelation); }); tBsCollegeAreasRelationService.batchInsert(relations); } @Test public void updateName(){ String fileName = "C:/Users/luoxianming/Desktop/学校数据/2021713/t_bs_college_areas_relation.xlsx"; TBsCollegeAreasRelationListener tBsCollegeAreasRelationListener = new TBsCollegeAreasRelationListener(); EasyExcel.read(fileName, TBsCollegeAreasRelationInput.class, tBsCollegeAreasRelationListener).sheet().doRead(); List<TBsCollegeAreasRelationInput> tBsCollegeAreasRelationInputs = tBsCollegeAreasRelationListener.getList(); try { TxtExport txtExport = new TxtExport(); TxtExport.creatTxtFile("t_bs_college_areas_relation20210713name"+""+System.currentTimeMillis()); for (TBsCollegeAreasRelationInput t: tBsCollegeAreasRelationInputs){ StringBuilder builder = new StringBuilder(); // builder.append("update t_bs_college_areas_relation set bs_college_areas_id =") // .append(t.getBsCollegeAreasId()+" , bs_college_areas_name = \\\"").append(t.getBsCollegeAreasName()+"\\\"") builder.append("update t_bs_college_areas_relation set bs_college_areas_name =\\\"").append(t.getName()+"\\\"") .append(" where id = ").append("\\").append(t.getId()).append("\\;"); txtExport.writeTxtFile(builder.toString().replace("\\","")); } }catch (Exception exception){ } } }
[ "luoxianming@gaodun.com" ]
luoxianming@gaodun.com
04955497297fc99728de0e6440c5cd69dd57c79d
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/validation/org/apache/hadoop/hdfs/server/namenode/startupprogress/TestStartupProgressMetrics.java
79892b8001779ec9febb88c0dc10260d28ea3258
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
5,146
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hdfs.server.namenode.startupprogress; import org.apache.hadoop.metrics2.MetricsRecordBuilder; import org.junit.Assert; import org.junit.Test; public class TestStartupProgressMetrics { private StartupProgress startupProgress; private StartupProgressMetrics metrics; @Test public void testInitialState() { MetricsRecordBuilder builder = getMetrics(metrics, true); assertCounter("ElapsedTime", 0L, builder); assertGauge("PercentComplete", 0.0F, builder); assertCounter("LoadingFsImageCount", 0L, builder); assertCounter("LoadingFsImageElapsedTime", 0L, builder); assertCounter("LoadingFsImageTotal", 0L, builder); assertGauge("LoadingFsImagePercentComplete", 0.0F, builder); assertCounter("LoadingEditsCount", 0L, builder); assertCounter("LoadingEditsElapsedTime", 0L, builder); assertCounter("LoadingEditsTotal", 0L, builder); assertGauge("LoadingEditsPercentComplete", 0.0F, builder); assertCounter("SavingCheckpointCount", 0L, builder); assertCounter("SavingCheckpointElapsedTime", 0L, builder); assertCounter("SavingCheckpointTotal", 0L, builder); assertGauge("SavingCheckpointPercentComplete", 0.0F, builder); assertCounter("SafeModeCount", 0L, builder); assertCounter("SafeModeElapsedTime", 0L, builder); assertCounter("SafeModeTotal", 0L, builder); assertGauge("SafeModePercentComplete", 0.0F, builder); } @Test public void testRunningState() { StartupProgressTestHelper.setStartupProgressForRunningState(startupProgress); MetricsRecordBuilder builder = getMetrics(metrics, true); Assert.assertTrue(((getLongCounter("ElapsedTime", builder)) >= 0L)); assertGauge("PercentComplete", 0.375F, builder); assertCounter("LoadingFsImageCount", 100L, builder); Assert.assertTrue(((getLongCounter("LoadingFsImageElapsedTime", builder)) >= 0L)); assertCounter("LoadingFsImageTotal", 100L, builder); assertGauge("LoadingFsImagePercentComplete", 1.0F, builder); assertCounter("LoadingEditsCount", 100L, builder); Assert.assertTrue(((getLongCounter("LoadingEditsElapsedTime", builder)) >= 0L)); assertCounter("LoadingEditsTotal", 200L, builder); assertGauge("LoadingEditsPercentComplete", 0.5F, builder); assertCounter("SavingCheckpointCount", 0L, builder); assertCounter("SavingCheckpointElapsedTime", 0L, builder); assertCounter("SavingCheckpointTotal", 0L, builder); assertGauge("SavingCheckpointPercentComplete", 0.0F, builder); assertCounter("SafeModeCount", 0L, builder); assertCounter("SafeModeElapsedTime", 0L, builder); assertCounter("SafeModeTotal", 0L, builder); assertGauge("SafeModePercentComplete", 0.0F, builder); } @Test public void testFinalState() { StartupProgressTestHelper.setStartupProgressForFinalState(startupProgress); MetricsRecordBuilder builder = getMetrics(metrics, true); Assert.assertTrue(((getLongCounter("ElapsedTime", builder)) >= 0L)); assertGauge("PercentComplete", 1.0F, builder); assertCounter("LoadingFsImageCount", 100L, builder); Assert.assertTrue(((getLongCounter("LoadingFsImageElapsedTime", builder)) >= 0L)); assertCounter("LoadingFsImageTotal", 100L, builder); assertGauge("LoadingFsImagePercentComplete", 1.0F, builder); assertCounter("LoadingEditsCount", 200L, builder); Assert.assertTrue(((getLongCounter("LoadingEditsElapsedTime", builder)) >= 0L)); assertCounter("LoadingEditsTotal", 200L, builder); assertGauge("LoadingEditsPercentComplete", 1.0F, builder); assertCounter("SavingCheckpointCount", 300L, builder); Assert.assertTrue(((getLongCounter("SavingCheckpointElapsedTime", builder)) >= 0L)); assertCounter("SavingCheckpointTotal", 300L, builder); assertGauge("SavingCheckpointPercentComplete", 1.0F, builder); assertCounter("SafeModeCount", 400L, builder); Assert.assertTrue(((getLongCounter("SafeModeElapsedTime", builder)) >= 0L)); assertCounter("SafeModeTotal", 400L, builder); assertGauge("SafeModePercentComplete", 1.0F, builder); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
35332d185fc1f015eda712b4e4c6f04d3aaa36a2
b21e0c55d57edbb0136f5102a059680c8b64e2d2
/src/main/java/com/bnk/locators/deleteCustomerLocators.java
ee8bbcb8a9325b36083bbdde5cf18c358bf0c9ee
[]
no_license
AparnaGitTest/BankingApplicationAutomate
336b676fbcdb18d51c92dcdf9c0599a579db45f6
0f2b10b4249e30e65cf721a711c04ed363db514b
refs/heads/master
2023-03-10T04:04:48.065739
2021-02-20T17:54:57
2021-02-20T17:54:57
339,006,349
0
0
null
null
null
null
UTF-8
Java
false
false
368
java
package com.bnk.locators; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; public class deleteCustomerLocators { @FindBy(xpath="//input[@name='cusid']") public WebElement customerID; @FindBy(xpath="//input[@name='AccSubmit']") public WebElement submit; @FindBy(xpath="//input[@name='res']") public WebElement reset; }
[ "aparnaacharya12@gmail.com" ]
aparnaacharya12@gmail.com
4acb9c841988395ef879c0b734da09b4b90ca254
d9e2d4589a600d084775fc29c482f5aed6aee661
/POO/tp3/src/TestVecteur.java
d91ab18c693ed4012e19ba115b329809c0942a5c
[]
no_license
MaximeMillier/L3
30b37c3e398353849e4c1a251bf52d8875526ad9
f0855b6e1860914a9e87a747f35fdce2ebc5b8c0
refs/heads/master
2020-04-04T10:55:13.068914
2018-12-16T11:07:51
2018-12-16T11:07:51
null
0
0
null
null
null
null
MacCentralEurope
Java
false
false
532
java
package tp3; public class TestVecteur { public static void main(String[] args) { Vecteur2D v = new Vecteur2D(2,1); System.out.println("v = " + v); /*v.mulScalaire(1.5); System.out.println("produit scalaire = " + v);*/ /*v.prodScalaire(new Vecteur2D(1.5,1.5)); System.out.println("produit scalaire = " + v);*/ /*v.transposer(); System.out.println("vecteur transposť " + v);*/ v.addVect(new Vecteur2D(1.5,1.5)); System.out.println("addition de vecteurs = " + v); } }
[ "mmillier@hotmail.fr" ]
mmillier@hotmail.fr
4105a7db5a476077e7a2d23bc25fdf2e71d2135f
fee07509619ca10be0b08059720886f9a1f2048d
/bdnav-provider/task-provider/src/main/java/com/bdxh/task/configration/rocketmq/util/RocketMqTransUtil.java
9fae1ab5322fb18977c8995f3f6cdf09cc04e5e2
[ "Apache-2.0" ]
permissive
jiageh08/tea-springboot
70a68c7518f2470268ad8fa03ea7dfa48dff948c
91892209a70b93e90eaee0a01a4f71e188f4a61a
refs/heads/master
2022-12-05T13:10:06.654077
2020-08-07T01:29:56
2020-08-07T01:29:56
285,574,085
0
0
null
null
null
null
UTF-8
Java
false
false
1,743
java
package com.bdxh.task.configration.rocketmq.util; import com.bdxh.common.base.constant.RocketMqConstrants; import com.bdxh.common.base.enums.RocketMqTransStatusEnum; import com.bdxh.task.configration.redis.RedisUtil; import org.apache.commons.lang3.StringUtils; import org.apache.rocketmq.client.producer.LocalTransactionState; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** * @Description: RocketMq事务回查工具类 * @Author: Kang * @Date: 2019/6/14 9:44 */ @Component public class RocketMqTransUtil { @Autowired private RedisUtil redisUtil; public void putTransState(String transactionId, RocketMqTransStatusEnum rocketMqTransStatusEnum) { redisUtil.setWithExpireTime(RocketMqConstrants.TRANSACTION_REDIS_PREFIX + transactionId, rocketMqTransStatusEnum.getCode(), 3600 * 24); } public LocalTransactionState getTransState(String transactionId) { String status = (String) redisUtil.getObject(RocketMqConstrants.TRANSACTION_REDIS_PREFIX + transactionId); if (StringUtils.equals(status, RocketMqTransStatusEnum.COMMIT_MESSAGE.getCode())) { return LocalTransactionState.COMMIT_MESSAGE; } if (StringUtils.equals(status, RocketMqTransStatusEnum.ROLLBACK_MESSAGE.getCode())) { return LocalTransactionState.ROLLBACK_MESSAGE; } if (StringUtils.equals(status, RocketMqTransStatusEnum.UNKNOW.getCode())) { return LocalTransactionState.UNKNOW; } return LocalTransactionState.UNKNOW; } public void removeTransState(String transactionId) { redisUtil.delete(RocketMqConstrants.TRANSACTION_REDIS_PREFIX + transactionId); } }
[ "wangjp@wehgc.com" ]
wangjp@wehgc.com
7c6f29cc79de2e62a4c1556e8b7a6c315ddfae34
f2530d42ef1ccf6d91e4f4e7d5a0a62d5d76523a
/settle_shopping/src/main/java/com/bcg/test/settleshop/controller/BaseController.java
e238a488a63ac95a09c0c511b24fe7093caca18f
[]
no_license
alexanderlc6/settle_shopping
ae94e3ec39f4dc5fcf0aecf8ab7c409ef74df589
7af269d74a1c626954ecde31de1265db7751ba6a
refs/heads/master
2020-06-04T01:23:56.118738
2019-06-13T18:44:59
2019-06-13T18:44:59
191,813,876
0
0
null
null
null
null
UTF-8
Java
false
false
1,150
java
package com.bcg.test.settleshop.controller; import com.bcg.test.settleshop.bean.vo.ResponseVO; import com.bcg.test.settleshop.utils.ResponseUtil; import java.util.Map; /** * @author alexlu * @date 2019/6/13 */ public class BaseController { protected ResponseVO getSuccess(){ return ResponseUtil.getSuccess(); } protected ResponseVO getFromData(Object data){ ResponseVO responseVO = getSuccess(); responseVO.setData(data); return responseVO; } protected ResponseVO getFailure(){ return ResponseUtil.getFailure(); } protected ResponseVO getFailure(String msg){ return ResponseUtil.getFailure(msg); } protected ResponseVO getFailure(Integer errorCode, String msg){ return ResponseUtil.getFailure(errorCode, msg); } protected ResponseVO getFailureWithMap(Integer errorCode, Map<String, String> errMsgMap){ return ResponseUtil.getFailure(errorCode, errMsgMap); } protected ResponseVO getResponse(Object data){ ResponseVO responseVO = getSuccess(); responseVO.setData(data); return responseVO; } }
[ "luchaob@enncloud.cn" ]
luchaob@enncloud.cn
62db7b04c25df2f5553bebacb8f83c32607b78d5
752d91d350aecb70e9cbf7dd0218ca034af652fa
/Winjit Deployment/Backend Source Code/src/main/java/com/fullerton/olp/wsdao/otp/OtpDAOImpl.java
05d01a90c4c419172f3704f514f2b845be5f6377
[]
no_license
mnjdby/TEST
5d0c25cf42eb4212f87cd4d23d1386633922f67e
cc2278c069e1711d4bd3f0a42eb360ea7417a6e7
refs/heads/master
2020-03-11T08:51:52.533185
2018-04-17T11:31:46
2018-04-17T11:31:46
129,894,682
0
0
null
null
null
null
UTF-8
Java
false
false
1,558
java
package com.fullerton.olp.wsdao.otp; import javax.annotation.Resource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpEntity; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; import com.fullerton.olp.bean.OtpRequest; import com.fullerton.olp.bean.OtpResponse; /** * Client to invoke OTP related services * * @author nitish * */ @Component public class OtpDAOImpl implements OtpDAO{ private static final Logger log = LoggerFactory.getLogger(OtpDAO.class); @Value("${otp-ws.host}") private String OTP_WS_HOST; private String GET_OTP_REQ = "getOTP"; private String VERIFY_OTP_REQ = "verifyOTP"; @Resource(name="restTemplate") private RestTemplate restTemplate; public OtpResponse sendOTP(OtpRequest otpRequest) { HttpEntity<OtpRequest> entity = new HttpEntity<OtpRequest>(otpRequest); ResponseEntity<OtpResponse> responseEntity = restTemplate.exchange(OTP_WS_HOST + GET_OTP_REQ, HttpMethod.POST, entity, OtpResponse.class); return responseEntity.getBody(); } public OtpResponse verifyOTP(OtpRequest otpRequest) { HttpEntity<OtpRequest> entity = new HttpEntity<OtpRequest>(otpRequest); ResponseEntity<OtpResponse> responseEntity = restTemplate.exchange(OTP_WS_HOST + VERIFY_OTP_REQ , HttpMethod.POST, entity, OtpResponse.class); return responseEntity.getBody(); } }
[ "165016@fullertonindia.local" ]
165016@fullertonindia.local
c13a18e843619b979f97c17439a193281b88679f
ada084ba8d5f36014b6d3a4f715a64f4ff24d0e4
/gsonsharedpreferences/src/androidTest/java/com/github/hynra/gsonsharedpreferences/ExampleInstrumentedTest.java
78ddb80a762d706ee58d2f4d0fc910ab4fbfe45f
[]
no_license
morristech/GSON-SharedPreferences
e52af36b140a7c8508c906c0ef17795dcf3be4ed
f393d09d4bd38b943b0775a85a81a81300e4b08a
refs/heads/master
2020-06-06T21:09:28.308314
2017-05-06T16:48:17
2017-05-06T16:48:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
785
java
package com.github.hynra.gsonsharedpreferences; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumentation test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.github.hynra.jsonsharedpreferences.test", appContext.getPackageName()); } }
[ "hynra@yahoo.com" ]
hynra@yahoo.com
891dfb4f1afd7556bf2c246f98a4e9905598ad7c
efdbd191f37c063f72d4d9925dfe37c6f012eda4
/src/main/java/com/stock/projet/entities/Fournisseur.java
81af672b024d46b9ef4f482bb1808fb1b6719beb
[]
no_license
hasbilal/gestionDeStock
285442557fa69c5ef8ab247704c42502033d1171
674608739da3af6f63599bb1cba92bbae80f69d2
refs/heads/master
2023-03-12T19:25:58.637031
2021-03-05T20:45:30
2021-03-05T20:45:30
335,373,202
0
0
null
null
null
null
UTF-8
Java
false
false
1,035
java
package com.stock.projet.entities; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.*; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedDate; import javax.persistence.*; import java.io.Serializable; import java.time.Instant; import java.util.List; @Data @Builder @AllArgsConstructor @NoArgsConstructor @EqualsAndHashCode @Entity @Table(name = "fournisseur") public class Fournisseur implements Serializable { @Id @GeneratedValue private long idFournisseur; private String nomFournisseur; private String prenomFournisseur; @Embedded private Adresse adresseFournisseur; private String emailFournisseur; private String imageFournisseur; private String numTelephone; @OneToMany(mappedBy = "fournisseur") private List<CmdFournisseur> cmdFournisseurs; @CreatedDate @JsonIgnore private Instant dateCreation; @LastModifiedDate @JsonIgnore private Instant dateDernierMiseAJour; }
[ "hasbilal92@gmail.com" ]
hasbilal92@gmail.com
06a829a8e74df096276d1f90f8b1ec2ab5c1a122
dce8dad6067ff3f6f59e1fa8185d249fd0bd9c58
/tests/correctness/targets/SampleBuildFile/Input/src/VersionConstants.java
9dbd54123c266599f54127d2e0418fe031bef12a
[ "Apache-2.0" ]
permissive
xpybuild/xpybuild
ccd6c22d4aa0560ee5583004b94dccc03c0cad52
9e0aa0ae268cf3fcc759572a026e1ed2a03379e0
refs/heads/master
2023-07-12T03:04:08.687644
2023-06-29T13:57:34
2023-06-29T13:57:34
81,104,277
9
5
Apache-2.0
2022-01-07T18:48:57
2017-02-06T15:58:02
Python
UTF-8
Java
false
false
92
java
public class VersionConstants { public static final String APP_VERSION = "@APP_VERSION@"; }
[ "ben-spiller@users.noreply.github.com" ]
ben-spiller@users.noreply.github.com
7d36560ac7f0d548fe5eeee433428d4d94a5cab2
dbb8906cffa811777eca34fdd9af4bd85bdacd79
/GameStoreProject/src/Abstracts/CampaignService.java
3e24d86caf9d89d80935fff6722d1f3fce49c2d3
[]
no_license
denizsucu/JavaCamp
2bb4e3fac10864f8d2bfbdecb24e02cfc9a52b91
b2ef8d4dc7d41e82871755b3a76f9cd329bd652f
refs/heads/master
2023-06-22T10:19:00.597763
2021-07-30T21:00:53
2021-07-30T21:00:53
370,719,657
2
0
null
null
null
null
UTF-8
Java
false
false
189
java
package Abstracts; import Entities.Campaign; public interface CampaignService { void add(Campaign campaign); void update(Campaign campaign); void delete(Campaign campaign); }
[ "denizsucumzfl@gmail.com" ]
denizsucumzfl@gmail.com
0624d2941f7d24e85e32f0138b1f1da7c5612a8f
8d3e448f9f43c40551aae146fc755ba4e272f655
/proj2_backend/src/main/java/com/niit/dao/BlogPostLikesDaoImpl.java
3b13621ef5c60a018b886e98b92ab3657658532b
[]
no_license
saripellaanusha/project1
145cd1a99749a911662073f1febbfabaf8c2bff0
2a156790aecfa3442499ef3c8ab21be6eece82a5
refs/heads/master
2022-12-22T02:48:12.504769
2019-12-15T08:06:34
2019-12-15T08:06:34
225,284,288
0
0
null
2022-12-16T07:26:10
2019-12-02T04:19:53
JavaScript
UTF-8
Java
false
false
1,718
java
package com.niit.dao; import javax.transaction.Transactional; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import com.niit.model.BlogPost; import com.niit.model.BlogPostLikes; import com.niit.model.User; @Repository @Transactional public class BlogPostLikesDaoImpl implements BlogPostLikesDao { @Autowired private SessionFactory sessionFactory; public BlogPostLikes hasUserLikedBlog(int blogId, String email) { // TODO Auto-generated method stub Session session=sessionFactory.getCurrentSession(); Query query=session.createQuery("from BlogPostLikes where blogPost.id=? and user.email=?"); query.setInteger(0,blogId); query.setString(1,email); BlogPostLikes blogPostLikes=(BlogPostLikes)query.uniqueResult(); return blogPostLikes; } public BlogPost updateLikes(int id,String email) { // TODO Auto-generated method stub Session session=sessionFactory.getCurrentSession(); BlogPostLikes blogPostLikes=hasUserLikedBlog(id, email); BlogPost blogPost=(BlogPost)session.get(BlogPost.class,id); if(blogPostLikes==null) { blogPostLikes=new BlogPostLikes(); User user=(User)session.get(User.class,email); blogPostLikes.setBlogPost(blogPost); blogPostLikes.setUser(user); session.save(blogPostLikes); blogPost.setLikes(blogPost.getLikes()+1); session.update(blogPost); } else { session.delete(blogPostLikes); blogPost.setLikes(blogPost.getLikes()-1); session.update(blogPost); } return blogPost; } }
[ "anushavarmavarma5452@gmail.com" ]
anushavarmavarma5452@gmail.com
05499466816ee7d3458531fc11b6ff9f48ac2e8c
51aa68267ac226b2d379dff823594823d4b34d00
/src/main/java/com/ocp17_gc/Classroom.java
7541bf7f6833ae8be0783d96daf25016be6432ad
[]
no_license
RichardChienn/Java1103
2ba14fc428d1c3671c29bd464de46a8f651492b1
105893cda95ee7e74af7d656bf87db61216f6ef5
refs/heads/master
2023-03-07T07:36:18.018381
2021-02-18T13:39:34
2021-02-18T13:39:34
309,671,775
0
0
null
null
null
null
UTF-8
Java
false
false
1,535
java
package com.ocp17_gc; import com.github.javafaker.Faker; import java.util.ArrayList; import java.util.Iterator; import java.util.List; class Student{ String name; public Student(String name) { //建構子 System.out.println(Thread.currentThread().getName()+ " 執行建構子"); this.name = name; } @Override protected void finalize() throws Throwable { //解構子 System.out.println(Thread.currentThread().getName()+ " 執行解構子"); System.out.println(name + "離開 (被Gc 吞吃!!!)"); } @Override public String toString() { System.out.println(Thread.currentThread().getName()+ " toString()"); return "\nStudent{" + "name=" + name + '}'; } } public class Classroom { public static void main(String[] args) { Faker faker = new Faker(); List<Student> students = new ArrayList<>(); for (int i = 0; i < 10; i++) { students.add(new Student(faker.name().lastName())); } System.out.println(students); //移除有 s 的人名 Iterator<Student> iter = students.iterator(); while (iter.hasNext()) { Student student = iter.next(); if(student.name.contains("s") || student.name.contains("S")){ iter.remove(); student= null; System.gc(); } } System.out.println(students); } }
[ "MB-study@DESKTOP-KVQTFGR" ]
MB-study@DESKTOP-KVQTFGR
dcea81a6f9568c5001d12575b5424568a85fb98f
828a9dc2a273e7529385d723193b73947aa00802
/app/src/main/java/com/int403/jabong/gifviewer2/glide/load/Option.java
271a2bf2f9dda6a676ed25eb91604c2296df2463
[]
no_license
dey2929/GifViewer2
f9c686770703361ae6d900bfa8bd6fde7d7a1bbe
e21a1ed978657057df6a6090c30be9b18df2285d
refs/heads/master
2021-01-17T08:43:52.089301
2016-07-15T12:21:05
2016-07-15T12:21:05
63,416,728
0
0
null
null
null
null
UTF-8
Java
false
false
5,293
java
package com.int403.jabong.gifviewer2.glide.load; import android.support.annotation.Nullable; import com.int403.jabong.gifviewer2.bumptech.load.bumptech.Key; import com.int403.jabong.gifviewer2.bumptech.util.bumptech.Preconditions; import java.security.MessageDigest; /** * Defines available component (decoders, encoders, model loaders etc.) options with optional * default values and the ability to affect the resource disk cache key used by {@link * DiskCacheStrategy#RESOURCE}. * * <p> * Implementations must either be unique (usually declared as static final variables), or * implement {@link #equals(Object)} and {@link #hashCode()}. * </p> * * <p> * Implementations can implement {@link #update(Object, MessageDigest)} to make sure that * the disk cache key includes the specific option set. * </p> * * @param <T> The type of the option ({@link Integer}, {@link * android.graphics.Bitmap.CompressFormat} etc.), must implement {@link #equals(Object)} and * {@link #hashCode()}. */ public final class Option<T> { private static final CacheKeyUpdater<Object> EMPTY_UPDATER = new CacheKeyUpdater<Object>() { @Override public void update(byte[] keyBytes, Object value, MessageDigest messageDigest) { // Do nothing. } }; private final T defaultValue; private final CacheKeyUpdater<T> cacheKeyUpdater; private final String key; private volatile byte[] keyBytes; /** * Returns a new {@link Option} that does not affect disk cache keys with a {@code null} default * value. * * @param key A unique package prefixed {@link String} that identifies this option (must be * stable across builds, so {@link Class#getName()} should <em>not</em> be used). */ public static <T> Option<T> memory(String key) { return new Option<>(key, null /*defaultValue*/, Option.<T>emptyUpdater()); } /** * Returns a new {@link Option} that does not affect disk cache keys with the given value as the * default value. * * @param key A unique package prefixed {@link String} that identifies this option (must be * stable across builds, so {@link Class#getName()} should <em>not</em> be used). */ public static <T> Option<T> memory(String key, T defaultValue) { return new Option<>(key, defaultValue, Option.<T>emptyUpdater()); } /** * Returns a new {@link Option} that uses the given {@link * com.bumptech.glide.load.Option.CacheKeyUpdater} to update disk cache keys. * * @param key A unique package prefixed {@link String} that identifies this option (must be * stable across builds, so {@link Class#getName()} should <em>not</em> be used). */ public static <T> Option<T> disk(String key, CacheKeyUpdater<T> cacheKeyUpdater) { return new Option<>(key, null /*defaultValue*/, cacheKeyUpdater); } /** * Returns a new {@link Option} that uses the given {@link * com.bumptech.glide.load.Option.CacheKeyUpdater} to update disk cache keys and provides * the given value as the default value. * * @param key A unique package prefixed {@link String} that identifies this option (must be * stable across builds, so {@link Class#getName()} should <em>not</em> be used). */ public static <T> Option<T> disk(String key, T defaultValue, CacheKeyUpdater<T> cacheKeyUpdater) { return new Option<>(key, defaultValue, cacheKeyUpdater); } Option(String key, T defaultValue, CacheKeyUpdater<T> cacheKeyUpdater) { this.key = Preconditions.checkNotEmpty(key); this.defaultValue = defaultValue; this.cacheKeyUpdater = Preconditions.checkNotNull(cacheKeyUpdater); } /** * Returns a reasonable default to use if no other value is set, or {@code null}. */ @Nullable public T getDefaultValue() { return defaultValue; } /** * Updates the given {@link MessageDigest} used to construct a cache key with the given * value using the {@link CacheKeyUpdater} optionally provided in * the constructor. */ public void update(T value, MessageDigest messageDigest) { cacheKeyUpdater.update(getKeyBytes(), value, messageDigest); } private byte[] getKeyBytes() { if (keyBytes == null) { keyBytes = key.getBytes(Key.CHARSET); } return keyBytes; } @Override public boolean equals(Object o) { if (o instanceof Option) { Option<?> other = (Option<?>) o; return key.equals(other.key); } return false; } @Override public int hashCode() { return key.hashCode(); } @SuppressWarnings("unchecked") private static <T> CacheKeyUpdater<T> emptyUpdater() { return (CacheKeyUpdater<T>) EMPTY_UPDATER; } @Override public String toString() { return "Option{" + "key='" + key + '\'' + '}'; } /** * An interface that updates a {@link MessageDigest} with the given value as part of a process to * generate a disk cache key. * * @param <T> The type of the option. */ public interface CacheKeyUpdater<T> { /** * Updates the given {@link MessageDigest} with the bytes of the given key (to avoid incidental * value collisions when values are not particularly unique) and value. */ void update(byte[] keyBytes, T value, MessageDigest messageDigest); } }
[ "deyanand2929@gmail.com" ]
deyanand2929@gmail.com
e27b78433663e162ed086922e8ee9b9c812673f4
cfdd9de878aa71c39853b067b0981a387de113f6
/src/main/java/org/jocean/wechat/spi/DownloadMediaResponse.java
14238af96b247ed52db712c1364deed1b1b0f5dd
[]
no_license
isdom/jocean-wechat
374e388a1ee82f73e8eb939078c04f9aec0786f8
74fce939e6d21d088dde30b246fe012e4e459d10
refs/heads/master
2023-08-17T08:18:15.004157
2023-08-10T16:36:00
2023-08-10T16:36:00
73,454,977
1
0
null
null
null
null
UTF-8
Java
false
false
2,638
java
/** * */ package org.jocean.wechat.spi; import java.util.Arrays; import javax.ws.rs.BeanParam; import javax.ws.rs.Consumes; import javax.ws.rs.HeaderParam; import com.alibaba.fastjson.annotation.JSONField; /** * @author isdom * */ public class DownloadMediaResponse { /* (non-Javadoc) * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("DownloadMediaResponse [contentType=") .append(_contentType) .append(", contentLength=") .append(_contentLength) .append(", contentDisposition=") .append(_contentDisposition) .append(", errormsg=") .append(_errormsg) .append(", msgbody=") .append(Arrays.toString(_msgbody)) .append("]"); return builder.toString(); } public String getContentType() { return _contentType; } public byte[] getMsgbody() { return _msgbody; } public Integer getContentLength() { return _contentLength; } public ErrorMsg getErrormsg() { return _errormsg; } public String getContentDisposition() { return _contentDisposition; } @HeaderParam("Content-Type") private String _contentType; @HeaderParam("Content-Length") private Integer _contentLength; @HeaderParam("Content-disposition") private String _contentDisposition; @BeanParam private byte[] _msgbody; @BeanParam private ErrorMsg _errormsg; @Consumes({"application/json", "text/plain"}) public static class ErrorMsg { @Override public String toString() { final StringBuilder builder = new StringBuilder(); builder.append("ErrorMsg [errcode=").append(_errcode) .append(", errmsg=").append(_errmsg).append("]"); return builder.toString(); } @JSONField(name="errcode") public int getErrcode() { return _errcode; } @JSONField(name="errcode") public void setErrcode(int errcode) { this._errcode = errcode; } @JSONField(name="errmsg") public String getErrmsg() { return _errmsg; } @JSONField(name="errmsg") public void setErrmsg(String errmsg) { this._errmsg = errmsg; } private int _errcode; private String _errmsg; } }
[ "isdom.maming@gmail.com" ]
isdom.maming@gmail.com
ad86d970c56478c6c556b594891111da39a461bf
b45bdae17650678670f5c08193b59da065e4c2f9
/src/main/java/com/mua/mas/MasApplication.java
47b9a606248dd85781fcd860f609bec3e827495c
[]
no_license
maifeeulasad/SDAS-heroku
6377954e2034116e724816b5795499414dbf08a2
69dedf8c51b3c58829fc67ee368ed6621c0641c1
refs/heads/main
2023-02-24T12:01:08.844953
2021-01-21T19:18:19
2021-01-21T19:18:19
331,730,196
0
0
null
null
null
null
UTF-8
Java
false
false
353
java
package com.mua.mas; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class MasApplication { public static void main(String[] args) { SpringApplication.run(MasApplication.class, args); } /* sudo lsof -t -i:8080 sudo kill some_number */ }
[ "maifeeulasad@gmail.com" ]
maifeeulasad@gmail.com
ea35e215faf7a9836763391a0eb98dba5b998f4d
9c0caa9778bb39fab0fd30c7576b02bfd539fde1
/src/com/plb/java/test5/Test5.java
a79a520aba0447302471330db59427aeab2579b0
[]
no_license
p294960570/thinking-in-java
dbed99079dd39c64122a1dd65bc283ca7a30f9c0
9558a229fe8fbc73b30c70782be66d66e3a00d8b
refs/heads/master
2020-03-27T03:30:06.529263
2018-09-26T15:57:19
2018-09-26T15:57:19
145,868,421
0
0
null
null
null
null
WINDOWS-1256
Java
false
false
350
java
package com.plb.java.test5; /*** * 90.1 * * @author إس±ٍ±ٍ * */ public class Test5 { public static void main(String[] args) { A a = new A(); a.test(); } } class A { void test() { B b = new B(); b.test1(); System.out.println("A"); } } class B { void test1() { A a = new A(); a.test(); System.out.println("B"); } }
[ "294960570@qq.com" ]
294960570@qq.com
99747ad02381b24ff9cc73e54eecd899b1c2d450
3b1787361c203262b4f3066cef97e4ebc35af972
/src/main/java/com/zvm/interpreter/Opcode.java
3d588daaa0d3390515d1c3c17bc740f64ce5e85b
[]
no_license
PhelanWang/zvm
69a3a2acbd26128c0b9be99510b0fb4ad880b2a0
def5b1499b3b73e8058e05964369ba9a25e36ade
refs/heads/master
2020-12-10T04:27:17.560044
2020-01-11T18:00:23
2020-01-11T18:00:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,852
java
package com.zvm.interpreter; /** * 懒得写了,google了来源: * https://docs.atlassian.com/atlassian-plugins/2.5.5/atlassian-plugins-osgi/xref/com/atlassian/plugin/osgi/util/OpCodes.html * https://github.com/alibaba/atlas/blob/master/atlas-gradle-plugin/dexpatch/src/main/java/com/taobao/android/dx/cf/code/ByteOps.java */ public class Opcode { final static int NOP = 0x00; final static int ACONST_NULL = 0x01; final static int ICONST_M1 = 0x02; final static int ICONST_0 = 0x03; final static int ICONST_1 = 0x04; final static int ICONST_2 = 0x05; final static int ICONST_3 = 0x06; final static int ICONST_4 = 0x07; final static int ICONST_5 = 0x08; final static int LCONST_0 = 0x09; final static int BIPUSH = 0x10; final static int SIPUSH = 0x11; final static int LDC = 0x12; final static int LDC_W = 0x13; final static int LDC2_W = 0x14; final static int ILOAD = 0x15; final static int LLOAD = 0x16; final static int FLOAD = 0x17; final static int DLOAD = 0x18; final static int ALOAD = 0x19; final static int LLOAD_2 = 0x20; final static int LLOAD_3 = 0x21; final static int FLOAD_0 = 0x22; final static int FLOAD_1 = 0x23; final static int FLOAD_2 = 0x24; final static int FLOAD_3 = 0x25; final static int DLOAD_0 = 0x26; final static int DLOAD_1 = 0x27; final static int DLOAD_2 = 0x28; final static int DLOAD_3 = 0x29; final static int FALOAD = 0x30; final static int DALOAD = 0x31; final static int AALOAD = 0x32; final static int BALOAD = 0x33; final static int CALOAD = 0x34; final static int SALOAD = 0x35; final static int ISTORE = 0x36; final static int LSTORE = 0x37; final static int FSTORE = 0x38; final static int DSTORE = 0x39; final static int LSTORE_1 = 0x40; final static int LSTORE_2 = 0x41; final static int LSTORE_3 = 0x42; final static int FSTORE_0 = 0x43; final static int FSTORE_1 = 0x44; final static int FSTORE_2 = 0x45; final static int FSTORE_3 = 0x46; final static int DSTORE_0 = 0x47; final static int DSTORE_1 = 0x48; final static int DSTORE_2 = 0x49; final static int LASTORE = 0x50; final static int FASTORE = 0x51; final static int DASTORE = 0x52; final static int AASTORE = 0x53; final static int BASTORE = 0x54; final static int CASTORE = 0x55; final static int SASTORE = 0x56; final static int POP = 0x57; final static int POP2 = 0x58; final static int DUP = 0x59; final static int IADD = 0x60; final static int LADD = 0x61; final static int FADD = 0x62; final static int DADD = 0x63; final static int ISUB = 0x64; final static int LSUB = 0x65; final static int FSUB = 0x66; final static int DSUB = 0x67; final static int IMUL = 0x68; final static int LMUL = 0x69; final static int IREM = 0x70; final static int LREM = 0x71; final static int FREM = 0x72; final static int DREM = 0x73; final static int INEG = 0x74; final static int LNEG = 0x75; final static int FNEG = 0x76; final static int DNEG = 0x77; final static int ISHL = 0x78; final static int LSHL = 0x79; final static int IOR = 0x80; final static int LOR = 0x81; final static int IXOR = 0x82; final static int LXOR = 0x83; final static int IINC = 0x84; final static int I2L = 0x85; final static int I2F = 0x86; final static int I2D = 0x87; final static int L2I = 0x88; final static int L2F = 0x89; final static int D2F = 0x90; final static int I2B = 0x91; final static int I2C = 0x92; final static int I2S = 0x93; final static int LCMP = 0x94; final static int FCMPL = 0x95; final static int FCMPG = 0x96; final static int DCMPL = 0x97; final static int DCMPG = 0x98; final static int IFEQ = 0x99; final static int LCONST_1 = 0x0a; final static int FCONST_0 = 0x0b; final static int FCONST_1 = 0x0c; final static int FCONST_2 = 0x0d; final static int DCONST_0 = 0x0e; final static int DCONST_1 = 0x0f; final static int ILOAD_0 = 0x1a; final static int ILOAD_1 = 0x1b; final static int ILOAD_2 = 0x1c; final static int ILOAD_3 = 0x1d; final static int LLOAD_0 = 0x1e; final static int LLOAD_1 = 0x1f; final static int ALOAD_0 = 0x2a; final static int ALOAD_1 = 0x2b; final static int ALOAD_2 = 0x2c; final static int ALOAD_3 = 0x2d; final static int IALOAD = 0x2e; final static int LALOAD = 0x2f; final static int ASTORE = 0x3a; final static int ISTORE_0 = 0x3b; final static int ISTORE_1 = 0x3c; final static int ISTORE_2 = 0x3d; final static int ISTORE_3 = 0x3e; final static int LSTORE_0 = 0x3f; final static int DSTORE_3 = 0x4a; final static int ASTORE_0 = 0x4b; final static int ASTORE_1 = 0x4c; final static int ASTORE_2 = 0x4d; final static int ASTORE_3 = 0x4e; final static int IASTORE = 0x4f; final static int DUP_X1 = 0x5a; final static int DUP_X2 = 0x5b; final static int DUP2 = 0x5c; final static int DUP2_X1 = 0x5d; final static int DUP2_X2 = 0x5e; final static int SWAP = 0x5f; final static int FMUL = 0x6a; final static int DMUL = 0x6b; final static int IDIV = 0x6c; final static int LDIV = 0x6d; final static int FDIV = 0x6e; final static int DDIV = 0x6f; final static int ISHR = 0x7a; final static int LSHR = 0x7b; final static int IUSHR = 0x7c; final static int LUSHR = 0x7d; final static int IAND = 0x7e; final static int LAND = 0x7f; final static int L2D = 0x8a; final static int F2I = 0x8b; final static int F2L = 0x8c; final static int F2D = 0x8d; final static int D2I = 0x8e; final static int D2L = 0x8f; final static int IFNE = 0x9a; final static int IFLT = 0x9b; final static int IFGE = 0x9c; final static int IFGT = 0x9d; final static int IFLE = 0x9e; final static int IF_ICMPEQ = 0x9f; final static int IF_ICMPNE = 0xa0; final static int IF_ICMPLT = 0xa1; final static int IF_ICMPGE = 0xa2; final static int IF_ICMPGT = 0xa3; final static int IF_ICMPLE = 0xa4; final static int IF_ACMPEQ = 0xa5; final static int IF_ACMPNE = 0xa6; final static int GOTO_ = 0xa7; final static int JSR = 0xa8; final static int RET = 0xa9; final static int TABLESWITCH = 0xaa; final static int LOOKUPSWITCH = 0xab; final static int IRETURN = 0xac; final static int LRETURN = 0xad; final static int FRETURN = 0xae; final static int DRETURN = 0xaf; final static int ARETURN = 0xb0; final static int RETURN_ = 0xb1; final static int GETSTATIC = 0xb2; final static int PUTSTATIC = 0xb3; final static int GETFIELD = 0xb4; final static int PUTFIELD = 0xb5; final static int INVOKEVIRTUAL = 0xb6; final static int INVOKESPECIAL = 0xb7; final static int INVOKESTATIC = 0xb8; final static int INVOKEINTERFACE = 0xb9; final static int XXXUNUSEDXXX = 0xba; final static int NEW_ = 0xbb; final static int NEWARRAY = 0xbc; final static int ANEWARRAY = 0xbd; final static int ARRAYLENGTH = 0xbe; final static int ATHROW = 0xbf; final static int CHECKCAST = 0xc0; final static int INSTANCEOF_ = 0xc1; final static int MONITORENTER = 0xc2; final static int MONITOREXIT = 0xc3; final static int WIDE = 0xc4; final static int MULTIANEWARRAY = 0xc5; final static int IFNULL = 0xc6; final static int IFNONNULL = 0xc7; final static int GOTO_W = 0xc8; final static int JSR_W = 0xc9; final static int BREAKPOINT = 0xca; /** final static int impdep1 = 0xfe;*/ final static int INVOKENATIVE = 0xfe; final static int IMPDEP2 = 0xff; }
[ "476093202@qq.com" ]
476093202@qq.com
16defb3e819ded5b65611a6ad15cdee7fe0a9d45
1c4bae9c9fc05a0396b325df1044281fcde88af1
/src/main/java/cn/northpark/flink/vehicleAPP/task/HandleRedisCron.java
fdaef0d26c00a2e8422421f000aed62ca06674b0
[]
no_license
yangle9567/bigdata
32d26d495761060c9997a065afe8205107955212
60d676f8cb0090056ab86fd16c6d8ba9584140c0
refs/heads/master
2022-12-16T20:39:19.104345
2022-09-29T07:08:03
2022-09-29T07:08:03
253,685,734
0
0
null
null
null
null
UTF-8
Java
false
false
3,437
java
package cn.northpark.flink.vehicleAPP.task; import cn.hutool.cron.CronUtil; import cn.hutool.cron.task.Task; import cn.northpark.flink.vehicleAPP.bean.GPSRealData; import cn.northpark.flink.util.KafkaString; import com.alibaba.fastjson.JSON; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import redis.clients.jedis.Jedis; import java.util.Date; import java.util.Map; import java.util.Objects; /** * @author bruce * @date 2022年07月01日 15:11:06 * 定时任务每分钟执行一次,从系统车辆上线集合的redis缓存中,根据score获取超过3分钟未上线的数据,生成一条消息发送到topic: json-vehicle-offline */ @Slf4j public class HandleRedisCron { //每1分钟 // private static String cronString = "0 0/1 * * * ? "; //每秒 private static String cronString = "0/30 * * * * ? "; private static String scheduleId; final String REDIS_PREFIX = "FLINK_RDF_GPS_REAL_DATA"; final Long TIME_LIMIT = 3 * 60 * 1000L; final String OFFLINE_TOPIC = "json-vehicle-offline"; public String execute() { String jobId = CronUtil.schedule(cronString, new Task() { @Override public void execute() { System.out.println("-------------------HandleRedisCron任务执行开始-------------------"); System.out.println(new Date()); //初始化 Jedis jedis = new Jedis("node1", 6379, 5000); jedis.auth("123456"); jedis.select(0); long nowTime = new Date().getTime(); try{ //todo 改为 获取超过3分钟未上线的数据 //定时任务每分钟执行一次,从系统车辆上线集合的redis缓存中,根据score获取超过3分钟未上线的数据 Map<String, String> stringMap = jedis.hgetAll(REDIS_PREFIX); for (Map.Entry<String, String> entry : stringMap.entrySet()) { System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue()); GPSRealData gpsRealData = JSON.parseObject(entry.getValue(), GPSRealData.class); if(Objects.nonNull(gpsRealData)){ Long sendTime = gpsRealData.getSendTime(); if(nowTime-sendTime>TIME_LIMIT){ //发送下线消息到生成一条消息发送到topic: json-vehicle-offline KafkaString.sendKafkaString(KafkaString.buildBasicKafkaProperty(),OFFLINE_TOPIC,entry.getValue()); } } } }finally { if(jedis!=null){ jedis.close(); } } System.out.println("-------------------HandleRedisCron任务执行结束-------------------"); } }); if (!StringUtils.isEmpty(jobId)) { scheduleId = jobId; return jobId; } else { return null; } } public void remove() { CronUtil.remove(scheduleId); } public static void main(String[] args) { HandleRedisCron m = new HandleRedisCron(); CronUtil.setMatchSecond(true); CronUtil.start(); m.execute(); } }
[ "13240807667@163.com" ]
13240807667@163.com
37ad308f405228bf7e06cb0ac40e2012f08f6bcc
95bba2c4c5f5406d9029b475ebf69f6b3ccb3555
/dubbo-learning/echo-server/src/main/java/com/general/server/api/EchoProvider.java
c0bfe6220c6490b9a7791d66ed41ef8c1b730fa4
[]
no_license
light-shadow/java-training
20f8bcb5041073562f5b479169f5dd6d60e541b7
f07bbe3ce7b630b9e9c63274d5482f4afc051060
refs/heads/master
2022-10-21T00:02:33.507436
2019-09-28T08:03:29
2019-09-28T08:03:29
193,010,352
0
0
null
2022-10-04T23:55:31
2019-06-21T01:36:50
Java
UTF-8
Java
false
false
949
java
package com.general.server.api; import com.alibaba.dubbo.config.ApplicationConfig; import com.alibaba.dubbo.config.RegistryConfig; import com.alibaba.dubbo.config.ServiceConfig; import com.general.api.EchoService; import com.general.server.EchoServiceApiImpl; import java.io.IOException; /** * @description: api方式 不依赖spring * @author: general * @version: 1.0 * @create: 2019-09-22 21:01 **/ public class EchoProvider { public static void main(String[] args) throws IOException { ServiceConfig<EchoService> service = new ServiceConfig<>(); service.setApplication(new ApplicationConfig("java-echo-provider")); service.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181")); service.setInterface(EchoService.class); service.setRef(new EchoServiceApiImpl()); service.export(); System.out.println("java-echo-provider is running"); System.in.read(); } }
[ "wangxuan8901@126.com" ]
wangxuan8901@126.com
66e05bb771d93ee949726bfd3e56a032ce3582e9
1b8ae41e4e43429ba6c21b49fdfa7312ddee23b3
/src/opencv-3.0.0-rc1/platforms/android/service/engine/src/org/opencv/engine3/MarketConnector.java
4e5f51acc560cbe47b6bf279c8edd05a476ec3aa
[ "BSD-3-Clause" ]
permissive
Technipire/Cpp
9f8476a944497b82ce425a3d9191acb74337a129
78d4c89385216865b9a9f475055fca1ff600d2a4
refs/heads/master
2021-05-01T16:31:45.977554
2017-04-03T00:02:01
2017-04-03T00:02:01
32,282,437
1
0
null
null
null
null
UTF-8
Java
false
false
3,710
java
package org.opencv.engine3; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.net.Uri; import android.util.Log; public class MarketConnector { protected static final String OpenCVPackageNamePreffix = "org.opencv.lib"; private static final String TAG = "OpenCVEngine/MarketConnector"; protected Context mContext; public MarketConnector(Context context) { mContext = context; } public String GetApplicationName(ApplicationInfo info) { return (String) info.loadLabel(mContext.getPackageManager()); } public boolean InstallAppFromMarket(String AppID) { boolean result = true; try { Intent intent = new Intent( Intent.ACTION_VIEW, Uri.parse("market://details?id=" + AppID) ); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); mContext.startActivity(intent); } catch(Exception e) { result = false; } return result; } public boolean RemoveAppFromMarket(String AppID, boolean wait) { boolean result = true; try { Intent intent = new Intent( Intent.ACTION_DELETE, Uri.parse("package:" + AppID) ); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); if (wait) { ((Activity)mContext).startActivityForResult(intent, 0); } else { mContext.startActivity(intent); } } catch(Exception e) { e.printStackTrace(); result = false; } return result; } public boolean CheckPackageInstalled(String AppID) { List<PackageInfo> Packages = mContext.getPackageManager().getInstalledPackages(PackageManager.GET_CONFIGURATIONS); Iterator<PackageInfo> it = Packages.iterator(); while(it.hasNext()) { PackageInfo CurrentPack = it.next(); if (CurrentPack.packageName == AppID) { return true; } } return false; } public PackageInfo[] GetInstalledOpenCVPackages() { List<PackageInfo> AllPackages = mContext.getPackageManager().getInstalledPackages(PackageManager.GET_CONFIGURATIONS); List<PackageInfo> OpenCVPackages = new ArrayList<PackageInfo>(); try { OpenCVPackages.add(mContext.getPackageManager().getPackageInfo("org.opencv.engine3", PackageManager.GET_CONFIGURATIONS)); } catch (NameNotFoundException e) { Log.e(TAG, "OpenCV Manager package info was not found!"); e.printStackTrace(); } Iterator<PackageInfo> it = AllPackages.iterator(); while(it.hasNext()) { PackageInfo CurrentPack = it.next(); if (CurrentPack.packageName.contains(OpenCVPackageNamePreffix)) { OpenCVPackages.add(CurrentPack); } } PackageInfo[] OpenCVPackagesArray = new PackageInfo[OpenCVPackages.size()]; it = OpenCVPackages.iterator(); int idx = 0; while(it.hasNext()) { OpenCVPackagesArray[idx] = it.next(); idx++; } return OpenCVPackagesArray; } }
[ "andyxian510@gmail.com" ]
andyxian510@gmail.com
1ee072db9d1c2105f67de9c0cd533f0983a393b6
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/spring-framework/2015/4/MatrixVariablesMapMethodArgumentResolverTests.java
6dabf42716311fd8ddf71b1b503465afe0a5b619
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
6,460
java
/* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.servlet.mvc.method.annotation; import java.lang.reflect.Method; import java.util.Arrays; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; import org.junit.Before; import org.junit.Test; import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.MatrixVariable; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.method.support.ModelAndViewContainer; import org.springframework.web.servlet.HandlerMapping; import static org.junit.Assert.*; /** * Test fixture with {@link MatrixVariableMethodArgumentResolver}. * * @author Rossen Stoyanchev */ public class MatrixVariablesMapMethodArgumentResolverTests { private MatrixVariableMapMethodArgumentResolver resolver; private MethodParameter paramString; private MethodParameter paramMap; private MethodParameter paramMultivalueMap; private MethodParameter paramMapForPathVar; private MethodParameter paramMapWithName; private ModelAndViewContainer mavContainer; private ServletWebRequest webRequest; private MockHttpServletRequest request; @Before public void setUp() throws Exception { this.resolver = new MatrixVariableMapMethodArgumentResolver(); Method method = getClass().getMethod("handle", String.class, Map.class, MultiValueMap.class, MultiValueMap.class, Map.class); this.paramString = new MethodParameter(method, 0); this.paramMap = new MethodParameter(method, 1); this.paramMultivalueMap = new MethodParameter(method, 2); this.paramMapForPathVar = new MethodParameter(method, 3); this.paramMapWithName = new MethodParameter(method, 4); this.mavContainer = new ModelAndViewContainer(); this.request = new MockHttpServletRequest(); this.webRequest = new ServletWebRequest(request, new MockHttpServletResponse()); Map<String, MultiValueMap<String, String>> params = new LinkedHashMap<String, MultiValueMap<String, String>>(); this.request.setAttribute(HandlerMapping.MATRIX_VARIABLES_ATTRIBUTE, params); } @Test public void supportsParameter() { assertFalse(resolver.supportsParameter(paramString)); assertTrue(resolver.supportsParameter(paramMap)); assertTrue(resolver.supportsParameter(paramMultivalueMap)); assertTrue(resolver.supportsParameter(paramMapForPathVar)); assertFalse(resolver.supportsParameter(paramMapWithName)); } @Test public void resolveArgument() throws Exception { MultiValueMap<String, String> params = getMatrixVariables("cars"); params.add("colors", "red"); params.add("colors", "green"); params.add("colors", "blue"); params.add("year", "2012"); @SuppressWarnings("unchecked") Map<String, String> map = (Map<String, String>) this.resolver.resolveArgument( this.paramMap, this.mavContainer, this.webRequest, null); assertEquals(Arrays.asList("red", "green", "blue"), map.get("colors")); @SuppressWarnings("unchecked") MultiValueMap<String, String> multivalueMap = (MultiValueMap<String, String>) this.resolver.resolveArgument( this.paramMultivalueMap, this.mavContainer, this.webRequest, null); assertEquals(Arrays.asList("red", "green", "blue"), multivalueMap.get("colors")); } @Test public void resolveArgumentPathVariable() throws Exception { MultiValueMap<String, String> params1 = getMatrixVariables("cars"); params1.add("colors", "red"); params1.add("colors", "purple"); MultiValueMap<String, String> params2 = getMatrixVariables("planes"); params2.add("colors", "yellow"); params2.add("colors", "orange"); @SuppressWarnings("unchecked") Map<String, String> mapForPathVar = (Map<String, String>) this.resolver.resolveArgument( this.paramMapForPathVar, this.mavContainer, this.webRequest, null); assertEquals(Arrays.asList("red", "purple"), mapForPathVar.get("colors")); @SuppressWarnings("unchecked") Map<String, String> mapAll = (Map<String, String>) this.resolver.resolveArgument( this.paramMap, this.mavContainer, this.webRequest, null); assertEquals(Arrays.asList("red", "purple", "yellow", "orange"), mapAll.get("colors")); } @Test public void resolveArgumentNoParams() throws Exception { @SuppressWarnings("unchecked") Map<String, String> map = (Map<String, String>) this.resolver.resolveArgument( this.paramMap, this.mavContainer, this.webRequest, null); assertEquals(Collections.emptyMap(), map); } @Test public void resolveArgumentNoMatch() throws Exception { MultiValueMap<String, String> params2 = getMatrixVariables("planes"); params2.add("colors", "yellow"); params2.add("colors", "orange"); @SuppressWarnings("unchecked") Map<String, String> map = (Map<String, String>) this.resolver.resolveArgument( this.paramMapForPathVar, this.mavContainer, this.webRequest, null); assertEquals(Collections.emptyMap(), map); } @SuppressWarnings("unchecked") private MultiValueMap<String, String> getMatrixVariables(String pathVarName) { Map<String, MultiValueMap<String, String>> matrixVariables = (Map<String, MultiValueMap<String, String>>) this.request.getAttribute( HandlerMapping.MATRIX_VARIABLES_ATTRIBUTE); MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(); matrixVariables.put(pathVarName, params); return params; } public void handle( String stringArg, @MatrixVariable Map<String, String> map, @MatrixVariable MultiValueMap<String, String> multivalueMap, @MatrixVariable(pathVar="cars") MultiValueMap<String, String> mapForPathVar, @MatrixVariable("name") Map<String, String> mapWithName) { } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
8dd072f9d54d21f22de94eaec5551511800160bf
cd4b1fb7aa3ffb82224cc0bed10849fa199fb373
/SpringBatch3/src/com/spring/beanpostprocessor/PostProcessorEx.java
54caa798320a92e144aab23712807e3f2590151b
[]
no_license
rajlaxman2000/javatraningcourse
896640f877aa249d3554a4519fab3d89c1f4433a
e738aef7b8a17c16063f37d5fd83dcc86757cb5d
refs/heads/master
2020-06-04T12:47:54.330246
2015-05-16T19:47:21
2015-05-16T19:47:21
35,737,619
0
1
null
null
null
null
UTF-8
Java
false
false
692
java
package com.spring.beanpostprocessor; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanPostProcessor; public class PostProcessorEx implements BeanPostProcessor{ @Override public Object postProcessBeforeInitialization(Object beanObj, String beanName) throws BeansException { System.out.println("This is BeforeInitialization method with bean name:: "+beanName); return beanObj; } @Override public Object postProcessAfterInitialization(Object beanObj, String beanName) throws BeansException { System.out.println("This is AfterInitialization method with bean name:: "+beanName); return beanObj; } }
[ "rajlaxmaniitg@gmail.com@68febd8b-95e1-6aca-4479-cf943fe5d08d" ]
rajlaxmaniitg@gmail.com@68febd8b-95e1-6aca-4479-cf943fe5d08d
6658c8b13db4cbfe846ef7004c9c54e05067b580
e01d1ee90f3ef976d026956c750cb5096dbd9a35
/cupoj_core-orm/src/main/java/com/cupacm/oj/dao/VjudgeRecordExample.java
7c3fcc80913cdfdbe869ab8285da3eb8cb66ca7f
[]
no_license
ryanlee2014/cupoj-core
1caf5377fda9e1961570aaa266239107c4759b13
c815559f9db4eb7fb9695b8e4e3d0220715ec838
refs/heads/master
2023-01-27T11:01:04.601487
2020-11-29T20:05:55
2020-11-29T20:05:55
311,055,104
1
0
null
null
null
null
UTF-8
Java
false
false
28,161
java
package com.cupacm.oj.dao; import java.util.ArrayList; import java.util.Date; import java.util.List; public class VjudgeRecordExample { /** * This field was generated by MyBatis Generator. * This field corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. * This field corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. * This field corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ protected List<Criteria> oredCriteria; /** * This method was generated by MyBatis Generator. * This method corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ public VjudgeRecordExample() { oredCriteria = new ArrayList<Criteria>(); } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ public String getOrderByClause() { return orderByClause; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ public void setDistinct(boolean distinct) { this.distinct = distinct; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ public boolean isDistinct() { return distinct; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ public List<Criteria> getOredCriteria() { return oredCriteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ public void or(Criteria criteria) { oredCriteria.add(criteria); } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } /** * This class was generated by MyBatis Generator. * This class corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ 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 andUserIdIsNull() { addCriterion("user_id is null"); return (Criteria) this; } public Criteria andUserIdIsNotNull() { addCriterion("user_id is not null"); return (Criteria) this; } public Criteria andUserIdEqualTo(String value) { addCriterion("user_id =", value, "userId"); return (Criteria) this; } public Criteria andUserIdNotEqualTo(String value) { addCriterion("user_id <>", value, "userId"); return (Criteria) this; } public Criteria andUserIdGreaterThan(String value) { addCriterion("user_id >", value, "userId"); return (Criteria) this; } public Criteria andUserIdGreaterThanOrEqualTo(String value) { addCriterion("user_id >=", value, "userId"); return (Criteria) this; } public Criteria andUserIdLessThan(String value) { addCriterion("user_id <", value, "userId"); return (Criteria) this; } public Criteria andUserIdLessThanOrEqualTo(String value) { addCriterion("user_id <=", value, "userId"); return (Criteria) this; } public Criteria andUserIdLike(String value) { addCriterion("user_id like", value, "userId"); return (Criteria) this; } public Criteria andUserIdNotLike(String value) { addCriterion("user_id not like", value, "userId"); return (Criteria) this; } public Criteria andUserIdIn(List<String> values) { addCriterion("user_id in", values, "userId"); return (Criteria) this; } public Criteria andUserIdNotIn(List<String> values) { addCriterion("user_id not in", values, "userId"); return (Criteria) this; } public Criteria andUserIdBetween(String value1, String value2) { addCriterion("user_id between", value1, value2, "userId"); return (Criteria) this; } public Criteria andUserIdNotBetween(String value1, String value2) { addCriterion("user_id not between", value1, value2, "userId"); return (Criteria) this; } public Criteria andOjNameIsNull() { addCriterion("oj_name is null"); return (Criteria) this; } public Criteria andOjNameIsNotNull() { addCriterion("oj_name is not null"); return (Criteria) this; } public Criteria andOjNameEqualTo(String value) { addCriterion("oj_name =", value, "ojName"); return (Criteria) this; } public Criteria andOjNameNotEqualTo(String value) { addCriterion("oj_name <>", value, "ojName"); return (Criteria) this; } public Criteria andOjNameGreaterThan(String value) { addCriterion("oj_name >", value, "ojName"); return (Criteria) this; } public Criteria andOjNameGreaterThanOrEqualTo(String value) { addCriterion("oj_name >=", value, "ojName"); return (Criteria) this; } public Criteria andOjNameLessThan(String value) { addCriterion("oj_name <", value, "ojName"); return (Criteria) this; } public Criteria andOjNameLessThanOrEqualTo(String value) { addCriterion("oj_name <=", value, "ojName"); return (Criteria) this; } public Criteria andOjNameLike(String value) { addCriterion("oj_name like", value, "ojName"); return (Criteria) this; } public Criteria andOjNameNotLike(String value) { addCriterion("oj_name not like", value, "ojName"); return (Criteria) this; } public Criteria andOjNameIn(List<String> values) { addCriterion("oj_name in", values, "ojName"); return (Criteria) this; } public Criteria andOjNameNotIn(List<String> values) { addCriterion("oj_name not in", values, "ojName"); return (Criteria) this; } public Criteria andOjNameBetween(String value1, String value2) { addCriterion("oj_name between", value1, value2, "ojName"); return (Criteria) this; } public Criteria andOjNameNotBetween(String value1, String value2) { addCriterion("oj_name not between", value1, value2, "ojName"); return (Criteria) this; } public Criteria andProblemIdIsNull() { addCriterion("problem_id is null"); return (Criteria) this; } public Criteria andProblemIdIsNotNull() { addCriterion("problem_id is not null"); return (Criteria) this; } public Criteria andProblemIdEqualTo(String value) { addCriterion("problem_id =", value, "problemId"); return (Criteria) this; } public Criteria andProblemIdNotEqualTo(String value) { addCriterion("problem_id <>", value, "problemId"); return (Criteria) this; } public Criteria andProblemIdGreaterThan(String value) { addCriterion("problem_id >", value, "problemId"); return (Criteria) this; } public Criteria andProblemIdGreaterThanOrEqualTo(String value) { addCriterion("problem_id >=", value, "problemId"); return (Criteria) this; } public Criteria andProblemIdLessThan(String value) { addCriterion("problem_id <", value, "problemId"); return (Criteria) this; } public Criteria andProblemIdLessThanOrEqualTo(String value) { addCriterion("problem_id <=", value, "problemId"); return (Criteria) this; } public Criteria andProblemIdLike(String value) { addCriterion("problem_id like", value, "problemId"); return (Criteria) this; } public Criteria andProblemIdNotLike(String value) { addCriterion("problem_id not like", value, "problemId"); return (Criteria) this; } public Criteria andProblemIdIn(List<String> values) { addCriterion("problem_id in", values, "problemId"); return (Criteria) this; } public Criteria andProblemIdNotIn(List<String> values) { addCriterion("problem_id not in", values, "problemId"); return (Criteria) this; } public Criteria andProblemIdBetween(String value1, String value2) { addCriterion("problem_id between", value1, value2, "problemId"); return (Criteria) this; } public Criteria andProblemIdNotBetween(String value1, String value2) { addCriterion("problem_id not between", value1, value2, "problemId"); return (Criteria) this; } public Criteria andTimeIsNull() { addCriterion("time is null"); return (Criteria) this; } public Criteria andTimeIsNotNull() { addCriterion("time is not null"); return (Criteria) this; } public Criteria andTimeEqualTo(Date value) { addCriterion("time =", value, "time"); return (Criteria) this; } public Criteria andTimeNotEqualTo(Date value) { addCriterion("time <>", value, "time"); return (Criteria) this; } public Criteria andTimeGreaterThan(Date value) { addCriterion("time >", value, "time"); return (Criteria) this; } public Criteria andTimeGreaterThanOrEqualTo(Date value) { addCriterion("time >=", value, "time"); return (Criteria) this; } public Criteria andTimeLessThan(Date value) { addCriterion("time <", value, "time"); return (Criteria) this; } public Criteria andTimeLessThanOrEqualTo(Date value) { addCriterion("time <=", value, "time"); return (Criteria) this; } public Criteria andTimeIn(List<Date> values) { addCriterion("time in", values, "time"); return (Criteria) this; } public Criteria andTimeNotIn(List<Date> values) { addCriterion("time not in", values, "time"); return (Criteria) this; } public Criteria andTimeBetween(Date value1, Date value2) { addCriterion("time between", value1, value2, "time"); return (Criteria) this; } public Criteria andTimeNotBetween(Date value1, Date value2) { addCriterion("time not between", value1, value2, "time"); return (Criteria) this; } public Criteria andResultIsNull() { addCriterion("result is null"); return (Criteria) this; } public Criteria andResultIsNotNull() { addCriterion("result is not null"); return (Criteria) this; } public Criteria andResultEqualTo(Integer value) { addCriterion("result =", value, "result"); return (Criteria) this; } public Criteria andResultNotEqualTo(Integer value) { addCriterion("result <>", value, "result"); return (Criteria) this; } public Criteria andResultGreaterThan(Integer value) { addCriterion("result >", value, "result"); return (Criteria) this; } public Criteria andResultGreaterThanOrEqualTo(Integer value) { addCriterion("result >=", value, "result"); return (Criteria) this; } public Criteria andResultLessThan(Integer value) { addCriterion("result <", value, "result"); return (Criteria) this; } public Criteria andResultLessThanOrEqualTo(Integer value) { addCriterion("result <=", value, "result"); return (Criteria) this; } public Criteria andResultIn(List<Integer> values) { addCriterion("result in", values, "result"); return (Criteria) this; } public Criteria andResultNotIn(List<Integer> values) { addCriterion("result not in", values, "result"); return (Criteria) this; } public Criteria andResultBetween(Integer value1, Integer value2) { addCriterion("result between", value1, value2, "result"); return (Criteria) this; } public Criteria andResultNotBetween(Integer value1, Integer value2) { addCriterion("result not between", value1, value2, "result"); return (Criteria) this; } public Criteria andTimeRunningIsNull() { addCriterion("time_running is null"); return (Criteria) this; } public Criteria andTimeRunningIsNotNull() { addCriterion("time_running is not null"); return (Criteria) this; } public Criteria andTimeRunningEqualTo(Integer value) { addCriterion("time_running =", value, "timeRunning"); return (Criteria) this; } public Criteria andTimeRunningNotEqualTo(Integer value) { addCriterion("time_running <>", value, "timeRunning"); return (Criteria) this; } public Criteria andTimeRunningGreaterThan(Integer value) { addCriterion("time_running >", value, "timeRunning"); return (Criteria) this; } public Criteria andTimeRunningGreaterThanOrEqualTo(Integer value) { addCriterion("time_running >=", value, "timeRunning"); return (Criteria) this; } public Criteria andTimeRunningLessThan(Integer value) { addCriterion("time_running <", value, "timeRunning"); return (Criteria) this; } public Criteria andTimeRunningLessThanOrEqualTo(Integer value) { addCriterion("time_running <=", value, "timeRunning"); return (Criteria) this; } public Criteria andTimeRunningIn(List<Integer> values) { addCriterion("time_running in", values, "timeRunning"); return (Criteria) this; } public Criteria andTimeRunningNotIn(List<Integer> values) { addCriterion("time_running not in", values, "timeRunning"); return (Criteria) this; } public Criteria andTimeRunningBetween(Integer value1, Integer value2) { addCriterion("time_running between", value1, value2, "timeRunning"); return (Criteria) this; } public Criteria andTimeRunningNotBetween(Integer value1, Integer value2) { addCriterion("time_running not between", value1, value2, "timeRunning"); return (Criteria) this; } public Criteria andMemoryIsNull() { addCriterion("memory is null"); return (Criteria) this; } public Criteria andMemoryIsNotNull() { addCriterion("memory is not null"); return (Criteria) this; } public Criteria andMemoryEqualTo(Integer value) { addCriterion("memory =", value, "memory"); return (Criteria) this; } public Criteria andMemoryNotEqualTo(Integer value) { addCriterion("memory <>", value, "memory"); return (Criteria) this; } public Criteria andMemoryGreaterThan(Integer value) { addCriterion("memory >", value, "memory"); return (Criteria) this; } public Criteria andMemoryGreaterThanOrEqualTo(Integer value) { addCriterion("memory >=", value, "memory"); return (Criteria) this; } public Criteria andMemoryLessThan(Integer value) { addCriterion("memory <", value, "memory"); return (Criteria) this; } public Criteria andMemoryLessThanOrEqualTo(Integer value) { addCriterion("memory <=", value, "memory"); return (Criteria) this; } public Criteria andMemoryIn(List<Integer> values) { addCriterion("memory in", values, "memory"); return (Criteria) this; } public Criteria andMemoryNotIn(List<Integer> values) { addCriterion("memory not in", values, "memory"); return (Criteria) this; } public Criteria andMemoryBetween(Integer value1, Integer value2) { addCriterion("memory between", value1, value2, "memory"); return (Criteria) this; } public Criteria andMemoryNotBetween(Integer value1, Integer value2) { addCriterion("memory not between", value1, value2, "memory"); return (Criteria) this; } public Criteria andCodeLengthIsNull() { addCriterion("code_length is null"); return (Criteria) this; } public Criteria andCodeLengthIsNotNull() { addCriterion("code_length is not null"); return (Criteria) this; } public Criteria andCodeLengthEqualTo(Integer value) { addCriterion("code_length =", value, "codeLength"); return (Criteria) this; } public Criteria andCodeLengthNotEqualTo(Integer value) { addCriterion("code_length <>", value, "codeLength"); return (Criteria) this; } public Criteria andCodeLengthGreaterThan(Integer value) { addCriterion("code_length >", value, "codeLength"); return (Criteria) this; } public Criteria andCodeLengthGreaterThanOrEqualTo(Integer value) { addCriterion("code_length >=", value, "codeLength"); return (Criteria) this; } public Criteria andCodeLengthLessThan(Integer value) { addCriterion("code_length <", value, "codeLength"); return (Criteria) this; } public Criteria andCodeLengthLessThanOrEqualTo(Integer value) { addCriterion("code_length <=", value, "codeLength"); return (Criteria) this; } public Criteria andCodeLengthIn(List<Integer> values) { addCriterion("code_length in", values, "codeLength"); return (Criteria) this; } public Criteria andCodeLengthNotIn(List<Integer> values) { addCriterion("code_length not in", values, "codeLength"); return (Criteria) this; } public Criteria andCodeLengthBetween(Integer value1, Integer value2) { addCriterion("code_length between", value1, value2, "codeLength"); return (Criteria) this; } public Criteria andCodeLengthNotBetween(Integer value1, Integer value2) { addCriterion("code_length not between", value1, value2, "codeLength"); return (Criteria) this; } public Criteria andLanguageIsNull() { addCriterion("language is null"); return (Criteria) this; } public Criteria andLanguageIsNotNull() { addCriterion("language is not null"); return (Criteria) this; } public Criteria andLanguageEqualTo(String value) { addCriterion("language =", value, "language"); return (Criteria) this; } public Criteria andLanguageNotEqualTo(String value) { addCriterion("language <>", value, "language"); return (Criteria) this; } public Criteria andLanguageGreaterThan(String value) { addCriterion("language >", value, "language"); return (Criteria) this; } public Criteria andLanguageGreaterThanOrEqualTo(String value) { addCriterion("language >=", value, "language"); return (Criteria) this; } public Criteria andLanguageLessThan(String value) { addCriterion("language <", value, "language"); return (Criteria) this; } public Criteria andLanguageLessThanOrEqualTo(String value) { addCriterion("language <=", value, "language"); return (Criteria) this; } public Criteria andLanguageLike(String value) { addCriterion("language like", value, "language"); return (Criteria) this; } public Criteria andLanguageNotLike(String value) { addCriterion("language not like", value, "language"); return (Criteria) this; } public Criteria andLanguageIn(List<String> values) { addCriterion("language in", values, "language"); return (Criteria) this; } public Criteria andLanguageNotIn(List<String> values) { addCriterion("language not in", values, "language"); return (Criteria) this; } public Criteria andLanguageBetween(String value1, String value2) { addCriterion("language between", value1, value2, "language"); return (Criteria) this; } public Criteria andLanguageNotBetween(String value1, String value2) { addCriterion("language not between", value1, value2, "language"); return (Criteria) this; } } /** * This class was generated by MyBatis Generator. * This class corresponds to the database table vjudge_record * * @mbg.generated do_not_delete_during_merge Sun Nov 08 15:06:46 CST 2020 */ public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } /** * This class was generated by MyBatis Generator. * This class corresponds to the database table vjudge_record * * @mbg.generated Sun Nov 08 15:06:46 CST 2020 */ 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); } } }
[ "gxlhybh@gmail.com" ]
gxlhybh@gmail.com
6462e1874aab03953acb15b70c5d68ba373a499a
a6f9e9dccef5658673382a1645bd1c1cb8aacaa6
/src/main/java/com/pbhatna/threads/ThreadWaitAndNotify.java
a7821375f5e3ce8c3e974fd72c0114e5dbe2c330
[]
no_license
Coalminemerc8288/QuickRef-Java
a382e26a5ac32e55319616b2a68e601ec33fb2cd
942666d8d97150c33e64f79fb9cf3de5a1bf5487
refs/heads/master
2021-05-16T18:02:05.589185
2017-09-11T13:52:07
2017-09-11T13:52:07
103,133,392
0
0
null
null
null
null
UTF-8
Java
false
false
516
java
package com.pbhatna.threads; class Calculator extends Thread { long sum; public void run() { synchronized (this) { for (int i = 0; i < 1000000; i++) { sum += i;//499999500000 } notify(); } } } public class ThreadWaitAndNotify { public static void main(String[] args) { Calculator thread = new Calculator(); thread.start(); synchronized (thread) { try { thread.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } System.out.println(thread.sum); } }
[ "coalminemerc8288@gmail.com" ]
coalminemerc8288@gmail.com
69795dd313e5ea0f9976519459c8cbb8ddad9e3f
0231446b7d153cf20030d0e43b4800829136853a
/1.JavaSyntax/src/com/javarush/task/pro/task07/task0714/Car.java
27df243f766f4a7764cf963c385529f3c7749ea2
[]
no_license
parabatareek/JavaRushTasks
b1ec3f4de0539056b2c9020a5b07e08976bd31e1
4a120b1abb10c24d337217fec794c306654490c4
refs/heads/master
2023-09-01T11:38:31.172212
2023-08-25T08:03:31
2023-08-25T08:03:31
223,151,100
0
0
null
null
null
null
UTF-8
Java
false
false
178
java
package com.javarush.task.pro.task07.task0714; /* Наследование переменных */ public class Car extends Vehicle { int wheelCount; double weight; }
[ "gavrosh07@gmail.com" ]
gavrosh07@gmail.com
204f68b2a189ca8ab1cf2a7405adf6cc0f41ecde
2688963b01f097a0c5c3f9a6663e8b9200f00491
/JavaPremiere/src/javapremiere/Main.java
70e785bcfc71ee8e48d8070248bb7d14513be2d7
[]
no_license
electroms/Exercices.Cours.Java
801042b71975e94afbc25030df0bdbebc91b32c5
5b0da16d98df258760379be510a48f054f84ac73
refs/heads/master
2022-08-31T00:30:32.840588
2020-05-27T13:58:22
2020-05-27T13:58:22
267,088,797
1
0
null
null
null
null
UTF-8
Java
false
false
3,828
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 javapremiere; /** * Premiere instanciation de la class Point et utilisation des methodes de Point * Utilisation du constructeur par defaut suivi d'un constructeur avec parametre * * @author Pierre-Henry Barge */ public class Main { public static void main1(String[] args) { Point p = null; p = new Point(); p.setX(10); p.setY(12); System.out.println(p.distance()); Point p1 = new Point(10, 12); Point p2 = new Point(); System.out.println("Point constructeur vide valeur par defaut de x " + p2.getX() + " de y " + p2.getY()); } //**************************passage par valeur et par référence************************ public void passageValeur(int x) { x = x + 10; } public void appelPassageValeur() { int y = 20; passageValeur(y); System.out.println("valeur de y " + y); } public void passageReference(Point p) { p.setX(10); } /** * main exemple pour passage valeur passage reference * * @param args */ public static void main2(String[] args) { Main m = new Main(); m.appelPassageValeur(); Point p1 = new Point(5, 10); m.passageReference(p1); System.out.println("Valeur de l'attribut de x du point passé : " + p1.getX()); } //*************************************************************************************** /** * main pour static * * @param args */ public static void main(String[] args) { Chat[] chats = new Chat[10]; Main.initialiserTableauChat(chats); Chat chef = leaderChat(chats); System.out.println("Affichage du chef des chats"); //System.out.println(chef); Main.afficherTableauChat(chats); System.out.println("Affichage du chef a partir de l'indice"); //afficher le chef int index = chats[((int) Math.random() * 10)].getIndexChefEntier(); System.out.println(chats[index]); chats[((int) Math.random() * 10)].affichageChef(); } //***************************************************************************************** //utilisation du mot cle static sur une methode : //si elle est public elle sera accessible par toutes clases en la prefixant du nom de la classe dans laquelle elle se trouve : Main.initialiserTableauChat /** * methode de classe initialisation du tableau avec 10 instances de Chat * valeur parametres farfelus * * @param chats */ private static void initialiserTableauChat(Chat[] chats) { for (int i = 0; i < 10; i++) { Chat c = new Chat("couleur" + i, 10 + i, "taille" + i); chats[i] = c; } } /** * affichage sur la console les chats du tableau Chat * * @param chats */ private static void afficherTableauChat(Chat[] chats) { for (Chat c : chats) { System.out.println(c); } } private static Chat leaderChat(Chat[] chats) { double alea = Math.random(); double indice = alea * 10; int indiceT = (int) indice; Chat c = chats[indiceT]; c.setIndexChef(true); //information de chaque chats de l'indice du chef for (Chat chat : chats) { chat.setIndexChefEntier(indiceT); } //attribuer la charge de chef directement sur l'attribut static chef Chat.chef = c; return c; } }
[ "electroms@users.noreply.github.com" ]
electroms@users.noreply.github.com
e494a894db76fcede048adbb0a3bdbd5ff53c5ab
b733c258761e7d91a7ef0e15ca0e01427618dc33
/cards/src/main/java/org/rnd/jmagic/cards/MentalAgony.java
19c22a87ed8fa2f55e90789d2e2031d1635d3cab
[]
no_license
jmagicdev/jmagic
d43aa3d2288f46a5fa950152486235614c6783e6
40e573f8e6d1cf42603fd05928f42e7080ce0f0d
refs/heads/master
2021-01-20T06:57:51.007411
2014-10-22T03:03:34
2014-10-22T03:03:34
9,589,102
2
0
null
null
null
null
UTF-8
Java
false
false
634
java
package org.rnd.jmagic.cards; import static org.rnd.jmagic.Convenience.*; import org.rnd.jmagic.engine.*; import org.rnd.jmagic.engine.generators.*; @Name("Mental Agony") @Types({Type.SORCERY}) @ManaCost("3B") @ColorIdentity({Color.BLACK}) public final class MentalAgony extends Card { public MentalAgony(GameState state) { super(state); // Target player discards two cards and loses 2 life. SetGenerator target = targetedBy(this.addTarget(Players.instance(), "target player")); this.addEffect(discardCards(target, 2, "Target player discards two cards")); this.addEffect(loseLife(target, 2, "and loses 2 life.")); } }
[ "robyter@gmail" ]
robyter@gmail
56a88f9d13ea58df287a5a281ff90df1396c6250
3618ffb2d61c4058c9136139257341bd60e2ccac
/Consonants.java
f3a319fe38b04fb833d08f6c9465761715f66d5d
[]
no_license
KSM479/String
833cf32c0c5d41acb89c09d025adae643d2d060e
50e8f826f774c38456aa7abd3a781ebfd4c69272
refs/heads/master
2022-12-21T23:34:10.912209
2020-09-23T00:11:24
2020-09-23T00:11:24
296,108,598
0
0
null
null
null
null
UTF-8
Java
false
false
879
java
package com.flexon.javabasics; import java.util.Scanner; public class Consonants { public static void main(String[] args) { Scanner sc= new Scanner(System.in); System.out.println("Enter the input here: "); String str = sc.nextLine(); Integer count = 0; String strlowercase = str.toLowerCase(); String newstr = ""; for (int i = 0; i <str.length(); i++) { if (strlowercase.charAt(i) == 'a' || strlowercase.charAt(i) == 'e' ||strlowercase.charAt(i) == 'i' || strlowercase.charAt(i) == 'o' || strlowercase.charAt(i) == 'u' || strlowercase.charAt(i) == ' ') { newstr = newstr + str.charAt(i); } else if(strlowercase.charAt(i) >='a' && strlowercase.charAt(i) <='z') { count = count + 1; newstr = newstr + '*'; } } System.out.println("The number of Consonants in the given String are: " + count); System.out.println(newstr); } }
[ "kalpan.mehta@gmail.com" ]
kalpan.mehta@gmail.com
d2f82fa3445702a7fc87af9a62394136c2988ced
b1f4916db97567c85affdf2f7222d3fe4998ff83
/app/src/main/java/com/ewintory/udacity/popularmovies/dagger/ApiModule.java
a19ff55cec7e41553b62f42dac801141ef08b95c
[]
no_license
subramanie/PopularMovies_Stage_1
18bdb819e86c54e1181b6d9d6475b87ca3e77ad9
02d3004aafeb468336fa197a8bcd8f5e706046a8
refs/heads/master
2021-01-10T03:04:33.987669
2015-12-28T19:51:40
2015-12-28T19:51:40
48,705,819
0
0
null
null
null
null
UTF-8
Java
false
false
1,618
java
package com.ewintory.udacity.popularmovies.dagger; import com.ewintory.udacity.popularmovies.BuildConfig; import com.ewintory.udacity.popularmovies.data.service.MoviesService; import com.google.gson.Gson; import com.squareup.okhttp.OkHttpClient; import javax.inject.Singleton; import dagger.Module; import dagger.Provides; import retrofit.Endpoint; import retrofit.Endpoints; import retrofit.RequestInterceptor; import retrofit.RestAdapter; import retrofit.client.OkClient; import retrofit.converter.GsonConverter; @Module( complete = false, library = true ) public final class ApiModule { public static final String MOVIE_DB_API_URL = "http://api.themoviedb.org/3"; @Provides @Singleton Endpoint provideEndpoint() { return Endpoints.newFixedEndpoint(MOVIE_DB_API_URL); } @Provides @Singleton RestAdapter provideRestAdapter(Endpoint endpoint, OkHttpClient client, Gson gson) { return new RestAdapter.Builder() .setClient(new OkClient(client)) .setEndpoint(endpoint) .setLogLevel(RestAdapter.LogLevel.FULL) .setRequestInterceptor(new RequestInterceptor() { @Override public void intercept(RequestFacade request) { request.addQueryParam("api_key", BuildConfig.MOVIE_DB_API_KEY); } }) .setConverter(new GsonConverter(gson)) .build(); } @Provides @Singleton MoviesService provideMoviesService(RestAdapter restAdapter) { return restAdapter.create(MoviesService.class); } }
[ "subramani.ethiraj@gmail.com" ]
subramani.ethiraj@gmail.com
6b9791b6b42f3fb3a558d687464429d3853f3603
b8f81e36c565978a3b0aaf5d028ffda68b030c71
/modules/flowable-camel/src/test/java/org/flowable/camel/AsyncPingTest.java
0b5df94c07d8972b3c350a61e18cc12b3f54b7e4
[ "Apache-2.0" ]
permissive
himiraj-dbox/FlowableSourceCode
14c788cf627d0a03bfd79db189579c29c97f7bbf
4345ef7c8377c5c41ac4262753b87a76f445ad85
refs/heads/main
2023-06-20T18:05:01.275529
2021-07-21T08:29:49
2021-07-21T08:29:49
388,039,602
0
0
null
null
null
null
UTF-8
Java
false
false
3,044
java
/* 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.flowable.camel; import java.util.List; import org.apache.camel.CamelContext; import org.apache.camel.Route; import org.apache.camel.builder.RouteBuilder; import org.flowable.engine.RuntimeService; import org.flowable.engine.runtime.Execution; import org.flowable.engine.runtime.ProcessInstance; import org.flowable.engine.test.Deployment; import org.flowable.spring.impl.test.SpringFlowableTestCase; import org.junit.Assert; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; /** * @author Saeid Mirzaei */ @Tag("camel") @ContextConfiguration("classpath:generic-camel-flowable-context.xml") public class AsyncPingTest extends SpringFlowableTestCase { @Autowired protected CamelContext camelContext; @Autowired protected RuntimeService runtimeService; @BeforeEach public void setUp() throws Exception { camelContext.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { from("flowable:asyncPingProcess:serviceAsyncPing").to("seda:continueAsync"); from("seda:continueAsync").to("flowable:asyncPingProcess:receiveAsyncPing"); } }); } @AfterEach public void tearDown() throws Exception { List<Route> routes = camelContext.getRoutes(); for (Route r : routes) { camelContext.stopRoute(r.getId()); camelContext.removeRoute(r.getId()); } } @Test @Deployment(resources = { "process/asyncPing.bpmn20.xml" }) public void testRunProcess() throws Exception { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("asyncPingProcess"); List<Execution> executionList = runtimeService.createExecutionQuery().list(); Assert.assertEquals(2, executionList.size()); managementService.executeJob(managementService.createJobQuery().processInstanceId(processInstance.getId()).singleResult().getId()); Thread.sleep(1500); executionList = runtimeService.createExecutionQuery().list(); Assert.assertEquals(0, executionList.size()); Assert.assertEquals(0, runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).count()); } }
[ "himiraj@gmail.com" ]
himiraj@gmail.com
e68d72d7ca33da458d04780f1fde3ee7350035c4
5b9a13831a1eae30e395578341ef629e8e73d62b
/app/src/main/java/com/yts/tsdiet/bindingAdapter/TextBindingAdapter.java
b4c55171e0f0c76c896fea5df73ce987826e0db3
[]
no_license
YunTaeSik/TsDiet
9f2f52ecfc73d156f4088ee38677b1c5f36bc4f6
f4ec544c6e18038a86029216abc2bc8c0da636d8
refs/heads/master
2020-12-18T18:28:28.839287
2020-01-22T02:37:44
2020-01-22T02:37:44
235,484,288
0
0
null
null
null
null
UTF-8
Java
false
false
7,653
java
package com.yts.tsdiet.bindingAdapter; import android.content.Context; import android.widget.TextView; import com.yts.tsdiet.R; import com.yts.tsdiet.data.model.Record; import com.yts.tsdiet.data.model.RecordFood; import com.yts.tsdiet.utils.DateFormat; import com.yts.tsdiet.utils.Type; import com.yts.tsdiet.utils.ValueFormat; import java.text.DecimalFormat; import java.util.Calendar; import java.util.GregorianCalendar; import androidx.databinding.BindingAdapter; public class TextBindingAdapter { @BindingAdapter({"setWeightText"}) public static void setWeightText(TextView view, double value) { try { String text = String.valueOf(value); view.setText(text); } catch (Exception e) { e.printStackTrace(); } } @BindingAdapter({"setText"}) public static void setText(TextView view, double value) { try { String text = ValueFormat.format(value); view.setText(text); } catch (Exception e) { e.printStackTrace(); } } @BindingAdapter({"setKcalText"}) public static void setKcalText(TextView view, double value) { try { String text = "(" + ValueFormat.format(value) + "kcal)"; view.setText(text); } catch (Exception e) { e.printStackTrace(); } } @BindingAdapter({"setGoalText"}) public static void setGoalText(TextView view, float value) { try { String text = String.valueOf(value); view.setText(text); } catch (Exception e) { e.printStackTrace(); } } @BindingAdapter({"setDateRangeText"}) public static void setDateRangeText(TextView view, Integer typeInteger) { Context context = view.getContext(); int type = typeInteger != null ? typeInteger : 1; String text; switch (type) { case 0: text = context.getString(R.string.this_month); break; case 1: text = context.getString(R.string.this_year); break; case 2: text = context.getString(R.string.all); break; default: text = context.getString(R.string.this_year); break; } view.setText(text); } @BindingAdapter({"setKindText"}) public static void setKindText(TextView view, Integer typeInteger) { Context context = view.getContext(); int type = typeInteger != null ? typeInteger : 1; String text; switch (type) { case 0: text = context.getString(R.string.weight); break; case 1: text = context.getString(R.string.calorie); break; case 2: text = context.getString(R.string.all); break; default: text = context.getString(R.string.all); break; } view.setText(text); } @BindingAdapter({"setCalendarHeaderText"}) public static void setCalendarHeaderText(TextView view, Long date) { try { if (date != null) { view.setText(DateFormat.getDate(date, DateFormat.CALENDAR_HEADER_FORMAT)); } } catch (Exception e) { e.printStackTrace(); } } @BindingAdapter({"setDayText"}) public static void setDayText(TextView view, Calendar calendar) { try { if (calendar != null) { GregorianCalendar gregorianCalendar = new GregorianCalendar(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH), 0, 0, 0); view.setText(DateFormat.getDate(gregorianCalendar.getTimeInMillis(), DateFormat.DAY_FORMAT)); } } catch (Exception e) { e.printStackTrace(); } } @BindingAdapter({"setNutrientPercentText", "setType"}) public static void setNutrientPercentText(TextView view, Record record, String type) { Context context = view.getContext(); String text = ""; if (record != null) { double carbohydrate = record.getTotalCarbohydrate(); double protein = record.getTotalProtein(); double fat = record.getTotalFat(); double total = carbohydrate + protein + fat == 0.0 ? 100.0 : carbohydrate + protein + fat; if (type.equals(Type.CARBOHYDRATE)) { text = context.getString(R.string.carbohydrate) + " (" + ValueFormat.format((carbohydrate / total) * (100.0)) + "%)"; } else if (type.equals(Type.PROTEIN)) { text = context.getString(R.string.protein) + " (" + ValueFormat.format((protein / total) * (100.0)) + "%)"; } else if (type.equals(Type.FAT)) { text = context.getString(R.string.fat) + " (" + ValueFormat.format((fat / total) * (100.0)) + "%)"; } view.setText(text); } } @BindingAdapter({"setNutrientPercentText", "setType"}) public static void setNutrientPercentText(TextView view, RecordFood recordFood, String type) { Context context = view.getContext(); String text = ""; if (recordFood != null) { double carbohydrate = recordFood.getCarbohydrate(); double protein = recordFood.getProtein(); double fat = recordFood.getFat(); double total = carbohydrate + protein + fat == 0.0 ? 100.0 : carbohydrate + protein + fat; if (type.equals(Type.CARBOHYDRATE)) { text = context.getString(R.string.carbohydrate) + " (" + ValueFormat.format((carbohydrate / total) * (100.0)) + "%)"; } else if (type.equals(Type.PROTEIN)) { text = context.getString(R.string.protein) + " (" + ValueFormat.format((protein / total) * (100.0)) + "%)"; } else if (type.equals(Type.FAT)) { text = context.getString(R.string.fat) + " (" + ValueFormat.format((fat / total) * (100.0)) + "%)"; } view.setText(text); } } @BindingAdapter({"setRecordFoodListTitleText"}) public static void setRecordFoodListTitleText(TextView view, RecordFood recordFood) { try { String text = recordFood.getName() + " " + ValueFormat.format(recordFood.getKcal()) + "kcal"; view.setText(text); } catch (Exception e) { e.printStackTrace(); } } @BindingAdapter({"setRecordFoodListSubTitleText"}) public static void setRecordFoodListSubTitleText(TextView view, RecordFood recordFood) { try { Context context = view.getContext(); //탄수화물 : 200g 단백질 : 200g 지방 : 200g\n수량 : 1 개 중량 : 200g String text = context.getString(R.string.carbohydrate) + " : " + ValueFormat.format(recordFood.getCarbohydrate()) + "g " + context.getString(R.string.protein) + " : " + ValueFormat.format(recordFood.getProtein()) + "g " + context.getString(R.string.fat) + " : " + ValueFormat.format(recordFood.getFat()) + "g" + "\n" + context.getString(R.string.quantity) + " : " + recordFood.getQuantity() + context.getString(R.string.count) + " " + context.getString(R.string.weight_two) + " : " + ValueFormat.format(recordFood.getSize()) + "g"; view.setText(text); } catch (Exception e) { e.printStackTrace(); } } }
[ "sky877kr@gmail.com" ]
sky877kr@gmail.com
73758b28a88f27e4a7f0626e62557167ba1df47d
f6cd189b91740ed36c1fc435a69c39dab3a5223b
/Java/Basic/Java_7_2.java
9bccd550904d3460388e67456115c94cf49270ee
[]
no_license
ZHANGxunjie/cours
0e2c0258c2068d33a06af2f192b188d78ddfcc11
393bc1bbf14ce8740af34e22bcfb09eb26ec71dd
refs/heads/master
2021-04-29T15:50:20.133993
2018-11-27T19:40:33
2018-11-27T19:40:33
121,804,014
0
0
null
null
null
null
UTF-8
Java
false
false
904
java
// nombre parfait public class Java_7_2 { public static void main(String[] args) { // TODO Auto-generated method stub new Java_7_2().run(); } public void run() { java.util.Scanner in = new java.util.Scanner(System.in); int a = in.nextInt(); int b = in.nextInt(); cherchePerfectNumber(a, b); } public boolean perfectNumber(int N) { int somme = 1; int j = 2; boolean res = false; while (j < N) { while (N % j == 0) { somme += j; j++; } j++; } if (somme == N && somme > 3) { res = true; } return res; } public void cherchePerfectNumber(int n, int m) { java.util.Scanner in = new java.util.Scanner(System.in); while (n < 0 || m > 1000 || m < n) { n = in.nextInt(); m = in.nextInt(); } String res = ""; for (int i = n; i <= m; i++) { if (perfectNumber(i)) { res += i + " "; } } System.out.println(res.trim()); } }
[ "xunjie.zhang1215@gmail.com" ]
xunjie.zhang1215@gmail.com
f4979ce5a7aa83e78119a59282421fa99849cf6f
10021a110dc9cec1f41d86e7ce86c993ffb68683
/app/src/androidTest/java/com/example/hello/systemreactionratecalculator/ExampleInstrumentedTest.java
a7642b08e1c453a4f9160704c5984672a781e38c
[ "Apache-2.0" ]
permissive
Henry-Zhuo/System-Reaction-Rate-Calculator
cbecfa4a5a8826de418b35159473d59c1e41fbd3
56f684bafd8820072faa9ed2112a5fb322e8c3bb
refs/heads/main
2023-02-13T04:37:08.189172
2021-01-10T07:29:53
2021-01-10T07:29:53
327,751,067
0
0
null
null
null
null
UTF-8
Java
false
false
776
java
package com.example.hello.systemreactionratecalculator; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.example.hello.systemreactionratecalculator", appContext.getPackageName()); } }
[ "henryzhuo@live.com" ]
henryzhuo@live.com
d56de4ecf065a3f90002d511ab752bae72a41cf3
1533510326380ff9ca245fb524d65e7ba5758c32
/src/SearchEmployeeByName.java
41e7a514163cc71b391426d3f73b6660fe7a8637
[]
no_license
veerdwivedi1015/Employee-Managment-System
d1e88c85703d362d4e59798b1327e0111797a791
6253226cb7d0e227394a4a94e00583b9514ad3cc
refs/heads/master
2020-05-10T00:25:10.036559
2019-04-15T16:54:59
2019-04-15T16:54:59
181,529,325
0
0
null
null
null
null
UTF-8
Java
false
false
1,772
java
import java.awt.BorderLayout; import java.awt.Color; import java.awt.FlowLayout; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import com.vikas.jdbc.utilities.*; import com.vikas.jdbc.Daos.*; import com.vikas.jdbc.pojos.*; import java.sql.*; import java.util.*; import java.io.*; import java.util.Date; import javax.swing.*; public class SearchEmployeeByName extends JPanel implements ActionListener{ JTextField ftf; JTextArea jtAreaOutput; String newline = "\n"; public SearchEmployeeByName() { jtAreaOutput = new JTextArea(5, 20); jtAreaOutput.setCaretPosition(jtAreaOutput.getDocument().getLength()); jtAreaOutput.setEditable(false); JScrollPane scrollPane = new JScrollPane(jtAreaOutput, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); setLayout(new BorderLayout()); add(scrollPane, BorderLayout.CENTER); ftf = new JTextField(); String str = new String(); str = "ENTER Employee Name"; ftf = new JTextField(new String()); add(ftf,BorderLayout.NORTH); JButton OkButton = new JButton("OK"); add(OkButton,BorderLayout.SOUTH); OkButton.addActionListener(this); } public void actionPerformed(ActionEvent e) { try { String name = ftf.getText(); EmployeesDao ed = new EmployeesDao(); ArrayList<Employees> al = ed.getEmployeesWithByName(name); for (Employees emp : al) jtAreaOutput.append(emp + newline); if((name.charAt(0) >= 'a' && name.charAt(0) <= 'z') || (name.charAt(0) >= 'A' && name.charAt(0) <= 'Z')) { } }catch (Exception ex) { JOptionPane.showMessageDialog(this, "Please Enter valid Data", "New Employee", JOptionPane.INFORMATION_MESSAGE); } } }
[ "veerdwivedi1015@gmail.com" ]
veerdwivedi1015@gmail.com
b3d3c88bbb755c3eb04d918e879f9abe1b7d46ac
117ee7cfa209492921c1b566496bb3b90fa8900e
/jetty-jersey/src/main/java/com/example/jetty_jersey/ws/ExampleResource.java
f87fc6b5f7ec6e2b5e3c12b9073bdea60e61f3c7
[]
no_license
Groupe1-GL/ShareYourMap
20403c586a4a8bb9d203030d34dfdd657c41355b
60d8ce01826622a3a60a9b4b18d5c34d85a6d61a
refs/heads/master
2022-07-23T08:25:59.095370
2020-05-13T01:26:23
2020-05-13T01:26:23
241,588,553
0
0
null
2022-07-07T22:12:37
2020-02-19T10:03:10
HTML
UTF-8
Java
false
false
4,682
java
package com.example.jetty_jersey.ws; import javax.ws.rs.Consumes; import javax.ws.rs.PUT; import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.PathParam; import javax.ws.rs.core.MediaType; import java.util.*; @Path("/") public class ExampleResource { static List<User> u = new ArrayList<User>(); static List<Map> m = new ArrayList<Map>(); @GET @Produces(MediaType.APPLICATION_JSON) @Path("/homepage") public List<User> getUsers() { return u; } @PUT @Consumes(MediaType.APPLICATION_JSON) @Path("/homepage") public List<User> addUser() { u.add(new User()); return u; } @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/searchmap") public List<Map> getMaps() { return m; } //pas dans le doc, besoin pour ajouter des maps @PUT @Produces(MediaType.APPLICATION_JSON) @Path("/searchmap") public List<Map> addMap() { m.add(new Map()); return m; } @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/searchmap/{map.id}") public List<Location> getLocations(@PathParam("map.id") int id) { for (Map map: m) { if (map.getID() == id) { return map.getLocations(); } } return null; } @PUT @Produces(MediaType.APPLICATION_JSON) @Path("/searchmap/{map.id}") public List<Location> addLocation (@PathParam("map.id") int id) { Location l1 = new Location(); for (Map map: m) { if (map.getID() == id) { map.addLocation(l1); return map.getLocations(); } } return null; } @GET @Produces(MediaType.APPLICATION_JSON) @Path("/viewmap/{user.id}") public List<Map> getUserMaps(@PathParam("user.id") int id) { for (User us: u) { if (us.getUserID() == id) { return us.getMaps(); } } return null; } @POST @Produces(MediaType.APPLICATION_JSON) @Path("/viewmap/{user.id}/{map.id}") //va ajouter une map existante sur un user public List<Map> addMapOnUser(@PathParam("user.id") int uid, @PathParam("map.id") int mid) { for (User us: u) { if (us.getUserID() == uid) { for (Map map: us.getMaps()) { if (map.getID() == mid) { us.getMaps().add(map); return us.getMaps(); } } } } return null; } @GET @Produces(MediaType.APPLICATION_JSON) @Path("/viewmap/{user.id}/{map.id}") public List<Location> getLocsOnUserMap(@PathParam("user.id") int uid, @PathParam("map.id") int mid) { for (User us: u) { if (us.getUserID() == uid) { for (Map map: us.getMaps()) { if (map.getID() == mid) { return map.getLocations(); } } } } return null; } @DELETE @Produces(MediaType.APPLICATION_JSON) @Path("/viewmap/{user.id}/{map.id}") //va ajouter une map existante sur un user public List<Map> delMapOnUser(@PathParam("user.id") int uid, @PathParam("map.id") int mid) { for (User us: u) { if (us.getUserID() == uid) { for (Map map: us.getMaps()) { if (map.getID() == mid) { us.getMaps().remove(map); return us.getMaps(); } } } } return null; } @PUT @Produces(MediaType.APPLICATION_JSON) @Path("/viewmap/{user.id}/{map.id}") public List<Location> addLocOnUserMap(@PathParam("user.id") int uid, @PathParam("map.id") int mid) { Location l1 = new Location(); for (User us: u) { if (us.getUserID() == uid) { for (Map map: us.getMaps()) { if (map.getID() == mid) { map.addLocation(l1); return map.getLocations(); } } } } return null; } @GET @Produces(MediaType.APPLICATION_JSON) @Path("/viewlocation/{user.id}/{map.id}/{location.name}") public Location getLocOnUserMap(@PathParam("user.id") int uid, @PathParam("map.id") int mid, @PathParam("location.name") int lid) { for (User us: u) { if (us.getUserID() == uid) { for (Map map: us.getMaps()) { if (map.getID() == mid) { for (Location lo: map.getLocations()) { if (lid == lo.getID()) return lo; } } } } } return null; } @DELETE @Produces(MediaType.APPLICATION_JSON) @Path("/viewlocation/{user.id}/{map.id}/{location.name}") public List<Location> delLocOnUserMap(@PathParam("user.id") int uid, @PathParam("map.id") int mid, @PathParam("location.name") int lid) { for (User us: u) { if (us.getUserID() == uid) { for (Map map: us.getMaps()) { if (map.getID() == mid) { for (Location lo: map.getLocations()) { if (lo.getID() == lid) { map.getLocations().remove(lo); return map.getLocations(); } } } } } } return null; } }
[ "PC03@DESKTOP-GBMGMQ0" ]
PC03@DESKTOP-GBMGMQ0
ff84bd7e24c17ce31dcdb979e8fe024932297f84
bee222b9d69484152567bf13e45a85ccc832c832
/kidos/build/generated/source/r/debug/android/support/graphics/drawable/animated/R.java
dec1c658f438f6d3327c06439b991e2059d7e717
[]
no_license
kartikpatel11/kidos
f89f86f1d8bc58662f1c3ca966ffa459d999194a
f007693ab969bfba67984be22b8f50d0a3e243ef
refs/heads/master
2021-01-15T15:36:47.274808
2017-12-21T15:53:40
2017-12-21T15:56:08
55,416,939
1
0
null
null
null
null
UTF-8
Java
false
false
7,264
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package android.support.graphics.drawable.animated; public final class R { public static final class attr { public static final int font = 0x7f01013b; public static final int fontProviderAuthority = 0x7f010134; public static final int fontProviderCerts = 0x7f010137; public static final int fontProviderFetchStrategy = 0x7f010138; public static final int fontProviderFetchTimeout = 0x7f010139; public static final int fontProviderPackage = 0x7f010135; public static final int fontProviderQuery = 0x7f010136; public static final int fontStyle = 0x7f01013a; public static final int fontWeight = 0x7f01013c; } public static final class bool { public static final int abc_action_bar_embed_tabs = 0x7f090000; } public static final class color { public static final int notification_action_color_filter = 0x7f0a0000; public static final int notification_icon_bg_color = 0x7f0a0051; public static final int ripple_material_light = 0x7f0a0063; public static final int secondary_text_default_material_light = 0x7f0a0065; } public static final class dimen { public static final int compat_button_inset_horizontal_material = 0x7f070085; public static final int compat_button_inset_vertical_material = 0x7f070086; public static final int compat_button_padding_horizontal_material = 0x7f070087; public static final int compat_button_padding_vertical_material = 0x7f070088; public static final int compat_control_corner_material = 0x7f070089; public static final int notification_action_icon_size = 0x7f07009a; public static final int notification_action_text_size = 0x7f07009b; public static final int notification_big_circle_margin = 0x7f07009c; public static final int notification_content_margin_start = 0x7f07001d; public static final int notification_large_icon_height = 0x7f07009d; public static final int notification_large_icon_width = 0x7f07009e; public static final int notification_main_column_padding_top = 0x7f07001e; public static final int notification_media_narrow_margin = 0x7f07001f; public static final int notification_right_icon_size = 0x7f07009f; public static final int notification_right_side_padding_top = 0x7f07001b; public static final int notification_small_icon_background_padding = 0x7f0700a0; public static final int notification_small_icon_size_as_large = 0x7f0700a1; public static final int notification_subtext_size = 0x7f0700a2; public static final int notification_top_pad = 0x7f0700a3; public static final int notification_top_pad_large_text = 0x7f0700a4; } public static final class drawable { public static final int notification_action_background = 0x7f020185; public static final int notification_bg = 0x7f020186; public static final int notification_bg_low = 0x7f020187; public static final int notification_bg_low_normal = 0x7f020188; public static final int notification_bg_low_pressed = 0x7f020189; public static final int notification_bg_normal = 0x7f02018a; public static final int notification_bg_normal_pressed = 0x7f02018b; public static final int notification_icon_background = 0x7f02018c; public static final int notification_template_icon_bg = 0x7f0201c1; public static final int notification_template_icon_low_bg = 0x7f0201c2; public static final int notification_tile_bg = 0x7f02018d; public static final int notify_panel_notification_icon_bg = 0x7f02018e; } public static final class id { public static final int action_container = 0x7f0c0182; public static final int action_divider = 0x7f0c0189; public static final int action_image = 0x7f0c0183; public static final int action_text = 0x7f0c0184; public static final int actions = 0x7f0c0192; public static final int async = 0x7f0c0048; public static final int blocking = 0x7f0c0049; public static final int chronometer = 0x7f0c018e; public static final int forever = 0x7f0c004a; public static final int icon = 0x7f0c00a7; public static final int icon_group = 0x7f0c0193; public static final int info = 0x7f0c018f; public static final int italic = 0x7f0c004b; public static final int line1 = 0x7f0c0015; public static final int line3 = 0x7f0c0016; public static final int normal = 0x7f0c0035; public static final int notification_background = 0x7f0c0191; public static final int notification_main_column = 0x7f0c018b; public static final int notification_main_column_container = 0x7f0c018a; public static final int right_icon = 0x7f0c0190; public static final int right_side = 0x7f0c018c; public static final int tag_transition_group = 0x7f0c001c; public static final int text = 0x7f0c001d; public static final int text2 = 0x7f0c001e; public static final int time = 0x7f0c018d; public static final int title = 0x7f0c0020; } public static final class integer { public static final int status_bar_notification_info_maxnum = 0x7f0d0009; } public static final class layout { public static final int notification_action = 0x7f030050; public static final int notification_action_tombstone = 0x7f030051; public static final int notification_template_custom_big = 0x7f030058; public static final int notification_template_icon_group = 0x7f030059; public static final int notification_template_part_chronometer = 0x7f03005d; public static final int notification_template_part_time = 0x7f03005e; } public static final class string { public static final int status_bar_notification_info_overflow = 0x7f06007b; } public static final class style { public static final int TextAppearance_Compat_Notification = 0x7f080085; public static final int TextAppearance_Compat_Notification_Info = 0x7f080086; public static final int TextAppearance_Compat_Notification_Line2 = 0x7f080112; public static final int TextAppearance_Compat_Notification_Time = 0x7f080089; public static final int TextAppearance_Compat_Notification_Title = 0x7f08008b; public static final int Widget_Compat_NotificationActionContainer = 0x7f08008d; public static final int Widget_Compat_NotificationActionText = 0x7f08008e; } public static final class styleable { public static final int[] FontFamily = { 0x7f010134, 0x7f010135, 0x7f010136, 0x7f010137, 0x7f010138, 0x7f010139 }; public static final int[] FontFamilyFont = { 0x01010532, 0x01010533, 0x0101053f, 0x7f01013a, 0x7f01013b, 0x7f01013c }; public static final int FontFamilyFont_android_font = 0; public static final int FontFamilyFont_android_fontStyle = 2; public static final int FontFamilyFont_android_fontWeight = 1; public static final int FontFamilyFont_font = 4; public static final int FontFamilyFont_fontStyle = 3; public static final int FontFamilyFont_fontWeight = 5; public static final int FontFamily_fontProviderAuthority = 0; public static final int FontFamily_fontProviderCerts = 3; public static final int FontFamily_fontProviderFetchStrategy = 4; public static final int FontFamily_fontProviderFetchTimeout = 5; public static final int FontFamily_fontProviderPackage = 1; public static final int FontFamily_fontProviderQuery = 2; } }
[ "patel.kartikv@gmail.com" ]
patel.kartikv@gmail.com
eda50b6b6777e58e68b238abb29521b9a7f61c69
890993899eb9fd579a83738e800bab78625864fe
/src/main/java/nl/clockwork/ebms/client/SSLFactoryManager.java
572f2e9899752d7638184df1bda8d206fc46747a
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
java-ebms-adapter/ebms-adapter-core
665afab7c27adbe97c99ec573de9aa4114b8d84a
c64c64b0f44f690389c366a14279d13b39ceb481
refs/heads/master
2022-12-26T00:40:45.570193
2022-12-11T14:53:22
2022-12-11T14:53:22
199,839,805
2
0
Apache-2.0
2022-12-11T14:53:05
2019-07-31T11:07:27
Java
UTF-8
Java
false
false
5,417
java
/** * Copyright 2011 Clockwork * * 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 nl.clockwork.ebms.client; import java.net.Socket; import java.security.KeyStore; import java.security.Principal; import java.security.PrivateKey; import java.security.cert.X509Certificate; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.KeyManager; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSession; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509KeyManager; import nl.clockwork.ebms.common.KeyStoreManager; public class SSLFactoryManager extends nl.clockwork.ebms.ssl.SSLFactoryManager { public class EbMSX509KeyManager implements X509KeyManager { private final String clientAlias; private final X509KeyManager standardKeyManager; public EbMSX509KeyManager(X509KeyManager standardKeyManager, String clientAlias) { this.clientAlias = clientAlias; this.standardKeyManager = standardKeyManager; } @Override public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket) { return standardKeyManager.chooseServerAlias(keyType,issuers,socket); } @Override public String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket) { return clientAlias == null ? standardKeyManager.chooseClientAlias(keyType,issuers,socket) : clientAlias; } @Override public String[] getServerAliases(String keyType, Principal[] issuers) { return standardKeyManager.getServerAliases(keyType,issuers); } @Override public String[] getClientAliases(String keyType, Principal[] issuers) { return standardKeyManager.getClientAliases(keyType,issuers); } @Override public X509Certificate[] getCertificateChain(String alias) { return standardKeyManager.getCertificateChain(alias); } @Override public PrivateKey getPrivateKey(String alias) { return standardKeyManager.getPrivateKey(alias); } } private String keyStorePath; private String keyStorePassword; private String trustStorePath; private String trustStorePassword; private boolean verifyHostnames; private String clientAlias; private SSLSocketFactory sslSocketFactory; @Override public void afterPropertiesSet() throws Exception { KeyStore keyStore = KeyStoreManager.getKeyStore(keyStorePath,keyStorePassword); KeyStore trustStore = KeyStoreManager.getKeyStore(trustStorePath,trustStorePassword); //KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); kmf.init(keyStore,keyStorePassword.toCharArray()); KeyManager[] keyManagers = kmf.getKeyManagers(); for (int i = 0; i < keyManagers.length; i++) if (keyManagers[i] instanceof X509KeyManager) keyManagers[i] = new EbMSX509KeyManager((X509KeyManager)keyManagers[i],clientAlias); //TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); tmf.init(trustStore); SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(kmf.getKeyManagers(),tmf.getTrustManagers(),null); sslSocketFactory = sslContext.getSocketFactory(); } public HostnameVerifier getHostnameVerifier(HttpsURLConnection connection) { return verifyHostnames ? HttpsURLConnection.getDefaultHostnameVerifier() : new HostnameVerifier() { @Override public boolean verify(String hostname, SSLSession sslSession) { return true; } }; } @SuppressWarnings({"deprecation","restriction"}) public com.sun.net.ssl.HostnameVerifier getHostnameVerifier(com.sun.net.ssl.HttpsURLConnection connection) { return verifyHostnames ? com.sun.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier() : new com.sun.net.ssl.HostnameVerifier() { @Override public boolean verify(String urlHostname, String certHostname) { return true; } }; } public SSLSocketFactory getSslSocketFactory() { return sslSocketFactory; } public void setKeyStorePath(String keyStorePath) { this.keyStorePath = keyStorePath; } public void setKeyStorePassword(String keyStorePassword) { this.keyStorePassword = keyStorePassword; } public void setTrustStorePath(String trustStorePath) { this.trustStorePath = trustStorePath; } public void setTrustStorePassword(String trustStorePassword) { this.trustStorePassword = trustStorePassword; } public void setClientAlias(String clientAlias) { this.clientAlias = clientAlias; } public void setVerifyHostnames(boolean verifyHostnames) { this.verifyHostnames = verifyHostnames; } }
[ "e.luinstra@gmail.com" ]
e.luinstra@gmail.com
a9f6b1b376ccf6ba95c73b92df8ca4e23bc66e57
c1fbc8664b5fb641e55a87e9961c379ac0701b21
/03-JPA-Introducao/src/br/com/fiap/jpa/entity/Carro.java
92cb1b5d6867e96707322c1966faafa4ca08df39
[]
no_license
carlosumiji/Enterprise
8ad7ae4e0f4e737d61e6e84fc179b271c44dc357
cd11d644a642a85810d0cd2489f91a0563d3c990
refs/heads/master
2021-04-29T16:09:24.322060
2018-05-21T23:52:37
2018-05-21T23:52:37
121,809,481
0
0
null
null
null
null
ISO-8859-1
Java
false
false
3,544
java
package br.com.fiap.jpa.entity; import java.io.Serializable; import java.util.Calendar; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Lob; import javax.persistence.SequenceGenerator; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Transient; @Entity @Table(name="TB_CARRO") @SequenceGenerator(name="carro", sequenceName="SQ_TB_CARRO", allocationSize=1) public class Carro implements Serializable{ @Id @Column(name="CD_CARRO") @GeneratedValue(generator="carro", strategy=GenerationType.SEQUENCE) private int id; @Column(name="DS_MODELO", nullable=false, length = 100) private String modelo; //Classe wrapper para valores nulos @Column(name="NR_ANO") private int ano; @Column(name="DS_MOTOR", length = 10) private String motor; @Column(name="DS_MONTADORA") private String montadora; @Column(name="DS_PLACA", nullable=false, length=8) private String placa; @Column(name="DT_FABRICACAO") @Temporal(TemporalType.DATE) private Calendar dataFabricacao; @Column(name="FG_COLECIONADOR") private boolean colecionador; @Transient//Não será mapeado para uma colunano banco de dados private boolean pagaIpva; @Lob//gravar arquivo no banco de dados (BLOB) @Column(name="FL_FOTO") private byte[] foto; @Enumerated(EnumType.STRING) @Column(name="DS_TRANSMISSAO") private Transmissao transmissao; public Carro() { super(); } public Carro(String modelo, int ano, String motor, String montadora, String placa, Calendar dataFabricacao, boolean colecionador, boolean pagaIpva, byte[] foto, Transmissao transmissao) { super(); this.modelo = modelo; this.ano = ano; this.motor = motor; this.montadora = montadora; this.placa = placa; this.dataFabricacao = dataFabricacao; this.colecionador = colecionador; this.pagaIpva = pagaIpva; this.foto = foto; this.transmissao = transmissao; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getModelo() { return modelo; } public void setModelo(String modelo) { this.modelo = modelo; } public int getAno() { return ano; } public void setAno(int ano) { this.ano = ano; } public String getMotor() { return motor; } public void setMotor(String motor) { this.motor = motor; } public String getMontadora() { return montadora; } public void setMontadora(String montadora) { this.montadora = montadora; } public String getPlaca() { return placa; } public void setPlaca(String placa) { this.placa = placa; } public Calendar getDataFabricacao() { return dataFabricacao; } public void setDataFabricacao(Calendar dataFabricacao) { this.dataFabricacao = dataFabricacao; } public boolean isColecionador() { return colecionador; } public void setColecionador(boolean colecionador) { this.colecionador = colecionador; } public boolean isPagaIpva() { return pagaIpva; } public void setPagaIpva(boolean pagaIpva) { this.pagaIpva = pagaIpva; } public byte[] getFoto() { return foto; } public void setFoto(byte[] foto) { this.foto = foto; } public Transmissao getTransmissao() { return transmissao; } public void setTransmissao(Transmissao transmissao) { this.transmissao = transmissao; } }
[ "logonrm@fiap.com.br" ]
logonrm@fiap.com.br
d60779cc5f1c00121ccceeaec9fa73fa93dc8d6b
70e58454f4c0f72031a6bc06f54b76843c873e73
/app/src/main/java/com/dev/prepcarapplication/fragment/FragmentAcceptBuyerActivity.java
180cca9ac92067d5017205d88ae5ef8aa7ce2968
[]
no_license
prepcar/PrepCarApplication
16e2872248b53929942ec8417fcab62331dee88f
77840dbb1d6b4eb2d37546cd5f21220cbe0d1c25
refs/heads/master
2021-01-25T06:55:42.659304
2017-06-07T10:48:59
2017-06-07T10:48:59
93,602,800
0
0
null
null
null
null
UTF-8
Java
false
false
4,394
java
package com.dev.prepcarapplication.fragment; import android.app.AlertDialog; import android.content.DialogInterface; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; import android.widget.TextView; import com.dev.prepcarapplication.R; import com.dev.prepcarapplication.adapter.DealerActivityAdapter; import com.dev.prepcarapplication.baseClasses.BaseFragment; import com.dev.prepcarapplication.baseClasses.Constants; import com.dev.prepcarapplication.bean.DealerActivityModel; import com.dev.prepcarapplication.networkTask.ApiManager; import org.json.JSONArray; import org.json.JSONObject; import java.util.ArrayList; public class FragmentAcceptBuyerActivity extends BaseFragment { public static String TAG="ACCEPT_BUYER_FAVOURITE"; private ListView cardStackView; ArrayList<DealerActivityModel> machesarray; DealerActivityAdapter adapter; TextView tvNoCars; static String miles="",location=""; public static FragmentAcceptBuyerActivity newInstanse(Bundle bundle) { FragmentAcceptBuyerActivity fragment = new FragmentAcceptBuyerActivity(); if (bundle != null) { fragment.setArguments(bundle); miles=bundle.getString(Constants.miles); location=bundle.getString(Constants.location); }else{ miles=""; location=""; } return fragment; } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_sent, null); initUi(view); setListener(); callingServicebyTag(); return view; } public void callingServicebyTag(){ //if(miles.equals("") && location.equals("")){ callingServiceNewmatches(); //} //else{ // callingFindDealer(); //} } private void callingServiceNewmatches() { ApiManager.getInstance().getDealerActivity(this); } @Override protected void initUi(View view) { tvNoCars=(TextView)view.findViewById(R.id.tv_no_cars); machesarray=new ArrayList<>(); cardStackView = (ListView) view.findViewById(R.id.cardstack_view); //cardStackView.setCardStackEventListener(this); } @Override protected void setValueOnUi() { } @Override protected void setListener() { } @Override public boolean onBackPressedListener() { return false; } @Override public void onClick(View v) { } public void setresponce(JSONObject jObject) { machesarray.clear(); if(jObject.optInt("status")==1 && jObject.optInt("dataflow")==1){ JSONArray data=jObject.optJSONArray("data"); for (int j = 0; j < data.length(); j++) { DealerActivityModel model = new DealerActivityModel(); model.setActivityTitle(data.optJSONObject(j).optString("msg")); model.setActivity_message(data.optJSONObject(j).optString("msg1")); machesarray.add(model); } Log.i("arrsize===",String.valueOf(machesarray.size())); if(machesarray.size()>0){ tvNoCars.setVisibility(View.GONE); setData(); }else{ tvNoCars.setVisibility(View.VISIBLE); // showDialog("This is where you send car matches for buyer's carplan. Make sure you’ve sent your Matches to buyer."); } } } private void setData() { adapter = new DealerActivityAdapter(getActivity(),machesarray); cardStackView.setAdapter(adapter); } public void showDialog(String msg){ final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setMessage(msg) .setCancelable(false) .setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { AlertDialog alert = builder.create(); alert.dismiss(); } }); AlertDialog alert = builder.create(); alert.show(); } }
[ "shubhamchhipa01@gmail.com" ]
shubhamchhipa01@gmail.com
32e3d9fd05f297f8c1a13e3f5a46220a53669d58
c1f11feaf39dbfe0044c1f2945f82dc45fd8d6be
/team170/BattleRobot.java
f33131a70780d070922b557be76ba6ec11a0ab79
[]
no_license
0x70b1a5/Battlecode2015
7ac515c424b2930af16d402483ff55f8fa97eed5
a1e7e5255e8394df4689213ae22824b936670291
refs/heads/master
2021-05-28T03:01:20.029752
2015-02-12T23:44:11
2015-02-12T23:44:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,641
java
package team170; import java.util.ArrayList; import team170.units.UnitController; import battlecode.common.*; public class BattleRobot extends Robot { public Boolean canBeMobilized; public Boolean isMobilized; public BattleRobot(RobotController robotController) { super(robotController); this.canBeMobilized = true; this.isMobilized = false; } public void run() { super.run(); try { Boolean shouldMobilize = this.shouldMobilize(); if (!this.isMobilized && shouldMobilize) { this.isMobilized = true; } } catch (GameActionException e) {} } // MARK: Attacking class AttackResult { public RobotInfo target; } public Boolean attack() throws GameActionException { return this.attack(null); } public Boolean attack(AttackResult attackResult) throws GameActionException { if (!this.robotController.isWeaponReady()) return true; RobotInfo desiredEnemy = this.desiredEnemy(this.unitController.nearbyAttackableEnemies()); if (desiredEnemy != null) { this.robotController.attackLocation(desiredEnemy.location); if (attackResult != null) { attackResult.target = desiredEnemy; } return true; } return false; } // MARK: Enemy Helpers public RobotInfo desiredEnemy(RobotInfo[] enemies) throws GameActionException { if (enemies.length == 0) return null; // prioritize the HQ for (RobotInfo enemy : enemies) { if (enemy.type == RobotType.HQ) return enemy; } // prioritize towers next for (RobotInfo enemy : enemies) { if (enemy.type == RobotType.TOWER) return enemy; } // otherwise just the weakest enemy return weakestEnemy(enemies); } public RobotInfo weakestEnemy(RobotInfo[] enemies) throws GameActionException { if (enemies.length > 0) { RobotInfo chosenEnemy = null; for (RobotInfo enemy : enemies) { // first report launcher sightings this.broadcaster.evaluateSeenLaunchersWithType(enemy.type); // figure out the best enemy if (chosenEnemy == null) { chosenEnemy = enemy; } else { if (enemy.type == Missile.type() && chosenEnemy.type == Missile.type() || enemy.type != Missile.type()) { if (chosenEnemy.health > enemy.health) { chosenEnemy = enemy; } } } } return chosenEnemy; } return null; } public RobotInfo[] nearbyDangerousEnemies() throws GameActionException { return this.nearbyDangerousEnemies(16, 0); } public RobotInfo[] nearbyDangerousEnemies(int visionRadius, double attackRadius) throws GameActionException { ArrayList<RobotInfo> dangerousEnemies = new ArrayList<RobotInfo>(); MapLocation currentLocation = this.locationController.currentLocation(); RobotInfo[] enemies = this.unitController.nearbyEnemies(visionRadius); for (RobotInfo enemy : enemies) { this.broadcaster.evaluateSeenLaunchersWithType(enemy.type); if (!UnitController.isUnitTypeMilitary(enemy.type)) continue; if (currentLocation.distanceSquaredTo(enemy.location) <= (attackRadius > 0 ? attackRadius : enemy.type.attackRadiusSquared)) { dangerousEnemies.add(enemy); } } return dangerousEnemies.toArray(new RobotInfo[dangerousEnemies.size()]); } public RobotInfo[] enemiesInTerritory() throws GameActionException { // figure out if we should engage units in friendly territory ArrayList<RobotInfo> targettableEnemies = new ArrayList<RobotInfo>(); RobotInfo[] enemies = this.unitController.nearbyEnemies(300); for (RobotInfo enemy : enemies) { this.broadcaster.evaluateSeenLaunchersWithType(enemy.type); if (enemy.type == Missile.type()) continue; if (locationController.isLocationInFriendlyTerritory(enemy.location)) { targettableEnemies.add(enemy); } } return targettableEnemies.toArray(new RobotInfo[targettableEnemies.size()]); } // MARK: Mobilization public Boolean shouldMobilize() throws GameActionException { if (this.isMobilized) return true; // if we are mobilized, we are attacking yo if (!this.canBeMobilized) return false; int roundNum = Clock.getRoundNum(); return this.currentPlaystyle().canMobilizeForClockNumber(roundNum, this.robotController.getRoundLimit()); } public void mobilize() throws GameActionException { if (!this.canBeMobilized) return; MapLocation objective = this.locationController.bestObjective(); if (objective != null) { this.movementController.moveToward(objective); } } }
[ "aaronwojnowski@gmail.com" ]
aaronwojnowski@gmail.com
e38d83092f3ff151ca5a01d6dc9df0ba74b72891
893900815cefea94d9baa36d02b9312c5694d78b
/src/ClassA.java
67607e7b656d3689a8b56dbb38049d6c7d4ef05a
[]
no_license
PriyaPT/Inheritanceemo
43f3106f55070fec71e8f6b087d0f1e0ae5a495a
29044abe9f4640dd3eca38127b59823b0ebbae98
refs/heads/master
2020-03-22T23:19:13.485923
2018-07-13T05:47:13
2018-07-13T05:47:13
140,802,872
0
0
null
null
null
null
UTF-8
Java
false
false
246
java
public class ClassA { int a; int b; public ClassA(int a){ this.a = a; } public static void m1() { System.out.println(" I am from A"); } public final void m2() { System.out.println("i am from A"); } }
[ "vyawaharepriya@gmail.com" ]
vyawaharepriya@gmail.com
9705974e9f7403e2f30a41102168f59c846eec00
4ff37861d491906100cb8867e866f4c368fc7920
/src/main/java/pt/dbpedia/org/lattes/KnowledgeAreaDescription.java
7d48c25da88402418c05a81652625cdc0b3bc075
[ "Apache-2.0" ]
permissive
ax300/lattes-2-rdf
fcd7ba6fba047a2847e30655514abc7951e53104
7b584cdfc625391924a82cf427cd89dd9b99e099
refs/heads/master
2020-04-21T22:02:03.430546
2018-05-07T17:04:08
2018-05-07T17:04:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
684
java
package pt.dbpedia.org.lattes; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamAsAttribute; import lombok.Getter; import lombok.Setter; @Getter @Setter public class KnowledgeAreaDescription { @XStreamAsAttribute @XStreamAlias("NOME-GRANDE-AREA-DO-CONHECIMENTO") private String knowledgeArea; @XStreamAsAttribute @XStreamAlias("NOME-DA-AREA-DO-CONHECIMENTO") private String knowledgeAreaName; @XStreamAsAttribute @XStreamAlias("NOME-DA-SUB-AREA-DO-CONHECIMENTO") private String knowledgeSubArea; @XStreamAsAttribute @XStreamAlias("NOME-DA-ESPECIALIDADE") private String knowledgeSubAreaName; }
[ "s2it_scoelho@uolinc.com" ]
s2it_scoelho@uolinc.com
3fabdf64d1d35d404a66c3b0d10815fb52d3545c
d930179224f1bb9944f304b248c80ea8cc162f62
/app/src/main/java/com/example/multimegafon3/MainActivity.java
eec068513f4b9e5b844b051f7def9b0cf9282b56
[]
no_license
MarcinGorcz/MultiMegafon
3285a14d24272856c17a27f45f6c0317a8680988
180241ca26440f686b326f1bc57c358e306b55f4
refs/heads/master
2023-02-05T18:49:32.750238
2020-12-06T15:52:42
2020-12-06T15:52:42
319,070,612
0
0
null
null
null
null
UTF-8
Java
false
false
717
java
package com.example.multimegafon3; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } public void moveToNadawanieActivity(View view) { Intent intent = new Intent(this, NadawanieActivity.class); startActivity(intent); } public void moveToWyborServeraActivity(View view) { Intent intent = new Intent(this, WyborServeraActivity.class); startActivity(intent); } }
[ "gorczyca@student.agh.edu.pl" ]
gorczyca@student.agh.edu.pl
0513fc0f521748164ef6aa276b9673281800a888
9c9f6ccf828fe22bbbc37f4bd7b5b3dd60394a29
/skadmin-generator/src/main/java/com/dxj/generator/service/GeneratorService.java
7556df7522e97639161aebe992900e800b6ddf29
[ "Apache-2.0" ]
permissive
Miemer/skadmin
081a52f60cd42d2165d8c5ab02c6bd98c49dfbd1
799d06d9c95433c658b77447298b8353cc37b74f
refs/heads/master
2020-08-23T20:10:25.357873
2019-10-10T01:01:25
2019-10-10T01:01:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,379
java
package com.dxj.generator.service; import com.dxj.common.util.PageUtil; import com.dxj.generator.domain.GenConfig; import com.dxj.generator.domain.vo.ColumnInfo; import com.dxj.generator.domain.vo.TableInfo; import com.dxj.common.exception.BadRequestException; import com.dxj.generator.util.GenUtil; import org.springframework.stereotype.Service; import org.springframework.util.ObjectUtils; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; import java.io.IOException; import java.util.ArrayList; import java.util.List; /** * @author dxj * @date 2019-01-02 */ @Service public class GeneratorService { @PersistenceContext private EntityManager em; /** * 查询数据库元数据 * * @param name * @param startEnd * @return */ public Object getTableList(String name, int[] startEnd) { StringBuilder sql = new StringBuilder("select table_name tableName,create_time createTime from information_schema.tables where table_schema = (select database()) "); if (!ObjectUtils.isEmpty(name)) { sql.append("and table_name like '%").append(name).append("%' "); } sql.append("order by table_name"); Query query = em.createNativeQuery(sql.toString()); query.setFirstResult(startEnd[0]); query.setMaxResults(startEnd[1] - startEnd[0]); System.out.println(sql.toString()); List<Object[]> result = query.getResultList(); List<TableInfo> tableInfos = new ArrayList<>(); for (Object[] obj : result) { tableInfos.add(new TableInfo(obj[0], obj[1])); } Query query1 = em.createNativeQuery("SELECT COUNT(*) from information_schema.tables where table_schema = (select database())"); Object totalElements = query1.getSingleResult(); return PageUtil.toPage(tableInfos, totalElements); } /** * 得到数据表的元数据 * * @param name * @return */ public Object getColumnList(String name) { StringBuilder sql = new StringBuilder("select column_name, is_nullable, data_type, column_comment, column_key, extra from information_schema.columns where "); if (!ObjectUtils.isEmpty(name)) { sql.append("table_name = '").append(name).append("' "); } sql.append("and table_schema = (select database()) order by ordinal_position"); Query query = em.createNativeQuery(sql.toString()); List<Object[]> result = query.getResultList(); List<ColumnInfo> columnInfoList = new ArrayList<>(); for (Object[] obj : result) { columnInfoList.add(new ColumnInfo(obj[0], obj[1], obj[2], obj[3], obj[4], obj[5], null, "true")); } return PageUtil.toPage(columnInfoList, columnInfoList.size()); } /** * 生成代码 * * @param columnInfoList * @param genConfig * @param tableName */ public void generator(List<ColumnInfo> columnInfoList, GenConfig genConfig, String tableName) { if (genConfig.getId() == null) { throw new BadRequestException("请先配置生成器"); } try { GenUtil.generatorCode(columnInfoList, genConfig, tableName); } catch (IOException e) { throw new RuntimeException(e); } } }
[ "dengsinkiang@gmail.com" ]
dengsinkiang@gmail.com
a2b27ef8daf670b5825017abab2f1fb75e79f94a
4aaa1fde3b286de94b82ef17400ef48cf112faf9
/MyCalculater/app/src/test/java/com/example/tirivashe/mycalculater/ExampleUnitTest.java
e469a3743cdfd16397ca9f2e91967270066e8377
[]
no_license
Tirivashe/Java_AndroidStudioProjects
be98cfe41cdf8f49842f8f82b505bf055881bb85
62a9aff1201c7a0206872fe4c09a7249f31f76e9
refs/heads/master
2022-02-20T20:27:58.303139
2019-09-05T14:59:44
2019-09-05T14:59:44
206,587,883
0
0
null
null
null
null
UTF-8
Java
false
false
327
java
package com.example.tirivashe.mycalculater; import org.junit.Test; import static org.junit.Assert.*; /** * To work on unit tests, switch the Test Artifact in the Build Variants view. */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "shaymusts@gmail.com" ]
shaymusts@gmail.com
a7c92f52fc24053162f03d8955d2eb54518ebae7
e61789e9edf0e682e87a0957aca6a93a2e230947
/src/main/java/com/googlesource/gerrit/plugins/gitblit/auth/GerritGitBlitUserManager.java
d618d3cf5c862ec138c85e06d610e807e63cb7d3
[ "Apache-2.0" ]
permissive
chbi/gerrit-gitblit-plugin
fca4484c5d74fc8a8c4ef36139e7001faeda1f7a
7f69cb41516fccdea73c85f56e640c973ce1d522
refs/heads/master
2020-04-27T00:10:44.911277
2019-04-09T07:36:52
2019-04-09T07:53:51
173,926,181
0
0
Apache-2.0
2019-04-09T07:50:52
2019-03-05T10:32:44
Java
UTF-8
Java
false
false
9,307
java
// Copyright (C) 2014 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.googlesource.gerrit.plugins.gitblit.auth; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.Collection; import java.util.Collections; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.gitblit.Keys; import com.gitblit.manager.IRuntimeManager; import com.gitblit.manager.IUserManager; import com.gitblit.models.TeamModel; import com.gitblit.models.UserModel; import com.google.common.base.Strings; import com.google.common.collect.ImmutableMap; import com.google.gerrit.extensions.registration.DynamicItem; import com.google.gerrit.httpd.WebSession; import com.google.gerrit.server.AnonymousUser; import com.google.gerrit.server.CurrentUser; import com.google.gerrit.server.IdentifiedUser; import com.google.gerrit.server.permissions.PermissionBackend; import com.google.gerrit.server.restapi.account.GetDiffPreferences; import com.google.inject.Inject; import com.google.inject.Provider; import com.google.inject.Singleton; import com.googlesource.gerrit.plugins.gitblit.app.GitBlitSettings; @Singleton public class GerritGitBlitUserManager implements IUserManager { private static final Logger log = LoggerFactory.getLogger(GerritGitBlitUserManager.class); private final PermissionBackend permissions; private final Provider<CurrentUser> userProvider; private final Provider<AnonymousUser> anonymousUser; private final GetDiffPreferences getDiffPreferences; @Inject public GerritGitBlitUserManager(final PermissionBackend permissions, final GitBlitSettings settings, final DynamicItem<WebSession> gerritSession, final Provider<AnonymousUser> anonymousUser, final GetDiffPreferences getDiffPreferences) { this.permissions = permissions; this.userProvider = new Provider<CurrentUser>() { @Override public CurrentUser get() { return gerritSession.get().getUser(); } }; this.anonymousUser = anonymousUser; this.getDiffPreferences = getDiffPreferences; if (!settings.getBoolean(Keys.web.authenticateViewPages, false) && !fixAnonymousUser()) { settings.saveSettings(ImmutableMap.of(Keys.web.authenticateViewPages, Boolean.TRUE.toString())); } } @Override public IUserManager start() { return this; } @Override public IUserManager stop() { return this; } @Override public void setup(IRuntimeManager runtimeManager) { } @Override public UserModel getUserModel(String username) { if (username == null || GerritGitBlitUserModel.ANONYMOUS_USER.equals(username)) { return new GerritGitBlitUserModel(permissions, anonymousUser, getDiffPreferences); } return new GerritGitBlitUserModel(username, permissions, userProvider, getDiffPreferences); } /** * GitBlit assumes all users (or user accounts) have a username (account name or login name). Gerrit allows users (accounts) to not have a * username, for instance if the account is created or logged in via Google OAuth. I such cases, we have to fake a username for GitBlit. * * @return a GitBlit {@link UserModel} for an unnamed Gerrit account. */ public UserModel getUnnamedGerritUser() { CurrentUser user = userProvider.get(); if (!user.isIdentifiedUser()) { log.warn("\"Logged-in\" user according to session is anonymous."); return new GerritGitBlitUserModel(permissions, anonymousUser, getDiffPreferences); } IdentifiedUser loggedInUser = (IdentifiedUser) user; // We know that this user has no username. Synthesize one for GitBlit. String fakeUserName = loggedInUser.getAccount().getPreferredEmail(); if (Strings.isNullOrEmpty(fakeUserName)) { fakeUserName = loggedInUser.getAccount().getFullName(); if (Strings.isNullOrEmpty(fakeUserName)) { fakeUserName = "external" + loggedInUser.getAccountId().toString(); } } return new GerritGitBlitUserModel(fakeUserName, permissions, userProvider, getDiffPreferences); } @Override public String getCookie(UserModel model) { return model.cookie; } @Override public boolean updateUserModel(UserModel model) { return false; } @Override public boolean updateUserModel(String username, UserModel model) { return false; } @Override public boolean deleteUserModel(UserModel model) { return false; } @Override public boolean deleteUser(String username) { return false; } @Override public List<String> getAllUsernames() { return Collections.emptyList(); } @Override public List<UserModel> getAllUsers() { return Collections.emptyList(); } @Override public List<String> getAllTeamNames() { return Collections.emptyList(); } @Override public List<TeamModel> getAllTeams() { return Collections.emptyList(); } @Override public TeamModel getTeamModel(String teamname) { return null; } @Override public boolean updateTeamModel(TeamModel model) { return false; } @Override public boolean updateTeamModel(String teamname, TeamModel model) { return false; } @Override public boolean deleteTeamModel(TeamModel model) { return false; } @Override public boolean deleteTeam(String teamname) { return false; } @Override public List<String> getUsernamesForRepositoryRole(String role) { return Collections.emptyList(); } @Override public boolean renameRepositoryRole(String oldRole, String newRole) { return false; } @Override public boolean deleteRepositoryRole(String role) { return false; } @Override public boolean updateTeamModels(Collection<TeamModel> arg0) { return false; } @Override public boolean updateUserModels(Collection<UserModel> arg0) { return false; } @Override public UserModel getUserModel(char[] cookie) { return null; } @Override public List<String> getTeamNamesForRepositoryRole(String role) { return Collections.emptyList(); } @Override public boolean isInternalAccount(String username) { return false; } /** * Tries to ensure that GitBlit's "anonymous" user obeys the branch visibility defined by Gerrit. * * @return {@code true} if sucessful, {@code false} if unsuccessful */ private boolean fixAnonymousUser() { // XXX Hack alert! // // This replaces the static final field UserModel.ANONYMOUS with a new object from our own user model. // This may or may not work. The problem here is that that object is hard-coded to the UserModel class and will // thus bypass all our Gerrit repository accessibility checks. We do solve this already by overriding a method // in GerritGitBlitRepositoryManager, but that class is lacking an operation to determine branch visibility. // (The separation of concerns inside GitBlit is a bit haphazard; an operation for branch visibility is on the // UserModel, and precisely because of this we need to make sure that the ANONYMOUS object is one of our own // user model class.) If GitBlit used Guice and a named Guice injection for this object instead of a static final // field, we could solve this much more cleanly by binding it in our module to our own object. if (UserModel.ANONYMOUS instanceof GerritGitBlitUserModel) { return true; } try { Field anonymousField = UserModel.class.getDeclaredField("ANONYMOUS"); if (anonymousField != null) { anonymousField.setAccessible(true); // Suppress Java-language accessibility checks Field modifiers = Field.class.getDeclaredField("modifiers"); if (modifiers != null) { modifiers.setAccessible(true); int modifierFlags = anonymousField.getModifiers(); modifiers.set(anonymousField, modifierFlags & ~Modifier.FINAL); // Remove "final" from the "ANONYMOUS" field anonymousField.set(null, new GerritGitBlitUserModel(permissions, anonymousUser, getDiffPreferences)); modifiers.set(anonymousField, modifierFlags); // Make the field "final" again. modifiers.setAccessible(false); // Re-enable Java-language accessibility checks } anonymousField.setAccessible(false); // Re-enable Java-language accessibility checks } } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { if (UserModel.ANONYMOUS instanceof GerritGitBlitUserModel) { // Was changed, so the exception occurred later log.debug("Reflectively changing the anonymous caused exception after the change", e); } else { if (log.isDebugEnabled()) { log.debug("Reflectively changing the anonymous user failed; disabling anonymous access", e); } else { log.warn("Cannot redefine anonymous user; disabling anonymous access. Error: {}", e.getLocalizedMessage()); } } } if (UserModel.ANONYMOUS instanceof GerritGitBlitUserModel) { log.info("Successfully installed Gerrit anonymous user in GitBlit"); return true; } return false; } }
[ "tw201207@gmail.com" ]
tw201207@gmail.com
60f281ed5050efc9aa3debd7fce8beb33b53a2b6
71877c152d7efefae2ff35ca11ef8abb257ca58a
/app/src/main/java/com/liang/basemvp/recycler/base/ItemViewDelegate.java
7fa24c92fbc5b56eec01026e077e27c6ffbb4c74
[]
no_license
liangxss/BaseMVP
fdf078be89c4b68b6202ed5533566a1782330109
7f8f20753eeea6ba31f82ca2af520ff06d901ccc
refs/heads/master
2020-07-19T05:33:31.760907
2017-06-23T17:20:59
2017-06-23T17:20:59
94,335,255
0
0
null
null
null
null
UTF-8
Java
false
false
214
java
package com.liang.basemvp.recycler.base; public interface ItemViewDelegate<T> { int getItemViewLayoutId(); boolean isForViewType(T item, int position); void convert(ViewHolder holder, T t, int position); }
[ "liangxss@qq.com" ]
liangxss@qq.com
221882b68211a07ab59c05c27feb907add30800a
42807648afabf74a84d0560d8bb3423d8c2c2e94
/src/com/leetcode/service/tree/ConstructMaximumBinaryTree.java
1795e7c5f1327ba4b73a44e4eea08df3c348f251
[]
no_license
BichongLi/Leetcode
d4dad76ac3db6fdfc2e72d8bc6a80a7a72e12d44
49b2141d26ce6c62e0b757cd5e70c4895eb6db1f
refs/heads/master
2021-01-13T15:37:52.535986
2017-12-07T13:22:20
2017-12-07T13:22:20
76,912,857
0
0
null
null
null
null
UTF-8
Java
false
false
868
java
package com.leetcode.service.tree; import com.leetcode.model.TreeNode; import com.leetcode.service.Solution; /** * @author bichongli on 9/19/2017 */ public class ConstructMaximumBinaryTree implements Solution<int[], TreeNode> { @Override public TreeNode solve(int[] nums) { if (nums == null || nums.length == 0) return null; int n = nums.length; return buildTree(0, n - 1, nums); } private TreeNode buildTree(int left, int right, int[] nums) { if (left > right) return null; int maxIndex = left; for (int i = left + 1; i <= right; i++) { if (nums[i] > nums[maxIndex]) maxIndex = i; } TreeNode cur = new TreeNode(nums[maxIndex]); cur.left = buildTree(left, maxIndex - 1, nums); cur.right = buildTree(maxIndex + 1, right, nums); return cur; } }
[ "bichongli@ea.com" ]
bichongli@ea.com
cfe8b11b3d4051889aba60da5301aa9e2a7278b0
05aeed39b488aee8518c6ff3372d35cec8071b73
/src/main/java/com/hyecheon/springpoll/payload/JwtAuthenticationResponse.java
78a1313bb91f2dd5cb230deddfdba9d671adcd78
[]
no_license
hyecheon/spring-poll
14666ed8a6306b1ea5b03fd5065f6f7930dafe95
de182ad7ab6ff111b187e58be118b09659951f2d
refs/heads/master
2020-03-12T16:36:43.598330
2018-04-23T15:40:24
2018-04-23T15:40:24
130,719,713
0
0
null
null
null
null
UTF-8
Java
false
false
506
java
package com.hyecheon.springpoll.payload; import lombok.Data; import lombok.NoArgsConstructor; /** * Project : spring-poll * Created by IntelliJ IDEA * Developer : 이혜천 * Date : 2018-04-23 * Time : 오후 11:58 * Email : ihyecheon@gmail.com */ @Data @NoArgsConstructor public class JwtAuthenticationResponse { private String accessToken; private String tokenType = "Bearer"; public JwtAuthenticationResponse(String accessToken) { this.accessToken = accessToken; } }
[ "ihyecheon@gmail.com" ]
ihyecheon@gmail.com
21b7e68ab7a93ad3b132497dcc8c6009c9e8ba74
daa81a7b33e4a5f60871c9d2f668ab992a1a6d5e
/SiteGeneratorAPI/src/com/amazon/generated/SimilarityLookupRequest.java
45b9260d69eae377e639903c312db44ed4bece2c
[]
no_license
Drastaro/SiteGeneratorAPI
260ca1cb718863ce89111918f6769e40f4770c3e
8f9145d77fc2e1f96f21193d58a26bf8eb374f52
refs/heads/master
2021-01-09T20:29:25.486607
2016-07-18T07:27:58
2016-07-18T07:27:58
63,580,101
0
0
null
null
null
null
UTF-8
Java
false
false
5,424
java
package com.amazon.generated; 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.XmlType; /** * <p>Java class for SimilarityLookupRequest complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="SimilarityLookupRequest"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Condition" minOccurs="0"/> * &lt;element name="ItemId" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="MerchantId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="ResponseGroup" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="SimilarityType" minOccurs="0"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="Intersection"/> * &lt;enumeration value="Random"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SimilarityLookupRequest", propOrder = { "condition", "itemId", "merchantId", "responseGroup", "similarityType" }) public class SimilarityLookupRequest { @XmlElement(name = "Condition") protected String condition; @XmlElement(name = "ItemId") protected List<String> itemId; @XmlElement(name = "MerchantId") protected String merchantId; @XmlElement(name = "ResponseGroup") protected List<String> responseGroup; @XmlElement(name = "SimilarityType") protected String similarityType; /** * Gets the value of the condition property. * * @return * possible object is * {@link String } * */ public String getCondition() { return condition; } /** * Sets the value of the condition property. * * @param value * allowed object is * {@link String } * */ public void setCondition(String value) { this.condition = value; } /** * Gets the value of the itemId 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 itemId property. * * <p> * For example, to add a new item, do as follows: * <pre> * getItemId().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getItemId() { if (itemId == null) { itemId = new ArrayList<String>(); } return this.itemId; } /** * Gets the value of the merchantId property. * * @return * possible object is * {@link String } * */ public String getMerchantId() { return merchantId; } /** * Sets the value of the merchantId property. * * @param value * allowed object is * {@link String } * */ public void setMerchantId(String value) { this.merchantId = value; } /** * Gets the value of the responseGroup 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 responseGroup property. * * <p> * For example, to add a new item, do as follows: * <pre> * getResponseGroup().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getResponseGroup() { if (responseGroup == null) { responseGroup = new ArrayList<String>(); } return this.responseGroup; } /** * Gets the value of the similarityType property. * * @return * possible object is * {@link String } * */ public String getSimilarityType() { return similarityType; } /** * Sets the value of the similarityType property. * * @param value * allowed object is * {@link String } * */ public void setSimilarityType(String value) { this.similarityType = value; } }
[ "hp@hp-PC" ]
hp@hp-PC
79fdaefc7110e5bc3fe87ad3c6af173518520b7d
d7973c00573c8d08c1ae46dd6419bdfff6beb2b6
/sample-ecsite/src/com/internousdev/sampleecsite/action/AddCartAction.java
7dcb09d5d96bf554307d7d064dc1d7499ac66742
[]
no_license
ohashi0904/sampleecsite
8d9378a93b2c9b2f39f07c7ecff7561641dd5b28
b769fe38b7dc69e7966fa7a6370f72d9bb72dc15
refs/heads/master
2020-03-24T20:38:05.085650
2018-07-31T09:02:54
2018-07-31T09:02:54
142,988,729
0
0
null
null
null
null
UTF-8
Java
false
false
3,955
java
package com.internousdev.sampleecsite.action; import java.util.ArrayList; import java.util.Date; import java.util.Iterator; import java.util.List; import java.util.Map; import org.apache.struts2.interceptor.SessionAware; import com.internousdev.sampleecsite.dao.CartInfoDAO; import com.internousdev.sampleecsite.dto.CartInfoDTO; import com.internousdev.sampleecsite.util.CommonUtility; import com.opensymphony.xwork2.ActionSupport; public class AddCartAction extends ActionSupport implements SessionAware{ private int productId; private String productName; private String productNameKana; private String imageFilePath; private String imageFileName; private int price; private String productCount; private String releaseCompany; private Date releaseDate; private String productDescription; private String categoryId; private Map<String, Object> session; public String execute(){ String result=ERROR; String userId = null; String tempUserId = null; if(!(session.containsKey("loginId")) && !(session.containsKey("tempUserId"))){ CommonUtility commonUtility = new CommonUtility(); session.put("tempUserId", commonUtility.getRamdomValue()); } if(session.containsKey("loginId")){ userId = String.valueOf(session.get("loginId")); } if(!(session.containsKey("loginId")) && session.containsKey("tempUserId")){ userId = String.valueOf(session.get("tempUserId")); tempUserId = String.valueOf(session.get("tempUserId")); } productCount = String.valueOf((productCount.split(" ,",0))[0]); CartInfoDAO cartInfoDAO = new CartInfoDAO(); int count = cartInfoDAO.regist(userId, tempUserId, productId, productCount, price); if(count > 0){ result=SUCCESS; } List<CartInfoDTO> cartInfoDTOList = new ArrayList<CartInfoDTO>(); cartInfoDTOList = cartInfoDAO.getCartInfoDTOList(userId); Iterator<CartInfoDTO> iterator = cartInfoDTOList.iterator(); if(!(iterator.hasNext())){ cartInfoDTOList = null; } session.put("cartInfoDTOList", cartInfoDTOList); int totalPrice = Integer.parseInt(String.valueOf(cartInfoDAO.getTotalPrice(userId))); session.put("totalPrice", totalPrice); return result; } public int getProductId(){ return productId; } public void setProductId(int productId){ this.productId = productId; } public String getProductName(){ return productName; } public void setProductName(String productName){ this.productName = productName; } public String getProductNameKana(){ return productNameKana; } public void setProductNameKana(String productNameKana){ this.productNameKana = productNameKana; } public String getImageFilePath(){ return imageFilePath; } public void setImageFilePath(String imageFilePath){ this.imageFilePath = imageFilePath; } public String getImageFileName(){ return imageFileName; } public void setImageFileName(String imageFileName){ this.imageFileName = imageFileName; } public int getPrice(){ return price; } public void setPrice(int price){ this.price = price; } public String getProductCount(){ return productCount; } public void setProductCount(String productCount){ this.productCount = productCount; } public String getReleaseCompany(){ return releaseCompany; } public void setReleaseCompany(String releaseCompany){ this.releaseCompany = releaseCompany; } public Date getReleaseDate(){ return releaseDate; } public void setReleaseDate(Date releaseDate){ this.releaseDate = releaseDate; } public String getProductDescription(){ return productDescription; } public void setProductDescription(String productDescription){ this.productDescription = productDescription; } public String getCategoryId(){ return categoryId; } public void setCategoryId(String categoryId){ this.categoryId = categoryId; } public Map<String, Object> getSession(){ return session; } public void setSession(Map<String, Object> session){ this.session = session; } }
[ "gild639@yahoo.co.jp" ]
gild639@yahoo.co.jp
c84229317b5e8614a765062d69af6abeeca0fab1
3bfd478788db6ea61352b9d153d229eed55a7c97
/src/Enums/ChompPlayer2Enum.java
a9b1137a87db113ff81ef9cd2622b41a1a5643b7
[]
no_license
ChroniclesOfTheRedeemed/VierGewinnt
9b500d3251ca3337006b8b23fbff9d326b0d515c
7f564c7efb204c455fdae5dec9bd6be6b145d211
refs/heads/master
2023-08-15T01:24:31.573481
2021-09-28T08:27:14
2021-09-28T08:27:14
334,428,287
0
0
null
null
null
null
UTF-8
Java
false
false
629
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 Enums; import Games.Chomp.SteadyClass; import Interfaces.BotFactory; /**__DATE__ , __TIME__ * * @author Mike */ public enum ChompPlayer2Enum { ContainerPlayer(() -> SteadyClass.containerPlayer), Randy(() -> new ChompPlayers.ChompRandy()), Triva(() -> new ChompPlayers.Triva()); ChompPlayer2Enum(BotFactory exactplayer){ thePlayer = exactplayer; } public final BotFactory thePlayer; }
[ "abseander@gmail.com" ]
abseander@gmail.com