blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
bdce2c50cd69162ca189541f0b0188344b9fa9d7
b45b20babd689bab8b9215d7dace248e41f97828
/src/br/com/patterns/flyweight/Mi.java
d90b5a60630d8f163e2106b669d6de42f0f78eef
[]
no_license
ironbats/design-patterns
d7e2fa95577f7b6464dfdb1ae2346b314be9ccd2
3c721d7d9eeabb25b405c001294cdf88409568c2
refs/heads/master
2023-07-11T10:34:16.191872
2021-08-18T01:32:23
2021-08-18T01:32:23
255,257,537
0
0
null
null
null
null
UTF-8
Java
false
false
144
java
package br.com.patterns.flyweight; public class Mi implements Notas { @Override public String simbolos() { return "E"; } }
[ "felipe.rodrigues@keyrus.com.br" ]
felipe.rodrigues@keyrus.com.br
1ad13aee4d555ca562b60c377cb13f0fbb26758c
19b25a7f35235b8771c42b56303c65372534d259
/app/src/main/java/com/pouyaheydari/training/android/basic/bootcamp00/aladhan/Month__1.java
73482877129f25f414b9e76464bbfef49a4b9a48
[]
no_license
SirLordPouya/AndroidBootCamp00
d9a7d97dcad07fd603973be1bfd3a12dcd016c0b
b36f24b5d650e377a9181ad5050ed44bdb71f995
refs/heads/master
2023-04-05T13:14:39.866046
2021-04-01T08:29:37
2021-04-01T08:29:37
352,924,328
0
0
null
null
null
null
UTF-8
Java
false
false
586
java
package com.pouyaheydari.training.android.basic.bootcamp00.aladhan; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class Month__1 { @SerializedName("number") @Expose private Integer number; @SerializedName("en") @Expose private String en; public Integer getNumber() { return number; } public void setNumber(Integer number) { this.number = number; } public String getEn() { return en; } public void setEn(String en) { this.en = en; } }
[ "pouyaheydary@gmail.com" ]
pouyaheydary@gmail.com
1bc4fdbbb1ecb14697a649394541e5db9951ae04
0e2b13921154804df4957d5b918631c7183d44f6
/src/main/java/com/thebloez/myapp/repository/UserRepository.java
61eefd560e89edf95f37e77042b7beba5959bf1d
[]
no_license
thebloez/jhipster-sample-application
43a70cd5e991abaec60cc6b4e5048b90478be2f2
fb91997009537eac5c229d50814b81f510fe5bc7
refs/heads/master
2022-12-25T11:02:31.800138
2020-02-25T07:44:08
2020-02-25T07:44:08
242,938,921
0
0
null
2022-12-16T05:13:09
2020-02-25T07:38:02
Java
UTF-8
Java
false
false
1,324
java
package com.thebloez.myapp.repository; import com.thebloez.myapp.domain.User; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.EntityGraph; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.List; import java.util.Optional; import java.time.Instant; /** * Spring Data JPA repository for the {@link User} entity. */ @Repository public interface UserRepository extends JpaRepository<User, Long> { Optional<User> findOneByActivationKey(String activationKey); List<User> findAllByActivatedIsFalseAndActivationKeyIsNotNullAndCreatedDateBefore(Instant dateTime); Optional<User> findOneByResetKey(String resetKey); Optional<User> findOneByEmailIgnoreCase(String email); Optional<User> findOneByLogin(String login); @EntityGraph(attributePaths = "authorities") Optional<User> findOneWithAuthoritiesById(Long id); @EntityGraph(attributePaths = "authorities") Optional<User> findOneWithAuthoritiesByLogin(String login); @EntityGraph(attributePaths = "authorities") Optional<User> findOneWithAuthoritiesByEmailIgnoreCase(String email); Page<User> findAllByLoginNot(Pageable pageable, String login); }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
0e1dbcd76760e8aa00c70622b7c2d7d7e9341a1e
c4c962a2308a141ddce55c1b0f4a1b40fcebfb86
/security-verification-spring-boot-starter/src/main/java/com/github/shawven/security/verification/config/CaptchaConfiguration.java
5b0742d50f9e02151a47b1cd6a4043dbdd5c7aa2
[ "Apache-2.0" ]
permissive
valley51/security
8531747f84f47d614a391e1e4a84676d203b7e39
cb07498cb2b56dc48bc60480616f5fb4dcf8228d
refs/heads/master
2023-03-05T09:28:13.958401
2021-02-19T01:18:05
2021-02-19T01:18:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
975
java
package com.github.shawven.security.verification.config; /** * 图片验证码配置项 */ public class CaptchaConfiguration extends VerificationConfiguration{ /** * 验证码长度 */ private int length = 6; /** * 过期时间 */ private int expireIn = 60; /** * 图片宽 */ private int width = 67; /** * 图片高 */ private int height = 23; public int getLength() { return length; } public void setLength(int length) { this.length = length; } public int getExpireIn() { return expireIn; } public void setExpireIn(int expireIn) { this.expireIn = expireIn; } public int getWidth() { return width; } public void setWidth(int width) { this.width = width; } public int getHeight() { return height; } public void setHeight(int height) { this.height = height; } }
[ "441653192@qq.com" ]
441653192@qq.com
9a87924a2dbabd189f10204bc8ce00325d882f92
934bc7bdeb8bbcffa8a152820d82a94bf7cd7e71
/src/com/xxs/definedweek/action/shop/GoodsAction.java
da773a9b735bb3b6766f3515c908921f88f15983
[]
no_license
xxs/test
774286d382bc46592c9d6e78404533841ba3bd3d
f9c3860086efb0bcb5a48da02286a7a26397efe8
refs/heads/master
2021-01-16T21:16:23.215244
2013-06-04T04:00:11
2013-06-04T04:00:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,701
java
package com.xxs.definedweek.action.shop; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import com.xxs.definedweek.bean.Pager.Order; import com.xxs.definedweek.entity.Brand; import com.xxs.definedweek.entity.GoodsAttribute; import com.xxs.definedweek.entity.GoodsCategory; import com.xxs.definedweek.service.BrandService; import com.xxs.definedweek.service.GoodsAttributeService; import com.xxs.definedweek.service.GoodsCategoryService; import com.xxs.definedweek.service.GoodsService; import org.apache.commons.lang.StringUtils; import org.apache.struts2.convention.annotation.ParentPackage; import com.opensymphony.xwork2.interceptor.annotations.InputConfig; import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator; import com.opensymphony.xwork2.validator.annotations.Validations; /** * 前台Action类 - 商品 */ @ParentPackage("shop") public class GoodsAction extends BaseShopAction { private static final long serialVersionUID = -4969421249817468001L; private String sign; private Map<String, String> goodsAttributeIdMap; private String orderType; private String viewType; private GoodsCategory goodsCategory; private Brand brand; private List<GoodsCategory> pathList; @Resource(name = "goodsServiceImpl") private GoodsService goodsService; @Resource(name = "goodsCategoryServiceImpl") private GoodsCategoryService goodsCategoryService; @Resource(name = "brandServiceImpl") private BrandService brandService; @Resource(name = "goodsAttributeServiceImpl") private GoodsAttributeService goodsAttributeService; @Validations( requiredStrings = { @RequiredStringValidator(fieldName = "sign", message = "参数错误!") } ) @InputConfig(resultName = "error") public String list() { if (StringUtils.equalsIgnoreCase(viewType, "tableType")) { viewType = "tableType"; } else { viewType = "pictureType"; } if (StringUtils.equalsIgnoreCase(orderType, "priceAsc")) { pager.setOrderBy("price"); pager.setOrder(Order.asc); } else if (StringUtils.equalsIgnoreCase(orderType, "priceDesc")) { pager.setOrderBy("price"); pager.setOrder(Order.desc); } else if (StringUtils.equalsIgnoreCase(orderType, "dateAsc")) { pager.setOrderBy("createDate"); pager.setOrder(Order.asc); } else { orderType = ""; pager.setOrderBy(null); pager.setOrder(null); } pager.setSearchBy(null); pager.setKeyword(null); goodsCategory = goodsCategoryService.getGoodsCategoryBySign(sign); if (goodsCategory == null) { addActionError("参数错误!"); return ERROR; } if (brand != null && StringUtils.isNotEmpty(brand.getId())) { brand = brandService.load(brand.getId()); } else { brand = null; } if (goodsAttributeIdMap == null || goodsAttributeIdMap.size() == 0) { pager = goodsService.getGoodsPager(goodsCategory, brand, null, pager); } else { Map<GoodsAttribute, String> goodsAttributeMap = new HashMap<GoodsAttribute, String>(); for (String goodsAttributeId : goodsAttributeIdMap.keySet()) { GoodsAttribute goodsAttribute = goodsAttributeService.load(goodsAttributeId); String goodsAttributeOption = goodsAttributeIdMap.get(goodsAttributeId); goodsAttributeMap.put(goodsAttribute, goodsAttributeOption); } pager = goodsService.getGoodsPager(goodsCategory, brand, goodsAttributeMap, pager); } pathList = goodsCategoryService.getGoodsCategoryPathList(goodsCategory); if (StringUtils.equalsIgnoreCase(viewType, "tableType")) { return "table_list"; } else { return "picture_list"; } } @Validations( requiredStrings = { @RequiredStringValidator(fieldName = "pager.keyword", message = "搜索关键词不允许为空!") } ) @InputConfig(resultName = "error") public String search() throws Exception { if (StringUtils.equalsIgnoreCase(orderType, "priceAsc")) { pager.setOrderBy("price"); pager.setOrder(Order.asc); } else if (StringUtils.equalsIgnoreCase(orderType, "priceDesc")) { pager.setOrderBy("price"); pager.setOrder(Order.desc); } else if (StringUtils.equalsIgnoreCase(orderType, "dateAsc")) { pager.setOrderBy("createDate"); pager.setOrder(Order.asc); } else { pager.setOrderBy(null); pager.setOrder(null); } pager = goodsService.search(pager); if (StringUtils.equalsIgnoreCase(viewType, "tableType")) { return "table_search"; } else { return "picture_search"; } } public String getSign() { return sign; } public void setSign(String sign) { this.sign = sign; } public Map<String, String> getGoodsAttributeIdMap() { return goodsAttributeIdMap; } public void setGoodsAttributeIdMap(Map<String, String> goodsAttributeIdMap) { this.goodsAttributeIdMap = goodsAttributeIdMap; } public String getOrderType() { return orderType; } public void setOrderType(String orderType) { this.orderType = orderType; } public String getViewType() { return viewType; } public void setViewType(String viewType) { this.viewType = viewType; } public GoodsCategory getGoodsCategory() { return goodsCategory; } public void setGoodsCategory(GoodsCategory goodsCategory) { this.goodsCategory = goodsCategory; } public Brand getBrand() { return brand; } public void setBrand(Brand brand) { this.brand = brand; } public List<GoodsCategory> getPathList() { return pathList; } public void setPathList(List<GoodsCategory> pathList) { this.pathList = pathList; } }
[ "xiaoshi332@163.com" ]
xiaoshi332@163.com
c9fc948da8fa78b437d6152d21defd1380ce9ae7
3c49f0766779f1c4b5865b0a70f82ab790d9866a
/01trunk/xwoa/src/main/java/com/centit/sys/security/DaoFilterSecurityInterceptor.java
836dad7cf2515b1e4a7747ecbc045a214b3cce10
[]
no_license
laoqianlaile/xwoa
bfa9e64ca01e9333efbc5602b41c1816f1fa746e
fe8a618ff9c0ddfcb8b51bc9d6786e2658b62fa1
refs/heads/master
2022-01-09T23:27:17.273124
2019-05-21T08:35:34
2019-05-21T08:35:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,774
java
package com.centit.sys.security; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import org.springframework.security.access.SecurityMetadataSource; import org.springframework.security.access.intercept.AbstractSecurityInterceptor; import org.springframework.security.access.intercept.InterceptorStatusToken; import org.springframework.security.web.FilterInvocation; import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource; public class DaoFilterSecurityInterceptor extends AbstractSecurityInterceptor implements Filter { private FilterInvocationSecurityMetadataSource securityMetadataSource; // ~ Methods // ======================================================================================================== /** * Method that is actually called by the filter chain. Simply delegates to * the {@link #invoke(FilterInvocation)} method. * * @param request * the servlet request * @param response * the servlet response * @param chain * the filter chain * * @throws IOException * if the filter chain fails * @throws ServletException * if the filter chain fails */ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { FilterInvocation fi = new FilterInvocation(request, response, chain); invoke(fi); } public FilterInvocationSecurityMetadataSource getSecurityMetadataSource() { return this.securityMetadataSource; } public Class<? extends Object> getSecureObjectClass() { return FilterInvocation.class; } public void invoke(FilterInvocation fi) throws IOException, ServletException { InterceptorStatusToken token = super.beforeInvocation(fi); try { fi.getChain().doFilter(fi.getRequest(), fi.getResponse()); } finally { super.afterInvocation(token, null); } } public SecurityMetadataSource obtainSecurityMetadataSource() { return this.securityMetadataSource; } public void setSecurityMetadataSource( FilterInvocationSecurityMetadataSource newSource) { this.securityMetadataSource = newSource; } public void destroy() { // TODO Auto-generated method stub } public void init(FilterConfig arg0) throws ServletException { // TODO Auto-generated method stub } }
[ "1820244007@qq.com" ]
1820244007@qq.com
f7bb296b180c368d2c2017ee14bb22ffc46cec68
8f70fe0e87e308fe3dc8cfe9a515a315ed131d18
/src/test/java/com/sugarcrm/test/emails/Emails_19077.java
4b5ed663b078ad292df76bc420281ab9471f0d59
[]
no_license
mustaeenbasit/LKW-Walter_Automation
76fd02c34c766bc34a5c300e3f5943664c70d67b
a97f4feca8e51c21f3cef1949573a8e4909e7143
refs/heads/master
2020-04-09T17:54:32.252374
2018-12-05T09:49:29
2018-12-05T09:49:29
160,495,697
0
0
null
null
null
null
UTF-8
Java
false
false
2,457
java
package com.sugarcrm.test.emails; import org.junit.Ignore; import org.junit.Test; import com.sugarcrm.candybean.datasource.FieldSet; import com.sugarcrm.sugar.VoodooControl; import com.sugarcrm.sugar.VoodooUtils; import com.sugarcrm.test.SugarTest; public class Emails_19077 extends SugarTest { FieldSet customData; FieldSet emailSetupData; VoodooControl subjectCtrl; public void setup() throws Exception { customData = testData.get(testName).get(0); emailSetupData = testData.get("env_email_setup").get(0); sugar.login(); // smtp settings sugar.admin.setEmailServer(emailSetupData); // Contact record sugar.contacts.navToListView(); sugar.contacts.listView.create(); sugar.contacts.createDrawer.getEditField("firstName").set(customData.get("firstName")); sugar.contacts.createDrawer.getEditField("lastName").set(customData.get("lastName")); // TODO: VOOD-866 new VoodooControl("input", "css", "input.newEmail.input-append").set(customData.get("email_address")); new VoodooControl("a", "css", ".btn.addEmail").click(); new VoodooControl("button", "css", ".btn.btn-edit[data-emailproperty='invalid_email']").click(); sugar.contacts.createDrawer.save(); sugar.contacts.listView.clickRecord(1); sugar.logout(); // smtp settings to update/reflect } /** * Verify that strikethrough line are not in the Address Book listview * @throws Exception */ @Test public void Emails_19077_execute() throws Exception { VoodooUtils.voodoo.log.info("Running " + testName + "..."); // Login as Admin sugar.login(); // Quick create - Compose Mail sugar.navbar.quickCreateAction(sugar.emails.moduleNamePlural); // BCC - Address Book // TODO: VOOD-798 new VoodooControl("a", "css", ".compose-sender-options div a:nth-of-type(2)").click(); new VoodooControl("a", "css", "div[data-name='bcc_addresses'] a").click(); VoodooUtils.waitForReady(); // Verifying no strike through mail in address book list new VoodooControl("table", "css", ".layout_Emails .flex-list-view-content table").assertContains(customData.get("email_address"), false); new VoodooControl("a", "css", ".fld_cancel_button.compose-addressbook-headerpane a").click(); // address book cancel new VoodooControl("a", "css", "div[data-voodoo-name='compose'] .fld_cancel_button.detail a").click(); // compose mail cancel VoodooUtils.voodoo.log.info(testName + "complete."); } public void cleanup() throws Exception {} }
[ "mustaeen.basit@ROLUSTECH.NET" ]
mustaeen.basit@ROLUSTECH.NET
a2ac70380711a03fa66d7bc542c1d758b9321093
36a80ecec12da8bf43980768a920c28842d2763b
/src/main/java/com/tools20022/repository/msg/DatePeriodDetails1.java
0064e3095bb72cc3d97c84708da9c3c6f03e0d28
[]
no_license
bukodi/test02
e9045f6f88d44a5833b1cf32b15a3d7b9a64aa83
30990a093e1239b4244c2a64191b6fe1eacf3b00
refs/heads/master
2021-05-08T03:22:32.792980
2017-10-24T23:00:52
2017-10-24T23:00:52
108,186,993
0
0
null
null
null
null
UTF-8
Java
false
false
2,336
java
package com.tools20022.repository.msg; import com.tools20022.metamodel.MMMessageAttribute; import com.tools20022.metamodel.MMMessageComponent; import com.tools20022.repository.datatype.ISODate; import com.tools20022.repository.entity.DateTimePeriod; import java.util.Arrays; import java.util.concurrent.atomic.AtomicReference; /** * Range of time defined by a start date and an end date. */ public class DatePeriodDetails1 { final static private AtomicReference<MMMessageComponent> mmObject_lazy = new AtomicReference<>(); /** * Start date of the range. */ public static final MMMessageAttribute FromDate = new MMMessageAttribute() { { businessElementTrace_lazy = () -> com.tools20022.repository.entity.DateTimePeriod.FromDateTime; componentContext_lazy = () -> DatePeriodDetails1.mmObject(); isDerived = false; xmlTag = "FrDt"; registrationStatus = com.tools20022.metamodel.MMRegistrationStatus.PROVISIONALLY_REGISTERED; name = "FromDate"; definition = "Start date of the range."; maxOccurs = 1; minOccurs = 1; simpleType_lazy = () -> ISODate.mmObject(); } }; /** * End date of the range. */ public static final MMMessageAttribute ToDate = new MMMessageAttribute() { { businessElementTrace_lazy = () -> com.tools20022.repository.entity.DateTimePeriod.ToDateTime; componentContext_lazy = () -> DatePeriodDetails1.mmObject(); isDerived = false; xmlTag = "ToDt"; registrationStatus = com.tools20022.metamodel.MMRegistrationStatus.PROVISIONALLY_REGISTERED; name = "ToDate"; definition = "End date of the range."; maxOccurs = 1; minOccurs = 0; simpleType_lazy = () -> ISODate.mmObject(); } }; final static public MMMessageComponent mmObject() { mmObject_lazy.compareAndSet(null, new MMMessageComponent() { { messageElement_lazy = () -> Arrays.asList(com.tools20022.repository.msg.DatePeriodDetails1.FromDate, com.tools20022.repository.msg.DatePeriodDetails1.ToDate); trace_lazy = () -> DateTimePeriod.mmObject(); dataDictionary_lazy = () -> com.tools20022.repository.GeneratedRepository.dataDict; registrationStatus = com.tools20022.metamodel.MMRegistrationStatus.REGISTERED; name = "DatePeriodDetails1"; definition = "Range of time defined by a start date and an end date."; } }); return mmObject_lazy.get(); } }
[ "bukodi@gmail.com" ]
bukodi@gmail.com
cf8cee3af3b92f60bdcc2a4aa42bf071a0207fa4
6e47715760eec5e49af7aa631a8aa879913b4520
/app/src/cn/dressbook/ui/adapter/LbtVpAdapter.java
147df99fddee021fd598c92210b2b964490bcea3
[]
no_license
yuandonghua/DressBook
65db02eb77a7e2fc9a56a2c700ad7ed89e5fbf42
f2870142e3bdcab003fc48ef90d84619d3991174
refs/heads/master
2021-01-17T18:21:18.076691
2016-09-19T14:21:32
2016-09-19T14:21:32
68,613,330
1
1
null
null
null
null
UTF-8
Java
false
false
3,193
java
package cn.dressbook.ui.adapter; import java.util.List; import org.xutils.x; import org.xutils.common.Callback.CommonCallback; import org.xutils.common.util.LogUtil; import org.xutils.image.ImageOptions; import cn.dressbook.app.ManagerUtils; import cn.dressbook.ui.LoginActivity; import cn.dressbook.ui.ShangPinXiangQingActivity; import cn.dressbook.ui.R; import cn.dressbook.ui.WangYeActivity; import cn.dressbook.ui.model.AttireScheme; import cn.dressbook.ui.model.GuangGao; import android.content.Context; import android.content.Intent; import android.graphics.drawable.Drawable; import android.support.v4.view.PagerAdapter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; /** * @description 广告适配器 * @author 袁东华 * @date 2016-2-23 */ public class LbtVpAdapter extends PagerAdapter { private List<GuangGao> list; private Context mContext; private ImageOptions mImageOptions = ManagerUtils.getInstance() .getImageOptions(); public LbtVpAdapter(Context context) { this.mContext = context; } public void setData(List<GuangGao> list) { this.list = list; } @Override public int getCount() { return list != null && list.size() > 0 ? Integer.MAX_VALUE : 0; } @Override public boolean isViewFromObject(View view, Object object) { return view == object; } @Override public Object instantiateItem(ViewGroup container, int position) { if (list != null && list.size() > 0) { ImageView channelView = (ImageView) LayoutInflater.from(mContext) .inflate(R.layout.item_lbt_vp, container, false); int newPosition = position % list.size(); container.addView(channelView); final GuangGao gg = list.get(newPosition); x.image().bind(channelView, gg.getPic(), mImageOptions, new CommonCallback<Drawable>() { @Override public void onSuccess(Drawable arg0) { // TODO Auto-generated method stub } @Override public void onFinished() { // TODO Auto-generated method stub } @Override public void onError(Throwable arg0, boolean arg1) { // TODO Auto-generated method stub } @Override public void onCancelled(CancelledException arg0) { // TODO Auto-generated method stub } }); // 点击广告 channelView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (ManagerUtils.getInstance().isLogin(mContext)) { if (!"".equals(gg.getUrl())) { Intent productIntent = new Intent(mContext, WangYeActivity.class); productIntent.putExtra("title", gg.getTitle()); productIntent.putExtra("url", gg.getUrl()); mContext.startActivity(productIntent); } } else { Intent loginIntent = new Intent(mContext, LoginActivity.class); mContext.startActivity(loginIntent); } } }); return channelView; } return null; } @Override public void destroyItem(ViewGroup container, int position, Object object) { container.removeView((View) object); } public interface ImageClick { void onImageClick(int position); } }
[ "1348474384@qq.com" ]
1348474384@qq.com
fd0cbc2ab3f2cc340f86b84a7ab8e5fd8f1bd0b3
1cc037b19a154941fd1fdc7d9d1c02702794b975
/core-customize/custom/spar/sparcore/src/com/spar/hcl/core/jalo/ElectronicsColorVariantProduct.java
3283127fe1aabd10485a797ab711e00caf8464b9
[]
no_license
demo-solution/solution
b557dea73d613ec8bb722e2d9a63a338f0b9cf8d
e342fd77084703d43122a17d7184803ea72ae5c2
refs/heads/master
2022-07-16T05:41:35.541144
2020-05-19T14:51:59
2020-05-19T14:51:59
259,383,771
0
0
null
2020-05-19T14:54:38
2020-04-27T16:07:54
Java
UTF-8
Java
false
false
1,306
java
/* * [y] hybris Platform * * Copyright (c) 2000-2015 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package com.spar.hcl.core.jalo; import de.hybris.platform.jalo.Item; import de.hybris.platform.jalo.JaloBusinessException; import de.hybris.platform.jalo.SessionContext; import de.hybris.platform.jalo.type.ComposedType; import org.apache.log4j.Logger; public class ElectronicsColorVariantProduct extends GeneratedElectronicsColorVariantProduct { @SuppressWarnings("unused") private final static Logger LOG = Logger.getLogger( ElectronicsColorVariantProduct.class.getName() ); @Override protected Item createItem(final SessionContext ctx, final ComposedType type, final ItemAttributeMap allAttributes) throws JaloBusinessException { // business code placed here will be executed before the item is created // then create the item final Item item = super.createItem( ctx, type, allAttributes ); // business code placed here will be executed after the item was created // and return the item return item; } }
[ "ruchi_g@hcl.com" ]
ruchi_g@hcl.com
f248c2515c9405533185c4a6794a42e47d6d15f1
b280a34244a58fddd7e76bddb13bc25c83215010
/scmv6/center-task1/src/main/java/com/smate/sie/center/task/pdwh/task/PublicationBriefGenerateTask.java
b0bf855aaa6541e68b0743090cf37e941d68f6a4
[]
no_license
hzr958/myProjects
910d7b7473c33ef2754d79e67ced0245e987f522
d2e8f61b7b99a92ffe19209fcda3c2db37315422
refs/heads/master
2022-12-24T16:43:21.527071
2019-08-16T01:46:18
2019-08-16T01:46:18
202,512,072
2
3
null
2022-12-16T05:31:05
2019-08-15T09:21:04
Java
UTF-8
Java
false
false
2,284
java
package com.smate.sie.center.task.pdwh.task; import java.util.Locale; import java.util.Map; import org.apache.commons.lang.LocaleUtils; import com.smate.core.base.utils.constant.PubXmlConstants; import com.smate.sie.center.task.pdwh.brief.IBriefDriver; import com.smate.sie.core.base.utils.pub.BriefFormatter; /** @author yamingd 生成简要描述(页面表格的来源列) */ public class PublicationBriefGenerateTask implements IPubXmlTask { /** * */ public final static String Brief_GENERATE = "brief_generate"; /* * (non-Javadoc) * * @see com.iris.scm.xml.IXmlTask#getName() */ @Override public String getName() { return this.Brief_GENERATE; } /* * (non-Javadoc) * * @see com.iris.scm.xml.IXmlTask#can(com.iris.scm.xml.XmlDocument, * com.iris.scm.xml.XmlProcessContext) */ @Override public boolean can(PubXmlDocument xmlDocument, PubXmlProcessContext context) { return false; } /* * (non-Javadoc) * * @see com.iris.scm.xml.IXmlTask#run(com.iris.scm.xml.XmlDocument, * com.iris.scm.xml.XmlProcessContext) */ @Override public boolean run(PubXmlDocument xmlDocument, PubXmlProcessContext context) throws Exception { String formTmpl = xmlDocument.getFormTemplate(); IBriefDriver briefDriver = context.getBrifDriverFactory().getDriver(formTmpl, context.getPubTypeId()); if (briefDriver != null) { String briefZh = getLanguagesBrief(LocaleUtils.toLocale("zh_CN"), xmlDocument, context, briefDriver); xmlDocument.setXmlNodeAttribute(PubXmlConstants.PUBLICATION_XPATH, "brief_desc", briefZh); String briefEn = getLanguagesBrief(LocaleUtils.toLocale("en_US"), xmlDocument, context, briefDriver); xmlDocument.setXmlNodeAttribute(PubXmlConstants.PUBLICATION_XPATH, "brief_desc_en", briefEn); } return true; } private String getLanguagesBrief(Locale locale, PubXmlDocument xmlDocument, PubXmlProcessContext context, IBriefDriver briefDriver) throws Exception { Map result = briefDriver.getData(locale, xmlDocument, context); String pattern = briefDriver.getPattern(); BriefFormatter formatter = new BriefFormatter(locale, result); String brief = formatter.format(pattern); formatter = null; return brief; } }
[ "zhiranhe@irissz.com" ]
zhiranhe@irissz.com
692ff6e85ae7ebc449ae4057df42333918d090b8
c172a08411eba60e810ee1ac8632f0176c2981c7
/src/main/java/aula20190521/aep2_1/AppClient.java
a7fa79ae0adf4d8c01ca3f47c876531cad586939
[]
no_license
aczavads/4esoft2019-progr-III
c7ea75b510601033bf7b39375d61f29a423336c6
2eb137d29c61f9e4895d36997da86136ca18bdda
refs/heads/master
2020-04-24T00:48:51.067341
2019-11-06T00:32:22
2019-11-06T00:32:22
171,576,920
5
2
null
null
null
null
UTF-8
Java
false
false
1,470
java
package aula20190521.aep2_1; import java.io.PrintWriter; import java.net.Socket; import java.util.Scanner; public class AppClient { public static void main(String[] args) { AppClient client = new AppClient(); try { client.executar(); } catch (Exception e) { e.printStackTrace(); } } private void executar() throws Exception { Socket socket = null; Scanner leitorTeclado = new Scanner(System.in); PrintWriter toServer = null; Scanner fromServer = null; String comando = null; String resposta = null; do { System.out.print(">>"); comando = leitorTeclado.nextLine(); if (comando.startsWith("connect")) { String[] partesDoComando = comando.split(" "); String endereco = partesDoComando[1]; int porta = Integer.parseInt(partesDoComando[2]); socket = new Socket(endereco, porta); toServer = new PrintWriter(socket.getOutputStream()); fromServer = new Scanner(socket.getInputStream()); System.out.println(fromServer.nextLine()); } else if (comando.equals("disconnect")) { if (socket != null && socket.isConnected()) { toServer.println(comando); toServer.flush(); socket.close(); } } else if (comando.startsWith("ls")) { toServer.println(comando); toServer.flush(); resposta = fromServer.nextLine(); System.out.println(resposta); } } while (!comando.equals("sair")); System.out.println("Tau!"); } }
[ "aczavads@gmail.com" ]
aczavads@gmail.com
b428e610703dd20ba7bbbc1a41db76399a34b9b0
65a09e9f4450c6133e6de337dbba373a5510160f
/crmNaifg/src/main/java/co/simasoft/models/TrdSeries.java
17ece3b6a333c5afffbb6d323f2943a1c570e326
[]
no_license
nelsonjava/simasoft
c0136cdf0c208a5e8d01ab72080330e4a15b1261
be83eb8ef67758be82bbd811b672572eff1910ee
refs/heads/master
2021-01-23T15:21:01.981277
2017-04-27T12:46:16
2017-04-27T12:46:16
27,980,384
0
0
null
null
null
null
UTF-8
Java
false
false
3,718
java
package co.simasoft.models; import java.io.Serializable; import java.util.Set; import java.util.HashSet; import java.util.Date; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Version; import javax.persistence.GenerationType; import javax.persistence.GeneratedValue; import javax.persistence.FetchType; import javax.persistence.Column; import javax.persistence.Lob; import javax.xml.bind.annotation.XmlRootElement; import org.hibernate.search.annotations.Indexed; import org.hibernate.search.annotations.Store; import org.hibernate.search.annotations.Analyze; import org.hibernate.search.annotations.DocumentId; import org.hibernate.search.annotations.Field; import org.hibernate.search.annotations.Index; import javax.persistence.OneToOne; import javax.persistence.OneToMany; import javax.persistence.ManyToOne; import javax.persistence.ManyToMany; import co.simasoft.models.*; import org.hibernate.search.annotations.Resolution; import org.hibernate.search.annotations.DateBridge; import javax.persistence.Temporal; import javax.persistence.TemporalType; // @Indexed @Entity @XmlRootElement public class TrdSeries implements Serializable { private static final long serialVersionUID = 1L; @Id @DocumentId @GeneratedValue(strategy=GenerationType.TABLE) private Long id; @Version private Integer optlock; private double orden; private String alias; @Lob @Column(nullable = true, unique = false) // @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO) private String observations; @Column(nullable = false, unique = true) // @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO) private String name; @ManyToOne private Trd trd; @ManyToOne private Series series; public TrdSeries() { } public TrdSeries(String name) { this.name = name; } public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } public Integer getOptlock() { return this.optlock; } public void setOptlock(Integer optlock) { this.optlock = optlock; } public String getAlias() { return this.alias; } public void setAlias(String alias) { this.alias = alias; } public double getOrden() { return this.orden; } public void setOrden(double orden) { this.orden = orden; } public String getObservations() { return observations; } public void setObservations(String observations) { this.observations = observations; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Trd getTrd() { return trd; } public void setTrd(Trd trd) { this.trd = trd; } public Series getSeries() { return series; } public void setSeries(Series series) { this.series = series; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object ojt) { if ( this == ojt ) return true; if ( ojt == null ) return false; if (getClass() != ojt.getClass()) return false; TrdSeries other = (TrdSeries) ojt; if (id == null) { if (other.id != null) { return false; } } else { if (!id.equals(other.id)) { return false; } } return true; } } // entity
[ "nelsonjava@gmail.com" ]
nelsonjava@gmail.com
36bb34f2cf186ce12e5bb8f880182a8a88f20859
626e31b49309cc5f3b5121b2181c58547cb9d134
/app/src/main/java/org/stepic/droid/core/LocalProgressImpl.java
9f50eb0523f56df5e3f8800bc6c76893b2f4c457
[ "Apache-2.0" ]
permissive
lubandi/stepik-android
4be9d7e3ddb2e6a12536dcbd6d214cbbaecb91de
f79fedb0f28f78a5fbf0f76f94de7ae962567b55
refs/heads/master
2021-01-22T02:48:56.360439
2017-02-03T20:04:53
2017-02-03T20:04:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,439
java
package org.stepic.droid.core; import com.squareup.otto.Bus; import org.stepic.droid.concurrency.IMainHandler; import org.stepic.droid.events.UpdateSectionProgressEvent; import org.stepic.droid.events.units.UnitProgressUpdateEvent; import org.stepic.droid.events.units.UnitScoreUpdateEvent; import org.stepic.droid.model.Progress; import org.stepic.droid.model.Section; import org.stepic.droid.model.Step; import org.stepic.droid.model.Unit; import org.stepic.droid.store.operations.DatabaseFacade; import org.stepic.droid.util.StringUtil; import org.stepic.droid.web.IApi; import java.util.List; import javax.inject.Inject; import kotlin.jvm.functions.Function0; import timber.log.Timber; public class LocalProgressImpl implements LocalProgressManager { private DatabaseFacade databaseFacade; private Bus bus; private IApi api; private IMainHandler mainHandler; @Inject public LocalProgressImpl(DatabaseFacade databaseFacade, Bus bus, IApi api, IMainHandler mainHandler) { this.databaseFacade = databaseFacade; this.bus = bus; this.api = api; this.mainHandler = mainHandler; } @Override public void checkUnitAsPassed(final long stepId) { Step step = databaseFacade.getStepById(stepId); if (step == null) return; List<Step> stepList = databaseFacade.getStepsOfLesson(step.getLesson()); for (Step stepItem : stepList) { if (!stepItem.is_custom_passed()) return; } Unit unit = databaseFacade.getUnitByLessonId(step.getLesson()); if (unit == null) return; // unit.set_viewed_custom(true); // mDatabaseFacade.addUnit(unit); //// TODO: 26.01.16 progress is not saved if (unit.getProgressId() != null) { databaseFacade.markProgressAsPassedIfInDb(unit.getProgressId()); } final long unitId = unit.getId(); //Say to ui that ui is cached now mainHandler.post(new Function0<kotlin.Unit>() { @Override public kotlin.Unit invoke() { bus.post(new UnitProgressUpdateEvent(unitId)); return kotlin.Unit.INSTANCE; } }); } @Override public void updateUnitProgress(final long unitId) { Unit unit = databaseFacade.getUnitById(unitId); if (unit == null) return; Progress updatedUnitProgress; try { updatedUnitProgress = api.getProgresses(new String[]{unit.getProgressId()}).execute().body().getProgresses().get(0); } catch (Exception e) { //if we have no progress of unit or progress is null -> do nothing return; } if (updatedUnitProgress == null) return; databaseFacade.addProgress(updatedUnitProgress); final Double finalScoreInUnit = getScoreOfProgress(updatedUnitProgress); if (finalScoreInUnit == null) { return; } mainHandler.post(new Function0<kotlin.Unit>() { @Override public kotlin.Unit invoke() { bus.post(new UnitScoreUpdateEvent(unitId, finalScoreInUnit)); return kotlin.Unit.INSTANCE; } }); //after that update section progress final long sectionId = unit.getSection(); try { final Section persistentSection = databaseFacade.getSectionById(sectionId); if (persistentSection == null) { return; } String progressId = persistentSection.getProgress(); if (progressId == null) { return; } final Progress progress = api.getProgresses(new String[]{progressId}).execute().body().getProgresses().get(0); databaseFacade.addProgress(progress); mainHandler.post(new Function0<kotlin.Unit>() { @Override public kotlin.Unit invoke() { bus.post(new UpdateSectionProgressEvent(progress, persistentSection.getCourse())); return kotlin.Unit.INSTANCE; } }); } catch (Exception exception) { Timber.e(exception); } } private Double getScoreOfProgress(Progress progress) { if (progress == null) return null; String oldScore = progress.getScore(); return StringUtil.safetyParseString(oldScore); } }
[ "kir-maka@yandex.ru" ]
kir-maka@yandex.ru
1aa3fd1b758bbf1b01b729b2651bf6353e08609c
0af8b92686a58eb0b64e319b22411432aca7a8f3
/api-vs-impl-small/core/src/main/java/org/gradle/testcore/performancenull_11/Productionnull_1070.java
885864158324abf1d1dfe5cd366a039f16701130
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
589
java
package org.gradle.testcore.performancenull_11; public class Productionnull_1070 { private final String property; public Productionnull_1070(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
28612ac24ea54acd15fc64982da69c3ea303ddef
4b954dbad1d42681157eee475d6cd1fa57628e1d
/module4/bai_13_i18n/bai_tap/customer_manager_international/src/main/java/com/customer/CustomerManagerInternationalApplication.java
039de410b658abc4f86f4043a63ae9f2f5eed36e
[]
no_license
hongson2410/C1020G1-PhamHongSon
c5466a068154f7cfcfb6a2c0c2f47bd90ff9f7ab
ae10660a5de6d9c3018a64f238dd34897f6ad2c2
refs/heads/main
2023-04-11T10:55:26.730907
2021-04-18T10:20:00
2021-04-18T10:20:00
307,275,086
0
0
null
null
null
null
UTF-8
Java
false
false
361
java
package com.customer; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class CustomerManagerInternationalApplication { public static void main(String[] args) { SpringApplication.run(CustomerManagerInternationalApplication.class, args); } }
[ "phamhongson2410@gmail.com" ]
phamhongson2410@gmail.com
446c14a66a3751db7e911127d5c6abb921c6ed25
8c75f13cb8919ca8fe48bad550cbc732057830a8
/hep/hepstorefront/web/addonsrc/chinesepspwechatpaymentaddon/de/hybris/platform/chinesepspwechatpay/controllers/ChinesepspwechatpaymentaddonControllerConstants.java
e2ab91277eaada8131f2fa945cdc14096f72bdc6
[]
no_license
glj381413362/Hybris-6-
1510378648741fb3cae3d74dc5c774aafa2b9144
5e4b99e6361a5c0f64e317d4ea471a8633678a9c
refs/heads/master
2021-01-19T20:53:54.051426
2017-04-18T03:19:11
2017-04-18T03:19:11
88,573,491
1
0
null
null
null
null
UTF-8
Java
false
false
584
java
/* * [y] hybris Platform * * Copyright (c) 2017 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.chinesepspwechatpay.controllers; /** */ public interface ChinesepspwechatpaymentaddonControllerConstants { // implement here controller constants used by this extension }
[ "381413362@qq.com" ]
381413362@qq.com
6d680ac75ad1c4a4135cd0b4c8b5481a4eeb1abb
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app50/source/com/shoufu/lib/ah.java
10aac13bc6f49e36dbedfc30f124a8165c1e6200
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
7,251
java
package com.shoufu.lib; import android.content.Context; import android.telephony.TelephonyManager; import java.lang.reflect.Field; import java.lang.reflect.Method; public class ah { private String a = null; private String b = null; private String c = null; private int d = 0; private String e = null; private String f = null; private int g = 0; public ah() {} public static int a(String paramString) { Object localObject2 = null; Object localObject1 = localObject2; if (paramString != null) { localObject1 = localObject2; if (paramString.length() > 5) { localObject1 = paramString.substring(0, 5); } } if (localObject1 == null) { return 0; } if ((((String)localObject1).equals("46000")) || (((String)localObject1).equals("46002")) || (((String)localObject1).equals("46007"))) { return 1; } if ((((String)localObject1).equals("46001")) || (((String)localObject1).equals("46006"))) { return 2; } if ((((String)localObject1).equals("46003")) || (((String)localObject1).equals("46005"))) { return 3; } return 4; } public static ah a(Context paramContext) { ah localAh2 = f(paramContext); ah localAh1 = localAh2; if (localAh2.a() == null) { localAh2 = c(paramContext); localAh1 = localAh2; if (localAh2.a() == null) { localAh2 = d(paramContext); localAh1 = localAh2; if (localAh2.a() == null) { localAh2 = e(paramContext); localAh1 = localAh2; if (localAh2.a() == null) { localAh1 = b(paramContext); } } } } if (localAh1.a() != null) { localAh1.d = a(localAh1.b); localAh1.g = a(localAh1.e); } return localAh1; } public static ah b(Context paramContext) { ah localAh = new ah(); try { paramContext = (TelephonyManager)paramContext.getSystemService("phone"); localAh.b = paramContext.getSubscriberId(); localAh.c = paramContext.getDeviceId(); if (localAh.b == null) { localAh.a = null; return localAh; } localAh.a = "single"; return localAh; } catch (Exception paramContext) { localAh.a = null; } return localAh; } private static ah c(Context paramContext) { ah localAh = new ah(); try { paramContext = (TelephonyManager)paramContext.getSystemService("phone"); Object localObject2 = Class.forName("com.android.internal.telephony.Phone"); Object localObject1 = ((Class)localObject2).getField("GEMINI_SIM_1"); ((Field)localObject1).setAccessible(true); localObject1 = (Integer)((Field)localObject1).get(null); localObject2 = ((Class)localObject2).getField("GEMINI_SIM_2"); ((Field)localObject2).setAccessible(true); localObject2 = (Integer)((Field)localObject2).get(null); Method localMethod = TelephonyManager.class.getDeclaredMethod("getSubscriberIdGemini", new Class[] { Integer.TYPE }); localAh.b = ((String)localMethod.invoke(paramContext, new Object[] { localObject1 })); localAh.e = ((String)localMethod.invoke(paramContext, new Object[] { localObject2 })); localAh.c = paramContext.getDeviceId(); localAh.f = paramContext.getDeviceId(); localAh.a = "MTK"; return localAh; } catch (Exception paramContext) { localAh.a = null; } return localAh; } private static ah d(Context paramContext) { ah localAh = new ah(); try { paramContext = (TelephonyManager)paramContext.getSystemService("phone"); Object localObject2 = Class.forName("com.android.internal.telephony.Phone"); Object localObject1 = ((Class)localObject2).getField("GEMINI_SIM_1"); ((Field)localObject1).setAccessible(true); localObject1 = (Integer)((Field)localObject1).get(null); localObject2 = ((Class)localObject2).getField("GEMINI_SIM_2"); ((Field)localObject2).setAccessible(true); localObject2 = (Integer)((Field)localObject2).get(null); Method localMethod = TelephonyManager.class.getMethod("getDefault", new Class[] { Integer.TYPE }); localObject1 = (TelephonyManager)localMethod.invoke(paramContext, new Object[] { localObject1 }); localObject2 = (TelephonyManager)localMethod.invoke(paramContext, new Object[] { localObject2 }); localAh.b = ((TelephonyManager)localObject1).getSubscriberId(); localAh.e = ((TelephonyManager)localObject2).getSubscriberId(); localAh.c = paramContext.getDeviceId(); localAh.f = paramContext.getDeviceId(); if ((localAh.b == null) && (localAh.e == null)) { localAh.a = null; return localAh; } localAh.a = "MTK"; return localAh; } catch (Exception paramContext) { localAh.a = null; } return localAh; } private static ah e(Context paramContext) { ah localAh = new ah(); try { Object localObject = Class.forName("com.android.internal.telephony.PhoneFactory"); localObject = (String)((Class)localObject).getMethod("getServiceName", new Class[] { String.class, Integer.TYPE }).invoke(localObject, new Object[] { "phone", Integer.valueOf(1) }); TelephonyManager localTelephonyManager = (TelephonyManager)paramContext.getSystemService("phone"); localAh.b = localTelephonyManager.getSubscriberId(); localAh.c = localTelephonyManager.getDeviceId(); localAh.e = ((TelephonyManager)paramContext.getSystemService((String)localObject)).getSubscriberId(); localAh.f = localTelephonyManager.getDeviceId(); localAh.a = "spread"; return localAh; } catch (Exception paramContext) { localAh.a = null; } return localAh; } private static ah f(Context paramContext) { ah localAh = new ah(); try { Object localObject2 = Class.forName("android.telephony.MSimTelephonyManager"); Object localObject1 = paramContext.getSystemService("phone_msim"); paramContext = (TelephonyManager)paramContext.getSystemService("phone"); localObject2 = ((Class)localObject2).getMethod("getSubscriberId", new Class[] { Integer.TYPE }); localAh.b = ((String)((Method)localObject2).invoke(localObject1, new Object[] { Integer.valueOf(0) })); localAh.e = ((String)((Method)localObject2).invoke(localObject1, new Object[] { Integer.valueOf(1) })); localAh.c = paramContext.getDeviceId(); localAh.f = paramContext.getDeviceId(); if ((localAh.b == null) && (localAh.e == null)) { localAh.a = null; return localAh; } localAh.a = "Qualcomm"; return localAh; } catch (Exception paramContext) { localAh.a = null; } return localAh; } public String a() { return this.a; } public String b() { return this.b; } public String c() { return this.e; } public String toString() { return "IMSInfo [m_chipname=" + this.a + ", m_imsi1=" + this.b + ", m_imei1=" + this.c + ", m_operid1=" + this.d + ", m_imsi2=" + this.e + ", m_imei2=" + this.f + ", m_operid2=" + this.g + "]"; } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
0b08e54cc8ed9461654957c6156a0fc9ff8c6903
f4fd782488b9cf6d99d4375d5718aead62b63c69
/com/planet_ink/coffee_mud/Items/Basic/Spring.java
edf555458405e93899f68165017ba409621277a9
[ "Apache-2.0" ]
permissive
sfunk1x/CoffeeMud
89a8ca1267ecb0c2ca48280e3b3930ee1484c93e
0ac2a21c16dfe3e1637627cb6373d34615afe109
refs/heads/master
2021-01-18T11:20:53.213200
2015-09-17T19:16:30
2015-09-17T19:16:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,113
java
package com.planet_ink.coffee_mud.Items.Basic; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2001-2015 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Spring extends StdDrink { @Override public String ID(){ return "Spring";} public Spring() { super(); setName("a spring"); amountOfThirstQuenched=250; amountOfLiquidHeld=999999; amountOfLiquidRemaining=999999; basePhyStats().setWeight(5); capacity=0; setDisplayText("a little magical spring flows here."); setDescription("The spring is coming magically from the ground. The water looks pure and clean."); baseGoldValue=10; basePhyStats().setSensesMask(PhyStats.SENSE_ITEMNOTGET); material=RawMaterial.RESOURCE_FRESHWATER; recoverPhyStats(); } }
[ "bo@zimmers.net" ]
bo@zimmers.net
3ccb723c943f0dc5dfbbb3751507b15b6a61a007
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/domain-20180208/src/main/java/com/aliyun/domain20180208/models/ReserveIntlDomainRequest.java
55fd164800775ef11cb603256486167f65bd567f
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
673
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.domain20180208.models; import com.aliyun.tea.*; public class ReserveIntlDomainRequest extends TeaModel { @NameInMap("DomainName") public String domainName; public static ReserveIntlDomainRequest build(java.util.Map<String, ?> map) throws Exception { ReserveIntlDomainRequest self = new ReserveIntlDomainRequest(); return TeaModel.build(map, self); } public ReserveIntlDomainRequest setDomainName(String domainName) { this.domainName = domainName; return this; } public String getDomainName() { return this.domainName; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
41270697c9fa7213e6881253d3697a94a65fac25
33de98aeb1bb63dedff40bd707e1ed917048ec06
/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ContextPathIntegrationTests.java
0f891cbb36a3e0191c17bef640cd63934b9b7293
[ "Apache-2.0" ]
permissive
Wan123ab/spring-framework-master
519fcc32ca7f72e91774729d15e9eb7f818af893
7866ed116e29b131eb3f7414d6c6c3258c0aedd0
refs/heads/master
2021-06-26T02:08:35.117922
2020-12-07T08:01:14
2020-12-07T08:01:14
185,965,422
0
0
null
null
null
null
UTF-8
Java
false
false
4,186
java
/* * Copyright 2002-2019 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 * * https://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.reactive.result.method.annotation; import java.io.File; import org.junit.Test; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.server.reactive.HttpHandler; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.http.server.reactive.bootstrap.ReactorHttpServer; import org.springframework.http.server.reactive.bootstrap.TomcatHttpServer; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; import org.springframework.web.reactive.config.EnableWebFlux; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; import static org.junit.Assert.*; /** * Integration tests related to the use of context paths. * * @author Rossen Stoyanchev */ public class ContextPathIntegrationTests { @Test public void multipleWebFluxApps() throws Exception { AnnotationConfigApplicationContext context1 = new AnnotationConfigApplicationContext(); context1.register(WebAppConfig.class); context1.refresh(); AnnotationConfigApplicationContext context2 = new AnnotationConfigApplicationContext(); context2.register(WebAppConfig.class); context2.refresh(); HttpHandler webApp1Handler = WebHttpHandlerBuilder.applicationContext(context1).build(); HttpHandler webApp2Handler = WebHttpHandlerBuilder.applicationContext(context2).build(); ReactorHttpServer server = new ReactorHttpServer(); server.registerHttpHandler("/webApp1", webApp1Handler); server.registerHttpHandler("/webApp2", webApp2Handler); server.afterPropertiesSet(); server.start(); try { RestTemplate restTemplate = new RestTemplate(); String actual; String url = "http://localhost:" + server.getPort() + "/webApp1/test"; actual = restTemplate.getForObject(url, String.class); assertEquals("Tested in /webApp1", actual); url = "http://localhost:" + server.getPort() + "/webApp2/test"; actual = restTemplate.getForObject(url, String.class); assertEquals("Tested in /webApp2", actual); } finally { server.stop(); } } @Test public void servletPathMapping() throws Exception { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); context.register(WebAppConfig.class); context.refresh(); File base = new File(System.getProperty("java.io.tmpdir")); TomcatHttpServer server = new TomcatHttpServer(base.getAbsolutePath()); server.setContextPath("/app"); server.setServletMapping("/api/*"); HttpHandler httpHandler = WebHttpHandlerBuilder.applicationContext(context).build(); server.setHandler(httpHandler); server.afterPropertiesSet(); server.start(); try { RestTemplate restTemplate = new RestTemplate(); String actual; String url = "http://localhost:" + server.getPort() + "/app/api/test"; actual = restTemplate.getForObject(url, String.class); assertEquals("Tested in /app/api", actual); } finally { server.stop(); } } @EnableWebFlux @Configuration static class WebAppConfig { @Bean public TestController testController() { return new TestController(); } } @RestController static class TestController { @GetMapping("/test") public String handle(ServerHttpRequest request) { return "Tested in " + request.getPath().contextPath().value(); } } }
[ "853280347@qq.com" ]
853280347@qq.com
1d33df2f5d37c19025369a12e171ecdb37c99080
acd9b11687fd0b5d536823daf4183a596d4502b2
/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/AnalyzerVariant.java
4a4d42524c8bd93a0c6ca9daf8e675402534f77d
[ "Apache-2.0" ]
permissive
szabosteve/elasticsearch-java
75be71df80a4e010abe334a5288b53fa4a2d6d5e
79a1249ae77be2ce9ebd5075c1719f3c8be49013
refs/heads/main
2023-08-24T15:36:51.047105
2021-10-01T14:23:34
2021-10-01T14:23:34
399,091,850
0
0
Apache-2.0
2021-08-23T12:15:19
2021-08-23T12:15:19
null
UTF-8
Java
false
false
1,323
java
/* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ //---------------------------------------------------- // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. //---------------------------------------------------- package co.elastic.clients.elasticsearch._types.analysis; import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.util.UnionVariant; /** * Base interface for {@link Analyzer} variants. */ public interface AnalyzerVariant extends UnionVariant, JsonpSerializable { default Analyzer _toAnalyzer() { return new Analyzer(this); } }
[ "sylvain@elastic.co" ]
sylvain@elastic.co
db5a85878d4852107466415ca396ec4b18f59711
921b73fb6a0964210b9f513b9aa08b4d1c2cf7d7
/src/main/java/TercerParcialClase/Bridge/basic/ImplementadorB.java
b04bb8940050fa7e91e974840722d83bd99e3eee
[]
no_license
X4TKC/PatronesDeDiseno
d781ff5b4c7459f01dfe484cdc18e7a9ec89d75b
0ccbadc36ae5355707193766cec3e71dac5830b3
refs/heads/master
2020-08-10T03:14:55.449201
2019-11-15T12:26:14
2019-11-15T12:26:14
214,243,199
1
1
null
null
null
null
UTF-8
Java
false
false
322
java
package TercerParcialClase.Bridge.basic; public class ImplementadorB implements Implementor { @Override public void operationA() { System.out.println("Implementador B : Operation A"); } @Override public void operationB() { System.out.println("Implementador B : Operation B"); } }
[ "tovilaskevin@gmail.com" ]
tovilaskevin@gmail.com
1530ffa3c0fc3de5b5140171969cafef425d77bd
f8f7bcbfbf566bf950f284199774b17e73905d24
/src/main/java/geeksforgeeks/overlappingintervals/Main.java
0052cdb882be73a655dcc8ac75f46c6b21774ab1
[]
no_license
mageddo/algorithms
a78b060285173b198c11466de7ae4cb0787f7ccf
9ef2c0f04814b161c2fcaf47db70cec9d3201a73
refs/heads/master
2021-07-23T19:52:11.725547
2021-07-14T22:37:09
2021-07-14T22:37:09
73,210,122
0
0
null
null
null
null
UTF-8
Java
false
false
1,769
java
package geeksforgeeks.overlappingintervals; import java.util.*; /** * http://practice.geeksforgeeks.org/problems/overlapping-intervals/0 * * @author elvis * @version $Revision: $<br/> * $Id: $ * @since 9/15/17 7:25 PM */ public class Main { public static void main(String[] args) { final Scanner scanner = new Scanner(System.in); final int testCases = scanner.nextInt(); // dynamic test cases for(int i=0; i < testCases; i++){ // getting the pairs final List<Pair> pairs = new ArrayList<>(); final Deque<Pair> mergedPairs = new ArrayDeque<>(); final int pairsQtd = scanner.nextInt(); for(int j=0; j < pairsQtd; j++){ pairs.add(new Pair(scanner.nextInt(), scanner.nextInt())); } if(pairs.isEmpty()){ return ; } Collections.sort(pairs); // System.out.println(pairs); mergedPairs.push(pairs.get(0)); // merging overlaps for (int h = 1; h < pairs.size(); h++) { final Pair head = mergedPairs.getFirst(); final Pair current = pairs.get(h); if(current.a > head.b){ mergedPairs.push(current); }else if(current.b > head.b) { head.b = current.b; } } // priting result String msg = ""; Iterator<Pair> it = mergedPairs.descendingIterator(); for (; it.hasNext() ;) { final Pair p = it.next(); if (!msg.isEmpty()) { System.out.printf(msg); } msg = String.format("%d %d ", p.a, p.b); } System.out.println(msg.trim()); } } static class Pair implements Comparable<Pair> { int a,b; public Pair(int a, int b) { this.a = a; this.b = b; } @Override public int compareTo(Pair o) { return Integer.compare(this.a, o.a); } @Override public String toString() { return "{a: " + a + ", b: " + b + "}"; } } }
[ "edigitalb@gmail.com" ]
edigitalb@gmail.com
6adb77ee407ecedef4f65ad7e7c284fd4ca2defe
95f6e2e941b3b189bc056ea32ca1d1833802b521
/play-services-core/src/main/java/org/microg/gms/gcm/SendReceiver.java
f49f53e26d8acfbc5dd14c8c6dbd0ee756f5c220
[ "Apache-2.0" ]
permissive
NoGooLag/android_packages_apps_GmsCore
fbf3d2c045a834cb1e8d43572df27436d9b51ec0
ccf130b2ef08498ad98182d82aadde7260ee7e63
refs/heads/master
2021-08-29T07:18:41.977188
2020-03-14T16:35:14
2020-03-14T16:35:14
133,546,504
8
3
Apache-2.0
2020-02-23T18:00:48
2018-05-15T16:51:51
Java
UTF-8
Java
false
false
1,514
java
/* * Copyright (C) 2013-2017 microG Project Team * * 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.microg.gms.gcm; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v4.content.WakefulBroadcastReceiver; import android.util.Log; import static org.microg.gms.gcm.McsConstants.ACTION_SEND; public class SendReceiver extends WakefulBroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if (intent.getExtras() == null) return; Bundle extras = intent.getExtras(); Log.d("GmsMcsSendRcvr", "original extras: " + extras); for (String key : extras.keySet()) { if (key.startsWith("GOOG.") || key.startsWith("GOOGLE.")) { extras.remove(key); } } Intent i = new Intent(context, McsService.class); i.setAction(ACTION_SEND); i.putExtras(extras); startWakefulService(context, i); } }
[ "git@larma.de" ]
git@larma.de
b45b241be7de3f8ec2b2512fe99d4265fa7f8327
e3965b3ecb8e941a8335f9dda9d5eb768d160e62
/Critaria-API-projection-App-proj-48/src/main/java/com/hibernate/DAO/BankUpdationImpl.java
ead60b879a70d79385b978ac9b0161aa903d55e5
[]
no_license
deepndra9755/hibernate
59de895ac431c9b9361e83fb803168607424ce56
9baf5c8e4efd755b2405b4151148d6fab2a181ad
refs/heads/master
2023-07-02T16:45:56.730295
2021-08-08T00:04:56
2021-08-08T00:04:56
387,090,574
0
0
null
null
null
null
UTF-8
Java
false
false
1,799
java
package com.hibernate.DAO; import java.util.List; import javax.persistence.NamedQuery; import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.Transaction; import org.hibernate.criterion.CriteriaQuery; import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Order; import org.hibernate.criterion.ProjectionList; import org.hibernate.criterion.Projections; import org.hibernate.criterion.PropertyProjection; import org.hibernate.criterion.Restrictions; import org.hibernate.query.Query; import org.hibernate.type.StandardBasicTypes; import com.hibernate.Entity.SbiBank; import com.hibs.utility.HBNutility; import com.mysql.cj.x.protobuf.MysqlxCrud.Projection; import com.sun.xml.bind.api.impl.NameConverter.Standard; public class BankUpdationImpl implements IBankUpdation { @Override public List<Object[]> DisplayingRecord() { // TODO Auto-generated method stub List<Object[]>js=null; try { Transaction tx=null; Session ses=HBNutility.getSession(); tx=ses.beginTransaction(); Criteria ct=ses.createCriteria(SbiBank.class); org.hibernate.criterion.Projection pj=Projections.property("customerNAME"); org.hibernate.criterion.Projection pj1=Projections.property("ACnum"); ProjectionList kd=Projections.projectionList(); kd.add(pj1); kd.add(pj); Criterion cts=Restrictions.ge("ACnum",300); // ProjectionList pod=Projections.projectionList(); // pod.add(pod); // pod.add(pj1); // ct.setProjection(kd); ct.add(cts); js=ct.list(); System.out.println(js.size()); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } return js; }}
[ "cotlin@DESKTOP-RNJ3PV0" ]
cotlin@DESKTOP-RNJ3PV0
3d717d447fad16f760d33ecaad6264b07bfc0208
37278ea984120d20661bd568a8908d696c0062f7
/javamalls/platform/domain/query/StoreDepartmentQueryObject.java
3552136b523c373ac7dc31a810d0c53ed28af9b7
[]
no_license
cjp472/dinghuobao
412f13b142e57b5868d609fdced51b9ee707ddb7
1d36ef79282955d308c07482e6443648202eb243
refs/heads/master
2020-03-19T09:48:21.018770
2018-05-05T07:18:48
2018-05-05T07:18:48
136,318,589
2
3
null
2018-06-06T11:23:23
2018-06-06T11:23:23
null
UTF-8
Java
false
false
466
java
package com.javamalls.platform.domain.query; import org.springframework.web.servlet.ModelAndView; import com.javamalls.base.query.QueryObject; public class StoreDepartmentQueryObject extends QueryObject { public StoreDepartmentQueryObject(String currentPage, ModelAndView mv, String orderBy, String orderType) { super(currentPage, mv, orderBy, orderType); } public StoreDepartmentQueryObject() { } }
[ "huyang3868@163.com" ]
huyang3868@163.com
606e42196948da6901119b83199c4b1b0d4830ec
4f806a911ca596014b760cda408b89486966b346
/okhttp/src/main/java/learn/io/reactivex/android/MainThreadDisposable.java
3d295788b9a8c6ec9c275c0aec4d23b12ed41334
[ "Apache-2.0" ]
permissive
wy676579037/learn_okhttp
ff38b93801e6130415dfbd0b069434ffeb5715f6
d03122a2f0bf023b6599ad49e733761807f97265
refs/heads/master
2023-04-12T10:50:53.310065
2021-04-23T11:41:09
2021-04-23T11:41:09
268,242,510
1
0
Apache-2.0
2020-05-31T09:38:28
2020-05-31T08:51:46
Java
UTF-8
Java
false
false
3,189
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 learn.io.reactivex.android; import android.os.Looper; import learn.io.reactivex.android.schedulers.AndroidSchedulers; import learn.io.reactivex.disposables.Disposable; import java.util.concurrent.atomic.AtomicBoolean; /** * A {@linkplain Disposable disposable} which ensures its {@linkplain #onDispose() * dispose action} is executed on the main thread. When unsubscription occurs on a different * thread than the main thread, the action is posted to run on the main thread as soon as possible. * <p> * Instances of this class are useful in creating observables which interact with APIs that can * only be used on the main thread, such as UI objects. * <p> * A {@link #verifyMainThread() convenience method} is also provided for validating whether code * is being called on the main thread. Calls to this method along with instances of this class are * commonly used when creating custom observables using the following pattern: * <pre><code> * &#064;Override public void subscribe(Observer<? extends T> o) { * MainThreadDisposable.verifyMainThread(); * * // TODO setup behavior * * o.onSubscribe(new MainThreadDisposable() { * &#064;Override protected void onDispose() { * // TODO undo behavior * } * }); * } * </code></pre> */ public abstract class MainThreadDisposable implements Disposable { /** * Verify that the calling thread is the Android main thread. * <p> * Calls to this method are usually preconditions for subscription behavior which instances of * this class later undo. See the class documentation for an example. * * @throws IllegalStateException when called from any other thread. */ public static void verifyMainThread() { if (Looper.myLooper() != Looper.getMainLooper()) { throw new IllegalStateException( "Expected to be called on the main thread but was " + Thread.currentThread().getName()); } } private final AtomicBoolean unsubscribed = new AtomicBoolean(); @Override public final boolean isDisposed() { return unsubscribed.get(); } @Override public final void dispose() { if (unsubscribed.compareAndSet(false, true)) { if (Looper.myLooper() == Looper.getMainLooper()) { onDispose(); } else { AndroidSchedulers.mainThread().scheduleDirect(new Runnable() { @Override public void run() { onDispose(); } }); } } } protected abstract void onDispose(); }
[ "wangyong14@hikviskon.com.cn" ]
wangyong14@hikviskon.com.cn
ed8ee7eed249c2b38ad24fd66aab451cc1a66e3c
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
/DecompiledViberSrc/app/src/main/java/com/google/android/exoplayer2/c/a.java
ca222d49e84015076d15edafed7ac2b31be3f06d
[]
no_license
cga2351/code
703f5d49dc3be45eafc4521e931f8d9d270e8a92
4e35fb567d359c252c2feca1e21b3a2a386f2bdb
refs/heads/master
2021-07-08T15:11:06.299852
2021-05-06T13:22:21
2021-05-06T13:22:21
60,314,071
1
3
null
null
null
null
UTF-8
Java
false
false
859
java
package com.google.android.exoplayer2.c; public abstract class a { private int a; public void a() { this.a = 0; } public final void a_(int paramInt) { this.a = paramInt; } public final void b(int paramInt) { this.a = (paramInt | this.a); } public final void c(int paramInt) { this.a &= (paramInt ^ 0xFFFFFFFF); } public final boolean c() { return d(4); } public final boolean d() { return d(1); } protected final boolean d(int paramInt) { return (paramInt & this.a) == paramInt; } public final boolean j_() { return d(-2147483648); } } /* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_dex2jar.jar * Qualified Name: com.google.android.exoplayer2.c.a * JD-Core Version: 0.6.2 */
[ "yu.liang@navercorp.com" ]
yu.liang@navercorp.com
2d35ac6117983d0c0ee70d2268806c9bfd5c998c
6500848c3661afda83a024f9792bc6e2e8e8a14e
/gp_JADX/com/google/android/instantapps/common/p221d/p222a/C5726p.java
511c511729ce38d2559eb8039c628a038883209f
[]
no_license
enaawy/gproject
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
91cb88559c60ac741d4418658d0416f26722e789
refs/heads/master
2021-09-03T03:49:37.813805
2018-01-05T09:35:06
2018-01-05T09:35:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
388
java
package com.google.android.instantapps.common.p221d.p222a; import android.content.Context; import p000c.p001a.C0000a; public final class C5726p implements C0000a { public final C0000a f28972a; public C5726p(C0000a c0000a) { this.f28972a = c0000a; } public final /* synthetic */ Object mo1a() { return new C5725o((Context) this.f28972a.mo1a()); } }
[ "genius.ron@gmail.com" ]
genius.ron@gmail.com
984da83f5f72020a37f3a024f38ee8c906f32230
f897a0dfa41a10e19a15568aace27171f8d6a23a
/reposilite-backend/src/main/java/org/panda_lang/reposilite/ReposiliteWriter.java
dabb933dff1747b5060a2c5c8f1d874fa3556d68
[ "Apache-2.0" ]
permissive
KnologyBase/reposilite
119331221946329ab6ed7d388c1720d3e6d409ec
2c04b4ed157d97337755d3e5a37da2f6866f5dff
refs/heads/master
2022-12-22T00:01:46.581370
2020-09-23T16:14:00
2020-09-23T16:14:00
298,048,776
1
0
Apache-2.0
2020-09-23T17:43:32
2020-09-23T17:43:32
null
UTF-8
Java
false
false
2,565
java
/* * Copyright (c) 2020 Dzikoysk * * 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.panda_lang.reposilite; import org.apache.commons.collections4.queue.CircularFifoQueue; import org.tinylog.core.LogEntry; import org.tinylog.core.LogEntryValue; import org.tinylog.writers.AbstractFormatPatternWriter; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Queue; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Consumer; /** * dirty af */ public final class ReposiliteWriter extends AbstractFormatPatternWriter { public static final int CACHE_SIZE = 100; private static final Queue<String> CACHE = new CircularFifoQueue<>(CACHE_SIZE); private static final Map<Object, Consumer<String>> CONSUMERS = new ConcurrentHashMap<>(); public ReposiliteWriter(Map<String, String> properties) { super(properties); } @Override public void write(LogEntry logEntry) { String message = render(logEntry); CACHE.add(message); CONSUMERS.forEach((object, consumer) -> consumer.accept(message)); System.out.print(message); } @Override public void flush() { } @Override public void close() { clear(); } public static void clear() { CACHE.clear(); CONSUMERS.clear(); } public static boolean contains(String message) { return getCache().stream() .filter(Objects::nonNull) .anyMatch(line -> line.contains(message)); } public static List<String> getCache() { return new ArrayList<>(CACHE); } @Override public Collection<LogEntryValue> getRequiredLogEntryValues() { Collection<LogEntryValue> logEntryValues = super.getRequiredLogEntryValues(); logEntryValues.add(LogEntryValue.LEVEL); return logEntryValues; } public static Map<Object, Consumer<String>> getConsumers() { return CONSUMERS; } }
[ "dzikoysk@dzikoysk.net" ]
dzikoysk@dzikoysk.net
3e0ab2feda42d6006a34865637d9d9ba07ee01d7
ec682b1e2f120457c94779c341a221935d2b7575
/src/main/java/com/faceye/component/data/hbase/wrapper/Col.java
2971f4cb41f65f79743abb7d04030d75ac36c4e0
[]
no_license
haipenge/faceye-data
0940bd594618a8cdf1d525668ab88166aa47f3ad
3bb9cadfa12aa786df976b13f05afa0e9ade4977
refs/heads/master
2022-07-10T13:40:03.083955
2019-06-20T10:51:47
2019-06-20T10:51:47
94,689,416
1
1
null
2022-07-01T21:23:48
2017-06-18T13:36:54
Java
UTF-8
Java
false
false
588
java
package com.faceye.component.data.hbase.wrapper; import java.io.Serializable; /** * 列对像 * @author songhaipeng * */ public class Col implements Serializable{ /** * */ private static final long serialVersionUID = 1L; /** * 列修饰符 */ private String key=""; /** * 列值,key,value共同组成hbase->row->family->cell */ private String value=""; public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } }
[ "haipenge@gmail.com" ]
haipenge@gmail.com
b0e84ef2f7f142a02fde787f1e419985ab27e005
7ad54455ccfdd0c2fa6c060b345488ec8ebb1cf4
/ocr/manager/ProcessExecutionProps.java
7fd04f387397c98c0e5858517992a5a01a036008
[]
no_license
chetanreddym/segmentation-correction-tool
afdbdaa4642fcb79a21969346420dd09eea72f8c
7ca3b116c3ecf0de3a689724e12477a187962876
refs/heads/master
2021-05-13T20:09:00.245175
2018-01-10T04:42:03
2018-01-10T04:42:03
116,817,741
0
0
null
null
null
null
UTF-8
Java
false
false
2,863
java
package ocr.manager; import java.io.File; import ocr.view.Props; class ProcessExecutionProps extends Props { public ProcessExecutionProps() { super(new File("config/ProcessExecution/ExternalProcess.properties")); } public long getTimeForOCROrganizer() { String time = getProperty("OCROrganizer_UpdateAfter"); if (time == null) { return 1000L; } return Long.parseLong(time) * 1000L; } public long getTimeForOCRProgram() { String time = getProperty("OCR_UpdateAfter"); if (time == null) { return 1000L; } return Long.parseLong(time) * 1000L; } public long getTimeForSegProgram() { String time = getProperty("SEG_UpdateAfter"); if (time == null) { return 1000L; } return Long.parseLong(time) * 1000L; } public long getTimeForTagProgram() { String time = getProperty("TAG_UpdateAfter"); if (time == null) { return 1000L; } return Long.parseLong(time) * 1000L; } }
[ "chetanb4u2009@outlook.com" ]
chetanb4u2009@outlook.com
97b3d825c3812ade106aebcd7e0b0dda8a36f44d
c11dfb8d82ae0660e3ef5b0a753562b1f72cf5e1
/fresco-2.5.0/fbcore/src/main/java/com/facebook/common/executors/StatefulRunnable.java
6f3ee331252472d3157b0d9fffb46a4e7f3550a8
[ "MIT" ]
permissive
Poomipat-Ch/Software-Architecture-and-Design-Fresco
8e7cad0b64fa1f7c5ae672da1bc6484d68639afb
fac688c6406738970780ef965c0fc2a13eacc600
refs/heads/main
2023-09-01T23:47:48.348929
2021-11-21T18:20:50
2021-11-21T18:20:50
430,391,642
0
0
null
null
null
null
UTF-8
Java
false
false
2,398
java
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ package com.facebook.common.executors; import com.facebook.infer.annotation.Nullsafe; import java.util.concurrent.atomic.AtomicInteger; import javax.annotation.Nullable; /** * Abstraction for computation. * * <p>Computation expressed as StatefulRunnable can be cancelled, but only if it has not started * yet. * * <p>For better decoupling of the code computing the result and the code that handles it, 4 * separate methods are provided: getResult, onSuccess, onFailure and onCancellation. * * <p>This runnable can be run only once. Subsequent calls to run method won't have any effect. */ @Nullsafe(Nullsafe.Mode.LOCAL) public abstract class StatefulRunnable<T> extends Runnable { protected static final int STATE_CREATED = 0; protected static final int STATE_STARTED = 1; protected static final int STATE_CANCELLED = 2; protected static final int STATE_FINISHED = 3; protected static final int STATE_FAILED = 4; protected final AtomicInteger mState; public StatefulRunnable() { mState = new AtomicInteger(STATE_CREATED); } @Override public final void run() { if (!mState.compareAndSet(STATE_CREATED, STATE_STARTED)) { return; } T result; try { result = getResult(); } catch (Exception e) { mState.set(STATE_FAILED); onFailure(e); return; } mState.set(STATE_FINISHED); try { onSuccess(result); } finally { disposeResult(result); } } public void cancel() { if (mState.compareAndSet(STATE_CREATED, STATE_CANCELLED)) { onCancellation(); } } /** * Called after computing result successfully. * * @param result */ protected void onSuccess(@Nullable T result) { } /** * Called if exception occurred during computation. * * @param e */ protected void onFailure(Exception e) { } /** * Called when the runnable is cancelled. */ protected void onCancellation() { } /** * Called after onSuccess callback completes in order to dispose the result. * * @param result */ protected void disposeResult(@Nullable T result) { } @Nullable protected abstract T getResult() throws Exception ; }
[ "poomipat002@gmail.com" ]
poomipat002@gmail.com
0268fe179e31e59bb70822326215f55fcbd23d12
edbd417df42bf2f61e1794a06f893bf86b65f0b8
/holding-objects/src/main/java/org/denispozo/tutorial/thj/holding/set/UniqueWordsEx16.java
b982d980b49ff3411de2d041d8fc0904245e4512
[]
no_license
denis-pozo/thinking-in-java
1c25717b0ddb55f5dcf10eacece61953c54ee3b7
2f03d159cf16fbcc92f37381e02aa073d4de01bd
refs/heads/master
2022-12-29T11:08:18.597445
2020-10-14T09:32:40
2020-10-14T09:32:40
263,020,791
0
0
null
2020-10-14T09:32:41
2020-05-11T11:18:05
Java
UTF-8
Java
false
false
808
java
package org.denispozo.tutorial.thj.holding.set; import java.util.Set; import java.util.TreeSet; import org.denispozo.tutorial.thj.util.TextFile; import static org.denispozo.tutorial.thj.util.PrintUtil.*; /* * Chapter - Holding your objects * Section - Set * Exercise 16 */ public class UniqueWordsEx16 { public static void main(String[] args) { int count = 0; Set<String> words = new TreeSet<String>(new TextFile("pom.xml", "\\W+")); Set<Character> characters = new TreeSet<Character>(); for(String word : words){ print(word + " has " + word.length() + " characters"); for(Character ch : word.toCharArray()){ count ++; characters.add(ch); } } print("Characters inserted: " + count); print("Characters stored: " + characters.size()); print(characters); } }
[ "denis.pozo@dai-labor.de" ]
denis.pozo@dai-labor.de
a0759b33dedae1632329598feb3a6d608dccaee4
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/apache--cassandra/a991b64811f4d6adb6c7b31c0df52288eb06cf19/after/TimeSortTest.java
cbbd040a640f63e95412a44d13847c99694e17a7
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,808
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.cassandra.db; import java.util.Iterator; import org.junit.Test; import org.apache.cassandra.cql3.CQLTester; import org.apache.cassandra.cql3.UntypedResultSet; import org.apache.cassandra.Util; import static org.junit.Assert.assertEquals; public class TimeSortTest extends CQLTester { @Test public void testMixedSources() throws Throwable { String tableName = createTable("CREATE TABLE %s (a int, b int, c int, PRIMARY KEY (a, b))"); ColumnFamilyStore cfs = Keyspace.open(KEYSPACE).getColumnFamilyStore(tableName); execute("INSERT INTO %s (a, b, c) VALUES (?, ?, ?) USING TIMESTAMP ?", 0, 100, 0, 100L); cfs.forceBlockingFlush(); execute("INSERT INTO %s (a, b, c) VALUES (?, ?, ?) USING TIMESTAMP ?", 0, 0, 1, 0L); assertRows(execute("SELECT * FROM %s WHERE a = ? AND b >= ? LIMIT 1000", 0, 10), row(0, 100, 0)); } @Test public void testTimeSort() throws Throwable { String tableName = createTable("CREATE TABLE %s (a int, b int, c int, PRIMARY KEY (a, b))"); ColumnFamilyStore cfs = Keyspace.open(KEYSPACE).getColumnFamilyStore(tableName); for (int i = 900; i < 1000; ++i) for (int j = 0; j < 8; ++j) execute("INSERT INTO %s (a, b, c) VALUES (?, ?, ?) USING TIMESTAMP ?", i, j * 2, 0, (long)j * 2); validateTimeSort(); cfs.forceBlockingFlush(); validateTimeSort(); // interleave some new data to test memtable + sstable DecoratedKey key = Util.dk("900"); for (int j = 0; j < 4; ++j) execute("INSERT INTO %s (a, b, c) VALUES (?, ?, ?) USING TIMESTAMP ?", 900, j * 2 + 1, 1, (long)j * 2 + 1); // and some overwrites execute("INSERT INTO %s (a, b, c) VALUES (?, ?, ?) USING TIMESTAMP ?", 900, 0, 2, 100L); execute("INSERT INTO %s (a, b, c) VALUES (?, ?, ?) USING TIMESTAMP ?", 900, 10, 2, 100L); // verify UntypedResultSet results = execute("SELECT * FROM %s WHERE a = ? AND b >= ? LIMIT 1000", 900, 0); assertEquals(12, results.size()); Iterator<UntypedResultSet.Row> iter = results.iterator(); for (int j = 0; j < 8; j++) { UntypedResultSet.Row row = iter.next(); assertEquals(j, row.getInt("b")); } assertRows(execute("SELECT * FROM %s WHERE a = ? AND b IN (?, ?)", 900, 0, 10), row(900, 0, 2), row(900, 10, 2)); } private void validateTimeSort() throws Throwable { for (int i = 900; i < 1000; ++i) { for (int j = 0; j < 8; j += 3) { UntypedResultSet results = execute("SELECT writetime(c) AS wt FROM %s WHERE a = ? AND b >= ? LIMIT 1000", i, j * 2); assertEquals(8 - j, results.size()); int k = j; for (UntypedResultSet.Row row : results) assertEquals((k++) * 2, row.getLong("wt")); } } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
647dcbd61b96c0e6e2b2b8399ace1de8c1aa4997
d5633867ec5a04e6fca735cd062e8f31a3604352
/net.dougqh.android.nejug/scratch-src/BenchmarkScratch.java
b492797f6ca4ae9301d200964b52340425293711
[]
no_license
mitchellmebane/nejug2011
24e2fed743a7ce500cc22b2519bdce4e5e0e22d9
465c6a05c328739c6523c16c25c9b2d74228c16d
refs/heads/master
2020-12-07T02:22:08.470561
2011-11-10T04:20:50
2011-11-10T04:20:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
788
java
import java.io.File; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import net.dougqh.benchmark.BenchmarkResults; import net.dougqh.benchmark.Benchmarker; import net.dougqh.benchmark.Benchmarker.Caching; import net.dougqh.benchmark.Benchmarker.Platform; import optimizations.InvocationsBenchmark; public class BenchmarkScratch { public static final void main( final String[] args ) throws InterruptedException, ExecutionException { Benchmarker benchmarker = new Benchmarker( new File( "benchmarks-lib" ), new File( "benchmarks-src" ) ); Future< BenchmarkResults > benchmarkFuture = benchmarker.benchmark( InvocationsBenchmark.class, Platform.JVM, Caching.FORCE_UPDATE ); System.out.println( benchmarkFuture.get() ); } }
[ "dougqh@gmail.com" ]
dougqh@gmail.com
797abf82231aec1c100b660f870730a57607d8a6
c7517f900a9a790a2638a3adebe8945ccc456f35
/GetTogether/app/src/main/java/com/tem/gettogether/rongyun/CustomizeBuyMessage.java
6fc33b2b3103247ed4d4fdad5b11f3419e04fcfb
[]
no_license
chenshichun/jushangmatou
e5e60874e576c83fe54d9cb057dfb61992dfc1b1
b940eed79fda8db2245602ff2c68161972afd18e
refs/heads/master
2022-04-02T14:54:29.455815
2020-01-08T01:20:27
2020-01-08T01:20:27
197,161,420
0
2
null
null
null
null
UTF-8
Java
false
false
6,620
java
package com.tem.gettogether.rongyun; import android.annotation.SuppressLint; import android.os.Parcel; import android.util.Log; import org.json.JSONException; import org.json.JSONObject; import java.io.UnsupportedEncodingException; import io.rong.common.ParcelUtils; import io.rong.imlib.MessageTag; import io.rong.imlib.model.MessageContent; /** * @Projectgoods_name: GetTogether * @Package: com.tem.gettogether.rongyun * @Classgoods_name: CustomizeBuyMessage * @Author: csc * @CreateDate: 2019/9/25 15:21 * @Description: */ @SuppressLint("ParcelCreator") @MessageTag(value = "GT:goods", flag = MessageTag.ISCOUNTED | MessageTag.ISPERSISTED) public class CustomizeBuyMessage extends MessageContent { private String image; private String goods_id; private String goods_name; private String batch_number; private String type; private String store_id; private String goods_type; private String qiugou_type; public CustomizeBuyMessage(String goods_id,String image, String goods_name, String batch_number,String type,String store_id,String goods_type,String qiugou_type) { this.goods_id = goods_id; this.image = image; this.goods_name = goods_name; this.batch_number = batch_number; this.type = type; this.store_id = store_id; this.goods_type = goods_type; this.qiugou_type = qiugou_type; } public String getQiugou_type() { return qiugou_type; } public void setQiugou_type(String qiugou_type) { this.qiugou_type = qiugou_type; } public String getGoods_type() { return goods_type; } public void setGoods_type(String goods_type) { this.goods_type = goods_type; } public String getStore_id() { return store_id; } public void setStore_id(String store_id) { this.store_id = store_id; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getGoods_id() { return goods_id; } public void setGoods_id(String goods_id) { this.goods_id = goods_id; } public String getImage() { return image; } public void setImage(String image) { this.image = image; } public String getGoods_name() { return goods_name; } public void setGoods_name(String goods_name) { this.goods_name = goods_name; } public String getBatch_number() { return batch_number; } public void setBatch_number(String count) { this.batch_number = count; } @Override public byte[] encode() { JSONObject jsonObj = new JSONObject(); try { jsonObj.put("goods_id",getGoods_id()); jsonObj.put("image", getImage()); jsonObj.put("goods_name", getGoods_name()); jsonObj.put("batch_number", getBatch_number()); jsonObj.put("type", getType()); jsonObj.put("store_id", getStore_id()); jsonObj.put("goods_type", getGoods_type()); jsonObj.put("qiugou_type", getQiugou_type()); } catch (JSONException e) { Log.e("JSONException", e.getMessage()); } try { return jsonObj.toString().getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return null; } public CustomizeBuyMessage(byte[] data) { String jsonStr = null; try { jsonStr = new String(data, "UTF-8"); } catch (UnsupportedEncodingException e1) { } try { JSONObject jsonObj = new JSONObject(jsonStr); if (jsonObj.has("goods_id")) goods_id = jsonObj.optString("goods_id"); if (jsonObj.has("image")) image = jsonObj.optString("image"); if (jsonObj.has("goods_name")) goods_name = jsonObj.optString("goods_name"); if (jsonObj.has("batch_number")) batch_number = jsonObj.optString("batch_number"); if (jsonObj.has("type")) type = jsonObj.optString("type"); if (jsonObj.has("store_id")) store_id = jsonObj.optString("store_id"); if (jsonObj.has("goods_type")) goods_type = jsonObj.optString("goods_type"); if (jsonObj.has("qiugou_type")) qiugou_type = jsonObj.optString("qiugou_type"); } catch (JSONException e) { Log.e("===", "JSONException" + e.getMessage()); } } public CustomizeBuyMessage(Parcel in) { setGoods_id(ParcelUtils.readFromParcel(in)); setImage(ParcelUtils.readFromParcel(in)); setGoods_name(ParcelUtils.readFromParcel(in)); setBatch_number(ParcelUtils.readFromParcel(in)); setType(ParcelUtils.readFromParcel(in)); setStore_id(ParcelUtils.readFromParcel(in)); setGoods_type(ParcelUtils.readFromParcel(in)); setQiugou_type(ParcelUtils.readFromParcel(in)); } public static final Creator<CustomizeBuyMessage> CREATOR = new Creator<CustomizeBuyMessage>() { @Override public CustomizeBuyMessage createFromParcel(Parcel source) { return new CustomizeBuyMessage(source); } @Override public CustomizeBuyMessage[] newArray(int size) { return new CustomizeBuyMessage[size]; } }; @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { ParcelUtils.writeToParcel(dest, getGoods_id());//该类为工具类,对消息中属性进行序列化 ParcelUtils.writeToParcel(dest, getImage());//该类为工具类,对消息中属性进行序列化 ParcelUtils.writeToParcel(dest, getGoods_name());//该类为工具类,对消息中属性进行序列化 ParcelUtils.writeToParcel(dest, getBatch_number());//该类为工具类,对消息中属性进行序列化 ParcelUtils.writeToParcel(dest, getType());//该类为工具类,对消息中属性进行序列化 ParcelUtils.writeToParcel(dest, getStore_id());//该类为工具类,对消息中属性进行序列化 ParcelUtils.writeToParcel(dest, getGoods_type());//该类为工具类,对消息中属性进行序列化 ParcelUtils.writeToParcel(dest, getQiugou_type());//该类为工具类,对消息中属性进行序列化 } }
[ "chenshichuen123@qq.com" ]
chenshichuen123@qq.com
7a58e375f4320c373410380512ade904a50883dc
783dcb735a434fdacddc7eb7adde9511917ff0f9
/sharewood/src/main/java/com/dub/spring/entities/MyUser.java
d3c210f2146b22b22f671dfb5343b84a6e31b8d5
[]
no_license
dubersfeld/sharewood-oauth2-upgrade
58cfe757d4e67896bcc8a0b386a3b4214d4cb6a3
01707c2c74e3327172b4b8e7a565b96c217a6ed7
refs/heads/master
2021-07-18T07:36:38.833375
2020-06-10T17:01:34
2020-06-10T17:01:34
140,325,777
1
0
null
null
null
null
UTF-8
Java
false
false
2,826
java
package com.dub.spring.entities; import java.io.Serializable; import java.util.HashSet; import java.util.Set; import javax.persistence.CollectionTable; import javax.persistence.Column; import javax.persistence.JoinColumn; import javax.persistence.ElementCollection; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; /** * Entity, does not implement UserDetails */ @Entity @Table(name="user") public class MyUser implements Serializable { /** * */ private static final long serialVersionUID = 1L; private long id; private String username; private String hashedPassword; private boolean accountNonExpired; private boolean accountNonLocked; private boolean credentialsNonExpired; private boolean enabled; private Set<UserAuthority> authorities = new HashSet<>(); @ElementCollection(fetch = FetchType.LAZY) @CollectionTable(name = "user_Authority", joinColumns = { @JoinColumn(name = "userId", referencedColumnName = "userId") }) public Set<UserAuthority> getAuthorities() { return authorities; } public void setAuthorities(Set<UserAuthority> authorities) { this.authorities = authorities; } @Column(name="hashedPassword") public String getHashedPassword() { return hashedPassword; } public void setHashedPassword(String hashedPassword) { this.hashedPassword = hashedPassword; } @Column(name="accountNonExpired") public boolean isAccountNonExpired() { return accountNonExpired; } public void setAccountNonExpired(boolean accountNonExpired) { this.accountNonExpired = accountNonExpired; } @Column(name="accountNonLocked") public boolean isAccountNonLocked() { return accountNonLocked; } public void setAccountNonLocked(boolean accountNonLocked) { this.accountNonLocked = accountNonLocked; } @Column(name="credentialsNonExpired") public boolean isCredentialsNonExpired() { return credentialsNonExpired; } public void setCredentialsNonExpired(boolean credentialsNonExpired) { this.credentialsNonExpired = credentialsNonExpired; } @Id @Column(name = "userId") @GeneratedValue(strategy = GenerationType.IDENTITY) public long getId() { return this.id; } public static long getSerialversionuid() { return serialVersionUID; } public void setEnabled(boolean enabled) { this.enabled = enabled; } public void setId(long id) { this.id = id; } @Column(name = "username") public String getUsername() { return this.username; } public void setUsername(String username) { this.username = username; } @Column(name = "enabled") public boolean isEnabled() { return enabled; } }
[ "dominique42ubersfeld@gmail.com" ]
dominique42ubersfeld@gmail.com
8903f3aaddab63f6473784aefc8469a703e43044
ef22b39b0a531a587dcce4ac3874bb7db058d3b5
/src/main/java/com/microfundit/controller/UserImpl.java
87bc1253f0ca0cc4550cbe2b7eac60cd79a730bf
[]
no_license
KevinKimaru/springboot-api
e40ee486f20b508fc4df463794d2253e2e02a379
3137095c3445555a33268137e6a93fc704c21f10
refs/heads/master
2020-03-11T09:02:14.377678
2018-04-17T14:27:48
2018-04-17T14:27:48
129,899,895
0
0
null
null
null
null
UTF-8
Java
false
false
772
java
package com.microfundit.controller; /** * Created by Kevin Kimaru Chege on 4/11/2018. */ public class UserImpl { private String username; private String role; private long id; public UserImpl() { } public UserImpl(String username, String role, long id) { this.username = username; this.role = role; this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getRole() { return role; } public void setRole(String role) { this.role = role; } public long getId() { return id; } public void setId(long id) { this.id = id; } }
[ "kevinkimaru99@gmail.com" ]
kevinkimaru99@gmail.com
945a92cc0c8fd59766c0da604d2650756acf1918
4b300989383e8ee9d2f106a5f9551fe6f1bb4df1
/src/test/java/org/apache/sysds/test/functions/paramserv/ParamservRecompilationTest.java
b556c314787333db3f1507f85ccea0841e225a25
[ "Apache-2.0" ]
permissive
OsChri/systemds
53f141c0ece77a9800038a5ddb6de8b00cdbf81a
68dddea79e08f9b3f9a29d674f66bb447d4325ca
refs/heads/master
2022-11-17T06:07:25.699222
2020-07-19T20:01:53
2020-07-19T20:01:53
280,914,336
0
0
Apache-2.0
2020-07-19T17:19:11
2020-07-19T17:19:10
null
UTF-8
Java
false
false
1,967
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.sysds.test.functions.paramserv; import org.junit.Test; import org.apache.sysds.test.AutomatedTestBase; import org.apache.sysds.test.TestConfiguration; public class ParamservRecompilationTest extends AutomatedTestBase { private static final String TEST_NAME1 = "paramserv-large-parallelism"; private static final String TEST_DIR = "functions/paramserv/"; private static final String TEST_CLASS_DIR = TEST_DIR + ParamservRecompilationTest.class.getSimpleName() + "/"; private final String HOME = SCRIPT_DIR + TEST_DIR; @Override public void setUp() { addTestConfiguration(TEST_NAME1, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME1, new String[] {})); } @Test public void testParamservLargeParallelism() { runDMLTest(TEST_NAME1, false, null, null); } private void runDMLTest(String testname, boolean exceptionExpected, Class<?> exceptionClass, String errmsg) { TestConfiguration config = getTestConfiguration(testname); loadTestConfiguration(config); programArgs = new String[] { "-explain" }; fullDMLScriptName = HOME + testname + ".dml"; runTest(true, exceptionExpected, exceptionClass, errmsg, -1); } }
[ "mboehm7@gmail.com" ]
mboehm7@gmail.com
63682b62d5e98c7136550ee9120881246f6779ca
f360e8d38a0c22d5716212486d3ef8e79a1265c3
/src/nez/expr/Match.java
f7bfe27bb6b7d9f2d5246d5a983f2e4cbce95e20
[]
no_license
sekiguchi-nagisa/nez
d4b5b771d193ae1752505b6b69e3078f7dea6531
7370746fb5c03c43a0123687dcc567f1ea38bc85
refs/heads/master
2021-01-17T22:26:44.695305
2015-03-23T09:50:17
2015-03-23T09:50:17
31,880,947
0
0
null
2015-03-09T05:28:33
2015-03-09T05:28:32
Java
UTF-8
Java
false
false
1,480
java
package nez.expr; import nez.SourceContext; import nez.ast.SourcePosition; import nez.runtime.RuntimeCompiler; import nez.runtime.Instruction; import nez.util.UList; import nez.util.UMap; public class Match extends Unary { Match(SourcePosition s, Expression inner) { super(s, inner); } @Override public String getPredicate() { return "~"; } @Override public String getInterningKey() { return "~"; } @Override Expression dupUnary(Expression e) { return (this.inner != e) ? Factory.newMatch(this.s, e) : this; } @Override public boolean checkAlwaysConsumed(GrammarChecker checker, String startNonTerminal, UList<String> stack) { return this.inner.checkAlwaysConsumed(checker, startNonTerminal, stack); } @Override public int inferTypestate(UMap<String> visited) { return Typestate.BooleanType; } @Override public Expression checkTypestate(GrammarChecker checker, Typestate c) { return this.inner.removeASTOperator(); } @Override public short acceptByte(int ch, int option) { return this.inner.acceptByte(ch, option); } @Override public boolean match(SourceContext context) { return this.inner.optimized.match(context); } @Override public Instruction encode(RuntimeCompiler bc, Instruction next) { return this.inner.encode(bc, next); } @Override protected int pattern(GEP gep) { return inner.pattern(gep); } @Override protected void examplfy(GEP gep, StringBuilder sb, int p) { this.inner.examplfy(gep, sb, p); } }
[ "kimio@konohascript.org" ]
kimio@konohascript.org
e8054a0358555c8b0e6359474f5988336e6d3340
b59f5a4fa9c6151ee1f757a0d265543eea7331dc
/examples/fuml/language_workbench/org.modelexecution.xmof.examples.fuml.fewsteps.xmof.dynamic/src/fumlConfigurationFewSteps/LociFewSteps/impl/LociFewStepsFactoryImpl.java
1c09484a767c95104ba6f0fdafdc98fbde0af1a9
[]
no_license
vatmi/moliz.gemoc
a8b7a6ac5d7bafb6b331655010975f2a44206d95
471f3128608986ddee1a7c4722d3620446e3726d
refs/heads/master
2020-03-30T23:32:19.818605
2017-10-20T09:20:17
2017-10-20T09:21:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,370
java
/** */ package fumlConfigurationFewSteps.LociFewSteps.impl; import fumlConfigurationFewSteps.LociFewSteps.*; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.impl.EFactoryImpl; import org.eclipse.emf.ecore.plugin.EcorePlugin; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class LociFewStepsFactoryImpl extends EFactoryImpl implements LociFewStepsFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static LociFewStepsFactory init() { try { LociFewStepsFactory theLociFewStepsFactory = (LociFewStepsFactory)EPackage.Registry.INSTANCE.getEFactory(LociFewStepsPackage.eNS_URI); if (theLociFewStepsFactory != null) { return theLociFewStepsFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new LociFewStepsFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public LociFewStepsFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case LociFewStepsPackage.EXECUTION_ENVIRONMENT: return createExecutionEnvironment(); case LociFewStepsPackage.LOCUS: return createLocus(); case LociFewStepsPackage.EXECUTOR: return createExecutor(); case LociFewStepsPackage.EXECUTION_FACTORY: return createExecutionFactory(); case LociFewStepsPackage.SEMANTIC_VISITOR: return createSemanticVisitor(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ExecutionEnvironment createExecutionEnvironment() { ExecutionEnvironmentImpl executionEnvironment = new ExecutionEnvironmentImpl(); return executionEnvironment; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Locus createLocus() { LocusImpl locus = new LocusImpl(); return locus; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Executor createExecutor() { ExecutorImpl executor = new ExecutorImpl(); return executor; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ExecutionFactory createExecutionFactory() { ExecutionFactoryImpl executionFactory = new ExecutionFactoryImpl(); return executionFactory; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public SemanticVisitor createSemanticVisitor() { SemanticVisitorImpl semanticVisitor = new SemanticVisitorImpl(); return semanticVisitor; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public LociFewStepsPackage getLociFewStepsPackage() { return (LociFewStepsPackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static LociFewStepsPackage getPackage() { return LociFewStepsPackage.eINSTANCE; } } //LociFewStepsFactoryImpl
[ "ebousse@users.noreply.github.com" ]
ebousse@users.noreply.github.com
43903020734095dad49d7f26d455a428a976c0ec
0f909f99aa229aa9d0e49665af7bc51cc2403f65
/src/generated/java/cdm/product/common/settlement/validation/exists/PaymentDiscountingOnlyExistsValidator.java
1db4f9f7f80e064e972f013812f68cc8d50ba435
[]
no_license
Xuanling-Chen/cdm-source-ext
8c93bc824e8c01255dfc06456bd6ec1fb3115649
e4cf7d5e549e514760cbd1e2d6789af171e5ea41
refs/heads/master
2023-07-11T20:35:26.485723
2021-08-29T04:12:00
2021-08-29T04:12:00
400,947,430
0
0
null
null
null
null
UTF-8
Java
false
false
1,735
java
package cdm.product.common.settlement.validation.exists; import cdm.product.common.settlement.PaymentDiscounting; import com.google.common.collect.ImmutableMap; import com.rosetta.model.lib.path.RosettaPath; import com.rosetta.model.lib.validation.ExistenceChecker; import com.rosetta.model.lib.validation.ValidationResult; import com.rosetta.model.lib.validation.ValidationResult.ValidationType; import com.rosetta.model.lib.validation.ValidatorWithArg; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; import static com.rosetta.model.lib.validation.ValidationResult.failure; import static com.rosetta.model.lib.validation.ValidationResult.success; public class PaymentDiscountingOnlyExistsValidator implements ValidatorWithArg<PaymentDiscounting, Set<String>> { @Override public <T2 extends PaymentDiscounting> ValidationResult<PaymentDiscounting> validate(RosettaPath path, T2 o, Set<String> fields) { Map<String, Boolean> fieldExistenceMap = ImmutableMap.<String, Boolean>builder() .put("discountFactor", ExistenceChecker.isSet(o.getDiscountFactor())) .put("presentValueAmount", ExistenceChecker.isSet(o.getPresentValueAmount())) .build(); // Find the fields that are set Set<String> setFields = fieldExistenceMap.entrySet().stream() .filter(Map.Entry::getValue) .map(Map.Entry::getKey) .collect(Collectors.toSet()); if (setFields.equals(fields)) { return success("PaymentDiscounting", ValidationType.ONLY_EXISTS, o.getClass().getSimpleName(), path, ""); } return failure("PaymentDiscounting", ValidationType.ONLY_EXISTS, o.getClass().getSimpleName(), path, "", String.format("[%s] should only be set. Set fields: %s", fields, setFields)); } }
[ "xuanling_chen@epam.com" ]
xuanling_chen@epam.com
dfc3fa692816e8ebcf34278677a74817ed4e07ab
b7a1bade5bf347f2601ebdb7eda3e954895e6455
/java02t/src/step06/Exam07.java
ddbfaed9586c647f4da7a91a0e4300e774285ff3
[]
no_license
Jeongjiho/Java76
a1429f12ffc2a5c557289760eb3164adba39c6eb
5c98d47a341776bc7b54b28907356b3007b46592
refs/heads/master
2016-08-12T20:29:57.698964
2016-02-22T14:59:27
2016-02-22T14:59:27
56,924,651
1
0
null
2016-04-23T14:54:31
2016-04-23T14:54:31
null
UTF-8
Java
false
false
2,743
java
/* * 주제: 자바 핵심 클래스 - Object (2) * */ package step06; public class Exam07 /* extends Object */{ static class Student /* extends Object */{ String name; String tel; boolean gender; public Student(String name, String tel, boolean gender) { this.name = name; this.tel = tel; this.gender = gender; } } public static void main(String[] args) { //Object의 메서드를 상속 받았다는 것을 확인 Student s1 = new Student("홍길동", "111-1111", false); Student s2 = new Student("홍길동", "111-1111", false); //1) toString(): "클래스정보@식별번호"를 리턴한다. String str = s1.toString(); // Object로부터 상속 받은 메서드 호출! System.out.println(str); System.out.println(s2.toString()); System.out.println(); //2) hashCode(): 식별번호만 리턴한다. // => 식별번호? 인스턴스의 내용을 구분하는 값이다. // => Object에서 상속 받은 날 것의 hashCode()는 인스턴스 내용에 상관없이 // 무조건 인스턴스 마다 고유의 식별번호를 리턴한다. // => 다음 코드를 실행해 보면 값은 같은데 인스턴스가 다르기 때문에 식별번호가 다르다. System.out.println(Integer.toHexString(s1.hashCode())); System.out.println(Integer.toHexString(s2.hashCode())); System.out.println(); StringBuffer sb1 = new StringBuffer("Hello"); StringBuffer sb2 = new StringBuffer("Hello"); System.out.println(Integer.toHexString(sb1.hashCode())); System.out.println(Integer.toHexString(sb2.hashCode())); System.out.println(sb1.toString()); System.out.println(sb2.toString()); // StringBuffer의 toString()은 "클래스정보@식별번호" 형식으로 문자열을 리턴하지 않는다. // 이유? Object로부터 상속 받은 toString()을 재정의 했기 때문이다. // 왜 재정의 했나? StringBuffer 클래스의 목적에 맞추기 위해 재정의 했다. // StringBuffer는 문자열을 다루는 클래스이다. // 당연히 그 내용을 toString()으로 만들려면 그 내용을 리턴해야 한다. // 그래서 상속 받은 메서드를 재정의 한 것이다. // "오버라이딩(Overriding)"? // => 이렇게 상속 받은 메서드를 해당 클래스의 목적에 맞게끔 재정의 하는 것. // StringBuffer는 Object로부터 상속 받은 메서드를 재정의 했고, // Student는 재정의 하지 않았다. // 그래서 Student에 대해 toString()을 호출하면 "클래스정보@식별번호" 문자열을 출력한다. } }
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
014a126b5821a5595e25909bc07ac954ccc993b9
6a61e393dfad6a6cefdf4f06798917c3a7aee971
/external-programs/jbook/Exercise6_2_1.java
9f412a3b2111ccec38c9061eacdae6ace7958c8b
[]
no_license
kframework/java-semantics
388bead15b594f3b2478441a5d95c02d7a0ccbf6
f27067ee7a38d236499992eed1b48064e70680fa
refs/heads/master
2021-09-22T20:42:43.662165
2021-09-15T19:53:33
2021-09-15T19:53:33
11,711,471
14
7
null
2016-03-16T22:03:02
2013-07-27T21:42:38
Java
UTF-8
Java
false
false
255
java
class Exercise6_2_1 { public static void main(String[] argv) { int i = 0; l1 : while (i<5) { try { if (i==2) break l1; } finally { i = i + 1; } } System.out.println(i); } }
[ "denis.bogdanas@gmail.com" ]
denis.bogdanas@gmail.com
7a58b0789600e8a3be3c38504a7a0822ea950c15
858761a5810934c51cb0987903f3f97f161bc4a6
/branches/SAK-13408/api/src/main/java/org/sakaiproject/authz/api/FunctionManager.java
956e2d276a37a635c51f7a952138a1ff7c80be10
[]
no_license
svn2github/sakai-kernel
f10821d51e39651788c97e1d2739f762c25e79de
2b97c9b7ad53becc8de57a5233c7d35873edd10d
refs/heads/master
2020-04-14T21:44:05.973159
2014-12-23T21:38:01
2014-12-23T21:38:01
10,166,725
1
0
null
null
null
null
UTF-8
Java
false
false
1,688
java
/********************************************************************************** * $URL$ * $Id$ *********************************************************************************** * * Copyright 2005, 2006, 2008 Sakai Foundation * * Licensed under the Educational Community License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.  * You may obtain a copy of the License at * * http://www.osedu.org/licenses/ECL-2.0 * * Unless required by applicable law or agreed to in writing, software  * distributed under the License is distributed on an "AS IS" BASIS,  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  * See the License for the specific language governing permissions and  * limitations under the License. * **********************************************************************************/ package org.sakaiproject.authz.api; import java.util.List; /** * <p> * FunctionManager is the API for the service that manages security function registrations from the various Sakai applications. * </p> */ public interface FunctionManager { /** * Register an authz function * * param function The function name. */ void registerFunction(String function); /** * Access all the registered functions. * * @return A List (String) of registered functions. */ List getRegisteredFunctions(); /** * Access all the registered functions that begin with the string. * * @param prefix * The prefix pattern to find. * @return A List (String) of registered functions that begin with the string. */ List getRegisteredFunctions(String prefix); }
[ "matthew@longsight.com@66ffb92e-73f9-0310-93c1-f5514f145a0a" ]
matthew@longsight.com@66ffb92e-73f9-0310-93c1-f5514f145a0a
9f19fb1076d60a08a1e4c760536c4dc759027b51
558880e29456e4a6a7b254d49c65207535737e97
/src/test/java/com/dnb/fusion/cucumber/CucumberTest.java
f2da3e07268d118c8ee1228a49dcada5239aca4d
[]
no_license
deepaksg/fusionMicroservice1
98a5ae39e2bfd6f19b2db05fcd9aacf0d6d7678c
a627df26494026afe38c00f94cc48668bf081279
refs/heads/master
2021-05-06T10:26:10.390917
2017-12-13T13:50:53
2017-12-13T13:50:53
114,126,616
0
0
null
null
null
null
UTF-8
Java
false
false
268
java
package com.dnb.fusion.cucumber; import org.junit.runner.RunWith; import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) @CucumberOptions(plugin = "pretty", features = "src/test/features") public class CucumberTest { }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
04e1a9a9307048fcd59a7c588bfba9878b5ded53
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project92/src/test/java/org/gradle/test/performance92_4/Test92_393.java
70dc049e16a69900fc05b08ab3626ac7ea49bb1f
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance92_4; import static org.junit.Assert.*; public class Test92_393 { private final Production92_393 production = new Production92_393("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
d54ed1524b1185c502302fc7cb881bdc25ca7204
43732c216b4923c4a7aac6d2ca39c7fc6506ae4b
/workspace/springboot-ibm-pune-feb2019/hr-service/src/main/java/com/demo/spring/HrController.java
08c67fb7ea9644535b8dabf88ba9809f72367aa2
[]
no_license
PappuProject/spring-boot-ibm-pune-feb2019
fe346a40f8bf7751de602149e67dc8a1f87f20cb
af2d8494909e3894a846b3547a14b41e62c4b342
refs/heads/master
2020-05-05T07:21:42.884625
2019-02-28T06:28:14
2019-02-28T06:28:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
769
java
package com.demo.spring; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @RestController public class HrController { @Autowired HrService service; @GetMapping(path="/hr/get",produces=MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<String> findEmp(@RequestParam("id")int id){ return service.getEmp(id); } @GetMapping(path="/hr/list",produces=MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<String> listAllEmps(){ return service.getAllEmps(); } }
[ "sbtalk@gmail.com" ]
sbtalk@gmail.com
9d486b5230b036ca656eda195523212eddaaace1
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_e9a0fcd69cca0f755b431100845d5bb415f2d16e/ILink/5_e9a0fcd69cca0f755b431100845d5bb415f2d16e_ILink_t.java
47ee115efaf33ee0266bbcc10b1a1fcb9809d439
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,289
java
/* @ITMillApache2LicenseForJavaFiles@ */ package com.itmill.toolkit.terminal.gwt.client.ui; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Event; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.ClickListener; import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.Widget; import com.itmill.toolkit.terminal.gwt.client.ApplicationConnection; import com.itmill.toolkit.terminal.gwt.client.ErrorMessage; import com.itmill.toolkit.terminal.gwt.client.Paintable; import com.itmill.toolkit.terminal.gwt.client.UIDL; public class ILink extends HTML implements Paintable, ClickListener { public static final String CLASSNAME = "i-link"; private static final int BORDER_STYLE_DEFAULT = 0; private static final int BORDER_STYLE_MINIMAL = 1; private static final int BORDER_STYLE_NONE = 2; private String src; private String target; private int borderStyle = BORDER_STYLE_DEFAULT; private boolean enabled; private boolean readonly; private int targetWidth; private int targetHeight; private Element errorIndicatorElement; private final Element captionElement = DOM.createSpan(); private ErrorMessage errorMessage; private Icon icon; public ILink() { super(); DOM.appendChild(getElement(), captionElement); addClickListener(this); setStyleName(CLASSNAME); } public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { // Ensure correct implementation, // but don't let container manage caption etc. if (client.updateComponent(this, uidl, false)) { return; } enabled = uidl.hasAttribute("disabled") ? false : true; readonly = uidl.hasAttribute("readonly") ? true : false; if (uidl.hasAttribute("name")) { target = uidl.getStringAttribute("name"); } if (uidl.hasAttribute("src")) { src = client.translateToolkitUri(uidl.getStringAttribute("src")); } if (uidl.hasAttribute("border")) { if ("none".equals(uidl.getStringAttribute("border"))) { borderStyle = BORDER_STYLE_NONE; } else { borderStyle = BORDER_STYLE_MINIMAL; } } else { borderStyle = BORDER_STYLE_DEFAULT; } targetHeight = uidl.hasAttribute("height") ? uidl .getIntAttribute("targetHeight") : -1; targetWidth = uidl.hasAttribute("width") ? uidl .getIntAttribute("targetHeidth") : -1; // Set link caption DOM.setInnerText(captionElement, uidl.getStringAttribute("caption")); // handle error if (uidl.hasAttribute("error")) { final UIDL errorUidl = uidl.getErrors(); if (errorIndicatorElement == null) { errorIndicatorElement = DOM.createDiv(); DOM.setElementProperty(errorIndicatorElement, "className", "i-errorindicator"); DOM.sinkEvents(errorIndicatorElement, Event.MOUSEEVENTS); sinkEvents(Event.MOUSEEVENTS); } DOM.insertChild(getElement(), errorIndicatorElement, 0); if (errorMessage == null) { errorMessage = new ErrorMessage(); } errorMessage.updateFromUIDL(errorUidl); } else if (errorIndicatorElement != null) { DOM.setStyleAttribute(errorIndicatorElement, "display", "none"); } if (uidl.hasAttribute("icon")) { if (icon == null) { icon = new Icon(client); DOM.insertChild(getElement(), icon.getElement(), 0); } icon.setUri(uidl.getStringAttribute("icon")); } // handle description if (uidl.hasAttribute("description")) { setTitle(uidl.getStringAttribute("description")); } } public void onClick(Widget sender) { if (enabled && !readonly) { if (target == null) { target = "_self"; } String features; switch (borderStyle) { case BORDER_STYLE_NONE: features = "menubar=no,location=no,status=no"; break; case BORDER_STYLE_MINIMAL: features = "menubar=yes,location=no,status=no"; break; default: features = ""; break; } if (targetWidth > 0) { features += (features.length() > 0 ? "," : "") + "width=" + targetWidth; } if (targetHeight > 0) { features += (features.length() > 0 ? "," : "") + "height=" + targetHeight; } Window.open(src, target, features); } } public void onBrowserEvent(Event event) { final Element target = DOM.eventGetTarget(event); if (errorIndicatorElement != null && DOM.compare(target, errorIndicatorElement)) { switch (DOM.eventGetType(event)) { case Event.ONMOUSEOVER: showErrorMessage(); break; case Event.ONMOUSEOUT: hideErrorMessage(); break; case Event.ONCLICK: ApplicationConnection.getConsole().log( DOM.getInnerHTML(errorMessage.getElement())); return; default: break; } } if (DOM.compare(target, captionElement) || (icon != null && DOM.compare(target, icon.getElement()))) { super.onBrowserEvent(event); } } private void hideErrorMessage() { errorMessage.hide(); } private void showErrorMessage() { if (errorMessage != null) { errorMessage.showAt(errorIndicatorElement); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
21706bf983c07c2c9e3868d3206904de147262d8
f662526b79170f8eeee8a78840dd454b1ea8048c
/ao.java
8ab2d534b5eb643b6f046722cd30c1223437883c
[]
no_license
jason920612/Minecraft
5d3cd1eb90726efda60a61e8ff9e057059f9a484
5bd5fb4dac36e23a2c16576118da15c4890a2dff
refs/heads/master
2023-01-12T17:04:25.208957
2020-11-26T08:51:21
2020-11-26T08:51:21
316,170,984
0
0
null
null
null
null
UTF-8
Java
false
false
5,701
java
/* */ import com.google.gson.JsonArray; /* */ import com.google.gson.JsonElement; /* */ import com.google.gson.JsonNull; /* */ import com.google.gson.JsonObject; /* */ import javax.annotation.Nullable; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class ao /* */ { /* 15 */ public static final ao a = new ao(ap.a, ai.a, ay.a, bb.a, bc.a); /* 16 */ public static final ao[] b = new ao[0]; /* */ /* */ private final ap c; /* */ private final ai d; /* */ private final ay e; /* */ private final bb f; /* */ private final bc g; /* */ /* */ private ao(ap ☃, ai ai1, ay ay1, bb bb1, bc bc1) { /* 25 */ this.c = ☃; /* 26 */ this.d = ai1; /* 27 */ this.e = ay1; /* 28 */ this.f = bb1; /* 29 */ this.g = bc1; /* */ } /* */ /* */ public boolean a(tf ☃, @Nullable aer aer1) { /* 33 */ if (this == a) { /* 34 */ return true; /* */ } /* 36 */ if (aer1 == null) { /* 37 */ return false; /* */ } /* 39 */ if (!this.c.a(aer1.P())) { /* 40 */ return false; /* */ } /* 42 */ if (!this.d.a(☃.q, ☃.r, ☃.s, aer1.q, aer1.r, aer1.s)) { /* 43 */ return false; /* */ } /* 45 */ if (!this.e.a(☃.s(), aer1.q, aer1.r, aer1.s)) { /* 46 */ return false; /* */ } /* 48 */ if (!this.f.a(aer1)) { /* 49 */ return false; /* */ } /* 51 */ if (!this.g.a(aer1)) { /* 52 */ return false; /* */ } /* 54 */ return true; /* */ } /* */ /* */ public static ao a(@Nullable JsonElement ☃) { /* 58 */ if (☃ == null || ☃.isJsonNull()) { /* 59 */ return a; /* */ } /* */ /* 62 */ JsonObject jsonObject = xj.m(☃, "entity"); /* */ /* 64 */ ap ap1 = ap.a(jsonObject.get("type")); /* 65 */ ai ai1 = ai.a(jsonObject.get("distance")); /* 66 */ ay ay1 = ay.a(jsonObject.get("location")); /* 67 */ bb bb1 = bb.a(jsonObject.get("effects")); /* 68 */ bc bc1 = bc.a(jsonObject.get("nbt")); /* 69 */ return (new a()) /* 70 */ .a(ap1) /* 71 */ .a(ai1) /* 72 */ .a(ay1) /* 73 */ .a(bb1) /* 74 */ .a(bc1) /* 75 */ .b(); /* */ } /* */ /* */ public static ao[] b(@Nullable JsonElement ☃) { /* 79 */ if (☃ == null || ☃.isJsonNull()) { /* 80 */ return b; /* */ } /* 82 */ JsonArray jsonArray = xj.n(☃, "entities"); /* 83 */ ao[] arrayOfAo = new ao[jsonArray.size()]; /* */ /* 85 */ for (int i = 0; i < jsonArray.size(); i++) { /* 86 */ arrayOfAo[i] = a(jsonArray.get(i)); /* */ } /* */ /* 89 */ return arrayOfAo; /* */ } /* */ /* */ public JsonElement a() { /* 93 */ if (this == a) { /* 94 */ return (JsonElement)JsonNull.INSTANCE; /* */ } /* */ /* 97 */ JsonObject ☃ = new JsonObject(); /* */ /* 99 */ ☃.add("type", this.c.a()); /* 100 */ ☃.add("distance", this.d.a()); /* 101 */ ☃.add("location", this.e.a()); /* 102 */ ☃.add("effects", this.f.b()); /* 103 */ ☃.add("nbt", this.g.a()); /* */ /* 105 */ return (JsonElement)☃; /* */ } /* */ /* */ public static JsonElement a(ao[] ☃) { /* 109 */ if (☃ == b) { /* 110 */ return (JsonElement)JsonNull.INSTANCE; /* */ } /* */ /* 113 */ JsonArray jsonArray = new JsonArray(); /* */ /* 115 */ for (int i = 0; i < ☃.length; i++) { /* 116 */ JsonElement jsonElement = ☃[i].a(); /* 117 */ if (!jsonElement.isJsonNull()) { /* 118 */ jsonArray.add(jsonElement); /* */ } /* */ } /* */ /* 122 */ return (JsonElement)jsonArray; /* */ } /* */ /* */ public static class a { /* 126 */ private ap a = ap.a; /* 127 */ private ai b = ai.a; /* 128 */ private ay c = ay.a; /* 129 */ private bb d = bb.a; /* 130 */ private bc e = bc.a; /* */ /* */ public static a a() { /* 133 */ return new a(); /* */ } /* */ /* */ public a a(aev<?> ☃) { /* 137 */ this.a = new ap(☃); /* 138 */ return this; /* */ } /* */ /* */ public a a(ap ☃) { /* 142 */ this.a = ☃; /* 143 */ return this; /* */ } /* */ /* */ public a a(ai ☃) { /* 147 */ this.b = ☃; /* 148 */ return this; /* */ } /* */ /* */ public a a(ay ☃) { /* 152 */ this.c = ☃; /* 153 */ return this; /* */ } /* */ /* */ public a a(bb ☃) { /* 157 */ this.d = ☃; /* 158 */ return this; /* */ } /* */ /* */ public a a(bc ☃) { /* 162 */ this.e = ☃; /* 163 */ return this; /* */ } /* */ /* */ public ao b() { /* 167 */ if (this.a == ap.a && this.b == ai.a && this.c == ay.a && this.d == bb.a && this.e == bc.a) /* */ { /* */ /* */ /* */ /* 172 */ return ao.a; /* */ } /* */ /* 175 */ return new ao(this.a, this.b, this.c, this.d, this.e); /* */ } /* */ } /* */ } /* Location: F:\dw\server.jar!\ao.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "jasonya2206@gmail.com" ]
jasonya2206@gmail.com
3f3d736490e7581139e0aeebd9be031989e33d9d
485cea47fd87f58a753ba581eae1e88e67f01be7
/CoyoteDX/src/main/java/coyote/commons/CommandLineProcess.java
0ae18ca00adea397ec98b078893fe41a6f3289e3
[]
no_license
sdcote/coyote
18706dc345addf6cd64809f840e2bddb4309bc17
7de908e3f089715ad1652f357dc95d2ceb5483c4
refs/heads/main
2023-03-06T23:42:49.573817
2023-03-02T17:06:31
2023-03-02T17:06:31
89,138,130
8
4
null
2022-11-10T22:06:36
2017-04-23T11:52:21
JavaScript
UTF-8
Java
false
false
7,457
java
/* * Copyright (c) 2003 Stephan D. Cote' - All rights reserved. * * This program and the accompanying materials are made available under the * terms of the MIT License which accompanies this distribution, and is * available at http://creativecommons.org/licenses/MIT/ */ package coyote.commons; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import coyote.loader.log.Log; /** * Execute commands at the operating system level. */ public class CommandLineProcess { private static Object mutex = new Object(); /** * Private constructor for a singleton fixture. */ private CommandLineProcess() { super(); } /** * Execute the given command. * * <p>This is a blocking call and will not return until the process returns. * It has therefore been made thread-safe so that may different threads can * make calls to this fixture to improve performance. * * <p>Each call spawns another thread in the JRE to handle reading the * STDERR stream while the calling thread reads the STDOUT stream. * * <p><strong>NOTE:</strong> Care must be given to ensure the called process * does not block for input, which will prevent the calling thread from * returning. * * @param command the command and arguments to process * * @return a list of strings representing the output from the process */ public static Result exec(String command) { if (Log.isLogging(Log.DEBUG_EVENTS)) { Log.debug("EXEC (String) called with command \"" + command + "\""); } String[] outArray = new String[0]; String[] errArray = new String[0]; Process process = null; long startTime = -1; int exitValue = -1; long duration = -1; try { startTime = System.currentTimeMillis(); Log.debug("EXEC calling runtime exec"); process = execSync(command); Log.debug("EXEC runtime exec returned"); // start reading errors in a separate thread ErrorReader errreader = new CommandLineProcess.ErrorReader(); errreader.printing = Log.isLogging(Log.DEBUG_EVENTS); errreader.stream = StreamUtil.getCharBufferedReader(process.getErrorStream()); errreader.collecting = true; errreader.start(); // wait for the process to complete, this is where we can block for a while Log.debug("EXEC calling waitFor"); exitValue = process.waitFor(); duration = System.currentTimeMillis() - startTime; Log.debug("EXEC waitFor returned"); // after the process is complete, read everything from STDOUT BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); String line = ""; while ((line = reader.readLine()) != null) { outArray = (String[])ArrayUtil.addElement(outArray, line); } process = null; errArray = errreader.collected; } catch (Exception exception) { if (Log.isLogging(Log.DEBUG_EVENTS)) { StringBuffer b = new StringBuffer("*** exec Exception"); b.append("\n command: " + command); b.append("\n exit: " + exitValue); b.append("\nOUT lines: " + outArray.length); b.append("\nERR lines: " + errArray.length); b.append("\n error: " + exception.toString()); Log.debug(b); } } if (process != null) { process.destroy(); } if (Log.isLogging(Log.DEBUG_EVENTS)) { StringBuffer b = new StringBuffer("*** exec results"); b.append("\n command: " + command); b.append("\n exit: " + exitValue); b.append("\nOUT lines: " + outArray.length); b.append("\nERR lines: " + errArray.length); b.append("\n time: " + duration + "ms"); Log.debug(b); } return new Result(command, startTime, duration, outArray, errArray, exitValue); } /** * Execute the command in a separate process. * * @param line the command to call and its arguments in one string * * @return the process being executed * * @throws IOException */ protected static Process execSync(String line) throws IOException { Process process; synchronized (mutex) { process = Runtime.getRuntime().exec(line); } return process; } /** * Execute the command in a separate process. * * @param args the command to call and its arguments * * @return the process being executed * * @throws IOException */ protected static Process execSync(String[] args) throws IOException { Process process; synchronized (mutex) { process = Runtime.getRuntime().exec(args); } return process; } /** * Reads errors in a separate thread, */ private static class ErrorReader extends Thread { public BufferedReader stream; public boolean printing; public boolean collecting; public String[] collected; public int collectedMax; /** * Default constructor. */ public ErrorReader() { this(true, true, 500); } /** * Constructor specifying operation. * * @param print print the errors as they are received * @param collect collect the errors for later retrieval * @param max the maximum number of errors to collect. */ public ErrorReader(boolean print, boolean collect, int max) { printing = print; collecting = collect; collected = new String[0]; collectedMax = max; } /** * Start reading from the (error) stream. */ public void run() { try { String s; while ((s = stream.readLine()) != null) { if (printing) { System.err.println(s); } if (collecting) { collected = (String[])ArrayUtil.addElement(collected, s); if (collected.length > collectedMax) { collected = (String[])ArrayUtil.removeElementAt(collected, 0); } } } return; } catch (Exception exception) { Log.error("Error reading from error stream: " + exception.getMessage()); } } } /** * Processing results from the shell execution. */ public static class Result { private final String command; private final long startTime; private final long duration; private final String[] output; private final String[] error; private final int exitCode; Result(String cmd, long start, long dur, String[] out, String[] err, int code) { command = cmd; startTime = start; duration = dur; output = out; error = err; exitCode = code; } /** * @return the command which was executed */ public String getCommand() { return command; } /** * @return the time the command was executed */ public long getStartTime() { return startTime; } /** * @return how long (in milliseconds) the command took to process */ public long getDuration() { return duration; } /** * @return the output from the process */ public String[] getOutput() { return output; } /** * @return the errors from the process */ public String[] getError() { return error; } /** * @return the exit code from the process */ public int getExitCode() { return exitCode; } } }
[ "sdcote@aep.com" ]
sdcote@aep.com
6cd13823c9c4c8ce7b3979c1ac3fb4030929ab99
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_b25f5597237d50b925bb7b813ea9df285ea72b99/TaskListSaveManager/18_b25f5597237d50b925bb7b813ea9df285ea72b99_TaskListSaveManager_s.java
53ed5722b74fed30d15d3a4bbd8ac2d8ec560c78
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,934
java
/******************************************************************************* * Copyright (c) 2004 - 2006 University Of British Columbia and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * University Of British Columbia - initial API and implementation *******************************************************************************/ package org.eclipse.mylar.internal.tasklist.util; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.mylar.internal.core.util.MylarStatusHandler; import org.eclipse.mylar.provisional.core.MylarPlugin; import org.eclipse.mylar.provisional.tasklist.ITask; import org.eclipse.mylar.provisional.tasklist.ITaskActivityListener; import org.eclipse.mylar.provisional.tasklist.MylarTaskListPlugin; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; import org.eclipse.ui.PlatformUI; /** * @author Mik Kersten */ public class TaskListSaveManager implements ITaskActivityListener, DisposeListener, IBackgroundSaveListener { private final static int DEFAULT_SAVE_INTERVAL = 5 * 60 * 1000; private static final String FILE_SUFFIX_BACKUP = "-backup.xml"; private BackgroundSaveTimer saveTimer = null; /** * Fort testing. */ private boolean forceBackgroundSave = false; public TaskListSaveManager() { saveTimer = new BackgroundSaveTimer(this); saveTimer.setSaveIntervalMillis(DEFAULT_SAVE_INTERVAL); saveTimer.start(); } /** * Called periodically by the save timer */ public void saveRequested() { MylarStatusHandler.log("auto saved task list", this); if (!MylarTaskListPlugin.getDefault().isInitialized()) { if (PlatformUI.getWorkbench() != null && PlatformUI.getWorkbench().getDisplay() != null) { MessageDialog.openInformation(PlatformUI.getWorkbench().getDisplay().getActiveShell(), MylarTaskListPlugin.TITLE_DIALOG, "If task list is blank, Mylar Task List may have failed to initialize.\n\n" + "First, try restarting to see if that corrects the problem.\n\n" + "Then, check the Error Log view for messages, and the FAQ for solutions.\n\n" + MylarTaskListPlugin.URL_HOMEPAGE); } } if (MylarTaskListPlugin.getDefault() != null && MylarTaskListPlugin.getDefault().isShellActive() || forceBackgroundSave) { try { saveTaskListAndContexts(); } catch (Exception e) { MylarStatusHandler.fail(e, "Could not auto save task list", false); } } } public void saveTaskListAndContexts() { if (MylarTaskListPlugin.getDefault() != null) { MylarTaskListPlugin.getTaskListManager().saveTaskList(); for (ITask task : new ArrayList<ITask>(MylarTaskListPlugin.getTaskListManager().getTaskList().getActiveTasks())) { MylarPlugin.getContextManager().saveContext(task.getHandleIdentifier()); } } } /** * Copies all files in the current data directory to the specified folder. * Will overwrite. */ public void copyDataDirContentsTo(String targetFolderPath) { File mainDataDir = new File(MylarPlugin.getDefault().getDataDirectory()); for (File currFile : mainDataDir.listFiles()) { if (currFile.isFile()) { File destFile = new File(targetFolderPath + File.separator + currFile.getName()); copy(currFile, destFile); } } } public void createTaskListBackupFile() { String path = MylarPlugin.getDefault().getDataDirectory() + File.separator + MylarTaskListPlugin.DEFAULT_TASK_LIST_FILE; File taskListFile = new File(path); String backup = path.substring(0, path.lastIndexOf('.')) + FILE_SUFFIX_BACKUP; copy(taskListFile, new File(backup)); } public String getBackupFilePath() { String path = MylarPlugin.getDefault().getDataDirectory() + File.separator + MylarTaskListPlugin.DEFAULT_TASK_LIST_FILE; return path.substring(0, path.lastIndexOf('.')) + FILE_SUFFIX_BACKUP; } public void reverseBackup() { String path = MylarPlugin.getDefault().getDataDirectory() + File.separator + MylarTaskListPlugin.DEFAULT_TASK_LIST_FILE; File taskListFile = new File(path); String backup = path.substring(0, path.lastIndexOf('.')) + FILE_SUFFIX_BACKUP; copy(new File(backup), taskListFile); } private boolean copy(File src, File dst) { try { InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dst); // Transfer bytes from in to out byte[] buf = new byte[1024]; int len; while ((len = in.read(buf)) > 0) { out.write(buf, 0, len); } in.close(); out.close(); return true; } catch (IOException ioe) { return false; } } /** For testing only * */ public BackgroundSaveTimer getSaveTimer() { return saveTimer; } public void taskActivated(ITask task) { } public void tasksActivated(List<ITask> tasks) { // ignore } public void taskDeactivated(ITask task) { saveTaskListAndContexts(); } public void localInfoChanged(ITask task) { saveTaskListAndContexts(); } public void repositoryInfoChanged(ITask task) { // ignore } public void tasklistRead() { // ignore } public void taskListModified() { saveTaskListAndContexts(); } public void widgetDisposed(DisposeEvent e) { saveTaskListAndContexts(); } /** * For testing. */ public void setForceBackgroundSave(boolean on) { forceBackgroundSave = on; saveTimer.setForceSyncExec(on); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
be67359e3229e0012d3a4c5cce8e945e963d2f78
09a00394429e4bad33d18299358a54fcd395423d
/gradle/wrapper/dists/gradle-2.2.1-all/c64ydeuardnfqctvr1gm30w53/gradle-2.2.1/src/core/org/gradle/api/internal/plugins/DefaultObjectConfigurationAction.java
14a7a47c1d2f51716e5c3b85f014bab0d20fd3a0
[ "BSD-2-Clause", "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "LGPL-2.1-or-later", "MIT", "CPL-1.0", "LGPL-2.1-only" ]
permissive
agneske-arter-walter-mostertruck-firetr/pushfish-android
35001c81ade9bb0392fda2907779c1d10d4824c0
09157e1d5d2e33a57b3def177cd9077cd5870b24
refs/heads/master
2021-12-02T21:13:04.281907
2021-10-18T21:48:59
2021-10-18T21:48:59
215,611,384
0
0
BSD-2-Clause
2019-10-16T17:58:05
2019-10-16T17:58:05
null
UTF-8
Java
false
false
5,297
java
/* * Copyright 2010 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.gradle.api.internal.plugins; import org.gradle.api.Plugin; import org.gradle.api.initialization.dsl.ScriptHandler; import org.gradle.api.internal.file.FileResolver; import org.gradle.api.internal.initialization.ClassLoaderScope; import org.gradle.api.internal.initialization.ScriptHandlerFactory; import org.gradle.api.plugins.ObjectConfigurationAction; import org.gradle.api.plugins.PluginAware; import org.gradle.configuration.ScriptPlugin; import org.gradle.configuration.ScriptPluginFactory; import org.gradle.groovy.scripts.DefaultScript; import org.gradle.groovy.scripts.UriScriptSource; import org.gradle.util.GUtil; import java.net.URI; import java.util.LinkedHashSet; import java.util.Set; public class DefaultObjectConfigurationAction implements ObjectConfigurationAction { private final FileResolver resolver; private final ScriptPluginFactory configurerFactory; private final ScriptHandlerFactory scriptHandlerFactory; private final Set<Object> targets = new LinkedHashSet<Object>(); private final Set<Runnable> actions = new LinkedHashSet<Runnable>(); private final ClassLoaderScope classLoaderScope; private final Object[] defaultTargets; public DefaultObjectConfigurationAction(FileResolver resolver, ScriptPluginFactory configurerFactory, ScriptHandlerFactory scriptHandlerFactory, ClassLoaderScope classLoaderScope, Object... defaultTargets) { this.resolver = resolver; this.configurerFactory = configurerFactory; this.scriptHandlerFactory = scriptHandlerFactory; this.classLoaderScope = classLoaderScope; this.defaultTargets = defaultTargets; } public ObjectConfigurationAction to(Object... targets) { GUtil.flatten(targets, this.targets); return this; } public ObjectConfigurationAction from(final Object script) { actions.add(new Runnable() { public void run() { applyScript(script); } }); return this; } public ObjectConfigurationAction plugin(final Class<? extends Plugin> pluginClass) { actions.add(new Runnable() { public void run() { applyPlugin(pluginClass); } }); return this; } public ObjectConfigurationAction plugin(final String pluginId) { actions.add(new Runnable() { public void run() { applyPlugin(pluginId); } }); return this; } private void applyScript(Object script) { URI scriptUri = resolver.resolveUri(script); UriScriptSource scriptSource = new UriScriptSource("script", scriptUri); ClassLoaderScope classLoaderScopeChild = classLoaderScope.createChild(); ScriptHandler scriptHandler = scriptHandlerFactory.create(scriptSource, classLoaderScopeChild); ScriptPlugin configurer = configurerFactory.create(scriptSource, scriptHandler, classLoaderScopeChild, classLoaderScope, "buildscript", DefaultScript.class, false); for (Object target : targets) { configurer.apply(target); } } private void applyPlugin(Class<? extends Plugin> pluginClass) { for (Object target : targets) { if (target instanceof PluginAware) { try { ((PluginAware) target).getPlugins().apply(pluginClass); } catch (Exception e) { throw new PluginApplicationException("class '" + pluginClass.getName() + "'", e); } } else { throw new UnsupportedOperationException(String.format("Cannot apply plugin of class '%s' to '%s' (class: %s) as it does not implement PluginAware", pluginClass.getName(), target.toString(), target.getClass().getName())); } } } private void applyPlugin(String pluginId) { for (Object target : targets) { if (target instanceof PluginAware) { try { ((PluginAware) target).getPlugins().apply(pluginId); } catch (Exception e) { throw new PluginApplicationException("id '" + pluginId + "'", e); } } else { throw new UnsupportedOperationException(String.format("Cannot apply plugin with id '%s' to '%s' (class: %s) as it does not implement PluginAware", pluginId, target.toString(), target.getClass().getName())); } } } public void execute() { if (targets.isEmpty()) { to(defaultTargets); } for (Runnable action : actions) { action.run(); } } }
[ "mega@ioexception.at" ]
mega@ioexception.at
123abec9cb340fdc12c86cf51236756033d3acd2
8196d4a595970d91d160b965503171aaaa12620f
/cevo-experiments/src/main/java/put/ci/cevo/experiments/ipd/IntegerVectorUniformMutation.java
236898fce9119f4c80bf60fa486d2546506dd606
[]
no_license
wjaskowski/mastering-2048
d3c1657143625c8260aba4cd6c108e4125b85ac6
cb9b92b16adb278a9716faffd2f9a6e3db075ec1
refs/heads/master
2020-07-26T22:22:22.747845
2017-03-04T12:03:48
2017-03-04T12:03:48
73,711,911
10
0
null
null
null
null
UTF-8
Java
false
false
2,183
java
package put.ci.cevo.experiments.ipd; import static com.google.common.base.Objects.toStringHelper; import org.apache.commons.math3.random.RandomDataGenerator; import put.ci.cevo.framework.operators.mutation.MutationOperator; import put.ci.cevo.util.vectors.IntegerVector; import put.ci.cevo.util.RandomUtils; import put.ci.cevo.util.annotations.AccessedViaReflection; import com.google.common.base.Preconditions; public class IntegerVectorUniformMutation implements MutationOperator<IntegerVector> { private final double probability; private final int min; private final int max; private final boolean replace; @AccessedViaReflection public IntegerVectorUniformMutation(int min, int max, double probability) { this(min, max, probability, true); } @AccessedViaReflection public IntegerVectorUniformMutation(int min, int max, double probability, boolean replace) { Preconditions.checkArgument(min < max); this.probability = probability; this.min = min; this.max = max; this.replace = replace; } @Override public IntegerVector produce(IntegerVector individual, RandomDataGenerator random) { return replace ? mutateWithReplacement(individual, random) : mutateWithoutReplacement(individual, random); } private IntegerVector mutateWithReplacement(IntegerVector individual, RandomDataGenerator random) { int[] childVector = individual.getVector().clone(); for (int i = 0; i < individual.getSize(); i++) { if (random.nextUniform(0, 1) < probability) { childVector[i] = random.nextInt(min, max); } } return new IntegerVector(childVector); } private IntegerVector mutateWithoutReplacement(IntegerVector individual, RandomDataGenerator random) { int[] child = individual.getVector().clone(); for (int i = 0; i < individual.getSize(); i++) { if (random.nextUniform(0, 1) < probability) { int gene = RandomUtils.nextInt(min, max - 1, random); if (individual.get(i) == gene) { gene = max; } child[i] = gene; } } return new IntegerVector(child); } @Override public String toString() { return toStringHelper(this).add("uniform", "[" + min + ", " + max + "]").add("p", probability).toString(); } }
[ "wojciech.jaskowski@gmail.com" ]
wojciech.jaskowski@gmail.com
2ae8867310ba587046a7ba6bcff17e4a5be14d8b
83f5b1dae716325f42a13f000273609796673735
/app/src/main/java/com/lanshifu/myapp_3/model/FileTransfer.java
36752ec5f06041336f54de3517aee3722c2240fd
[]
no_license
lanshifu/MyApp3
f14d8a1e0f39b7f2241eba60e5a92cfac2c49c84
585536bf321a57bfdc32d56378801c47fd2bc438
refs/heads/master
2021-09-07T21:08:50.129250
2018-03-01T06:50:29
2018-03-01T06:50:29
116,124,291
1
0
null
null
null
null
UTF-8
Java
false
false
1,144
java
package com.lanshifu.myapp_3.model; import java.io.Serializable; /** * 作者:叶应是叶 * 时间:2018/2/9 21:17 * 说明: */ public class FileTransfer implements Serializable { //文件路径 private String filePath; //文件大小 private long fileLength; //MD5码 private String md5; public FileTransfer(String name, long fileLength) { this.filePath = name; this.fileLength = fileLength; } public String getFilePath() { return filePath; } public void setFilePath(String filePath) { this.filePath = filePath; } public long getFileLength() { return fileLength; } public void setFileLength(long fileLength) { this.fileLength = fileLength; } public String getMd5() { return md5; } public void setMd5(String md5) { this.md5 = md5; } @Override public String toString() { return "FileTransfer{" + "filePath='" + filePath + '\'' + ", fileLength=" + fileLength + ", md5='" + md5 + '\'' + '}'; } }
[ "lanxiaobin@jiaxincloud.com" ]
lanxiaobin@jiaxincloud.com
eacc78e34c9038859cff2ba31dd7b66ceb415777
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/95/org/apache/commons/math/linear/RealVectorImpl_getL1Distance_907.java
9bcb2a679f169d3d8a633d5051dc024db8898070
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,723
java
org apach common math linear link real vector realvector arrai version revis date real vector impl realvectorimpl real vector realvector serializ inherit doc inheritdoc distanc getl1dist real vector realvector illeg argument except illegalargumentexcept distanc getl1dist real vector impl realvectorimpl class cast except classcastexcept cce check vector dimens checkvectordimens sum data length delta data entri getentri sum math ab delta sum
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
a7618645532a662d06059c19584088304ca7ada5
b453e85b1f74744c53c717fd429a5704d71229e7
/src/java/com/tv/xeeng/reporttool/action/DeleteGoldenHourAction.java
e763be5f28279b617e721c448139eabbcf39884e
[]
no_license
hungdt138/report_tv
ee1cc4bc0ec76d9dfb3c0da91958ff0fc6cd4ddd
4253510f5fd467c7707b72503d46eb56fe8f0cad
refs/heads/master
2020-05-29T21:46:47.338195
2014-08-08T01:34:25
2014-08-08T01:34:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,184
java
package com.tv.xeeng.reporttool.action; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import com.tv.xeeng.reporttool.dao.GoldenhourDAO; public class DeleteGoldenHourAction extends Action { @Override public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { int gdhId = Integer.parseInt(request.getParameter("goldenhourId")); if(gdhId > 0) { int rs = new GoldenhourDAO().deleteGoldenHour(gdhId); if(rs > 0) { request.setAttribute("msg_notifi", "Đã xóa thành công"); return mapping.findForward("success"); } else { request.setAttribute("msg_notifi", "Không thể tìm kiếm giờ vàng <br/> Bạn hãy kiểm tra lại"); return mapping.findForward("fail"); } } else { request.setAttribute("msg_notifi", "Không tồn tại giờ vàng cần xóa"); return mapping.findForward("fail"); } } }
[ "hungdt138@outlook.com" ]
hungdt138@outlook.com
3a4a82141d6543a0531d706a83a3f423e5a2ee6f
91de42350a0c1ae23cefb866e02976b48b441b83
/src/com/asiainfo/chapter12/exercise/Exercise_1.java
3f79a978b5b08ba67aceb732c330690b0ad43324
[]
no_license
zhangzhiwang/ThinkingInJava
05996f1fb93331ada3bfdb1cded4e7d37f2d9c78
3aae2d5583dc7b6d5f1a93660d5ac2132c38e564
refs/heads/master
2020-04-06T07:04:59.236348
2016-07-31T23:49:51
2016-07-31T23:49:51
38,598,285
0
0
null
null
null
null
UTF-8
Java
false
false
356
java
package com.asiainfo.chapter12.exercise; /** * p253练习1 * * @author zhangzw8@asiainfo.com * @date 2015年12月5日 上午1:02:01 */ public class Exercise_1 { public static void main(String[] args) { try { throw new Exception("hello"); } catch (Exception e) { e.printStackTrace(); } finally { System.out.println("world"); } } }
[ "934109401@qq.com" ]
934109401@qq.com
7fb6335c3b2181470cbcbeb685def1779507de00
79595075622ded0bf43023f716389f61d8e96e94
/app/src/main/java/gov/nist/javax/sip/parser/AllowEventsParser.java
1eac36ef2b3d142d4151b6415d6669031b2d6480
[]
no_license
dstmath/OppoR15
96f1f7bb4d9cfad47609316debc55095edcd6b56
b9a4da845af251213d7b4c1b35db3e2415290c96
refs/heads/master
2020-03-24T16:52:14.198588
2019-05-27T02:24:53
2019-05-27T02:24:53
142,840,716
7
4
null
null
null
null
UTF-8
Java
false
false
1,646
java
package gov.nist.javax.sip.parser; import gov.nist.javax.sip.header.AllowEvents; import gov.nist.javax.sip.header.AllowEventsList; import gov.nist.javax.sip.header.SIPHeader; import java.text.ParseException; public class AllowEventsParser extends HeaderParser { public AllowEventsParser(String allowEvents) { super(allowEvents); } protected AllowEventsParser(Lexer lexer) { super(lexer); } public SIPHeader parse() throws ParseException { if (debug) { dbg_enter("AllowEventsParser.parse"); } AllowEventsList list = new AllowEventsList(); try { headerName(TokenTypes.ALLOW_EVENTS); AllowEvents allowEvents = new AllowEvents(); allowEvents.setHeaderName("Allow-Events"); this.lexer.SPorHT(); this.lexer.match(4095); allowEvents.setEventType(this.lexer.getNextToken().getTokenValue()); list.add((SIPHeader) allowEvents); this.lexer.SPorHT(); while (this.lexer.lookAhead(0) == ',') { this.lexer.match(44); this.lexer.SPorHT(); allowEvents = new AllowEvents(); this.lexer.match(4095); allowEvents.setEventType(this.lexer.getNextToken().getTokenValue()); list.add((SIPHeader) allowEvents); this.lexer.SPorHT(); } this.lexer.SPorHT(); this.lexer.match(10); return list; } finally { if (debug) { dbg_leave("AllowEventsParser.parse"); } } } }
[ "toor@debian.toor" ]
toor@debian.toor
7d6ba66645b374bfb5762d77d2f4f699b1b369fe
913338182e28c362b1fde43c35a00f3afc590645
/src/main/java/com/huios/compta/repository/AuthorityRepository.java
f92b1fad64c91bf59291638ba836933cbbaa3cd4
[]
no_license
serviceshuios/comptabiliteGestion
aa661228707948c9a4bed8be31aee9e661431982
c259e48029b75669cf56531ac7cb97692080699b
refs/heads/master
2022-12-20T18:32:01.239777
2020-01-22T15:26:56
2020-01-22T15:26:56
235,602,307
1
0
null
2022-12-16T04:43:34
2020-01-22T15:26:42
Java
UTF-8
Java
false
false
298
java
package com.huios.compta.repository; import com.huios.compta.domain.Authority; import org.springframework.data.jpa.repository.JpaRepository; /** * Spring Data JPA repository for the {@link Authority} entity. */ public interface AuthorityRepository extends JpaRepository<Authority, String> { }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
a3b858f507807114061d03312fdef34ba27dbffa
0a6336496abdb49a8fbcbbbcad581c850356f018
/src/test/java/org/openapitools/client/model/MinedTransactionE409Test.java
3b06bcc02439d1c583f2ac4c7afd65d174877cd3
[]
no_license
Crypto-APIs/Crypto_APIs_2.0_SDK_Java
8afba51f53a7a617d66ef6596010cc034a48c17d
29bac849e4590c4decfa80458fce94a914801019
refs/heads/main
2022-09-24T04:43:37.066099
2022-09-12T17:38:13
2022-09-12T17:38:13
360,245,136
5
1
null
null
null
null
UTF-8
Java
false
false
2,119
java
/* * CryptoAPIs * Crypto APIs is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of their blockchain applications. Crypto APIs provides unified endpoints and data, raw data, automatic tokens and coins forwardings, callback functionalities, and much more. * * The version of the OpenAPI document: 2021-03-20 * Contact: developers@cryptoapis.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client.model; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.AlreadyExists; import org.openapitools.client.model.BannedIpAddressDetailsInner; import org.openapitools.client.model.InvalidData; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; /** * Model tests for MinedTransactionE409 */ public class MinedTransactionE409Test { private final MinedTransactionE409 model = new MinedTransactionE409(); /** * Model tests for MinedTransactionE409 */ @Test public void testMinedTransactionE409() { // TODO: test MinedTransactionE409 } /** * Test the property 'code' */ @Test public void codeTest() { // TODO: test code } /** * Test the property 'message' */ @Test public void messageTest() { // TODO: test message } /** * Test the property 'details' */ @Test public void detailsTest() { // TODO: test details } }
[ "kristiyan.ivanov@menasoftware.com" ]
kristiyan.ivanov@menasoftware.com
de35ba5101006e573014106a2096325bf68984a9
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project75/src/test/java/org/gradle/test/performance75_5/Test75_411.java
c2e261789a34e5c52a526797e6aef83c8c7ffc36
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance75_5; import static org.junit.Assert.*; public class Test75_411 { private final Production75_411 production = new Production75_411("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
89ccf7586d992c253c4814a0710b5e5f4b778168
0ae77408151560a7d315d81d97b8c04363545149
/app/src/main/java/com/iplay/jsreview/setting/view/CreateTableActivity.java
72d8851fe0ae75e11a8f5742d1f85419130364e2
[]
no_license
iplaycloud/JsReview
88abed6f8aa0408bfd0ea22e8c78715518936757
681451d5c808291ccb8184564fd7d1baa6008855
refs/heads/master
2021-01-12T10:25:45.378993
2016-12-20T09:54:59
2016-12-20T09:54:59
76,446,282
0
0
null
null
null
null
UTF-8
Java
false
false
6,224
java
package com.iplay.jsreview.setting.view; import android.os.Bundle; import android.view.View; import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; import com.iplay.jsreview.R; import com.iplay.jsreview.commons.base.BaseActivity; import com.iplay.jsreview.review.model.bean.Content; import com.iplay.jsreview.review.model.bean.Point; import com.iplay.jsreview.review.model.bean.Unit; import com.iplay.jsreview.setting.model.bean.Suggest; import com.iplay.jsreview.test.model.bean.Test; import cn.bmob.v3.BmobQuery; import cn.bmob.v3.listener.CountListener; import cn.bmob.v3.listener.SaveListener; public class CreateTableActivity extends BaseActivity { public static final int PB_STEP = 20; private TextView mBtCreateTable; private ProgressBar mProgressBar; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_create_table); initToolBar(); showOrHideToolBarNavigation(true); // initData(); mBtCreateTable = (TextView) findViewById(R.id.bt_create); mProgressBar = (ProgressBar) findViewById(R.id.progressbar); mBtCreateTable.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mProgressBar.setProgress(0); initData(); } }); } private void initData() { final Unit unit = new Unit(); unit.setName("单元名称"); unit.save(this, new SaveListener() { @Override public void onSuccess() { stepComplete(); final Point point = new Point(); point.setColor(2); point.setName("知识点"); point.setUnit(unit); point.save(CreateTableActivity.this, new SaveListener() { @Override public void onSuccess() { stepComplete(); Content content = new Content(); content.setPoint(point); content.setTitle("博文标题"); content.setSource("AndroidReview"); content.setCreater("Vv"); content.setAuthor("Vv"); content.setSmall("博文简介"); content.setContent("博文内容"); content.save(CreateTableActivity.this, new SaveListener() { @Override public void onSuccess() { stepComplete(); } @Override public void onFailure(int i, String s) { Toast.makeText(CreateTableActivity.this, "创建Content表失败", Toast.LENGTH_SHORT).show(); } }); } @Override public void onFailure(int i, String s) { Toast.makeText(CreateTableActivity.this, "创建Point表失败", Toast.LENGTH_SHORT).show(); } }); } @Override public void onFailure(int i, String s) { Toast.makeText(CreateTableActivity.this, "创建Unit表失败", Toast.LENGTH_SHORT).show(); } }); initTest(); Suggest suggest = new Suggest(); suggest.setMail_qq("qq"); suggest.setMsg("建议"); suggest.save(this, new SaveListener() { @Override public void onSuccess() { stepComplete(); } @Override public void onFailure(int i, String s) { Toast.makeText(CreateTableActivity.this, "创建Suggest表失败", Toast.LENGTH_SHORT).show(); } }); } @Override public String returnToolBarTitle() { return getString(R.string.creat_table); } public void initTest() { BmobQuery<Test> query = new BmobQuery<>(); query.count(this, Test.class, new CountListener() { @Override public void onSuccess(int i) { stepComplete(); createTest(i); } @Override public void onFailure(int i, String s) { //101代表表格未创建,官网可查 错误码含义http://docs.bmob.cn/errorcode/index.html?menukey=otherdoc&key=errorcode if (i == 101) { stepComplete(); createTest(0); } else { Toast.makeText(CreateTableActivity.this, "获取Test题目数量失败", Toast.LENGTH_SHORT).show(); } } }); } private void stepComplete() { mProgressBar.setProgress(mProgressBar.getProgress() + PB_STEP); } private void createTest(int i) { Test test = new Test(); test.setQuestion("题目"); test.setTestId(i);//这个作者脑残了设置成了 手动添加并且要从0开始不能重复 重复后会有错(乱序读题根据这个id),设成自增长就不用烦这事了,但是这个要到后台去修改这个字段,读者可以自行尝试 test.setTestType(1); test.setAnswerA("选项"); test.setAnswerB("选项"); test.setAnswerC("选项"); test.setAnswerD("选项"); test.setAnswerE("选项"); test.setAnswerF("选项"); test.setAnswerG("选项"); test.setAnswer("答案");//如果是要简答题那么前面选项都为空并且设置testType就可以了 test.save(CreateTableActivity.this, new SaveListener() { @Override public void onSuccess() { stepComplete(); } @Override public void onFailure(int i, String s) { Toast.makeText(CreateTableActivity.this, "创建Test表失败", Toast.LENGTH_SHORT).show(); } }); } }
[ "iplaycloud@gmail.com" ]
iplaycloud@gmail.com
848caaecf081c6aaa059631f4b76e5abe24b6069
fbfc55e7335cd07e38289cd9b291ebbded62a96b
/projetos/deploy-amazon/src/main/java/com/algaworks/algafood/api/v1/openapi/controller/CidadeControllerOpenApi.java
f74267e2d28d6c4826ebc8f95837ac64707c58fb
[]
no_license
dvsilva/algaworks-especialista-spring-rest
cc8097a5432fb7d7263f5f5f050a5e05443779f8
c190bb9901d86f6c0eb3ffdedfb1868b8eedd40b
refs/heads/master
2023-04-02T01:44:18.271430
2021-04-02T19:34:26
2021-04-02T19:34:26
304,274,947
0
1
null
2020-12-19T14:03:49
2020-10-15T09:26:38
Java
UTF-8
Java
false
false
2,099
java
package com.algaworks.algafood.api.v1.openapi.controller; import org.springframework.hateoas.CollectionModel; import com.algaworks.algafood.api.exceptionhandler.Problem; import com.algaworks.algafood.api.v1.model.CidadeModel; import com.algaworks.algafood.api.v1.model.input.CidadeInput; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; @Api(tags = "Cidades") public interface CidadeControllerOpenApi { @ApiOperation("Lista as cidades") CollectionModel<CidadeModel> listar(); @ApiOperation("Busca uma cidade por ID") @ApiResponses({ @ApiResponse(code = 400, message = "ID da cidade inválido", response = Problem.class), @ApiResponse(code = 404, message = "Cidade não encontrada", response = Problem.class) }) CidadeModel buscar( @ApiParam(value = "ID de uma cidade", example = "1", required = true) Long cidadeId); @ApiOperation("Cadastra uma cidade") @ApiResponses({ @ApiResponse(code = 201, message = "Cidade cadastrada"), }) CidadeModel adicionar( @ApiParam(name = "corpo", value = "Representação de uma nova cidade", required = true) CidadeInput cidadeInput); @ApiOperation("Atualiza uma cidade por ID") @ApiResponses({ @ApiResponse(code = 200, message = "Cidade atualizada"), @ApiResponse(code = 404, message = "Cidade não encontrada", response = Problem.class) }) CidadeModel atualizar( @ApiParam(value = "ID de uma cidade", example = "1", required = true) Long cidadeId, @ApiParam(name = "corpo", value = "Representação de uma cidade com os novos dados") CidadeInput cidadeInput); @ApiOperation("Exclui uma cidade por ID") @ApiResponses({ @ApiResponse(code = 204, message = "Cidade excluída"), @ApiResponse(code = 404, message = "Cidade não encontrada", response = Problem.class) }) void remover( @ApiParam(value = "ID de uma cidade", example = "1", required = true) Long cidadeId); }
[ "danyllo.dvs@gmail.com" ]
danyllo.dvs@gmail.com
fe0312ba8be27413cdc979d14024e0f33437876c
40a0f546bcf56cee5bce681fe173580c15f4066f
/tools/plugins/org.scribble.lang.projection/src/main/java/org/scribble/lang/projection/impl/StateDefinitionProjectorRule.java
159a30e4fcfbebf39a460f4a8d449f49dccaf66e
[]
no_license
objectiser/sgl
6f141f95878e63fd99f88e91ff69c4ae40be20b6
1f2c97bd31f84042dff72ca967a26d525582ce2c
refs/heads/master
2016-09-10T22:41:05.756757
2011-03-25T22:21:24
2011-03-25T22:21:24
1,527,516
0
0
null
null
null
null
UTF-8
Java
false
false
2,182
java
/* * Copyright 2009-10 www.scribble.org * * 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.scribble.lang.projection.impl; import org.scribble.common.logging.Journal; import org.scribble.lang.model.*; /** * This class provides the StateDefinition implementation of the * projector rule. */ public class StateDefinitionProjectorRule implements ProjectorRule { /** * This method determines whether the projection rule is * appropriate for the supplied model object. * * @param obj The model object to be projected * @return Whether the rule is relevant for the * model object */ public boolean isSupported(ModelObject obj) { return(obj.getClass() == StateDefinition.class); } /** * This method projects the supplied model object based on the * specified role. * * @param model The model object * @param role The role * @param l The model listener * @return The projected model object */ public ModelObject project(ProjectorContext context, ModelObject model, String role, Journal l) { StateDefinition ret=new StateDefinition(); StateDefinition source=(StateDefinition)model; ret.derivedFrom(source); ret.setName(source.getName()); if (source.getActor() != null) { ret.setActor((Actor)context.project(source.getActor(), role, l)); } if (source.getInitializer() != null) { ret.setInitializer((Expression)context.project(source.getInitializer(), role, l)); } if (ret.getActor() != null && ret.getActor().getName().equals(role) == false) { ret = null; } return(ret); } }
[ "gary@pi4tech.com" ]
gary@pi4tech.com
cfd3ec10f7f78063597e426e7d8751c80253fca9
b36a85dd502904fc014f318e91a7ff5d67537905
/src/main/java/com/redxun/oa/personal/entity/AddrCont.java
66c3fff711c700802105557ce5bd7d1e28146169
[]
no_license
clickear/jsaas
7c0819b4f21443c10845e549b521fa50c3a1c760
ddffd4c42ee40c8a2728d46e4c7009a95f7f801f
refs/heads/master
2020-03-16T09:00:40.649868
2018-04-18T12:13:50
2018-04-18T12:13:50
132,606,788
4
8
null
2018-05-08T12:37:25
2018-05-08T12:37:25
null
UTF-8
Java
false
false
6,841
java
package com.redxun.oa.personal.entity; import com.redxun.core.entity.BaseTenantEntity; import java.io.Serializable; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.Table; import javax.validation.constraints.Size; import org.hibernate.validator.constraints.NotEmpty; import com.redxun.core.constants.MBoolean; import com.redxun.core.annotion.table.FieldDefine; import com.redxun.core.annotion.table.TableDefine; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.EqualsBuilder; /** * <pre> * 描述:通讯录联系实体类定义 * 通讯录联系信息 * 构建组:miweb * 作者:keith * 邮箱: keith@redxun.cn * 日期:2014-2-1-上午12:52:41 * 版权:广州红迅软件有限公司版权所有 * </pre> */ @Entity @Table(name = "OA_ADDR_CONT") @TableDefine(title = "通讯录联系信息") public class AddrCont extends BaseTenantEntity { @FieldDefine(title = "PKID") @Id @Column(name = "CONT_ID_") protected String contId; /* * 类型 手机号=MOBILE 家庭地址=HOME_ADDRESS 工作地址=WORK_ADDRESS QQ=QQ 微信=WEI_XIN * GoogleTalk=GOOGLE-TALK 工作=WORK_INFO 备注=MEMO */ @FieldDefine(title = "类型") @Column(name = "TYPE_") @Size(max = 50) @NotEmpty protected String type; /* 联系主信息 */ @FieldDefine(title = "联系主信息") @Column(name = "CONTACT_") @Size(max = 255) protected String contact; /* 联系扩展字段1 */ @FieldDefine(title = "联系扩展字段1") @Column(name = "EXT1_") @Size(max = 100) protected String ext1; /* 联系扩展字段2 */ @FieldDefine(title = "联系扩展字段2") @Column(name = "EXT2_") @Size(max = 100) protected String ext2; /* 联系扩展字段3 */ @FieldDefine(title = "联系扩展字段3") @Column(name = "EXT3_") @Size(max = 100) protected String ext3; /* 联系扩展字段4 */ @FieldDefine(title = "联系扩展字段4") @Column(name = "EXT4_") @Size(max = 100) protected String ext4; @FieldDefine(title = "通讯录联系人") @ManyToOne @JoinColumn(name = "ADDR_ID_") protected com.redxun.oa.personal.entity.AddrBook addrBook; /** * Default Empty Constructor for class AddrCont */ public AddrCont() { super(); } /** * Default Key Fields Constructor for class AddrCont */ public AddrCont(String in_contId) { this.setContId(in_contId); } public com.redxun.oa.personal.entity.AddrBook getAddrBook() { return addrBook; } public void setAddrBook(com.redxun.oa.personal.entity.AddrBook in_addrBook) { this.addrBook = in_addrBook; } /** * 联系信息ID * @return String */ public String getContId() { return this.contId; } /** * 设置 联系信息ID */ public void setContId(String aValue) { this.contId = aValue; } /** * 联系人ID * @return String */ public String getAddrId() { return this.getAddrBook() == null ? null : this.getAddrBook().getAddrId(); } /** * 设置 联系人ID */ public void setAddrId(String aValue) { if (aValue == null) { addrBook = null; } else if (addrBook == null) { addrBook = new com.redxun.oa.personal.entity.AddrBook(aValue); } else { addrBook.setAddrId(aValue); } } /** * 类型 手机号=MOBILE 家庭地址=HOME_ADDRESS 工作地址=WORK_ADDRESS QQ=QQ 微信=WEI_XIN * GoogleTalk=GOOGLE-TALK 工作=WORK_INFO 备注=MEMO * @return String */ public String getType() { return this.type; } /** * 设置 类型 手机号=MOBILE 家庭地址=HOME_ADDRESS 工作地址=WORK_ADDRESS QQ=QQ 微信=WEI_XIN * GoogleTalk=GOOGLE-TALK 工作=WORK_INFO 备注=MEMO */ public void setType(String aValue) { this.type = aValue; } /** * 联系主信息 * @return String */ public String getContact() { return this.contact; } /** * 设置 联系主信息 */ public void setContact(String aValue) { this.contact = aValue; } /** * 联系扩展字段1 * @return String */ public String getExt1() { return this.ext1; } /** * 设置 联系扩展字段1 */ public void setExt1(String aValue) { this.ext1 = aValue; } /** * 联系扩展字段2 * @return String */ public String getExt2() { return this.ext2; } /** * 设置 联系扩展字段2 */ public void setExt2(String aValue) { this.ext2 = aValue; } /** * 联系扩展字段3 * @return String */ public String getExt3() { return this.ext3; } /** * 设置 联系扩展字段3 */ public void setExt3(String aValue) { this.ext3 = aValue; } /** * 联系扩展字段4 * @return String */ public String getExt4() { return this.ext4; } /** * 设置 联系扩展字段4 */ public void setExt4(String aValue) { this.ext4 = aValue; } @Override public String getIdentifyLabel() { return this.contId; } @Override public Serializable getPkId() { return this.contId; } @Override public void setPkId(Serializable pkId) { this.contId = (String) pkId; } /** * @see java.lang.Object#equals(Object) */ public boolean equals(Object object) { if (!(object instanceof AddrCont)) { return false; } AddrCont rhs = (AddrCont) object; return new EqualsBuilder().append(this.contId, rhs.contId).append(this.type, rhs.type).append(this.contact, rhs.contact).append(this.ext1, rhs.ext1).append(this.ext2, rhs.ext2).append(this.ext3, rhs.ext3).append(this.ext4, rhs.ext4).append(this.updateTime, rhs.updateTime).append(this.updateBy, rhs.updateBy).append(this.createTime, rhs.createTime).append(this.createBy, rhs.createBy).append(this.tenantId, rhs.tenantId).isEquals(); } /** * @see java.lang.Object#hashCode() */ public int hashCode() { return new HashCodeBuilder(-82280557, -700257973).append(this.contId).append(this.type).append(this.contact).append(this.ext1).append(this.ext2).append(this.ext3).append(this.ext4).append(this.updateTime).append(this.updateBy).append(this.createTime).append(this.createBy).append(this.tenantId).toHashCode(); } /** * @see java.lang.Object#toString() */ public String toString() { return new ToStringBuilder(this).append("contId", this.contId).append("type", this.type).append("contact", this.contact).append("ext1", this.ext1).append("ext2", this.ext2).append("ext3", this.ext3).append("ext4", this.ext4).append("updateTime", this.updateTime).append("updateBy", this.updateBy).append("createTime", this.createTime).append("createBy", this.createBy).append("tenantId", this.tenantId).toString(); } }
[ "yijiang331" ]
yijiang331
2deed34c8095d26ca3ba19b31a7ad93c734605af
823471e6a384e6c552df936f1832e56a67a74669
/app/src/main/java/com/bw/combatsample/view/adapter/MyMlssAdapter.java
768d65609171e0b4ae4f23e72b5e2e23117d6a2c
[]
no_license
tongchexinfeitao/CombatSample
0acc8eddb382d2cf2f4df0f5a2e0d33d2316b2ef
3c9aebce3fa8baae18967ce8748acbef76b3db3d
refs/heads/master
2020-09-21T21:57:34.761848
2019-12-12T09:21:48
2019-12-12T09:21:48
224,946,405
0
2
null
null
null
null
UTF-8
Java
false
false
2,063
java
package com.bw.combatsample.view.adapter; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.bw.combatsample.R; import com.bw.combatsample.model.bean.Lawyer; import com.bw.combatsample.util.NetUtil; import java.util.List; public class MyMlssAdapter extends RecyclerView.Adapter<MyMlssAdapter.MyViewHolder> { private List<Lawyer.ResultBean.MlssBean.CommodityListBeanXX> commodityList; public MyMlssAdapter(List<Lawyer.ResultBean.MlssBean.CommodityListBeanXX> commodityList) { this.commodityList = commodityList; } @NonNull @Override public MyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { // TODO: 2019/12/6 加载布局、创建适配器 View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_mlss, viewGroup, false); return new MyViewHolder(inflate); } @Override public void onBindViewHolder(@NonNull MyViewHolder myViewHolder, int i) { // TODO: 2019/12/6 绑定数据 Lawyer.ResultBean.MlssBean.CommodityListBeanXX commodityListBeanXX = commodityList.get(i); myViewHolder.name.setText(commodityListBeanXX.getCommodityName()); myViewHolder.price.setText(commodityListBeanXX.getPrice() + ""); NetUtil.getInstance().getPhoto(commodityListBeanXX.getMasterPic(), myViewHolder.imageView); } @Override public int getItemCount() { return commodityList.size(); } class MyViewHolder extends RecyclerView.ViewHolder { ImageView imageView; TextView name; TextView price; public MyViewHolder(@NonNull View itemView) { super(itemView); imageView = itemView.findViewById(R.id.img); name = itemView.findViewById(R.id.tv_name); price = itemView.findViewById(R.id.tv_price); } } }
[ "tongchexinfeitao@sina.cn" ]
tongchexinfeitao@sina.cn
bfd9705098503f62cc4abfbef88acbaea2e20ec0
de764192481a850baaf3251120c430882911afd9
/src/com/gxb/concurrenttool/cas/SimulatedCAS.java
0bc17431d16af9b5fd3b3204eb911c943c572059
[]
no_license
zyyawin/JavaNotebook
9f25c60c3da1d911c3541962659600c3f23d88ea
0632d4cf529bff731efef169e92891f1a653560e
refs/heads/master
2022-04-17T20:57:03.921493
2020-04-19T14:29:48
2020-04-19T14:29:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
320
java
package com.gxb.concurrenttool.cas; public class SimulatedCAS { private volatile int value; public synchronized int compareAndSawp(int expectedValue,int newValue) { int oldValue = value; if (oldValue == expectedValue) { value = newValue; } return oldValue; } }
[ "535758155@qq.com" ]
535758155@qq.com
09fa0c90e0c575a0ec462bc7fab2f5d741277706
bd97ad9c3489e72ad8ee407248059e5908b9a71f
/mall-mbg/src/main/java/com/dunshan/mall/mapper/SmsHomeRecommendProductMapper.java
4528671a421755c2f999982c36501f1f15c28d2d
[ "Apache-2.0" ]
permissive
okay456okay/7d-mall-microservice
055a33560b2d9cd9c73e52626ba9d1e99a7f72e8
8cfd98e47208f715b495ce6db39908d8163db927
refs/heads/master
2023-09-04T12:19:37.296256
2021-11-04T02:23:05
2021-11-04T02:23:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,101
java
package com.dunshan.mall.mapper; import com.dunshan.mall.model.SmsHomeRecommendProduct; import com.dunshan.mall.model.SmsHomeRecommendProductExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface SmsHomeRecommendProductMapper { long countByExample(SmsHomeRecommendProductExample example); int deleteByExample(SmsHomeRecommendProductExample example); int deleteByPrimaryKey(Long id); int insert(SmsHomeRecommendProduct record); int insertSelective(SmsHomeRecommendProduct record); List<SmsHomeRecommendProduct> selectByExample(SmsHomeRecommendProductExample example); SmsHomeRecommendProduct selectByPrimaryKey(Long id); int updateByExampleSelective(@Param("record") SmsHomeRecommendProduct record, @Param("example") SmsHomeRecommendProductExample example); int updateByExample(@Param("record") SmsHomeRecommendProduct record, @Param("example") SmsHomeRecommendProductExample example); int updateByPrimaryKeySelective(SmsHomeRecommendProduct record); int updateByPrimaryKey(SmsHomeRecommendProduct record); }
[ "zuozewei@hotmail.com" ]
zuozewei@hotmail.com
c7f27b9337391cdcdfc700b04a3facfb336a6bf5
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/4787e244d80536220c962c69131ce65c1bba9a78/after/ParameterDeclaration.java
824f60c3ed234d27e616021ddd9c82388c17677a
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,874
java
package org.jetbrains.plugins.groovy.lang.parser.parsing.auxiliary.parameters; import org.jetbrains.plugins.groovy.lang.parser.GroovyElementTypes; import org.jetbrains.plugins.groovy.lang.parser.parsing.util.ParserUtils; import org.jetbrains.plugins.groovy.lang.parser.parsing.auxiliary.modifiers.ParameterModifierOptional; import org.jetbrains.plugins.groovy.lang.parser.parsing.auxiliary.VariableInitializer; import org.jetbrains.plugins.groovy.lang.parser.parsing.types.TypeSpec; import org.jetbrains.plugins.groovy.lang.lexer.GroovyElementType; import com.intellij.psi.tree.IElementType; import com.intellij.lang.PsiBuilder; /** * @author: Dmitry.Krasilschikov * @date: 26.03.2007 */ public class ParameterDeclaration implements GroovyElementTypes { public static IElementType parse(PsiBuilder builder) { PsiBuilder.Marker pdMarker = builder.mark(); if (WRONGWAY.equals(ParameterModifierOptional.parse(builder))) { pdMarker.rollbackTo(); return WRONGWAY; } PsiBuilder.Marker checkMarker = builder.mark(); GroovyElementType type = TypeSpec.parse(builder); if (!WRONGWAY.equals(type)) { //type was recognized ParserUtils.getToken(builder, mTRIPLE_DOT); if (!ParserUtils.getToken(builder, mIDENT)) { //if there is no identifier rollback to begin checkMarker.rollbackTo(); if (!ParserUtils.getToken(builder, mIDENT)) { //parse identifier because suggestion about type was wrong pdMarker.rollbackTo(); return WRONGWAY; } VariableInitializer.parse(builder); pdMarker.done(PARAMETER); return PARAMETER; } else { //parse typized identifier checkMarker.drop(); VariableInitializer.parse(builder); pdMarker.done(PARAMETER); return PARAMETER; } } else { //TODO: return WRONGWAY; } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
0f78b8c7fc455f9bef139c40d03e6dc4cd9c63bd
c7473d3323273ce570598488d4799ab69d5d4130
/freeipa/src/main/java/com/sequenceiq/freeipa/api/model/Status.java
0bfba28f279c945eaeae00309905ae84b429b94e
[ "LicenseRef-scancode-warranty-disclaimer", "ANTLR-PD", "CDDL-1.0", "bzip2-1.0.6", "Zlib", "BSD-3-Clause", "MIT", "EPL-1.0", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-jdbm-1.00", "Apache-2.0" ]
permissive
prabhjyotsingh/cloudbreak
4df3e3c053f67cbecd493aaa2d5895c3c42538b9
4f735996a73d19dca8fe2617eaf125debe25ea38
refs/heads/master
2020-05-29T13:08:33.276790
2019-05-28T13:37:04
2019-05-28T19:54:05
189,146,058
0
0
Apache-2.0
2019-05-29T03:44:21
2019-05-29T03:44:20
null
UTF-8
Java
false
false
1,011
java
package com.sequenceiq.freeipa.api.model; import java.util.Arrays; public enum Status { REQUESTED, CREATE_IN_PROGRESS, AVAILABLE, UPDATE_IN_PROGRESS, UPDATE_REQUESTED, UPDATE_FAILED, CREATE_FAILED, ENABLE_SECURITY_FAILED, PRE_DELETE_IN_PROGRESS, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETED, STOPPED, STOP_REQUESTED, START_REQUESTED, STOP_IN_PROGRESS, START_IN_PROGRESS, START_FAILED, STOP_FAILED, WAIT_FOR_SYNC, MAINTENANCE_MODE_ENABLED; public boolean isRemovableStatus() { return Arrays.asList(AVAILABLE, UPDATE_FAILED, CREATE_FAILED, ENABLE_SECURITY_FAILED, DELETE_FAILED, DELETE_COMPLETED, STOPPED, START_FAILED, STOP_FAILED).contains(valueOf(name())); } public boolean isAvailable() { return Arrays.asList(AVAILABLE, MAINTENANCE_MODE_ENABLED).contains(valueOf(name())); } public boolean isStopPhaseActive() { return name().contains("STOP"); } }
[ "keyki.kk@gmail.com" ]
keyki.kk@gmail.com
308f8fc1bede85920a8377544e052be9e25484f5
fa4e76a172a4642da11625d855b6f26cf075a7a2
/src/androidTest/java/de/blau/android/prefs/CustomImageryTest.java
9c5bebfbf4a8d05bab834a5d2054314ea40b12ae
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
skull591/osmeditor4android
757d00d0765ddce59cf8f20b2793bf611825aa7f
430d0d7bfb6b5cbcee82201756568d88378478c9
refs/heads/master
2022-11-18T09:48:48.473405
2020-06-27T13:16:21
2020-06-27T13:16:21
281,732,078
0
2
NOASSERTION
2020-07-22T16:43:23
2020-07-22T16:43:22
null
UTF-8
Java
false
false
6,235
java
package de.blau.android.prefs; import java.io.IOException; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import android.app.Instrumentation; import android.app.Instrumentation.ActivityMonitor; import android.content.Intent; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.filters.LargeTest; import androidx.test.rule.ActivityTestRule; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.uiautomator.UiDevice; import androidx.test.uiautomator.UiObject; import androidx.test.uiautomator.UiObject2; import androidx.test.uiautomator.UiObjectNotFoundException; import androidx.test.uiautomator.UiSelector; import androidx.test.uiautomator.Until; import android.view.View; import de.blau.android.Main; import de.blau.android.R; import de.blau.android.Splash; import de.blau.android.TestUtils; import de.blau.android.layer.LayerDialogTest; import de.blau.android.resources.TileLayerDatabase; /** * Note these tests are not mocked * * @author simon * */ @RunWith(AndroidJUnit4.class) @LargeTest public class CustomImageryTest { Main main = null; View v = null; Splash splash = null; ActivityMonitor monitor = null; Instrumentation instrumentation = null; UiDevice device = null; /** * Manual start of activity so that we can set up the monitor for main */ @Rule public ActivityTestRule<Splash> mActivityRule = new ActivityTestRule<>(Splash.class, false, false); /** * Pre-test setup */ @Before public void setup() { instrumentation = InstrumentationRegistry.getInstrumentation(); device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); monitor = instrumentation.addMonitor(Main.class.getName(), null, false); Intent intent = new Intent(Intent.ACTION_MAIN); splash = mActivityRule.launchActivity(intent); main = (Main) instrumentation.waitForMonitorWithTimeout(monitor, 40000); // wait for main TestUtils.grantPermissons(device); TestUtils.dismissStartUpDialogs(device, main); } /** * Post-test teardown */ @After public void teardown() { instrumentation.removeMonitor(monitor); if (main != null) { main.deleteDatabase(TileLayerDatabase.DATABASE_NAME); main.finish(); } else { System.out.println("main is null"); } instrumentation.waitForIdleSync(); } /** * Start prefs, custom imagery, add, load mbtiles */ @Test public void customImageryValidMBTiles() { try { TestUtils.copyFileFromResources(main, "map.mbt", "mbtiles", false); } catch (IOException e) { Assert.fail(e.getMessage()); } Preferences prefs = new Preferences(main); TestUtils.removeImageryLayers(main); main.getMap().setPrefs(main, prefs); monitor = instrumentation.addMonitor(PrefEditor.class.getName(), null, false); Assert.assertTrue(TestUtils.clickButton(device, device.getCurrentPackageName() + ":id/menu_config", true)); instrumentation.waitForMonitorWithTimeout(monitor, 40000); // wait for main Assert.assertTrue(TestUtils.clickText(device, false, main.getString(R.string.config_customlayers_title), true, false)); Assert.assertTrue(TestUtils.clickButton(device, device.getCurrentPackageName() + ":id/add", true)); Assert.assertTrue(TestUtils.clickButton(device, device.getCurrentPackageName() + ":id/file_button", true)); TestUtils.selectFile(device, main, "mbtiles", "map.mbt", false); Assert.assertTrue(TestUtils.findText(device, false, "My Map")); Assert.assertTrue(TestUtils.findText(device, false, "57.0527713171221")); Assert.assertTrue(TestUtils.clickText(device, false, main.getString(R.string.save_and_set), true, false)); Assert.assertTrue(TestUtils.findText(device, false, "My Map")); Assert.assertTrue(TestUtils.clickText(device, false, main.getString(R.string.done), true, false)); Assert.assertTrue(TestUtils.clickHome(device, true)); UiObject2 extentButton = TestUtils.getLayerButton(device, "My Map", LayerDialogTest.EXTENT_BUTTON); extentButton.clickAndWait(Until.newWindow(), 2000); Assert.assertTrue(main.getMap().getBackgroundLayer().getTileProvider().connected()); // check that the service // // is still running } /** * Start prefs, custom imagery, add, load invalid mbtiles */ @Test public void customImageryInvalidMBTiles() { try { TestUtils.copyFileFromResources(main, "map-no-meta.mbt", "mbtiles", false); } catch (IOException e) { Assert.fail(e.getMessage()); } Preferences prefs = new Preferences(main); TestUtils.removeImageryLayers(main); main.getMap().setPrefs(main, prefs); monitor = instrumentation.addMonitor(PrefEditor.class.getName(), null, false); Assert.assertTrue(TestUtils.clickButton(device, device.getCurrentPackageName() + ":id/menu_config", true)); instrumentation.waitForMonitorWithTimeout(monitor, 40000); // wait for main Assert.assertTrue(TestUtils.clickText(device, false, main.getString(R.string.config_customlayers_title), true, false)); Assert.assertTrue(TestUtils.clickButton(device, device.getCurrentPackageName() + ":id/add", true)); Assert.assertTrue(TestUtils.clickButton(device, device.getCurrentPackageName() + ":id/file_button", true)); TestUtils.selectFile(device, main, "mbtiles", "map-no-meta.mbt", false); UiObject url = device.findObject(new UiSelector().resourceId(device.getCurrentPackageName() + ":id/url")); try { Assert.assertEquals("", url.getText()); // url not set } catch (UiObjectNotFoundException e) { Assert.fail(e.getMessage()); } } }
[ "simon@poole.ch" ]
simon@poole.ch
eb92cd28fe412e736646b68c48d0e37736da77e4
4aae34d37572688d34c224e6b812ef4a3b633b55
/LTISystem/view/com/lti/action/betagainranking/MainAction.java
0f29294d4043418b8dac7c5dfbc3a043b829be17
[]
no_license
cpedia/xjany-jee-1
9300eabfc263e1f3a4346fccdceaed5c3b606f6d
2a9791b248c4f58c8113dbff2d32b8023244a0ec
refs/heads/master
2016-08-11T14:58:30.434979
2013-04-11T03:22:40
2013-04-11T03:22:40
55,684,098
0
1
null
null
null
null
UTF-8
Java
false
false
312
java
/** * */ package com.lti.action.betagainranking; import com.lti.action.Action; import com.opensymphony.xwork2.ActionSupport; /** * @author CCD * */ public class MainAction extends ActionSupport implements Action{ public String execute() throws Exception { return Action.SUCCESS; } }
[ "xjany.p@gmail.com" ]
xjany.p@gmail.com
ee97513fc82989bd78e272a2e7a6862fc60e38ad
850f8c1030f86350f4b6caefd511dc080f1a53d4
/app/src/main/java/com/frank/sga/data/model/tipoDoc.java
b90fec29fbfc2b24ee391cd483b9652a3909319f
[]
no_license
FrankCV12345/sga-android
d66033fca8252b827c0836e8cbeb30edf2a7d0fa
cb73361a2ba9f16ec22379f270ffa3623fac3fc0
refs/heads/master
2020-08-20T23:54:30.277447
2020-01-15T02:15:25
2020-01-15T02:15:25
216,079,409
0
0
null
null
null
null
UTF-8
Java
false
false
932
java
package com.frank.sga.data.model; import java.io.Serializable; @SuppressWarnings("serial") public class tipoDoc implements Serializable { private long id; private String nombreDoc; private String descripcion; public tipoDoc(long id) { this.id = id; } public tipoDoc(long id, String nombreDoc, String descripcion) { this.id = id; this.nombreDoc = nombreDoc; this.descripcion = descripcion; } public tipoDoc() { } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getNombreDoc() { return nombreDoc; } public void setNombreDoc(String nombreDoc) { this.nombreDoc = nombreDoc; } public String getDescripcion() { return descripcion; } public void setDescripcion(String descripcion) { this.descripcion = descripcion; } }
[ "you@example.com" ]
you@example.com
7922d41b05efb007b38654a87251a2bb84a0e1ce
9c7a0315cc406210e7c5c3670633798552d6ab4d
/rxjava/src/main/java/io/reactivex/internal/operators/maybe/MaybeFlatMapSingleElement.java
ee04e3f73296b956a5bd20194870d89c8767e692
[ "Apache-2.0" ]
permissive
IMLaoJI/RxDemo
6e0c44c0cc5c3fb33593e7053410568d8eb33871
d2b0a33955bdc245ac6a13b8f601dbf9393b6e99
refs/heads/master
2020-12-02T15:22:42.728306
2018-04-18T14:35:35
2018-04-18T14:35:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,246
java
/** * Copyright (c) 2016-present, RxJava Contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See * the License for the specific language governing permissions and limitations under the License. */ package io.reactivex.internal.operators.maybe; import java.util.concurrent.atomic.AtomicReference; import io.reactivex.Maybe; import io.reactivex.MaybeObserver; import io.reactivex.MaybeSource; import io.reactivex.SingleObserver; import io.reactivex.SingleSource; import io.reactivex.annotations.Experimental; import io.reactivex.disposables.Disposable; import io.reactivex.exceptions.Exceptions; import io.reactivex.functions.Function; import io.reactivex.internal.disposables.DisposableHelper; import io.reactivex.internal.functions.ObjectHelper; /** * Maps the success value of the source MaybeSource into a Single. * @param <T> the input value type * @param <R> the result value type * * @since 2.0.2 - experimental */ @Experimental public final class MaybeFlatMapSingleElement<T, R> extends Maybe<R> { final MaybeSource<T> source; final Function<? super T, ? extends SingleSource<? extends R>> mapper; public MaybeFlatMapSingleElement(MaybeSource<T> source, Function<? super T, ? extends SingleSource<? extends R>> mapper) { this.source = source; this.mapper = mapper; } @Override protected void subscribeActual(MaybeObserver<? super R> actual) { source.subscribe(new FlatMapMaybeObserver<T, R>(actual, mapper)); } static final class FlatMapMaybeObserver<T, R> extends AtomicReference<Disposable> implements MaybeObserver<T>, Disposable { private static final long serialVersionUID = 4827726964688405508L; final MaybeObserver<? super R> actual; final Function<? super T, ? extends SingleSource<? extends R>> mapper; FlatMapMaybeObserver(MaybeObserver<? super R> actual, Function<? super T, ? extends SingleSource<? extends R>> mapper) { this.actual = actual; this.mapper = mapper; } @Override public void dispose() { DisposableHelper.dispose(this); } @Override public boolean isDisposed() { return DisposableHelper.isDisposed(get()); } @Override public void onSubscribe(Disposable d) { if (DisposableHelper.setOnce(this, d)) { actual.onSubscribe(this); } } @Override public void onSuccess(T value) { SingleSource<? extends R> ss; try { ss = ObjectHelper.requireNonNull(mapper.apply(value), "The mapper returned a null SingleSource"); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); onError(ex); return; } ss.subscribe(new FlatMapSingleObserver<R>(this, actual)); } @Override public void onError(Throwable e) { actual.onError(e); } @Override public void onComplete() { actual.onComplete(); } } static final class FlatMapSingleObserver<R> implements SingleObserver<R> { final AtomicReference<Disposable> parent; final MaybeObserver<? super R> actual; FlatMapSingleObserver(AtomicReference<Disposable> parent, MaybeObserver<? super R> actual) { this.parent = parent; this.actual = actual; } @Override public void onSubscribe(final Disposable d) { DisposableHelper.replace(parent, d); } @Override public void onSuccess(final R value) { actual.onSuccess(value); } @Override public void onError(final Throwable e) { actual.onError(e); } } }
[ "haoliu@thoughtworks.com" ]
haoliu@thoughtworks.com
b4382be271d5602571a49bdf0123561f1a89e122
c6c8ca55bc28a2a97074c228f0ad14c73911d32b
/api/src/main/java/com/payne/perdev/api/ApiHelper.java
cf78b26dcba3c332a04163192c8f060c8b10eaac
[]
no_license
PaIn22152/WanAndroid
8c6baf67a54b7b31ba611424a5c88a0b0bcc2b36
8db4bceb1d58e88937e02174298a4aafa8a0dbf1
refs/heads/master
2022-11-25T12:42:15.776917
2020-08-01T13:23:49
2020-08-01T13:23:49
279,253,593
0
0
null
null
null
null
UTF-8
Java
false
false
555
java
package com.payne.perdev.api; /** * Project WanAndroid * Path com.payne.perdev.api * Date 2020/07/20 - 15:26 * Author Payne. * About 类描述: */ public class ApiHelper { public static final class Builder { private String baseUrl; public Builder baseUrl(String url) { baseUrl = url; return this; } public ApiHelper build() { return new ApiHelper(); } } public <T> T create(final Class<T> service) { return null; } }
[ "111" ]
111
b0abb3b37be8128676c4e1af554074e457cc1cca
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/neo4j/validation/705/CircularGraphTest.java
52c86780d220e0b91b754bd08fcbfa86c492a469
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,718
java
/* * Copyright (c) 2002-2018 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.kernel.impl.traversal; import org.junit.Before;import org.junit.Test; import java.util.Iterator; import org.neo4j.graphdb.Direction; import org.neo4j.graphdb.Node; import org.neo4j.graphdb.Relationship; import org.neo4j.graphdb.RelationshipType; import org.neo4j.graphdb.Transaction; import org.neo4j.graphdb.traversal.Evaluation; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; public class CircularGraphTest extends TraversalTestBase { @Before public void createTheGraph() { createGraph( "1 TO 2", "2 TO 3", "3 TO 1" ); } @Test public void testCircularBug() { final long timestamp = 3; try ( Transaction tx = beginTx() ) { getNodeWithName( "2" ).setProperty( "timestamp", 1L ); getNodeWithName( "3" ).setProperty( "timestamp", 2L ); tx.success(); } try ( Transaction tx2 = beginTx() ) { final RelationshipType type = RelationshipType.withName( "TO" ); Iterator<Node> nodes = getGraphDb().traversalDescription() .depthFirst() .relationships( type, Direction.OUTGOING ) .evaluator( path -> { Relationship rel = path.lastRelationship(); boolean relIsOfType = rel != null && rel.isType( type ); boolean prune = relIsOfType && (Long) path.endNode().getProperty( "timestamp" ) >= timestamp; return Evaluation.of( relIsOfType, !prune ); } ) .traverse( node( "1" ) ) .nodes().iterator(); assertEquals( "2", nodes.next().getProperty( "name" ) ); assertEquals( "3", nodes.next().getProperty( "name" ) ); assertFalse( nodes.hasNext() ); } } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
6550019cb3127351410ca4cef9dff7f6258ec633
0581dd75bbaaaa90a42fd62c352170b2ca6d9ae6
/src/java/com/linuxense/javadbf/DBFReader.java
ceb462c100dae5935ad43e1722d807dd0e9f4866
[]
no_license
TeamDeveloper2016/jom
a6cebf86f5ece8b72becdd11204b3a2affbb8e5c
a1131a741255689cd82c4ef4c40d15b675062e0c
refs/heads/master
2020-10-02T05:50:06.105396
2020-07-22T20:24:13
2020-07-22T20:24:13
227,715,196
1
1
null
null
null
null
UTF-8
Java
false
false
7,646
java
/* DBFReader Class for reading the records assuming that the given InputStream comtains DBF data. This file is part of JavaDBF packege. Author: anil@linuxense.com License: LGPL (http://www.gnu.org/copyleft/lesser.html) $Id: DBFReader.java,v 1.8 2004/03/31 10:54:03 anil Exp $ */ package com.linuxense.javadbf; import java.io.*; import java.util.*; import mx.org.kaana.libs.formato.Error; /** * DBFReader class can creates objects to represent DBF data. * * This Class is used to read data from a DBF file. Meta data and records can be queried against this document. * * <p> DBFReader cannot write anythng to a DBF file. For creating DBF files use DBFWriter. * * <p> Fetching rocord is possible only in the forward direction and cannot re-wound. In such situation, a suggested approach is to reconstruct the object. * * <p> The nextRecord() method returns an array of Objects and the types of these Object are as follows: * * <table> <tr> <th>xBase Type</th><th>Java Type</th> </tr> <tr> <td>C</td><td>String</td> </tr> <tr> <td>N</td><td>Integer</td> </tr> <tr> <td>F</td><td>Double</td> </tr> <tr> * <td>L</td><td>Boolean</td> </tr> <tr> <td>D</td><td>java.util.Date</td> </tr> </table> * */ public class DBFReader extends DBFBase { DataInputStream dataInputStream; DBFHeader header; /* Class specific variables */ boolean isClosed=true; /** * Initializes a DBFReader object. When this constructor returns the object will have completed reading the hader (meta date) and header information can be quried there on. And it will be ready to * return the first row. * * @param InputStream where the data is read from. */ public DBFReader(InputStream in) throws DBFException { try { this.dataInputStream=new DataInputStream(in); this.isClosed=false; this.header=new DBFHeader(); this.header.read(this.dataInputStream); /* it might be required to leap to the start of records at times */ int t_dataStartIndex=this.header.headerLength-(32+(32*this.header.fieldArray.length))-1; if (t_dataStartIndex>0) { dataInputStream.skip(t_dataStartIndex); } } catch (IOException e) { throw new DBFException(e.getMessage()); } } public String toString() { StringBuffer sb=new StringBuffer(this.header.year+"/"+this.header.month+"/"+this.header.day+"\n" +"Total records: "+this.header.numberOfRecords +"\nHEader length: "+this.header.headerLength +""); for (int i=0; i<this.header.fieldArray.length; i++) { sb.append(this.header.fieldArray[i].getName()); sb.append("\n"); } return sb.toString(); } /** * Returns the number of records in the DBF. */ public int getRecordCount() { return this.header.numberOfRecords; } /** * Returns the asked Field. In case of an invalid index, it returns a ArrayIndexOutofboundsException. * * @param index. Index of the field. Index of the first field is zero. */ public DBFField getField(int index) throws DBFException { if (isClosed) { throw new DBFException("Source is not open"); } return this.header.fieldArray[ index]; } /** * Returns the number of field in the DBF. */ public int getFieldCount() throws DBFException { if (isClosed) { throw new DBFException("Source is not open"); } if (this.header.fieldArray!=null) { return this.header.fieldArray.length; } return -1; } /** * Reads the returns the next row in the DBF stream. * * @returns The next row as an Object array. Types of the elements these arrays follow the convention mentioned in the class description. */ public Object[] nextRecord() throws DBFException { if (isClosed) { throw new DBFException("Source is not open"); } Object recordObjects[]=new Object[this.header.fieldArray.length]; try { boolean isDeleted=false; do { if (isDeleted) { dataInputStream.skip(this.header.recordLength-1); } int t_byte=dataInputStream.readByte(); if (t_byte==END_OF_DATA) { return null; } isDeleted=(t_byte=='*'); } while (isDeleted); for (int i=0; i<this.header.fieldArray.length; i++) { switch (this.header.fieldArray[i].getDataType()) { case 'C': byte b_array[]=new byte[this.header.fieldArray[i].getFieldLength()]; dataInputStream.read(b_array); recordObjects[i]=new String(b_array, characterSetName); break; case 'D': byte t_byte_year[]=new byte[4]; dataInputStream.read(t_byte_year); byte t_byte_month[]=new byte[2]; dataInputStream.read(t_byte_month); byte t_byte_day[]=new byte[2]; dataInputStream.read(t_byte_day); try { GregorianCalendar calendar=new GregorianCalendar( Integer.parseInt(new String(t_byte_year)), Integer.parseInt(new String(t_byte_month))-1, Integer.parseInt(new String(t_byte_day))); recordObjects[i]=calendar.getTime(); } catch (Exception e) { /* this field may be empty or may have improper value set */ recordObjects[i]=null; } break; case 'F': try { byte t_float[]=new byte[this.header.fieldArray[i].getFieldLength()]; dataInputStream.read(t_float); t_float=Utils.trimLeftSpaces(t_float); if (t_float.length>0&&!Utils.contains(t_float, (byte) '?')) { recordObjects[i]=new Float(new String(t_float)); } else { recordObjects[i]=null; } } catch (Exception e) { Error.mensaje(e); throw new DBFException("Failed to parse Float: "+e.getMessage()); } break; case 'N': try { byte t_numeric[]=new byte[this.header.fieldArray[i].getFieldLength()]; dataInputStream.read(t_numeric); t_numeric=Utils.trimLeftSpaces(t_numeric); if (t_numeric.length>0&&!Utils.contains(t_numeric, (byte) '?')) { recordObjects[i]=new Double(new String(t_numeric)); } else { recordObjects[i]=null; } } catch (Exception e) { Error.mensaje(e); throw new DBFException("Failed to parse Number: "+e.getMessage()); } break; case 'L': byte t_logical=dataInputStream.readByte(); if (t_logical=='Y'||t_logical=='t'||t_logical=='T'||t_logical=='t') { recordObjects[i]=Boolean.TRUE; } else { recordObjects[i]=Boolean.FALSE; } break; case 'M': // TODO Later recordObjects[i]=new String("null"); break; default: recordObjects[i]=new String("null"); } } } catch (EOFException e) { return null; } catch (IOException e) { throw new DBFException(e.getMessage()); } return recordObjects; } }
[ "team.developer@gmail.com" ]
team.developer@gmail.com
97f201df8c6d84676f56d5b7861ec90e39c7a928
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project331/src/test/java/org/gradle/test/performance/largejavamultiproject/project331/p1659/Test33187.java
65158f975d7789acf4fbe7277f5e0e93f4e8e7ce
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
2,182
java
package org.gradle.test.performance.largejavamultiproject.project331.p1659; import org.junit.Test; import static org.junit.Assert.*; public class Test33187 { Production33187 objectUnderTest = new Production33187(); @Test public void testProperty0() { Production33184 value = new Production33184(); objectUnderTest.setProperty0(value); assertEquals(value, objectUnderTest.getProperty0()); } @Test public void testProperty1() { Production33185 value = new Production33185(); objectUnderTest.setProperty1(value); assertEquals(value, objectUnderTest.getProperty1()); } @Test public void testProperty2() { Production33186 value = new Production33186(); objectUnderTest.setProperty2(value); assertEquals(value, objectUnderTest.getProperty2()); } @Test public void testProperty3() { String value = "value"; objectUnderTest.setProperty3(value); assertEquals(value, objectUnderTest.getProperty3()); } @Test public void testProperty4() { String value = "value"; objectUnderTest.setProperty4(value); assertEquals(value, objectUnderTest.getProperty4()); } @Test public void testProperty5() { String value = "value"; objectUnderTest.setProperty5(value); assertEquals(value, objectUnderTest.getProperty5()); } @Test public void testProperty6() { String value = "value"; objectUnderTest.setProperty6(value); assertEquals(value, objectUnderTest.getProperty6()); } @Test public void testProperty7() { String value = "value"; objectUnderTest.setProperty7(value); assertEquals(value, objectUnderTest.getProperty7()); } @Test public void testProperty8() { String value = "value"; objectUnderTest.setProperty8(value); assertEquals(value, objectUnderTest.getProperty8()); } @Test public void testProperty9() { String value = "value"; objectUnderTest.setProperty9(value); assertEquals(value, objectUnderTest.getProperty9()); } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
5841e6f53aff69ed8f06f98b43db7ea7afa27647
1a32d704493deb99d3040646afbd0f6568d2c8e7
/BOOT-INF/lib/org/apache/catalina/util/ManifestResource.java
42206e87b09ac8e1235bbf88368a9935ed31e92a
[]
no_license
yanrumei/bullet-zone-server-2.0
e748ff40f601792405143ec21d3f77aa4d34ce69
474c4d1a8172a114986d16e00f5752dc019cdcd2
refs/heads/master
2020-05-19T11:16:31.172482
2019-03-25T17:38:31
2019-03-25T17:38:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,182
java
/* */ package org.apache.catalina.util; /* */ /* */ import java.util.ArrayList; /* */ import java.util.Iterator; /* */ import java.util.jar.Attributes; /* */ import java.util.jar.Manifest; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class ManifestResource /* */ { /* */ public static final int SYSTEM = 1; /* */ public static final int WAR = 2; /* */ public static final int APPLICATION = 3; /* 40 */ private ArrayList<Extension> availableExtensions = null; /* 41 */ private ArrayList<Extension> requiredExtensions = null; /* */ /* */ private final String resourceName; /* */ private final int resourceType; /* */ /* */ public ManifestResource(String resourceName, Manifest manifest, int resourceType) /* */ { /* 48 */ this.resourceName = resourceName; /* 49 */ this.resourceType = resourceType; /* 50 */ processManifest(manifest); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ public String getResourceName() /* */ { /* 59 */ return this.resourceName; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ public ArrayList<Extension> getAvailableExtensions() /* */ { /* 68 */ return this.availableExtensions; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ public ArrayList<Extension> getRequiredExtensions() /* */ { /* 77 */ return this.requiredExtensions; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public int getAvailableExtensionCount() /* */ { /* 88 */ return this.availableExtensions != null ? this.availableExtensions.size() : 0; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ public int getRequiredExtensionCount() /* */ { /* 97 */ return this.requiredExtensions != null ? this.requiredExtensions.size() : 0; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ public boolean isFulfilled() /* */ { /* 107 */ if (this.requiredExtensions == null) { /* 108 */ return true; /* */ } /* 110 */ Iterator<Extension> it = this.requiredExtensions.iterator(); /* 111 */ while (it.hasNext()) { /* 112 */ Extension ext = (Extension)it.next(); /* 113 */ if (!ext.isFulfilled()) return false; /* */ } /* 115 */ return true; /* */ } /* */ /* */ /* */ public String toString() /* */ { /* 121 */ StringBuilder sb = new StringBuilder("ManifestResource["); /* 122 */ sb.append(this.resourceName); /* */ /* 124 */ sb.append(", isFulfilled="); /* 125 */ sb.append(isFulfilled() + ""); /* 126 */ sb.append(", requiredExtensionCount ="); /* 127 */ sb.append(getRequiredExtensionCount()); /* 128 */ sb.append(", availableExtensionCount="); /* 129 */ sb.append(getAvailableExtensionCount()); /* 130 */ switch (this.resourceType) { /* 131 */ case 1: sb.append(", resourceType=SYSTEM"); break; /* 132 */ case 2: sb.append(", resourceType=WAR"); break; /* 133 */ case 3: sb.append(", resourceType=APPLICATION"); /* */ } /* 135 */ sb.append("]"); /* 136 */ return sb.toString(); /* */ } /* */ /* */ /* */ /* */ private void processManifest(Manifest manifest) /* */ { /* 143 */ this.availableExtensions = getAvailableExtensions(manifest); /* 144 */ this.requiredExtensions = getRequiredExtensions(manifest); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ private ArrayList<Extension> getRequiredExtensions(Manifest manifest) /* */ { /* 159 */ Attributes attributes = manifest.getMainAttributes(); /* 160 */ String names = attributes.getValue("Extension-List"); /* 161 */ if (names == null) { /* 162 */ return null; /* */ } /* 164 */ ArrayList<Extension> extensionList = new ArrayList(); /* 165 */ names = names + " "; /* */ /* */ for (;;) /* */ { /* 169 */ int space = names.indexOf(' '); /* 170 */ if (space < 0) /* */ break; /* 172 */ String name = names.substring(0, space).trim(); /* 173 */ names = names.substring(space + 1); /* */ /* */ /* 176 */ String value = attributes.getValue(name + "-Extension-Name"); /* 177 */ if (value != null) /* */ { /* 179 */ Extension extension = new Extension(); /* 180 */ extension.setExtensionName(value); /* 181 */ extension /* 182 */ .setImplementationURL(attributes.getValue(name + "-Implementation-URL")); /* 183 */ extension /* 184 */ .setImplementationVendorId(attributes.getValue(name + "-Implementation-Vendor-Id")); /* 185 */ String version = attributes.getValue(name + "-Implementation-Version"); /* 186 */ extension.setImplementationVersion(version); /* 187 */ extension /* 188 */ .setSpecificationVersion(attributes.getValue(name + "-Specification-Version")); /* 189 */ extensionList.add(extension); /* */ } } /* 191 */ return extensionList; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ private ArrayList<Extension> getAvailableExtensions(Manifest manifest) /* */ { /* 206 */ Attributes attributes = manifest.getMainAttributes(); /* 207 */ String name = attributes.getValue("Extension-Name"); /* 208 */ if (name == null) { /* 209 */ return null; /* */ } /* 211 */ ArrayList<Extension> extensionList = new ArrayList(); /* */ /* 213 */ Extension extension = new Extension(); /* 214 */ extension.setExtensionName(name); /* 215 */ extension.setImplementationURL(attributes /* 216 */ .getValue("Implementation-URL")); /* 217 */ extension.setImplementationVendor(attributes /* 218 */ .getValue("Implementation-Vendor")); /* 219 */ extension.setImplementationVendorId(attributes /* 220 */ .getValue("Implementation-Vendor-Id")); /* 221 */ extension.setImplementationVersion(attributes /* 222 */ .getValue("Implementation-Version")); /* 223 */ extension.setSpecificationVersion(attributes /* 224 */ .getValue("Specification-Version")); /* */ /* 226 */ extensionList.add(extension); /* */ /* 228 */ return extensionList; /* */ } /* */ } /* Location: C:\Users\ikatwal\Downloads\bullet-zone-server-2.0.jar!\BOOT-INF\lib\tomcat-embed-core-8.5.27.jar!\org\apache\catalin\\util\ManifestResource.class * Java compiler version: 7 (51.0) * JD-Core Version: 0.7.1 */
[ "ishankatwal@gmail.com" ]
ishankatwal@gmail.com
27cc8acccca96c6101ee80d768f414d6597ec4d3
700d10ee31b5e6bd01c2e68a486653c6be153378
/authentication/src/main/java/org/etocrm/authentication/entity/VO/industry/SysIndustryGetResponseVO.java
609750be83e6b3daef93c0211a4fe51fdd075a0d
[]
no_license
chensude/tag
01dbe5b644f23967cd7680f8c9f8138077eec4b4
85364fdaaad626f61074677f5c310922c47b8280
refs/heads/master
2023-03-19T04:17:34.431545
2021-03-02T10:31:13
2021-03-02T10:31:13
343,733,956
0
1
null
null
null
null
UTF-8
Java
false
false
1,062
java
package org.etocrm.authentication.entity.VO.industry; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.io.Serializable; /** * @author lingshuang.pang * @Date 2020-09-05 */ @ApiModel(value = "查询行业出参 ") @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) @JsonInclude(value = Include.NON_NULL) public class SysIndustryGetResponseVO implements Serializable { private static final long serialVersionUID = 1579400306332000716L; @ApiModelProperty(value = "行业id") private Long id; @ApiModelProperty(value = "行业名称") private String industryName; }
[ "1045763864@qq.com" ]
1045763864@qq.com
6625d3a1b420a540d3d0af6e2557d797a6716fea
723cf379d4f5003337100548db3121081fe08504
/java/io/FileFilter.java
34553d2a3017a5639ca6715758dbb886c4a1e56b
[]
no_license
zxlooong/jdk13120
719b53375da0a5a49cf74efb42345653ccd1e9c1
f8bcd92167a3bf8dd9b1a77009d96d0f5653b825
refs/heads/master
2016-09-06T18:11:53.353084
2013-12-06T16:09:41
2013-12-06T16:09:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
784
java
/* * Copyright 2002 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package java.io; /** * A filter for abstract pathnames. * * <p> Instances of this interface may be passed to the <code>{@link * File#listFiles(java.io.FileFilter) listFiles(FileFilter)}</code> method * of the <code>{@link java.io.FileFilter}</code> class. * * @since 1.2 */ public interface FileFilter { /** * Tests whether or not the specified abstract pathname should be * included in a pathname list. * * @param pathname The abstract pathname to be tested * @return <code>true</code> if and only if <code>pathname</code> * should be included */ boolean accept(File pathname); }
[ "zxlooong@gmail.com" ]
zxlooong@gmail.com
fc7560ab37206a94e97439f5db9b25b8911a182d
b59b132033af0b482c2d9154dfcaedce450c2574
/src/test/resources/GeneratorTest/all/after/src/main/java/org/tomitribe/github/model/RepositoryInvitation.java
0e370ce8570b7f9e586a0450f76d03918d9aadfe
[ "Apache-2.0" ]
permissive
Deng678/github-api-java
89078dde67e0fadda0dc81e0e4b156eae1e2d24b
0c060b9625c4b054bb0810c75782ee06c76be94f
refs/heads/master
2023-03-16T04:30:01.903330
2020-12-03T11:34:56
2020-12-03T11:34:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,507
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.tomitribe.github.model; import java.util.Date; import javax.json.bind.annotation.JsonbProperty; import javax.json.bind.annotation.JsonbTypeAdapter; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import org.tomitribe.github.core.DateAdapter; import org.tomitribe.github.core.EnumAdapter; @Data @Builder @AllArgsConstructor @NoArgsConstructor @ComponentId("#/components/schemas/repository-invitation") public class RepositoryInvitation { @JsonbProperty("created_at") @JsonbTypeAdapter(DateAdapter.class) private Date createdAt; @JsonbProperty("html_url") private String htmlUrl; @JsonbProperty("id") private Integer id; @JsonbProperty("invitee") private SimpleUser invitee; @JsonbProperty("inviter") private SimpleUser inviter; @JsonbProperty("node_id") private String nodeId; @JsonbProperty("permissions") @JsonbTypeAdapter(PermissionsAdapter.class) private Permissions permissions; @JsonbProperty("repository") private MinimalRepository repository; @JsonbProperty("url") private String url; public enum Permissions { READ("read"), WRITE("write"), ADMIN("admin"); private final String name; Permissions(final String name) { this.name = name; } public String getName() { return name; } @Override public String toString() { return name; } } public static class PermissionsAdapter extends EnumAdapter<Permissions> { public PermissionsAdapter() { super(Permissions.class); } } }
[ "david.blevins@gmail.com" ]
david.blevins@gmail.com
2762b65e82468664448707a4781df053fd12af26
e2bcc84f6c734affba77c1d5c94976cc9329f92e
/Best1API/.svn/pristine/27/2762b65e82468664448707a4781df053fd12af26.svn-base
66e330e9915b79a41554924946729a5cd59e6212
[]
no_license
CaptainJ93/SpringStudy
422985fa6e6be3d1b7415efdeb7bad4d243d108d
40d0665f9e1917f7189e7d9554c951c13d7d5c5a
refs/heads/master
2020-03-17T05:50:07.857946
2018-06-22T09:06:47
2018-06-22T09:06:47
133,330,489
0
0
null
null
null
null
UTF-8
Java
false
false
4,671
package com.best1.api.webservice.soap.response.dto.vwms; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; public class WhtransferorderDTO { private Long interwhorderid; private Long fromwarehouseid; private Long towarehouseid; private Long productid; private Integer productversion; private Integer colourcode; private Integer colourclass; private Integer stylecode; private Integer styleclass; private Long transferorderqty; private Long dockid; private Integer fromhour; private Integer frommin; private Integer tohour; private Integer tomin; @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00") private Date interwhorderdate; @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00") private Date expectedarrivaldate; private String shippedproducttype; private String batchid; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00") private Date recordcreatedtime; private String shippedproducttypecode; public Long getInterwhorderid() { return interwhorderid; } public void setInterwhorderid(Long interwhorderid) { this.interwhorderid = interwhorderid; } public Long getFromwarehouseid() { return fromwarehouseid; } public void setFromwarehouseid(Long fromwarehouseid) { this.fromwarehouseid = fromwarehouseid; } public Long getTowarehouseid() { return towarehouseid; } public void setTowarehouseid(Long towarehouseid) { this.towarehouseid = towarehouseid; } public Long getProductid() { return productid; } public void setProductid(Long productid) { this.productid = productid; } public Integer getProductversion() { return productversion; } public void setProductversion(Integer productversion) { this.productversion = productversion; } public Integer getColourcode() { return colourcode; } public void setColourcode(Integer colourcode) { this.colourcode = colourcode; } public Integer getColourclass() { return colourclass; } public void setColourclass(Integer colourclass) { this.colourclass = colourclass; } public Integer getStylecode() { return stylecode; } public void setStylecode(Integer stylecode) { this.stylecode = stylecode; } public Integer getStyleclass() { return styleclass; } public void setStyleclass(Integer styleclass) { this.styleclass = styleclass; } public Long getTransferorderqty() { return transferorderqty; } public void setTransferorderqty(Long transferorderqty) { this.transferorderqty = transferorderqty; } public Long getDockid() { return dockid; } public void setDockid(Long dockid) { this.dockid = dockid; } public Integer getFromhour() { return fromhour; } public void setFromhour(Integer fromhour) { this.fromhour = fromhour; } public Integer getFrommin() { return frommin; } public void setFrommin(Integer frommin) { this.frommin = frommin; } public Integer getTohour() { return tohour; } public void setTohour(Integer tohour) { this.tohour = tohour; } public Integer getTomin() { return tomin; } public void setTomin(Integer tomin) { this.tomin = tomin; } public Date getInterwhorderdate() { return interwhorderdate; } public void setInterwhorderdate(Date interwhorderdate) { this.interwhorderdate = interwhorderdate; } public Date getExpectedarrivaldate() { return expectedarrivaldate; } public void setExpectedarrivaldate(Date expectedarrivaldate) { this.expectedarrivaldate = expectedarrivaldate; } public String getShippedproducttype() { return shippedproducttype; } public void setShippedproducttype(String shippedproducttype) { this.shippedproducttype = shippedproducttype; } public String getBatchid() { return batchid; } public void setBatchid(String batchid) { this.batchid = batchid; } public Date getRecordcreatedtime() { return recordcreatedtime; } public void setRecordcreatedtime(Date recordcreatedtime) { this.recordcreatedtime = recordcreatedtime; } public String getShippedproducttypecode() { return shippedproducttypecode; } public void setShippedproducttypecode(String shippedproducttypecode) { this.shippedproducttypecode = shippedproducttypecode; } }
[ "jiashizhen@JSB-0019.best1.com" ]
jiashizhen@JSB-0019.best1.com
93c4a3ac8c9325cb356c9dcee68efc792ba184d9
d0a2f69b44f18a6cc338f4489ac56829d5d54994
/app/src/main/gen/com/akaxin/client/Manifest.java
f63e0fdec550b14bfef83976d2c213a623694659
[ "Apache-2.0" ]
permissive
lisir/wind-android
eb62b570a7e309bf0cb33d4c912cd0f3fc754079
800bc9cc61462f38179ec14d06f2c25594d5068a
refs/heads/master
2022-08-31T17:54:12.742594
2020-05-11T14:42:37
2020-05-11T14:42:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
189
java
/*___Generated_by_IDEA___*/ package com.windchat.client; /* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */ public final class Manifest { }
[ "an.guoyue254@gmail.com" ]
an.guoyue254@gmail.com
9bfeb68011063c7165e68b049238200def2e474c
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava2/Foo560Test.java
1059fdbfc4b5e28e21e3e1555ed0d718e4817fa8
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
741
java
package applicationModulepackageJava2; import org.junit.Test; public class Foo560Test { @Test public void testFoo0() { new Foo560().foo0(); } @Test public void testFoo1() { new Foo560().foo1(); } @Test public void testFoo2() { new Foo560().foo2(); } @Test public void testFoo3() { new Foo560().foo3(); } @Test public void testFoo4() { new Foo560().foo4(); } @Test public void testFoo5() { new Foo560().foo5(); } @Test public void testFoo6() { new Foo560().foo6(); } @Test public void testFoo7() { new Foo560().foo7(); } @Test public void testFoo8() { new Foo560().foo8(); } @Test public void testFoo9() { new Foo560().foo9(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
e85942ff2730035577d9a4fabf104c170aeb8273
8d0cb402d8f5611816004bd30940be68abcfa4c0
/src/main/java/ch/globaz/devsecops/activiti/lab/application/configuration/SecurityConfiguration.java
cc15d05e4157f2c9a2b1c4a26a380c9e7332fe94
[]
no_license
sebChevre/activiti-lab
1a754278007d214ebf4f373edc3f9ba138699f1f
5b58700def21c0389a225acf193123564f53ca73
refs/heads/master
2020-04-01T16:49:03.579677
2018-10-17T05:25:34
2018-10-17T05:25:34
152,859,048
0
0
null
null
null
null
UTF-8
Java
false
false
4,610
java
/* * Copyright 2018 Alfresco, Inc. and/or its affiliates. * * 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 ch.globaz.devsecops.activiti.lab.application.configuration; import ch.globaz.devsecops.activiti.lab.application.ActivitiAuthFilter; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.security.provisioning.InMemoryUserDetailsManager; import org.springframework.security.web.authentication.www.BasicAuthenticationFilter; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; @Slf4j @Configuration @EnableWebSecurity public class SecurityConfiguration extends WebSecurityConfigurerAdapter { @Override @Autowired public void configure(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(inMemoryUserDetailService()); } @Bean public UserDetailsService inMemoryUserDetailService() { InMemoryUserDetailsManager inMemoryUserDetailsManager = new InMemoryUserDetailsManager(); for (User user : generateInMemroryUser()) { log.info("> Création utilisateurr: {}, authority: {}",user, authoritiesAsString(user)); inMemoryUserDetailsManager.createUser(user); } return inMemoryUserDetailsManager; } @Override protected void configure(HttpSecurity http) throws Exception { http .csrf().disable() .authorizeRequests().antMatchers("/h2/**").permitAll() .anyRequest() .authenticated() .and() .httpBasic(); http .addFilterAfter(new ActivitiAuthFilter(), BasicAuthenticationFilter.class); http.headers().frameOptions().disable(); } @Bean public PasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } private List<User> generateInMemroryUser(){ SimpleGrantedAuthority roleActivitiUser = new SimpleGrantedAuthority("ROLE_ACTIVITI_USER"); SimpleGrantedAuthority roleActivitiAdmin = new SimpleGrantedAuthority("ROLE_ACTIVITI_ADMIN"); SimpleGrantedAuthority groupeActivitiGetionnaire = new SimpleGrantedAuthority("GROUP_gestionnaire"); SimpleGrantedAuthority groupeActivitiStagiaire = new SimpleGrantedAuthority("GROUP_stagiaire"); List<User> users = new ArrayList<>(); users.add(new User("gestionnaire",passwordEncoder().encode("1234"), Arrays.asList(roleActivitiUser,groupeActivitiGetionnaire))); users.add(new User("gestionnaire2",passwordEncoder().encode("1234"), Arrays.asList(roleActivitiUser,groupeActivitiGetionnaire))); users.add(new User("stagiaire",passwordEncoder().encode("1234"), Arrays.asList(roleActivitiUser,groupeActivitiStagiaire))); users.add(new User("admin",passwordEncoder().encode("1234"), Arrays.asList(roleActivitiAdmin))); return users; } private List<String> authoritiesAsString(User user){ return user.getAuthorities().stream().map(auth -> auth.getAuthority()).collect(Collectors.toList()); } }
[ "seb.chevre@gmail.com" ]
seb.chevre@gmail.com
f0d85122f12e8fd346563c1a9b9f01f8f5e50d3b
27f4ea2b7474f2d201a01a2b13e65dc8c7e746b2
/bee-rpc/src/main/java/com/alacoder/bee/rpc/RpcResult.java
811ee7aa6d16f4ffaefaf0fae8a123dc6300c0ed
[]
no_license
zogwei/bee
a4b0c6e202da81863223ada23d5c12aadb887202
413c546d414c3f5ff5fe8d50ebdf6db5cc394a58
refs/heads/master
2020-04-06T07:58:10.204370
2016-09-06T02:26:29
2016-09-06T02:26:29
63,914,350
0
0
null
null
null
null
UTF-8
Java
false
false
2,740
java
/** * 版权声明:bee 版权所有 违者必究 2016 * Copyright: Copyright (c) 2016 * * @project_name: bee-rpc * @Title: RpcResult.java * @Package com.alacoder.bee.rpc * @Description: * @author jimmy.zhong * @date 2016年7月28日 下午3:53:09 * @version V1.0 */ package com.alacoder.bee.rpc; import java.io.Serializable; import java.util.HashMap; import java.util.Map; /** * @ClassName: RpcResult * @Description: * @author jimmy.zhong * @date 2016年7月28日 下午3:53:09 * */ public class RpcResult implements Result, Serializable { private static final long serialVersionUID = -6925924956850004727L; private Object result; private Throwable exception; private Map<String, String> attachments = new HashMap<String, String>(); public RpcResult(){ } public RpcResult(Object result){ this.result = result; } public RpcResult(Throwable exception){ this.exception = exception; } public Object recreate() throws Throwable { if (exception != null) { throw exception; } return result; } /** * @deprecated Replace to getValue() * @see com.alibaba.dubbo.rpc.RpcResult#getValue() */ @Deprecated public Object getResult() { return getValue(); } /** * @deprecated Replace to setValue() * @see com.alibaba.dubbo.rpc.RpcResult#setValue() */ @Deprecated public void setResult(Object result) { setValue(result); } public Object getValue() { return result; } public void setValue(Object value) { this.result = value; } public Throwable getException() { return exception; } public void setException(Throwable e) { this.exception = e; } public boolean hasException() { return exception != null; } public Map<String, String> getAttachments() { return attachments; } public String getAttachment(String key) { return attachments.get(key); } public String getAttachment(String key, String defaultValue) { String result = attachments.get(key); if (result == null || result.length() == 0) { result = defaultValue; } return result; } public void setAttachments(Map<String, String> map) { if (map != null && map.size() > 0) { attachments.putAll(map); } } public void setAttachment(String key, String value) { attachments.put(key, value); } @Override public String toString() { return "RpcResult [result=" + result + ", exception=" + exception + "]"; } }
[ "zogwei@gmail.com" ]
zogwei@gmail.com
0babf3a5346b4f54d33b45bc8c2fe8e16ee90ab2
4bb83687710716d91b5da55054c04f430474ee52
/dsrc/sku.0/sys.server/compiled/game/script/item/special/temporary_item.java
bedffb0aa91027d466126fdc1c6b9be5f4b4c094
[]
no_license
geralex/SWG-NGE
0846566a44f4460c32d38078e0a1eb115a9b08b0
fa8ae0017f996e400fccc5ba3763e5bb1c8cdd1c
refs/heads/master
2020-04-06T11:18:36.110302
2018-03-19T15:42:32
2018-03-19T15:42:32
157,411,938
1
0
null
2018-11-13T16:35:01
2018-11-13T16:35:01
null
UTF-8
Java
false
false
4,314
java
package script.item.special; import script.*; import script.base_class.*; import script.combat_engine.*; import java.util.Arrays; import java.util.Hashtable; import java.util.Vector; import script.base_script; import script.library.utils; public class temporary_item extends script.base_script { public temporary_item() { } public static final float LIFESPAN = 3600.0f; public int OnAttach(obj_id self) throws InterruptedException { obj_id npcOwner = utils.getContainingNpcCreature(self); if (hasScript(npcOwner, "npc.vendor.vendor")) { detachScript(self, "item.special.temporary_item"); removeObjVar(self, "item.lifespan"); return SCRIPT_CONTINUE; } else { float lifeSpan = getLifeSpan(self); float rightNow = getGameTime(); setObjVar(self, "item.temporary.time_stamp", rightNow); float dieTime = getDieTime(lifeSpan, self); if (dieTime < 1) { dieTime = 1.0f; } messageTo(self, "cleanUp", null, dieTime, false); } return SCRIPT_CONTINUE; } public int OnInitialize(obj_id self) throws InterruptedException { obj_id npcOwner = utils.getContainingNpcCreature(self); if (hasScript(npcOwner, "npc.vendor.vendor")) { detachScript(self, "item.special.temporary_item"); removeObjVar(self, "item.lifespan"); return SCRIPT_CONTINUE; } else { float lifeSpan = getLifeSpan(self); float dieTime = getDieTime(lifeSpan, self); if (dieTime < 1) { dieTime = 1.0f; } messageTo(self, "cleanUp", null, dieTime, false); } return SCRIPT_CONTINUE; } public float getLifeSpan(obj_id self) throws InterruptedException { float lifeSpan = LIFESPAN; if (hasObjVar(self, "item.lifespan")) { lifeSpan = (float)getIntObjVar(self, "item.lifespan"); } return lifeSpan; } public float getDieTime(float lifeSpan, obj_id tempObject) throws InterruptedException { float timeStamp = getFloatObjVar(tempObject, "item.temporary.time_stamp"); float deathStamp = timeStamp + lifeSpan; float rightNow = getGameTime(); float dieTime = deathStamp - rightNow; return dieTime; } public int cleanUp(obj_id self, dictionary params) throws InterruptedException { if (self.isBeingDestroyed()) { return SCRIPT_CONTINUE; } obj_id containedBy = getContainedBy(self); if (isGameObjectTypeOf(containedBy, GOT_misc_container_public)) { return SCRIPT_CONTINUE; } float lifeSpan = LIFESPAN; if (hasObjVar(self, "item.lifespan")) { lifeSpan = (float)getIntObjVar(self, "item.lifespan"); } float dieTime = getDieTime(lifeSpan, self); if (dieTime < 1) { destroyObject(self); } else { messageTo(self, "cleanUp", null, dieTime, false); } return SCRIPT_CONTINUE; } public int OnGetAttributes(obj_id self, obj_id player, String[] names, String[] attribs) throws InterruptedException { obj_id npcOwner = utils.getContainingNpcCreature(self); if (hasScript(npcOwner, "npc.vendor.vendor")) { detachScript(self, "item.special.temporary_item"); removeObjVar(self, "item.lifespan"); return SCRIPT_CONTINUE; } else { int idx = utils.getValidAttributeIndex(names); if (idx == -1) { return SCRIPT_CONTINUE; } float lifeSpan = getLifeSpan(self); float dieTime = getDieTime(lifeSpan, self); int timeLeft = (int)dieTime; names[idx] = "storyteller_time_remaining"; attribs[idx] = utils.formatTimeVerbose(timeLeft); idx++; if (idx >= names.length) { return SCRIPT_CONTINUE; } } return SCRIPT_CONTINUE; } }
[ "tmoflash@gmail.com" ]
tmoflash@gmail.com
b45751b1633bd501097fe040141966f45330e661
2c42d04cba77776514bc15407cd02f6e9110b554
/src/org/processmining/analysis/traceclustering/preprocessor/SVDProfile.java
fe5bc77af7b3ffc144abfacbbf4c1309aa58c966
[]
no_license
pinkpaint/BPMNCheckingSoundness
7a459b55283a0db39170c8449e1d262e7be21e11
48cc952d389ab17fc6407a956006bf2e05fac753
refs/heads/master
2021-01-10T06:17:58.632082
2015-06-22T14:58:16
2015-06-22T14:58:16
36,382,761
0
1
null
2015-06-14T10:15:32
2015-05-27T17:11:29
null
UTF-8
Java
false
false
2,945
java
package org.processmining.analysis.traceclustering.preprocessor; import java.io.IOException; import org.processmining.analysis.traceclustering.profile.AggregateProfile; import org.processmining.framework.log.LogReader; import weka.core.matrix.SingularValueDecomposition; import weka.core.matrix.Matrix; public class SVDProfile extends AbstractPreProcessor { public SVDProfile(LogReader log) throws IndexOutOfBoundsException, IOException { super("SVD", "Apply SVD to the profiles", log); } public void buildProfile(AggregateProfile aggregateProfile) { this.buildProfile(aggregateProfile,10); } public void buildProfile(AggregateProfile aggregateProfile, int dim) { Matrix in = null; boolean bMoreItem = true; // make matrix if(aggregateProfile.getItemKeys().size()>=log.numberOfInstances()) { in = new Matrix(aggregateProfile.getItemKeys().size(),log.numberOfInstances()); int row=0; for(String key:aggregateProfile.getItemKeys()){ for(int i=0;i<log.numberOfInstances();i++) { in.set(row,i, aggregateProfile.getValue(i, key)); // if(i==10)break; } row++; } } else { bMoreItem = false; in = new Matrix(log.numberOfInstances(),aggregateProfile.getItemKeys().size()); int row=0; for(String key:aggregateProfile.getItemKeys()){ for(int i=0;i<log.numberOfInstances();i++) { in.set(i,row, aggregateProfile.getValue(i, key)); } row++; } } SingularValueDecomposition svd = new SingularValueDecomposition(in); Matrix mat=null; for(int k=0;k<svd.getSingularValues().length;k++) { System.out.print("sing["+k+"] = " + svd.getSingularValues()[k]); } System.out.println(); if(bMoreItem) { System.out.println("row = " + svd.getV().transpose().getRowDimension() + ", col = "+ svd.getV().transpose().getColumnDimension()); System.out.println("u row = " + svd.getU().getRowDimension() + ", col = "+ svd.getU().getColumnDimension()); mat = svd.getU().getMatrix(0, dim-1, 0, log.numberOfInstances() - 1); } else { // result System.out.println("row = " + svd.getV().transpose().getRowDimension() + ", col = "+ svd.getV().transpose().getColumnDimension()); System.out.println("u row = " + svd.getU().getRowDimension() + ", col = "+ svd.getU().getColumnDimension()); mat = svd.getU().transpose().getMatrix(0, dim-1, 0, log.numberOfInstances() - 1); } /* for(int k=0;k<svd.getS().getRowDimension();k++) { for(int j=0;j<svd.getS().getColumnDimension();j++) System.out.print("ss["+k+"]["+j+"]="+svd.getS().get(k, j)+", "); System.out.println(); } */ for(int k=0;k<mat.getRowDimension();k++) { String key = aggregateProfile.getItemKey(k); for(int j=0; j<log.numberOfInstances(); j++) { incrementValue(j, key, mat.get(k,j)); // System.out.print("("+k+","+j+")="+mat.get(k,j)+" "); } // System.out.println(); } this.setNormalizationMaximum(1.0); } }
[ "pinkpaint.ict@gmail.com" ]
pinkpaint.ict@gmail.com
92d328a6b9e5f62ad367c5653fc5e34db6ba65ee
cd1df984f578495a11b93ee537727a0ce948cee4
/rest/src/main/java/net/yandex/speller/services/spellservice/CheckTextResponse.java
e9893ffc1f2e06317280ee3e967c2c74ba46cc00
[ "MIT" ]
permissive
SKuznet/auction
772397ea9dd2c91a80f6e5e2ba0b716e4a66fe5a
6514f9dd5af82b22315ef295df0520382577d58c
refs/heads/master
2020-04-20T08:34:49.675807
2019-01-20T17:32:39
2019-01-20T17:32:39
168,743,535
1
1
MIT
2019-02-01T18:39:55
2019-02-01T18:39:55
null
UTF-8
Java
false
false
1,591
java
package net.yandex.speller.services.spellservice; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="SpellResult" type="{http://speller.yandex.net/services/spellservice}SpellResult"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "spellResult" }) @XmlRootElement(name = "CheckTextResponse") public class CheckTextResponse { @XmlElement(name = "SpellResult", required = true) protected SpellResult spellResult; /** * Gets the value of the spellResult property. * * @return * possible object is * {@link SpellResult } * */ public SpellResult getSpellResult() { return spellResult; } /** * Sets the value of the spellResult property. * * @param value * allowed object is * {@link SpellResult } * */ public void setSpellResult(SpellResult value) { this.spellResult = value; } }
[ "azon.sk@gmail.com" ]
azon.sk@gmail.com
5e1e38de784fc7b1978fa268d1588f9480dc39e6
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/dbeaver/2015/8/CustomComboBoxCellEditor.java
91ee5e4f05263c8a954855eb10677713a245f332
[]
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,950
java
/* * DBeaver - Universal Database Manager * Copyright (C) 2010-2015 Serge Rieder (serge@jkiss.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License (version 2) * as published by the Free Software Foundation. * * 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 General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ package org.jkiss.dbeaver.ui.controls; import org.eclipse.core.runtime.Assert; import org.eclipse.jface.viewers.CellEditor; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CCombo; import org.eclipse.swt.events.*; import org.eclipse.swt.graphics.GC; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.jkiss.dbeaver.model.DBPNamedObject; import org.jkiss.utils.CommonUtils; import java.text.MessageFormat; /** * Custom combo editor */ public class CustomComboBoxCellEditor extends CellEditor { private String[] items; private CCombo comboBox; private static final int defaultStyle = SWT.NONE; public CustomComboBoxCellEditor() { setStyle(defaultStyle); } public CustomComboBoxCellEditor(Composite parent, String[] items) { this(parent, items, defaultStyle); } public CustomComboBoxCellEditor(Composite parent, String[] items, int style) { super(parent, style); setItems(items); } /** * Returns the list of choices for the combo box * * @return the list of choices for the combo box */ public String[] getItems() { return this.items; } /** * Sets the list of choices for the combo box * * @param items * the list of choices for the combo box */ public void setItems(String[] items) { Assert.isNotNull(items); this.items = items; populateComboBoxItems(); } @Override protected Control createControl(Composite parent) { comboBox = new CCombo(parent, getStyle()); //comboBox.setEditable((getStyle() & SWT.READ_ONLY) == 0); comboBox.setVisibleItemCount(15); comboBox.setFont(parent.getFont()); comboBox.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND)); populateComboBoxItems(); comboBox.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { keyReleaseOccured(e); } }); comboBox.addSelectionListener(new SelectionAdapter() { @Override public void widgetDefaultSelected(SelectionEvent event) { applyEditorValueAndDeactivate(); } @Override public void widgetSelected(SelectionEvent event) { } }); comboBox.addTraverseListener(new TraverseListener() { @Override public void keyTraversed(TraverseEvent e) { if (e.detail == SWT.TRAVERSE_ESCAPE || e.detail == SWT.TRAVERSE_RETURN) { e.doit = false; } } }); comboBox.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { CustomComboBoxCellEditor.this.focusLost(); } }); return comboBox; } @Override protected Object doGetValue() { return comboBox.getText(); } /* * (non-Javadoc) Method declared on CellEditor. */ @Override protected void doSetFocus() { comboBox.setFocus(); fireEnablementChanged(DELETE); fireEnablementChanged(COPY); fireEnablementChanged(CUT); fireEnablementChanged(PASTE); } @Override public LayoutData getLayoutData() { LayoutData layoutData = super.getLayoutData(); if ((comboBox == null) || comboBox.isDisposed()) { layoutData.minimumWidth = 60; } else { // make the comboBox 10 characters wide GC gc = new GC(comboBox); layoutData.minimumWidth = (gc.getFontMetrics() .getAverageCharWidth() * 10) + 10; gc.dispose(); } return layoutData; } /** * The <code>ComboBoxCellEditor</code> implementation of this * <code>CellEditor</code> framework method accepts a zero-based index of * a selection. * * @param value * the zero-based index of the selection wrapped as an * <code>Integer</code> */ @Override protected void doSetValue(Object value) { Assert.isTrue(comboBox != null && (value instanceof String || value instanceof DBPNamedObject || value instanceof Enum)); if (value instanceof DBPNamedObject) { comboBox.setText(((DBPNamedObject) value).getName()); } else if (value instanceof Enum) { comboBox.setText(((Enum)value).name()); } else { comboBox.setText(CommonUtils.toString(value)); } } /** * Updates the list of choices for the combo box for the current control. */ private void populateComboBoxItems() { if (comboBox != null && items != null) { comboBox.removeAll(); for (int i = 0; i < items.length; i++) { comboBox.add(items[i], i); } setValueValid(true); } } /** * Applies the currently selected value and deactivates the cell editor */ void applyEditorValueAndDeactivate() { // must set the selection before getting value Object newValue = doGetValue(); markDirty(); boolean isValid = isCorrect(newValue); setValueValid(isValid); if (!isValid) { setErrorMessage(MessageFormat.format(getErrorMessage(), comboBox.getText() )); } fireApplyEditorValue(); deactivate(); } @Override protected void focusLost() { if (isActivated()) { applyEditorValueAndDeactivate(); } } @Override protected void keyReleaseOccured(KeyEvent keyEvent) { if (keyEvent.character == '\u001b') { // Escape character fireCancelEditor(); } else if (keyEvent.character == SWT.TAB) { // tab key applyEditorValueAndDeactivate(); } else if (keyEvent.character == SWT.DEL) { // tab key comboBox.setText(""); keyEvent.doit = false; } } @Override public boolean isCopyEnabled() { return comboBox != null && !comboBox.isDisposed(); } @Override public boolean isCutEnabled() { return comboBox != null && !comboBox.isDisposed(); } @Override public boolean isDeleteEnabled() { return comboBox != null && !comboBox.isDisposed(); } @Override public boolean isPasteEnabled() { return comboBox != null && !comboBox.isDisposed(); } @Override public void performCopy() { comboBox.copy(); } @Override public void performCut() { comboBox.cut(); } @Override public void performDelete() { comboBox.setText(""); } @Override public void performPaste() { comboBox.paste(); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
24108e56aaca059013be86375f1e8c1a04b9871f
bd384a4a24182d483654e0fc751eea193c42a8d9
/src/test/java/com/fasterxml/jackson/databind/deser/creators/ArrayDelegatorCreatorForCollectionTest.java
1c1a662ab11818fb8e69c234bbbcd17ece68fe58
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
phated/jackson-databind
5dc5fcce4c57ff77061f6213cdf9cb6225e727ad
ac5cd16cb24129aede32feadcff183611e1798fc
refs/heads/master
2020-08-30T14:06:12.705641
2019-10-29T05:05:20
2019-10-29T05:05:20
218,403,081
2
0
Apache-2.0
2019-10-29T23:31:29
2019-10-29T23:31:28
null
UTF-8
Java
false
false
1,278
java
package com.fasterxml.jackson.databind.deser.creators; import java.util.Collections; import java.util.Set; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.testutil.NoCheckSubTypeValidator; // for [databind#1392] (regression in 2.7 due to separation of array-delegating creator) public class ArrayDelegatorCreatorForCollectionTest extends BaseMapTest { @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY) abstract static class UnmodifiableSetMixin { @JsonCreator public UnmodifiableSetMixin(Set<?> s) {} } public void testUnmodifiable() throws Exception { Class<?> unmodSetType = Collections.unmodifiableSet(Collections.<String>emptySet()).getClass(); ObjectMapper mapper = jsonMapperBuilder() .activateDefaultTyping(NoCheckSubTypeValidator.instance, DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY) .addMixIn(unmodSetType, UnmodifiableSetMixin.class) .build(); final String EXPECTED_JSON = "[\""+unmodSetType.getName()+"\",[]]"; Set<?> foo = mapper.readValue(EXPECTED_JSON, Set.class); assertTrue(foo.isEmpty()); } }
[ "tatu.saloranta@iki.fi" ]
tatu.saloranta@iki.fi
9d14d0af1cf27610101c87ba111744682c28f6ec
d38afb4d31e0574dd2086fc84e5d664aecc77f5c
/com/planet_ink/coffee_mud/MOBS/Cheetah.java
bc80b80952a3be5f069da552f7e0747fbba39016
[ "Apache-2.0" ]
permissive
Dboykey/CoffeeMud
c4775fc6ec9e910ff7ff8523c04567a580a9529e
844704805d3de26a16b83bd07552d6ae82391208
refs/heads/master
2022-04-16T07:07:22.004847
2020-04-06T17:55:33
2020-04-06T17:55:33
255,074,559
0
1
Apache-2.0
2020-04-12T12:10:07
2020-04-12T12:10:06
null
UTF-8
Java
false
false
2,762
java
package com.planet_ink.coffee_mud.MOBS; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2001-2020 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Cheetah extends StdMOB { @Override public String ID() { return "Cheetah"; } public Cheetah() { super(); final Random randomizer = new Random(System.currentTimeMillis()); username="a cheetah"; setDescription("A medium-sized, lightly built cat with sand covered fur and black spot."); setDisplayText("A cheetah stalks its prey."); CMLib.factions().setAlignment(this,Faction.Align.NEUTRAL); setMoney(0); basePhyStats.setWeight(20 + Math.abs(randomizer.nextInt() % 45)); setWimpHitPoint(2); basePhyStats.setWeight(150 + Math.abs(randomizer.nextInt() % 55)); baseCharStats().setStat(CharStats.STAT_INTELLIGENCE,1); baseCharStats().setStat(CharStats.STAT_STRENGTH,12); baseCharStats().setStat(CharStats.STAT_DEXTERITY,18); baseCharStats().setMyRace(CMClass.getRace("GreatCat")); baseCharStats().getMyRace().startRacing(this,false); basePhyStats().setDamage(8); basePhyStats().setSpeed(2.0); basePhyStats().setAbility(0); basePhyStats().setLevel(3); basePhyStats().setArmor(80); baseState.setHitPoints(CMLib.dice().roll(basePhyStats().level(),20,basePhyStats().level())); recoverMaxState(); resetToMaxState(); recoverPhyStats(); recoverCharStats(); } }
[ "bo@zimmers.net" ]
bo@zimmers.net
0bac6d67304635ff9726c687f0588d89d8e5e6c2
5f2f29cb1ae519a4a0b059f8653bbf80af5be0f4
/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java
5461bbdc5b73ceb35eb2fb373609109a703db5dd
[ "Apache-2.0" ]
permissive
gibahjoe/springdoc-openapi
28af152f8e5988e9c4cda29ee7d894df2fdb24f6
791ea8ca23981488e37f3e063e86ad2fe796ad46
refs/heads/master
2021-03-02T19:10:32.777095
2020-03-17T22:49:02
2020-03-17T22:49:02
245,896,899
0
0
Apache-2.0
2020-03-15T12:58:08
2020-03-08T22:17:57
Java
UTF-8
Java
false
false
2,587
java
/* * * * Copyright 2019-2020 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 * * * * https://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 test.org.springdoc.api.app67; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; import test.org.springdoc.api.AbstractSpringDocTest; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; public class SpringDocApp67Test extends AbstractSpringDocTest { @SpringBootApplication @ComponentScan(basePackages = { "org.springdoc", "test.org.springdoc.api.app67" }) static class SpringDocTestApp {} @Test public void testApp() throws Exception { webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + groupName).exchange().expectStatus().isOk().expectBody() .jsonPath("$.openapi").isEqualTo("3.0.1") .jsonPath("$.paths./api.get.tags[0]").isEqualTo("hello-controller") .jsonPath("$.paths./api.get.responses.200.content.['*/*'].schema.type").isEqualTo("string") .jsonPath("$.paths./api.post.tags[0]").isEqualTo("hello-controller") .jsonPath("$.paths./api.post.responses.200.content.['*/*'].schema.type").isEqualTo("string") .jsonPath("$.paths./api.put.tags[0]").isEqualTo("hello-controller") .jsonPath("$.paths./api.put.responses.200.content.['*/*'].schema.type").isEqualTo("string") .jsonPath("$.paths./api.patch.tags[0]").isEqualTo("hello-controller") .jsonPath("$.paths./api.patch.responses.200.content.['*/*'].schema.type").isEqualTo("string") .jsonPath("$.paths./api.delete.tags[0]").isEqualTo("hello-controller") .jsonPath("$.paths./api.delete.responses.200.content.['*/*'].schema.type").isEqualTo("string") .jsonPath("$.paths./api.options.tags[0]").isEqualTo("hello-controller") .jsonPath("$.paths./api.options.responses.200.content.['*/*'].schema.type").isEqualTo("string") .jsonPath("$.paths./api.head.tags[0]").isEqualTo("hello-controller") .jsonPath("$.paths./api.head.responses.200.content.['*/*'].schema.type").isEqualTo("string"); } }
[ "badr.nasslashen@gmail.com" ]
badr.nasslashen@gmail.com
b4b3121c23b68e4f107f469c769a9dd2e814cc8b
3c024b8c8b87ed840e4f7d8f12ce63ddc9539df4
/GediTest/src/gems/test/GenomicRegionIntervalTreeTest.java
d849891dc5b58f67f172b0df3295721ac4037aa9
[ "Apache-2.0" ]
permissive
paulrajgithub/gedi
fa267e3d246627bcb15a5d6d7729111c658350d2
431ae0eacf87c20664fc3d8e69b4dedfc4ad0310
refs/heads/master
2020-12-30T14:44:51.320221
2017-01-24T22:40:15
2017-01-24T22:40:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,618
java
/** * * Copyright 2017 Florian Erhard * * 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 gems.test; import java.util.ArrayList; import java.util.Iterator; import java.util.Set; import gedi.core.reference.Chromosome; import gedi.core.reference.ReferenceSequence; import gedi.core.region.ArrayGenomicRegion; import gedi.core.region.intervalTree.MemoryIntervalTreeStorage; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import static org.junit.Assert.*; @RunWith(JUnit4.class) public class GenomicRegionIntervalTreeTest { @Test public void genomicRegionIntervalTreeTest() { MemoryIntervalTreeStorage<Integer> storage = new MemoryIntervalTreeStorage<Integer>(Integer.class); ReferenceSequence ref = Chromosome.obtain("test"); storage.add(ref,new ArrayGenomicRegion(0,10,90,100),1); storage.add(ref,new ArrayGenomicRegion(10,20,90,100),1); storage.add(ref,new ArrayGenomicRegion(19,20,30,40),1); storage.add(ref,new ArrayGenomicRegion(19,20,30,40),1,(a,b)->a+b); storage.add(ref,new ArrayGenomicRegion(40,50,60,70),1); storage.add(ref,new ArrayGenomicRegion(70,80,100,110),1); storage.add(ref,new ArrayGenomicRegion(100,110),1); storage.add(ref,new ArrayGenomicRegion(200,201),1); // Iterator<Set<ArrayGenomicRegion>> it = tree.iterateSingleLinkage(); // assertTrue(it.hasNext()); // assertEquals(3,it.next().size()); // assertTrue(it.hasNext()); // assertEquals(1,it.next().size()); // assertTrue(it.hasNext()); // assertEquals(2,it.next().size()); // assertTrue(it.hasNext()); // assertEquals(1,it.next().size()); // assertFalse(it.hasNext()); assertEquals(0,storage.getRegionsIntersectingList(ref,20, 25).size()); assertEquals(2,storage.getRegionsIntersectingList(ref,19, 25).size()); assertEquals(0,storage.getRegionsIntersectingList(ref,50, 59).size()); assertEquals(4,storage.getRegionsIntersectingList(ref,99, 101).size()); assertEquals(2, storage.getRegionsIntersectingMap(ref,30, 40).get(new ArrayGenomicRegion(19,20,30,40)).intValue()); } }
[ "flo@erhard-mail.de" ]
flo@erhard-mail.de
dcfb1d0a595ea7c82305a501b5365581b4a80225
e652d775c8443b399ecfaec6fe427583aa6e7d94
/Molap/Molap-Core/agitar/test/com/huawei/unibi/molap/keygenerator/util/KeyGenUtilAgitarTest.java
6101e3ef0e90a2c4a2d2111434c0c10de2d996de
[]
no_license
gvramana/carbondata
52d95dcb44546b71630c0680b42f8f76dacf9f96
3e7af59daa726d61d6437e0ed74efe4f28e1a249
refs/heads/master
2020-12-28T09:28:04.153050
2016-03-14T14:24:12
2016-03-14T14:24:12
54,021,189
0
0
null
null
null
null
UTF-8
Java
false
false
2,593
java
/** * Generated by Agitar build: AgitarOne Version 5.3.0.000022 (Build date: Jan 04, 2012) [5.3.0.000022] * JDK Version: 1.6.0_14 * * Generated on 29 Jul, 2013 2:30:15 PM * Time to generate: 00:13.459 seconds * */ package com.huawei.unibi.molap.keygenerator.util; import com.agitar.lib.junit.AgitarTestCase; public class KeyGenUtilAgitarTest extends AgitarTestCase { public Class getTargetClass() { return KeyGenUtil.class; } public void testConstructor() throws Throwable { new KeyGenUtil(); assertTrue("Test call resulted in expected outcome", true); } public void testToLong() throws Throwable { byte[] bytes = new byte[2]; bytes[0] = (byte)-128; long result = KeyGenUtil.toLong(bytes, 0, 1); assertEquals("result", 128L, result); } public void testToLong1() throws Throwable { byte[] bytes = new byte[2]; long result = KeyGenUtil.toLong(bytes, 0, 1); assertEquals("result", 0L, result); } public void testToLong2() throws Throwable { byte[] bytes = new byte[3]; long result = KeyGenUtil.toLong(bytes, 100, 0); assertEquals("result", 0L, result); } public void testToLongThrowsArrayIndexOutOfBoundsException() throws Throwable { byte[] bytes = new byte[3]; try { KeyGenUtil.toLong(bytes, 100, 1000); fail("Expected ArrayIndexOutOfBoundsException to be thrown"); } catch (ArrayIndexOutOfBoundsException ex) { assertEquals("ex.getMessage()", "100", ex.getMessage()); assertThrownBy(KeyGenUtil.class, ex); } } public void testToLongThrowsArrayIndexOutOfBoundsException1() throws Throwable { byte[] bytes = new byte[4]; try { KeyGenUtil.toLong(bytes, 0, 100); fail("Expected ArrayIndexOutOfBoundsException to be thrown"); } catch (ArrayIndexOutOfBoundsException ex) { assertEquals("ex.getMessage()", "4", ex.getMessage()); assertThrownBy(KeyGenUtil.class, ex); } } public void testToLongThrowsNullPointerException() throws Throwable { try { KeyGenUtil.toLong((byte[]) null, 100, 1000); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { assertNull("ex.getMessage()", ex.getMessage()); assertThrownBy(KeyGenUtil.class, ex); } } }
[ "chenliang613@huawei.com" ]
chenliang613@huawei.com
30cd4c6d9b47b8fed4635b2cc736b626485f04da
547f667fc96ff43cad7d6b4372d7cd095ad8cc38
/src/main/java/edu/cmu/cs/stage3/alice/core/question/time/DayOfYear.java
daa4b9294202e9db689f8208633c7f03a2125054
[ "BSD-2-Clause" ]
permissive
ericpauley/Alice
ca01da9cd90ebe743d392522e1e283d63bdaa184
a0b732c548f051f5c99dd90ec9410866ba902479
refs/heads/master
2020-06-05T03:15:51.421453
2012-03-20T13:50:16
2012-03-20T13:50:16
2,081,310
3
1
null
null
null
null
UTF-8
Java
false
false
1,427
java
/* * Copyright (c) 1999-2003, Carnegie Mellon University. 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. Products derived from the software may not be called "Alice", * nor may "Alice" appear in their name, without prior written * permission of Carnegie Mellon University. * * 4. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes software developed by Carnegie Mellon University" */ package edu.cmu.cs.stage3.alice.core.question.time; public class DayOfYear extends edu.cmu.cs.stage3.alice.core.question.IntegerQuestion { @Override public Object getValue() { java.util.Calendar calendar = new java.util.GregorianCalendar(); java.util.Date date = new java.util.Date(); calendar.setTime(date); return new Integer(calendar.get(java.util.Calendar.DAY_OF_YEAR)); } }
[ "zonedabone@gmail.com" ]
zonedabone@gmail.com