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
66cf06d1770a1559c73ba046855a241526471bb4
3e909d759fa6fb4694447064a80dfb185a77d907
/xmnService/.svn/pristine/33/33c1e6ecaf19f2229e36245925a72eb274604cd4.svn-base
6bb2a3cf62b59f76bbedc050fefc1f8215b6b45d
[]
no_license
liveqmock/seeyouagain
9703616f59ae0b9cd2e641d135170c84c18a257c
fae0cb3471f07520878e51358cfa5ea88e1d659c
refs/heads/master
2020-04-04T14:47:00.192619
2017-11-14T12:47:31
2017-11-14T12:47:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,396
package com.xmniao.xmn.core.seller.service.impl; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.xmniao.xmn.core.common.ObjResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.xmniao.xmn.core.base.BaseRequest; import com.xmniao.xmn.core.base.BaseResponse; import com.xmniao.xmn.core.common.MapResponse; import com.xmniao.xmn.core.common.ResponseCode; import com.xmniao.xmn.core.seller.dao.TradeDao; import com.xmniao.xmn.core.seller.service.SellerTradeService; /** * * @projectName: xmnService * @ClassName: SellerTradeServiceImpl * @Description:商铺分类列表接口实现类 * @author: liuzhihao * @date: 2016年11月28日 上午9:57:03 */ @Service public class SellerTradeServiceImpl implements SellerTradeService{ @Autowired private TradeDao tradeDao; @Override public Object querySellerTradeList(BaseRequest baseRequest) { Map<Object,Object> map = new HashMap<Object,Object>(); List<Map<Object,Object>> result = new ArrayList<Map<Object,Object>>(); try{ //查询美食下面的所有二级分类 List<Map<Object,Object>> trades = tradeDao.findAllTradeByDeliciousFood(); // if(trades != null && !trades.isEmpty()){ // for(Map<Object,Object> trade : trades){ // pid = Integer.parseInt(trade.get("tid").toString()); // List<Map<Object,Object>> SecendTrades = tradeDao.findAllByPid(pid); // if(SecendTrades != null && !SecendTrades.isEmpty()){ // trade.put("SecendTrades", SecendTrades); // } // } // }else{ // trades = new ArrayList<Map<Object,Object>>(); // } if(trades != null && !trades.isEmpty()){ Map<Object,Object> allmap = new HashMap<Object,Object>(); allmap.put("pid", ""); allmap.put("tid", ""); allmap.put("tradename", "全部"); result.add(allmap); result.addAll(trades); map.put("trades", result); } MapResponse response = new MapResponse(ResponseCode.SUCCESS,"查询成功"); response.setResponse(map); return response; }catch(Exception e){ e.printStackTrace(); return new BaseResponse(ResponseCode.FAILURE, "查询异常"); } } /** * 查询店铺分类 * @return */ public Object getSellerTradeList(BaseRequest request) { try{ Map<Object, Object> result = new HashMap<Object, Object>(); List<Map<Object, Object>> resultItemList = new ArrayList<>(); List<Map<Object,Object>> trades = tradeDao.findAll(); if (trades != null) { // key : 父菜单id value:子菜单列表 Map<Integer, List<Map<Object, Object>>> tradesMap = new HashMap<Integer, List<Map<Object, Object>>>(); for (Map<Object,Object> trade : trades ) { Integer pid = Integer.parseInt(trade.get("pid").toString()); List<Map<Object, Object>> tradeList = tradesMap.get(pid); if (tradeList == null) { tradeList = new ArrayList<Map<Object, Object>>(); tradesMap.put(pid, tradeList); } tradeList.add(trade); } List<Map<Object, Object>> parentTrade = tradesMap.get(0); // 1级菜单 parentTrade = parentTrade == null ? new ArrayList<Map<Object, Object>>() : parentTrade; for (Map<Object, Object> parent : parentTrade) { Integer tid = Integer.parseInt(parent.get("tid").toString()); List<Map<Object, Object>> childTrade = tradesMap.get(tid); // 2级菜单 List<Map<Object, Object>> childData = new ArrayList<>(); if (childTrade != null) { for (Map<Object, Object> child : childTrade) { Map<Object, Object> tmp = new HashMap<Object, Object>(); tmp.put("tid", child.get("tid").toString()); tmp.put("tradename", child.get("tradename") == null ? "" : child.get("tradename").toString()); childData.add(tmp); } } Map<Object, Object> data = new HashMap<Object, Object>(); data.put("tid", tid); data.put("tradename", parent.get("tradename") == null ? "" : parent.get("tradename").toString()); data.put("secondList", childData); resultItemList.add(data); } } result.put("data", resultItemList); MapResponse mapResponse = new MapResponse(ResponseCode.SUCCESS, "查询成功"); mapResponse.setResponse(result); return mapResponse; } catch (Exception e) { e.printStackTrace(); return new BaseResponse(ResponseCode.FAILURE, "查询异常"); } } }
[ "641013587@qq.com" ]
641013587@qq.com
7d54f345057526835dc97f73d0f0c16bcfc2b531
e6e3a865f1bba98335afa8761c3ed5d96071a3ab
/jrJava/barbarianAttack3/RunningBarbarian.java
46bceee0e53704c557c529f40d47c97357313911
[]
no_license
adhvik-kannan/Projects
c5e4b1f58bd30c040a11267a5f6721242e4ba53d
2e659206e98637b1fe4084d36ccc2186f8c0327e
refs/heads/master
2023-08-23T20:12:04.390935
2021-10-23T19:35:44
2021-10-23T19:35:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
291
java
package jrJava.barbarianAttack3; import java.awt.Image; public class RunningBarbarian extends Barbarian { public RunningBarbarian(Image[] images, int x, int y, int vx) { super(images, x, y, vx); } public void move() { x += vx; if (x > 1100) Coordinator.gameOver = true; } }
[ "90004955+adhvik-kannan@users.noreply.github.com" ]
90004955+adhvik-kannan@users.noreply.github.com
fdc89749daafcef3cc643d6499225d4c00396132
03fa839049232561fddeb726fb09adaf5bad2f4e
/basex-core/src/main/java/org/basex/gui/text/SearchContext.java
27de1ca69a2dca564dcfb08ffc24f7cd90e9e64f
[ "BSD-3-Clause" ]
permissive
cuongpd95/basex
96791206e7a41537c90b1d2d567238850fd201b3
05d975432d78b90946813cd416e78186ab45a8bb
refs/heads/master
2021-08-30T16:30:17.551857
2017-12-18T16:36:28
2017-12-18T16:36:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,269
java
package org.basex.gui.text; import static org.basex.util.Token.*; import java.util.*; import java.util.regex.*; import org.basex.util.*; import org.basex.util.list.*; /** * This class summarizes the result of a search. * * @author BaseX Team 2005-17, BSD License * @author Christian Gruen */ final class SearchContext { /** Search bar. */ final SearchBar bar; /** Mode: match case. */ final boolean mcase; /** Mode: regular expression. */ final boolean regex; /** Mode: multi-line. */ final boolean multi; /** Mode: whole word. */ final boolean word; /** Search string. */ final String search; /** Number of results. */ int nr; /** * Constructor. * @param bar search bar * @param text search string */ SearchContext(final SearchBar bar, final String text) { this.bar = bar; mcase = bar.mcase.isSelected(); word = bar.word.isSelected(); regex = bar.regex.isSelected(); multi = bar.multi.isSelected(); String srch = mcase ? text : text.toLowerCase(Locale.ENGLISH); // speed up regular expressions starting with wildcards if(regex && (srch.startsWith(".*") || srch.startsWith("(.*") || srch.startsWith(".+") || srch.startsWith("(.+"))) srch = '^' + srch; search = srch; } /** * Performs the search. * @param txt text to be searched * @return result positions */ IntList[] search(final byte[] txt) { final IntList start = new IntList(), end = new IntList(); if(!search.isEmpty()) { if(regex) searchRegEx(start, end, txt); else searchSimple(start, end, txt); } nr = start.size(); bar.refresh(this); return new IntList[] { start, end }; } /** * Runs a query using regular expressions. * @param start start positions * @param end end positions * @param text text to be searched */ private void searchRegEx(final IntList start, final IntList end, final byte[] text) { int flags = Pattern.DOTALL; if(!mcase) flags |= Pattern.CASE_INSENSITIVE; final Pattern pattern = Pattern.compile(search, flags); if(multi) { int c = 0, p = 0; final Matcher m = pattern.matcher(string(text)); while(m.find()) { final int s = m.start(), e = m.end(); while(c < s) { p += cl(text, p); c++; } start.add(p); while(c < e) { p += cl(text, p); c++; } end.add(p); } } else { final int os = text.length; final TokenBuilder tb = new TokenBuilder(os); for(int t = 0, o = 0; o <= os; o++) { if(o < os ? text[o] == '\n' : o != t) { int c = 0, p = t; final Matcher m = pattern.matcher(string(text, t, o - t)); while(m.find()) { final int s = m.start(), e = m.end(); while(c < s) { p += cl(text, p); c++; } start.add(p); while(c < e) { p += cl(text, p); c++; } end.add(p); } if(o < os) tb.add('\n'); t = o + 1; } } } } /** * Runs a simple query. * @param start start positions * @param end end positions * @param text text to be searched */ private void searchSimple(final IntList start, final IntList end, final byte[] text) { final byte[] srch = token(search); final int ss = srch.length, os = text.length; boolean s = true; for(int o = 0; o < os;) { int sp = 0; if(o + ss <= os && s) { if(mcase) { while(sp < ss && text[o + sp] == srch[sp]) sp++; } else { while(sp < ss && lc(cp(text, o + sp)) == cp(srch, sp)) sp += cl(srch, sp); } } if(sp == ss && (!word || o + ss == os || !Character.isLetterOrDigit(cp(text, o + ss)))) { start.add(o); end.add(o + ss); o += ss; s = !word; } else if(word) { s = !Character.isLetterOrDigit(cp(text, o)); o += cl(text, o); } else { o++; } } } /** * Checks if the specified string matches the search string. * @param string string to be checked * @return result of check */ boolean matches(final String string) { // ignore empty strings and others that stretch over multiple lines if(string.isEmpty() || string.contains("\n")) return true; if(regex) { try { int flags = Pattern.DOTALL; if(!mcase) flags |= Pattern.CASE_INSENSITIVE; final Pattern pattern = Pattern.compile(search, flags); return pattern.matcher(string).matches(); } catch(final Exception ex) { Util.debug(ex); return false; } } return mcase ? search.equals(string) : search.equalsIgnoreCase(string); } /** * Returns the number of results. * @return number of results */ int nr() { return nr; } @Override public boolean equals(final Object obj) { if(this == obj) return true; if(!(obj instanceof SearchContext)) return false; final SearchContext sc = (SearchContext) obj; return mcase == sc.mcase && word == sc.word && regex == sc.regex && multi == sc.multi && Strings.eq(search, sc.search); } }
[ "christian.gruen@gmail.com" ]
christian.gruen@gmail.com
2ed331fa8a79612cc667683e21b687c63e9236b8
1629e37bba65c44f8cf5e88d73c71870089041a4
/JAVA基础/day27/代码/day27/src/cn/itcast/bat/Demo1.java
f532ce77c9584f8924aba0b1c1e41e74a6d4551a
[]
no_license
15529343201/Java-Web
e202e242663911420879685c6762c8d232ef5d61
15886604aa7b732d42f7f5783f73766da34923e2
refs/heads/master
2021-01-19T08:50:32.816256
2019-03-28T23:34:31
2019-03-28T23:34:31
87,683,430
0
0
null
null
null
null
GB18030
Java
false
false
1,128
java
package cn.itcast.bat; /* bat处理文件: bat处理文件就是可以一次性执行多个命令的文件。 为什么要学bat处理文件, 快速运行一个软件我一般都会把软件打包一个jar包。 jar双击可以运行仅对于图形化界面的软件起作用,对于控制台的程序是不起作用的。 对于控制台的程序我们可以使用bat处理文件快速启动一个项目。 如何编写bat处理文件呢? 步骤: 编写一个自定义的文本文件,然后把后缀名改成bat即可,然后把你所要执行的命令写在bat处理文件中即可。 bat处理文件常用的命令: echo 向控制台输出指定的内容。 echo off 隐藏echo off后面执行过的命令。 @ 隐藏当前行执行的命令。 title 改变当前控制台窗口的标题 color 指定控制台的背景颜色与前景颜色 %注释的内容% pause: 让当前控制台停留。 %1~%9: 给bat处理文件传入参数。 */ public class Demo1 { public static void main(String[] args) { System.out.println("哈哈..."); } }
[ "15529343201@139.com" ]
15529343201@139.com
3795e22c2d194dabb179636551122e502a67abe7
340b193641c8c4f6534072604b50dc4fd737466e
/src/main/java/com/lcy/util/common/DateUtils.java
ff2b88bbf840cda8dccc3266d2f7908f7bb56553
[]
no_license
wang0077/hxjy
169aafae00dc4defd30a03968a8bd8db24330bed
1054fe54ec3f4cd870d4e9935eb8c62f358cd4bb
refs/heads/master
2023-02-24T13:49:26.024943
2021-02-03T08:31:23
2021-02-03T08:31:23
327,232,057
0
0
null
null
null
null
UTF-8
Java
false
false
7,743
java
package com.lcy.util.common; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; /** * 日期工具类 * * @author lshengda@linewell.com * @since 2017年6月1日 */ public class DateUtils { private static final String DEFAULT_FORMAT = "yyyy-MM-dd HH:mm:ss"; private static final String DATA_FORMAT = "yyyy-MM-dd"; private static final String ZONE_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss z"; /** * 由日期字符串格式(yyyy-MM-dd HH:mm:ss)获取毫秒 * * @param dateStr 日期字符串(yyyy-MM-dd HH:mm:ss) * @return 毫秒 * @throws */ public static long parseDateStrToTime(String dateStr) { try { SimpleDateFormat sdf = new SimpleDateFormat(DEFAULT_FORMAT); long time = sdf.parse(dateStr).getTime(); return time; } catch (ParseException e) { } return 0; } /** * 由日期字符串格式(yyyy-MM-dd)获取毫秒 * * @param dateStr 日期字符串(yyyy-MM-dd) * @return 毫秒 * @throws */ public static long parseDateStrToTimestamp(String dateStr) { try { SimpleDateFormat sdf = new SimpleDateFormat(DATA_FORMAT); long time = sdf.parse(dateStr).getTime(); return time; } catch (ParseException e) { } return 0; } /** * 由日期字符串格式(yyyy-MM-dd HH:mm:ss)获取毫秒 * * @param dateStr 日期字符串(yyyy-MM-dd HH:mm:ss) * @return 毫秒 * @throws ParseException */ public static long parseDateTimeStrToTime(String dateStr) { Date date = null; try { SimpleDateFormat sdf = new SimpleDateFormat(DEFAULT_FORMAT); date = sdf.parse(dateStr); } catch (Exception e) { e.printStackTrace(); } if (date == null) { return 0; } else { return date.getTime(); } } /** * 由毫秒获取日期字符串格式(yyyy-MM-dd HH:mm:ss) * * @param time 毫秒 * @return 日期字符串(yyyy-MM-dd HH:mm:ss) * @throws */ public static String parseTimeToDateStr(long time) { SimpleDateFormat sdf = new SimpleDateFormat(DEFAULT_FORMAT); Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(time); return sdf.format(calendar.getTime()); } /** * 根据时间戳转默认格式的字符串(yyyy-MM-dd HH:mm:ss) * * @param time 毫秒 * @return 日期字符串(yyyy-MM-dd HH:mm:ss) */ public static String parseTimeToDefaultStr(long time) { SimpleDateFormat sdf = new SimpleDateFormat(DEFAULT_FORMAT); return sdf.format(time); } /** * 根据时间戳转默认格式的字符串(yyyy-MM-dd HH:mm:ss) * * @param time 毫秒 * @return 日期字符串(yyyy-MM-dd HH:mm:ss) */ public static String parseTimeToDate(long time) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(time); return sdf.format(calendar.getTime()); } /** * 根据时间戳转字符串 * * @param time 毫秒 * @param pattern 格式 * @return 日期字符串 */ public static String parseTimeToStr(long time, String pattern) { SimpleDateFormat sdf = new SimpleDateFormat(pattern); return sdf.format(time); } /** * 获取一天开始时间,00:00:00 000 */ public static long getDayBeginTime(long time) { if (time == 0) { return time; } Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(time); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); return cal.getTimeInMillis(); } /** * 获取一天结束时间,23:59:59 999 */ public static long getDayEndTime(long time) { if (time == 0) { return time; } Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(time); cal.set(Calendar.HOUR_OF_DAY, 23); cal.set(Calendar.MINUTE, 59); cal.set(Calendar.SECOND, 59); cal.set(Calendar.MILLISECOND, 999); return cal.getTimeInMillis(); } /** * 返回下一个日期是不是大于上一个日期 * @param beforeTime * @param afterTime * @return */ public static int getDistanceDay(long beforeTime, long afterTime){ return getDateByTime(afterTime)-getDateByTime(beforeTime); } /** * 根据时间戳获取年月日(格式:20180712) * @param timestamp 时间戳 * @return */ public static int getDateByTime(long timestamp) { Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(timestamp); int year = cal.get(Calendar.YEAR); int month = cal.get(Calendar.MONTH)+1; //第一个月从0开始,所以得到月份+1 int day = cal.get(Calendar.DAY_OF_MONTH); int dateNum = year*10000+month*100+day; return dateNum; } /** * 获取当前日期是星期几 * * @param date * @return 当前日期是星期几 */ public static String getWeekOfDate(Date date) { String[] weekDays = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}; Calendar cal = Calendar.getInstance(); cal.setTime(date); int w = cal.get(Calendar.DAY_OF_WEEK) - 1; if (w < 0) w = 0; return weekDays[w]; } public static String parseZoneDateStr(String dateStr) { try { SimpleDateFormat formatter = new SimpleDateFormat(ZONE_DATE_FORMAT); Date date = formatter.parse(dateStr); long time = date.getTime(); String parseTimeToDateStr = DateUtils.parseTimeToDateStr(time); return parseTimeToDateStr; } catch (ParseException e) { e.printStackTrace(); return null; } } /** * 兼容所有日期格式 * @param sFormat * @param sDate * @return */ public static Date unifyDate(String sFormat, String sDate) { SimpleDateFormat sdf = new SimpleDateFormat(sFormat); Date d = null; try { sdf.setLenient(false); d = sdf.parse(sDate); } catch (Exception e) { e.printStackTrace(); } return d; } /** * 转化不同格式的时间 * @param sDate * @return */ public static String unifyDate(String sDate) { String[] sa = { "yyyy-MM-dd HH:mm", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd", "yyyyMMdd", "yyyy.MM.dd", "yyyy/MM/dd", "yyyy年MM月dd日" }; for(String s : sa) { Date d = unifyDate(s, sDate); if(d == null) { continue; } else { return new SimpleDateFormat(DEFAULT_FORMAT).format(d); } } return ""; } /** * 日期相差天数 * @param date1 2019-09-23 * @param date2 2019-09-24 * @return 1 */ public static int diffDay(String date1, String date2){ long date1TimeMills = DateUtils.parseDateStrToTime(date1 + " 00:00:00"); long date2TimeMills = DateUtils.parseDateStrToTime(date2 + " 00:00:00"); return (int)((date2TimeMills - date1TimeMills) / (24 * 3600 * 1000)); } }
[ "44741783+wang0077@users.noreply.github.com" ]
44741783+wang0077@users.noreply.github.com
e2f8f94806862b988840f8830d76e63ae585d724
262bbe852f68a382abafae1db42cbc6dd3301fb4
/src/main/java/com/liudehuang/saleActivity/model/param/ActivityBO.java
e82cc3dcd8703c2460ad296f6205a01824e2ab72
[]
no_license
8Liu/car
c019fcc28622c9c017cfcf5979142c78a772a26e
634f64b70e449b3927f23e769dbd46788f49145c
refs/heads/master
2021-05-04T16:05:58.356673
2018-02-05T03:16:02
2018-02-05T03:16:02
120,244,178
0
0
null
null
null
null
UTF-8
Java
false
false
1,264
java
package com.liudehuang.saleActivity.model.param; import java.util.Date; //car_activity 参数获取类 public class ActivityBO { private Integer carActivityId; private String activityName; private Double activityPrice; private Date startime; private Date endTime; public Integer getCarActivityId() { return carActivityId; } public void setCarActivityId(Integer carActivityId) { this.carActivityId = carActivityId; } public String getActivityName() { return activityName; } public void setActivityName(String activityName) { this.activityName = activityName; } public Double getActivityPrice() { return activityPrice; } public void setActivityPrice(Double activityPrice) { this.activityPrice = activityPrice; } public Date getStartime() { return startime; } public void setStartime(Date startime) { this.startime = startime; } public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) { this.endTime = endTime; } @Override public String toString() { return "ActivityBO [carActivityId=" + carActivityId + ", activityName=" + activityName + ", activityPrice=" + activityPrice + ", startime=" + startime + ", endTime=" + endTime + "]"; } }
[ "2969878315@qq.com" ]
2969878315@qq.com
de619dc94131e3bc47146796990a4363666f26df
852ad8705a796bbaf66a53e1274c20130737e0c4
/src/main/java/com/github/houbb/markdown/toc/constant/TocConstant.java
7ed3045cb1efe4468cd6c777f8dd3c6255e0b45c
[ "Apache-2.0" ]
permissive
kengJ/markdown-toc
c776430b9110b34c3ff3bdd927aae873d176582a
9e09ad2940b34c6331a1b89cf6449192f600a215
refs/heads/master
2020-03-24T09:55:24.626353
2018-07-07T05:14:24
2018-07-07T05:14:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
849
java
package com.github.houbb.markdown.toc.constant; /** * TOC 常量 * @author bbhou * @version 1.0.0 * @since 1.0.0, 2018/01/30 */ public final class TocConstant { private TocConstant(){} /** * 两个空格 */ public static final String TWO_BLANK = " "; /** * 井号 */ public static final String ASTERISK = "#"; /** * 星号 */ public static final String STAR = "*"; /** * 减号 */ public static final String MINUS = "-"; /** * TOC 格式化 */ public static final String TOC_FORMAT = "* [%s](%s)"; /** * 默认的 toc 开头 */ public static final String DEFAULT_TOC_HEAD = "# Table of Contents"; /** * 通用换行符 */ public static final String RETURN_LINE = System.getProperty("line.separator"); }
[ "1060732496@qq.com" ]
1060732496@qq.com
8ccc10234e384de7fbe5d844f0f22be95cb36662
ba3b25d6cf9be46007833ce662d0584dc1246279
/droidsafe_modified/modeling/api/android/security/KeyChainAliasCallback.java
b8a319355c45b3ea7b280569f9254fb4a92600d8
[]
no_license
suncongxd/muDep
46552d4156191b9dec669e246188080b47183a01
b891c09f2c96ff37dcfc00468632bda569fc8b6d
refs/heads/main
2023-03-20T20:04:41.737805
2021-03-01T19:52:08
2021-03-01T19:52:08
326,209,904
8
0
null
null
null
null
UTF-8
Java
false
false
2,003
java
/* * Copyright (C) 2015, Massachusetts Institute of Technology * * This program 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 2 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, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Please email droidsafe@lists.csail.mit.edu if you need additional * information or have any questions. * * * This file incorporates work covered by the following copyright and * permission notice: * * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /***** THIS FILE HAS BEEN MODIFIED FROM THE ORIGINAL BY THE DROIDSAFE PROJECT. *****/ package android.security; // Droidsafe Imports import droidsafe.runtime.*; import droidsafe.helpers.*; import droidsafe.annotations.*; public interface KeyChainAliasCallback { @DSComment("Abstract Method") @DSSpec(DSCat.ABSTRACT_METHOD) public void alias(String alias); }
[ "suncong@xidian.edu.cn" ]
suncong@xidian.edu.cn
40615d14908e2cded880e4ae0462a59eda8cad6c
80ed86dacae737b6a847e3a40d6a9cdec89e38cc
/zlib/src/main/java/com/zsy/zlib/view/ecg/EcgBean.java
324700ae5d45076989a77146877c68bd5fd24943
[]
no_license
ZhaoShuyin/ZsyAndroid
348d7ff74d3c7c0fe27aa24c5d4052bb54ec2243
7e6ce47e38e5878ed2bf0d3457780779e693e86f
refs/heads/master
2021-06-13T06:08:41.494113
2021-04-20T03:23:28
2021-04-20T03:23:28
187,734,497
2
0
null
null
null
null
UTF-8
Java
false
false
2,066
java
package com.zsy.zlib.view.ecg; /** * @Title com.pengyang.ecg.bean.wave * @date 2019/11/4 * @autor Zsy */ public class EcgBean { public static final String TAG_I = "MDC_ECG_LEAD_I"; public static final String TAG_II = "MDC_ECG_LEAD_II"; public static final String TAG_III = "MDC_ECG_LEAD_III"; public static final String TAG_AVR = "MDC_ECG_LEAD_AVR"; public static final String TAG_AVL = "MDC_ECG_LEAD_AVL"; public static final String TAG_AVF = "MDC_ECG_LEAD_AVF"; public static final String TAG_V1 = "MDC_ECG_LEAD_V1"; public static final String TAG_V2 = "MDC_ECG_LEAD_V2"; public static final String TAG_V3 = "MDC_ECG_LEAD_V3"; public static final String TAG_V4 = "MDC_ECG_LEAD_V4"; public static final String TAG_V5 = "MDC_ECG_LEAD_V5"; public static final String TAG_V6 = "MDC_ECG_LEAD_V6"; public String low; public String high; public int[] I; public int[] II; public int[] III; public int[] AVR; public int[] AVL; public int[] AVF; public int[] V1; public int[] V2; public int[] V3; public int[] V4; public int[] V5; public int[] V6; public void conver(int number) { conversion(I, number); conversion(II, number); conversion(III, number); conversion(AVR, number); conversion(AVL, number); conversion(AVF, number); conversion(V1, number); conversion(V2, number); conversion(V3, number); conversion(V4, number); conversion(V5, number); conversion(V6, number); } private void conversion(int[] origin, int number) { int[] ints = I; I = new int[ints.length]; for (int j = 0; j < ints.length; j++) { if (j % number == 0) { I[j / number] = getTotal(ints, number); } } } private int getTotal(int[] ints, int number) { int total = 0; for (int i = 0; i < number; i++) { total += ints[i + number]; } return total; } }
[ "zhaoshuyin89@163.com" ]
zhaoshuyin89@163.com
0be11ba960e2593dbc0cba6d449a9f5d8510f50b
7674040b3eb0d11bfc2be40aec98f7c781bfde53
/CF360/src/com/cf360/act/PostContractActivity.java
424389af29b224a142cd8005148416f4499a24c7
[]
no_license
lvhailing/ower_project2
1a49f6b7ed37cf012ab2f73fca2066c1a10022c4
88e87b40dc6256a958d29083f1dfb0e52778a8ee
refs/heads/master
2021-01-09T06:04:48.397151
2017-02-16T09:34:43
2017-02-16T09:34:43
80,908,441
0
0
null
null
null
null
UTF-8
Java
false
false
4,588
java
package com.cf360.act; import com.cf360.R; import com.cf360.bean.ResultPostContractBean; import com.cf360.bean.ResultPostContractContentBean; import com.cf360.bean.ResultSignContractContentBean; import com.cf360.mould.BaseParams; import com.cf360.mould.HtmlRequest; import com.cf360.mould.BaseRequester.OnRequestListener; import com.cf360.uitls.ActivityStack; import com.cf360.view.TitleBar; import com.cf360.view.TitleBar.OnActionListener; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; /** * 寄回合同 * */ public class PostContractActivity extends BaseActivity implements OnClickListener{ private EditText edt_express_name; private EditText edt_express_number; private EditText edt_express_address; private Button btnPost; private String contractId; private ActivityStack stack; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); baseSetContentView(R.layout.activity_post_contract); initView(); initData(); initTopTitle(); } private void initTopTitle() { TitleBar title = (TitleBar) findViewById(R.id.rl_title); title.showLeftImg(true); title.setTitle(getResources().getString(R.string.title_no)) .setCenterText( getResources().getString(R.string.title_post_contract)) .setLogo(R.drawable.img_logo, false).setIndicator(R.drawable.back) .showMore(false).setOnActionListener(new OnActionListener() { @Override public void onMenu(int id) { } @Override public void onBack() { finish(); } @Override public void onAction(int id) { } }); } private void initView() { stack = ActivityStack.getActivityManage(); stack.addActivity(this); edt_express_name=(EditText) findViewById(R.id.post_contract_edit_express_name); edt_express_number=(EditText) findViewById(R.id.post_contract_edit_express_number); edt_express_address=(EditText) findViewById(R.id.post_contract_edit_express_address); btnPost=(Button) findViewById(R.id.btn_post); if(netHint_2!=null){ netHint_2.setVisibility(View.GONE); llContent.setVisibility(View.VISIBLE); } netFail_2 = false; } private void initData() { contractId=getIntent().getStringExtra("contractId"); btnPost.setOnClickListener(this); } private void requestPostContractData(final String contractId,String expressNameBack,String expressCodeBack,String expressUrlBack) { HtmlRequest.getPostContract(PostContractActivity.this, contractId,expressNameBack,expressCodeBack,expressUrlBack, new OnRequestListener() { @Override public void onRequestFinished(BaseParams params) { if (params.result != null) { ResultPostContractContentBean data = (ResultPostContractContentBean) params.result; if (data != null) { if (data.getFlag().equals("true")) { Toast.makeText(PostContractActivity.this, "寄回成功", Toast.LENGTH_LONG).show(); Intent intent = new Intent(PostContractActivity.this,ContractActivity.class); startActivity(intent); stack.removeAllActivity(); } } } else { Toast.makeText(PostContractActivity.this, "加载失败,请确认网络通畅", Toast.LENGTH_LONG).show(); } } }); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.btn_post: String express_name=edt_express_name.getText().toString(); String express_number=edt_express_number.getText().toString(); String express_address=edt_express_address.getText().toString(); if(TextUtils.isEmpty(express_name)){ Toast.makeText(PostContractActivity.this, "请输入快递公司名称", Toast.LENGTH_LONG).show(); }else{ if(TextUtils.isEmpty(express_number)){ Toast.makeText(PostContractActivity.this, "请输入运单号", Toast.LENGTH_LONG).show(); }else{ if(TextUtils.isEmpty(express_address)){ Toast.makeText(PostContractActivity.this, "请输入快递公司网址", Toast.LENGTH_LONG).show(); }else{ if(express_address.startsWith("www.")){ requestPostContractData(contractId, express_name, express_number, "http://"+express_address); }else{ Toast.makeText(PostContractActivity.this, "请输入正确的网址地址 如www.baidu.com", Toast.LENGTH_LONG).show(); } } } } break; default: break; } } }
[ "lvhl3@ziroom.com" ]
lvhl3@ziroom.com
3c2d15915ed0720cbcf70b94b3d9978bce6afeb2
293e395565a5689af9781f6f87389a87becadfa5
/thevpc-common-strings/src/main/java/net/thevpc/common/strings/deprecated/ExprParseException.java
3c76b955701be79e30ca44a788736b150f859942
[]
no_license
thevpc/vpc-common
fa0bcc7a40c7ab426d0871ee4620177717517435
af29b2340a4beb1d5e6e3f278ec8c99077302144
refs/heads/master
2023-06-07T17:00:18.820723
2023-05-31T12:54:32
2023-05-31T12:54:32
71,976,446
0
0
null
2022-01-05T21:28:01
2016-10-26T07:14:22
Java
UTF-8
Java
false
false
732
java
package net.thevpc.common.strings.deprecated; //package net.thevpc.common.strings; // ///** // * Created by vpc on 4/16/17. // */ //public class ExprParseException extends RuntimeException { // // public ExprParseException() { // } // // public ExprParseException(String message) { // super(message); // } // // public ExprParseException(String message, Throwable cause) { // super(message, cause); // } // // public ExprParseException(Throwable cause) { // super(cause); // } // // public ExprParseException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { // super(message, cause, enableSuppression, writableStackTrace); // } //}
[ "taha.bensalah@gmail.com" ]
taha.bensalah@gmail.com
33078d3fd2ce58b625a480631c61147a4c028a9d
43be490003f3c1681e9ce02c39616c7d5f82add3
/src/main/java/com/naresh/bankingappspringdata/model/User.java
00538d4f77edebcecbd86f2fca8f730d27e30fe1
[]
no_license
nareshkumar-h/springboot-data-jpa-rest
aaf051cdc93f67d646c093ed7220648c213f57c2
37905cca10a5727b82997bf6525c4f95db64bad5
refs/heads/master
2020-06-18T19:58:40.393684
2019-07-22T18:09:29
2019-07-22T18:09:29
196,427,889
0
2
null
null
null
null
UTF-8
Java
false
false
1,336
java
package com.naresh.bankingappspringdata.model; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.SequenceGenerator; import javax.persistence.Table; @Entity @Table(name = "users") public class User { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "userid_gen") @SequenceGenerator(name = "userid_gen", sequenceName = "users_id_seq", allocationSize = 1) @Column(name = "id") private Integer id; @Column(name = "name") private String name; @Column(name = "email") private String email; @Column(name = "password") private String password; public Integer getId() { return id; } public User() { } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @Override public String toString() { return "User [id=" + id + ", name=" + name + ", email=" + email + ", password=" + password + "]"; } }
[ "nareshkumarh@live.com" ]
nareshkumarh@live.com
0669cef4ea246da45d768ece3ae6d13bd03d9ee7
a2753b177335ca9ee647cd862c9d21b824e0f4c6
/src/main/java/edu/arizona/biosemantics/etcsite/client/common/ServerSetup.java
a641b29fbf7eb76e6f8df630c8299f77dbd1eb2d
[]
no_license
rodenhausen/otoLiteFromEtcIntegration
d6d339cbca23512a453d7128e1375914e8177e5b
9b33cd4bd1667e2657d931591ba2866bf97d3d63
refs/heads/master
2016-09-05T15:48:19.048749
2014-08-20T02:23:07
2014-08-20T02:23:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
538
java
package edu.arizona.biosemantics.etcsite.client.common; import edu.arizona.biosemantics.etcsite.shared.rpc.Setup; public class ServerSetup { private static ServerSetup instance; public static ServerSetup getInstance() { if(instance == null) instance = new ServerSetup(); return instance; } private Setup setup; private ServerSetup() { } public Setup getSetup() { return setup; } public void setSetup(Setup setup) { this.setup = setup; } public boolean hasSetup() { return this.setup != null; } }
[ "thomas.rodenhausen@gmail.com" ]
thomas.rodenhausen@gmail.com
30a8cb67d7f7fc152805aaf48ed36af434172044
1c47c4f834ec5f5a89d2262768486da8054d7544
/src/main/java/mekanism/common/recipe/impl/ActivatingIRecipe.java
356df80a23e8fc81f6d7f1c7267dd36e15b093ae
[ "MIT" ]
permissive
Sinmis077/Meka-Guide
d4443cd1ae48929aa6ff5f811e2d00d7caf3ba17
c42191d9d5a4e8add654a6cf8720abc8af2896c3
refs/heads/main
2023-08-07T19:45:42.813342
2021-09-26T21:55:10
2021-09-26T21:55:10
383,550,665
1
1
MIT
2021-09-26T21:55:11
2021-07-06T17:34:34
Java
UTF-8
Java
false
false
1,330
java
package mekanism.common.recipe.impl; import javax.annotation.Nonnull; import mekanism.api.chemical.gas.GasStack; import mekanism.api.recipes.GasToGasRecipe; import mekanism.api.recipes.inputs.chemical.GasStackIngredient; import mekanism.common.recipe.MekanismRecipeType; import mekanism.common.registries.MekanismBlocks; import mekanism.common.registries.MekanismRecipeSerializers; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipeSerializer; import net.minecraft.item.crafting.IRecipeType; import net.minecraft.util.ResourceLocation; public class ActivatingIRecipe extends GasToGasRecipe { public ActivatingIRecipe(ResourceLocation id, GasStackIngredient input, GasStack output) { super(id, input, output); } @Nonnull @Override public IRecipeType<GasToGasRecipe> getType() { return MekanismRecipeType.ACTIVATING; } @Nonnull @Override public IRecipeSerializer<GasToGasRecipe> getSerializer() { return MekanismRecipeSerializers.ACTIVATING.getRecipeSerializer(); } @Nonnull @Override public String getGroup() { return MekanismBlocks.SOLAR_NEUTRON_ACTIVATOR.getName(); } @Nonnull @Override public ItemStack getIcon() { return MekanismBlocks.SOLAR_NEUTRON_ACTIVATOR.getItemStack(); } }
[ "llelga8@gmail.com" ]
llelga8@gmail.com
a3350e0e726f6785ac09a649cedf8f25f2f97878
250386e0c361915e7065e2fe0df4497909a4ed27
/src/main/java/search/ExpertSearcher.java
f98362f4d6a60af882afe0a3106f8204c2f077aa
[]
no_license
1000-7/expert_es
02c08e81e41cd23d1da8bac528926ec08209c8ec
2b9f2b5c34a462e0ef8e6a7c7e34ba5127691d94
refs/heads/master
2020-03-14T01:34:03.701047
2018-04-28T06:33:54
2018-04-28T06:33:54
131,380,450
0
0
null
null
null
null
UTF-8
Java
false
false
4,670
java
package search; import client.ClientFactory; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.search.SearchHit; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; public class ExpertSearcher { public static Set<String> search(String index, String type) { SearchResponse response = ClientFactory.get().prepareSearch(index) .setTypes(type) .setQuery(QueryBuilders.boolQuery().filter(QueryBuilders.existsQuery("fos")) .must(QueryBuilders.termQuery("lang", "zh_chs"))) .setFetchSource(new String[]{"id", "keywords", "authors", "fos"}, null) .setScroll(new TimeValue(10, TimeUnit.MINUTES)) .setSize(10) .get(); String scrollId = response.getScrollId(); // System.out.println("sdfhksj" + scrollId); SearchHit[] searchHits = response.getHits().getHits(); Map<String, Object> source; Set<String> docIds = new HashSet<>(searchHits.length); for (SearchHit hit : searchHits) { System.out.println(hit.getId()); source = hit.getSourceAsMap(); System.out.println(source.toString()); docIds.add(hit.getId()); } List<SearchHit> xa = ScrollSearch.searchByScrollId(scrollId); System.out.println("前10个打印" + xa.size()); for (SearchHit hit : xa) { docIds.add(hit.getId()); } return docIds; } public static Set<String> searchName(String index, String type, String name) { SearchResponse response = ClientFactory.get().prepareSearch(index) .setTypes(type) .setQuery(QueryBuilders.boolQuery().filter(QueryBuilders.existsQuery("fos")) .must(QueryBuilders.termQuery("lang", "zh_chs"))) .setFetchSource(false) .setScroll(new TimeValue(10, TimeUnit.MINUTES)) .setSize(10) .get(); String scrollId = response.getScrollId(); System.out.println("sdfhksj" + scrollId); SearchHit[] searchHits = response.getHits().getHits(); Set<String> docIds = new HashSet<>(searchHits.length); for (SearchHit hit : searchHits) { docIds.add(hit.getId()); } System.out.println(docIds.size()); System.out.println("前10个打印"); for (SearchHit hit : ScrollSearch.searchByScrollId(scrollId)) { docIds.add(hit.getId()); } System.out.println(docIds.size()); return docIds; } public static Set<String> searchfoskeywords(String index, String type) { SearchResponse response = ClientFactory.get().prepareSearch(index) .setTypes(type) .setQuery(QueryBuilders.boolQuery() .must(QueryBuilders.boolQuery().filter(QueryBuilders.existsQuery("keywords"))) .must(QueryBuilders.matchQuery("lang", "zh_chs")) .must(QueryBuilders.boolQuery().filter(QueryBuilders.existsQuery("fos"))) .must(QueryBuilders.matchQuery("year", "2014")) .must(QueryBuilders.matchQuery("issue", "8")) .must(QueryBuilders.matchQuery("page_end", "766")) ) .setFetchSource(true) .setScroll(new TimeValue(10, TimeUnit.MINUTES)) .setSize(10) .get(); String scrollId = response.getScrollId(); // System.out.println("sdfhksj" + scrollId); SearchHit[] searchHits = response.getHits().getHits(); Map<String, Object> source; Set<String> docIds = new HashSet<>(searchHits.length); for (SearchHit hit : searchHits) { System.out.println(hit.getId()); source = hit.getSourceAsMap(); System.out.println(source.toString()); docIds.add(hit.getId()); } List<SearchHit> xa = ScrollSearch.searchByScrollId(scrollId); System.out.println("前10个打印" + xa.size()); for (SearchHit hit : xa) { docIds.add(hit.getId()); } return docIds; } public static void main(String[] args) { Set<String> result = searchfoskeywords("mag", "mag"); System.out.println(result.size()); for (String s : result) { System.out.println(s); } } }
[ "1256656057@qq.com" ]
1256656057@qq.com
9582e90abb28847ffe85852e735c4020aa8b8524
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/validation/org/drools/verifier/core/cache/inspectors/PatternInspectorTest.java
872b2ffafd59ade378ee22d897e3be9fc35f546f
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
2,269
java
/** * Copyright 2018 Red Hat, 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 org.drools.verifier.core.cache.inspectors; import org.drools.verifier.core.checks.AnalyzerConfigurationMock; import org.drools.verifier.core.configuration.AnalyzerConfiguration; import org.drools.verifier.core.index.model.ObjectType; import org.junit.Assert; import org.junit.Test; import org.mockito.Mockito; public class PatternInspectorTest { private AnalyzerConfigurationMock configurationMock; private PatternInspector a; private PatternInspector b; @Test public void testRedundancy01() throws Exception { Assert.assertTrue(a.isRedundant(b)); Assert.assertTrue(b.isRedundant(a)); } @Test public void testRedundancy02() throws Exception { final PatternInspector x = new PatternInspector(new org.drools.verifier.core.index.model.Pattern("x", new ObjectType("org.Address", configurationMock), configurationMock), Mockito.mock(RuleInspectorUpdater.class), Mockito.mock(AnalyzerConfiguration.class)); Assert.assertFalse(x.isRedundant(b)); Assert.assertFalse(b.isRedundant(x)); } @Test public void testSubsumpt01() throws Exception { Assert.assertTrue(a.subsumes(b)); Assert.assertTrue(b.subsumes(a)); } @Test public void testSubsumpt02() throws Exception { final PatternInspector x = new PatternInspector(new org.drools.verifier.core.index.model.Pattern("x", new ObjectType("org.Address", configurationMock), configurationMock), Mockito.mock(RuleInspectorUpdater.class), Mockito.mock(AnalyzerConfiguration.class)); Assert.assertFalse(x.subsumes(b)); Assert.assertFalse(b.subsumes(x)); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
2316ba0ddfa32c1e26b59ce7aa38d5610d5f8a76
3e50e8dbd656465ccdc682e16c44fd2e04d85e19
/ext-src/cn/com/brilliance/begen/model/TmchntApp.java
49fb7fb68881cbdf30e0657887d6fcecc8323d1b
[]
no_license
gavinwang1018/riskcontrol
6c1fd38fba22ead67fc4f66c259c0e5c79de165d
3d55f39e8bcb5759e99261fd053ff5c96a4cd4ee
refs/heads/master
2021-01-21T21:32:12.318882
2017-06-20T06:08:28
2017-06-20T06:08:28
94,855,850
0
2
null
null
null
null
GB18030
Java
false
false
7,420
java
package cn.com.brilliance.begen.model; import java.io.Serializable; import java.util.Set; import java.util.List; import cn.com.brilliance.begen.dao.*; import cn.com.brilliance.begen.common.Tools; /** * 定义类TmchntApp. */ public class TmchntApp extends BaseModel implements Serializable { private int _edit_flag; private int _record_index; private boolean _checked_flag; /** * 字段域mchntId. */ private java.lang.String mchntId; /** * 字段域apptype. */ private java.lang.String apptype; /** * 字段域main. */ private java.lang.Boolean main; /** * 字段域acquirer. */ private java.lang.String acquirer; /** * 字段域networktransferinst. */ private java.lang.String networktransferinst; /** * 字段域memberinstmerno. */ private java.lang.String memberinstmerno; /** * 字段域depositbank. */ private java.lang.String depositbank; /** * 字段域settlementaccntname. */ private java.lang.String settlementaccntname; /** * 字段域settlementaccntno. */ private java.lang.String settlementaccntno; /** * 字段域belongToInst. */ private java.lang.String belongToInst; /** * 字段域id. */ private java.lang.String id; /** * 域mchntIdOfTmchnt. */ private Tmchnt mchntIdOfTmchnt; /** * 域belongToInstOfTorganizeInfo. */ private TorganizeInfo belongToInstOfTorganizeInfo; public int get_edit_flag() { return _edit_flag; } public void set_edit_flag(int _edit_flag) { this._edit_flag = _edit_flag; } public int get_record_index() { return _record_index; } public void set_record_index(int index) { this._record_index = index; } public boolean is_checked_flag() { return _checked_flag; } public void set_checked_flag(boolean _checked_flag) { this._checked_flag = _checked_flag; } /** * 获取 mchntId. * @return java.lang.String. */ public java.lang.String getMchntId() { return this.mchntId; } /** * 设置 mchntId. * @param mchntId mchntId域. */ public void setMchntId(java.lang.String mchntId) { this.mchntId = mchntId; } /** * 获取 apptype. * @return java.lang.String. */ public java.lang.String getApptype() { return this.apptype; } /** * 设置 apptype. * @param apptype apptype域. */ public void setApptype(java.lang.String apptype) { this.apptype = apptype; } /** * 获取 main. * @return java.lang.Boolean. */ public java.lang.Boolean getMain() { return this.main; } /** * 设置 main. * @param main main域. */ public void setMain(java.lang.Boolean main) { this.main = main; } /** * 获取 acquirer. * @return java.lang.String. */ public java.lang.String getAcquirer() { return this.acquirer; } /** * 设置 acquirer. * @param acquirer acquirer域. */ public void setAcquirer(java.lang.String acquirer) { this.acquirer = acquirer; } /** * 获取 networktransferinst. * @return java.lang.String. */ public java.lang.String getNetworktransferinst() { return this.networktransferinst; } /** * 设置 networktransferinst. * @param networktransferinst networktransferinst域. */ public void setNetworktransferinst(java.lang.String networktransferinst) { this.networktransferinst = networktransferinst; } /** * 获取 memberinstmerno. * @return java.lang.String. */ public java.lang.String getMemberinstmerno() { return this.memberinstmerno; } /** * 设置 memberinstmerno. * @param memberinstmerno memberinstmerno域. */ public void setMemberinstmerno(java.lang.String memberinstmerno) { this.memberinstmerno = memberinstmerno; } /** * 获取 depositbank. * @return java.lang.String. */ public java.lang.String getDepositbank() { return this.depositbank; } /** * 设置 depositbank. * @param depositbank depositbank域. */ public void setDepositbank(java.lang.String depositbank) { this.depositbank = depositbank; } /** * 获取 settlementaccntname. * @return java.lang.String. */ public java.lang.String getSettlementaccntname() { return this.settlementaccntname; } /** * 设置 settlementaccntname. * @param settlementaccntname settlementaccntname域. */ public void setSettlementaccntname(java.lang.String settlementaccntname) { this.settlementaccntname = settlementaccntname; } /** * 获取 settlementaccntno. * @return java.lang.String. */ public java.lang.String getSettlementaccntno() { return this.settlementaccntno; } /** * 设置 settlementaccntno. * @param settlementaccntno settlementaccntno域. */ public void setSettlementaccntno(java.lang.String settlementaccntno) { this.settlementaccntno = settlementaccntno; } /** * 获取 belongToInst. * @return java.lang.String. */ public java.lang.String getBelongToInst() { return this.belongToInst; } /** * 设置 belongToInst. * @param belongToInst belongToInst域. */ public void setBelongToInst(java.lang.String belongToInst) { this.belongToInst = belongToInst; } /** * 获取 id. * @return java.lang.String. */ public java.lang.String getId() { return this.id; } /** * 设置 id. * @param id id域. */ public void setId(java.lang.String id) { this.id = id; } /** * 获取 mchntIdOfTmchnt. * @return Tmchnt. */ public Tmchnt getMchntIdOfTmchnt() { if (this.mchntIdOfTmchnt == null && this.mchntId != null && !"".equals(this.mchntId)){ TmchntDAO tmchntDAO = (TmchntDAO)Tools.getBean("tmchntDAO"); this.mchntIdOfTmchnt= tmchntDAO.getTmchnt(this.mchntId); } return this.mchntIdOfTmchnt; } /** * 设置 mchntIdOfTmchnt. * @param mchntIdOfTmchnt mchntIdOfTmchnt域. */ public void setMchntIdOfTmchnt(Tmchnt mchntIdOfTmchnt) { this.mchntIdOfTmchnt = mchntIdOfTmchnt; } /** * 获取 belongToInstOfTorganizeInfo. * @return TorganizeInfo. */ public TorganizeInfo getBelongToInstOfTorganizeInfo() { if (this.belongToInstOfTorganizeInfo == null && this.belongToInst != null && !"".equals(this.belongToInst)){ TorganizeInfoDAO torganizeInfoDAO = (TorganizeInfoDAO)Tools.getBean("torganizeInfoDAO"); this.belongToInstOfTorganizeInfo= torganizeInfoDAO.getTorganizeInfo(this.belongToInst); } return this.belongToInstOfTorganizeInfo; } /** * 设置 belongToInstOfTorganizeInfo. * @param belongToInstOfTorganizeInfo belongToInstOfTorganizeInfo域. */ public void setBelongToInstOfTorganizeInfo(TorganizeInfo belongToInstOfTorganizeInfo) { this.belongToInstOfTorganizeInfo = belongToInstOfTorganizeInfo; } }
[ "cywang@exigengroup.com" ]
cywang@exigengroup.com
f608a43a7f4312f4b6c1d2e2cabe3630d770a3f9
23cc963092bb93e4b0b6531747a40bbcfaea20fb
/Server/src/main/java/ar/com/adriabe/components/InventoryAccountantImpl.java
981284daf2ae9313a4183a9cdd30a5c01eb71689
[]
no_license
MildoCentaur/billing
819927d1695fde31b26451b4223fcf513d35e376
6c37bf3f476d326404cf70f4fd72740028eb3d01
refs/heads/master
2021-01-11T04:18:26.568172
2017-02-10T03:44:12
2017-02-10T03:44:12
71,210,731
0
0
null
null
null
null
UTF-8
Java
false
false
1,908
java
package ar.com.adriabe.components; import ar.com.adriabe.daos.ProductDao; import ar.com.adriabe.model.Barcode; import ar.com.adriabe.model.Product; import ar.com.adriabe.services.InvalidDataException; import ar.com.adriabe.services.ServiceException; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Component; @Component public class InventoryAccountantImpl implements InventoryAccountant { public static final String INVALID_BARCODE = "Error en la lectura del c?digo de barras."; public static final String PRODUCT_NOT_FOUND = "Producto no encontrado."; protected final Logger logger = LogManager.getLogger(InventoryAccountantImpl.class); BarcodeAnalyzer barcodeAnalizer; ProductDao productDao; @Autowired public InventoryAccountantImpl(@Qualifier("barcodeAnalyzer") BarcodeAnalyzer barcodeAnalizer, ProductDao productDao) { this.barcodeAnalizer = barcodeAnalizer; this.productDao = productDao; } @Override public Barcode incrementProductStock(String code, long amount) throws ServiceException { Barcode barcode = null; try { barcode = barcodeAnalizer.scanBarcode(code); Product product = barcode.getProduct(); product.addStock(amount); productDao.save(product); return barcode; } catch (InvalidDataException e) { e.printStackTrace(); logger.error("C?digo de barras invalido"); throw new ServiceException(INVALID_BARCODE); } catch (ServiceException e) { e.printStackTrace(); logger.error("Producto no encontrado."); throw new ServiceException(PRODUCT_NOT_FOUND); } } }
[ "alejandro.mildiner@gmail.com" ]
alejandro.mildiner@gmail.com
3edcf1549bd4f9368efcc638ddf64e8a8797aaca
374ad03287670140e4a716aa211cdaf60f50c944
/ztr-framework/framework-core/src/main/java/com/travelzen/framework/core/wrapper/Pagination.java
05d8425740810383080c21566fd46b49b4ffd1de
[]
no_license
xxxJppp/firstproj
ca541f8cbe004a557faff577698c0424f1bbd1aa
00dcfbe731644eda62bd2d34d55144a3fb627181
refs/heads/master
2020-07-12T17:00:00.549410
2017-04-17T08:29:58
2017-04-17T08:29:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,835
java
package com.travelzen.framework.core.wrapper; import java.io.Serializable; import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.Set; import org.codehaus.jackson.annotate.JsonIgnore; public class Pagination<T> implements Serializable { private static final long serialVersionUID = 8692496180734037486L; /** 总页数 */ private int totalPageCount; /** 当前页码 */ private int pageNo; /** 页面大小(一页当中的数据条目数量) */ private int pageSize; /** 总数据条目数 */ private int totalItemCount; /** 源数据 */ private Map<String, Object> meta; private Collection<T> data; public Pagination() { this.pageSize = 10; this.pageNo = 1; this.totalPageCount = 1; } public Map<String, Object> getMeta() { return meta; } public void setMeta(Map<String, Object> meta) { this.meta = meta; } public Pagination(int pageNo, int pageSize) { this.pageNo = pageNo;; this.pageSize = pageSize; } public void setTotalItemCount(int itemCount) { this.totalItemCount = itemCount; this.totalPageCount = (itemCount + pageSize - 1) / pageSize; this.totalPageCount = totalPageCount <= 0 ? 1 : totalPageCount; } @JsonIgnore public int getStart() { return pageSize * (pageNo - 1); } public long getTotalPageCount() { return totalPageCount; } public void setTotalPageCount(int totalPageCount) { this.totalPageCount = totalPageCount < 1 ? 1 : totalPageCount; } public int getPageNo() { return pageNo; } public void setPageNo(Integer pageNo) { if (pageNo != null) { this.pageNo = pageNo < 1 ? 1 : pageNo; } } public int getPageSize() { return pageSize; } public void setPageSize(Integer pageSize) { if (pageSize != null) { this.pageSize = pageSize; } } public long getTotalItemCount() { return totalItemCount; } public Collection<T> getData() { return data; } public void setData(Collection<T> data) { this.data = data; } public void addMeta(String key, Object obj) { if (meta == null) { meta = new HashMap<String, Object>(); } meta.put(key, obj); } public Object getMeta(String key) { if (meta == null) { return null; } return meta.get(key); } public Set<String> getMetaKeys() { if (meta == null) { return null; } return meta.keySet(); } public Object removeMeta(String key) { if (meta == null) { return null; } return meta.remove(key); } }
[ "yining.ni@travelzen.com" ]
yining.ni@travelzen.com
a75d9e271519c5e514d79c60c425e0a332fc07e2
a1de9cd2a3dee055e8baaf58515fbbb0b78776e3
/core/cas-server-core-authentication-mfa-api/src/test/java/org/apereo/cas/authentication/mfa/trigger/AdaptiveMultifactorAuthenticationTriggerTests.java
002ea6e3d6c677fd6a034836989ffc5b066d9de7
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-free-unknown" ]
permissive
bhubert/cas
21927acf9a5dd0123314002b7bce78c444bd2823
9d417ab06bd0e6c1e0a93c1d0783fb94e0f0e5a9
refs/heads/master
2023-03-05T09:40:22.302417
2021-02-22T18:08:49
2021-02-22T18:08:49
259,693,459
1
0
Apache-2.0
2020-04-28T16:33:37
2020-04-28T16:33:36
null
UTF-8
Java
false
false
4,413
java
package org.apereo.cas.authentication.mfa.trigger; import org.apereo.cas.authentication.AuthenticationException; import org.apereo.cas.authentication.adaptive.geo.GeoLocationRequest; import org.apereo.cas.authentication.adaptive.geo.GeoLocationResponse; import org.apereo.cas.authentication.principal.Service; import org.apereo.cas.configuration.CasConfigurationProperties; import lombok.val; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; import org.springframework.test.annotation.DirtiesContext; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.*; /** * This is {@link AdaptiveMultifactorAuthenticationTriggerTests}. * * @author Misagh Moayyed * @since 6.1.0 */ @Tag("MFA") @DirtiesContext @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class AdaptiveMultifactorAuthenticationTriggerTests extends BaseMultifactorAuthenticationTriggerTests { @Test @Order(0) @Tag("DisableProviderRegistration") public void verifyNoProviders() { val props = new CasConfigurationProperties(); props.getAuthn().getAdaptive().getPolicy().getRequireMultifactor().put("mfa-dummy", ".+London.+"); val trigger = new AdaptiveMultifactorAuthenticationTrigger(null, props, this.applicationContext); assertThrows(AuthenticationException.class, () -> trigger.isActivated(authentication, registeredService, this.httpRequest, mock(Service.class))); } @Test @Order(1) public void verifyOperationByRequestIP() { val props = new CasConfigurationProperties(); props.getAuthn().getAdaptive().getPolicy().getRequireMultifactor().put("mfa-dummy", "185.86.151.11"); val trigger = new AdaptiveMultifactorAuthenticationTrigger(this.geoLocationService, props, this.applicationContext); val result = trigger.isActivated(authentication, registeredService, this.httpRequest, mock(Service.class)); assertTrue(result.isPresent()); } @Test @Order(2) public void verifyOperationByRequestUserAgent() { val props = new CasConfigurationProperties(); props.getAuthn().getAdaptive().getPolicy().getRequireMultifactor().put("mfa-dummy", "^Mozilla.+"); val trigger = new AdaptiveMultifactorAuthenticationTrigger(this.geoLocationService, props, this.applicationContext); val result = trigger.isActivated(authentication, registeredService, this.httpRequest, mock(Service.class)); assertTrue(result.isPresent()); } @Test @Order(3) public void verifyOperationByRequestGeoLocation() { val props = new CasConfigurationProperties(); props.getAuthn().getAdaptive().getPolicy().getRequireMultifactor().put("mfa-dummy", ".+London.+"); val geoResponse = new GeoLocationResponse(); geoResponse.addAddress("123 Main St London UK"); when(this.geoLocationService.locate(anyString(), any(GeoLocationRequest.class))).thenReturn(geoResponse); val trigger = new AdaptiveMultifactorAuthenticationTrigger(this.geoLocationService, props, this.applicationContext); val result = trigger.isActivated(authentication, registeredService, this.httpRequest, mock(Service.class)); assertTrue(result.isPresent()); } @Test @Order(5) public void verifyMissingProviders() { val props = new CasConfigurationProperties(); props.getAuthn().getAdaptive().getPolicy().getRequireMultifactor().put("mfa-xyz", ".+London.+"); val trigger = new AdaptiveMultifactorAuthenticationTrigger(null, props, this.applicationContext); assertThrows(AuthenticationException.class, () -> trigger.isActivated(authentication, registeredService, this.httpRequest, mock(Service.class))); } @Test @Order(7) public void verifyNoLocation() { val props = new CasConfigurationProperties(); props.getAuthn().getAdaptive().getPolicy().getRequireMultifactor().put("mfa-dummy", ".+London.+"); val trigger = new AdaptiveMultifactorAuthenticationTrigger(this.geoLocationService, props, this.applicationContext); val result = trigger.isActivated(authentication, registeredService, this.httpRequest, mock(Service.class)); assertTrue(result.isEmpty()); } }
[ "mm1844@gmail.com" ]
mm1844@gmail.com
4a370b945b5ac1c83787c088a7b78e57e099b1b8
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/20/20_9e85f473c7c2a167a5aa8b039ac6aa157b02a88b/AbstractEntity/20_9e85f473c7c2a167a5aa8b039ac6aa157b02a88b_AbstractEntity_s.java
1397d526ff742954184df47791f6c24787843d55
[]
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
848
java
package org.einherjer.twitter.tickets.model; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.MappedSuperclass; import lombok.EqualsAndHashCode; import lombok.ToString; import org.springframework.hateoas.Identifiable; import com.fasterxml.jackson.annotation.JsonIgnore; @MappedSuperclass @ToString @EqualsAndHashCode public class AbstractEntity implements Identifiable<Long> { @Id @GeneratedValue(strategy = GenerationType.AUTO) private final Long id = null; //the getter could have been generated with lombok and the @JsonIgnore set on the attribute but that way the @Override of @JsonIgnore in the Attachment doesn't work @JsonIgnore @Override public Long getId() { return id; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
677df32fc37a3a9b43d2c5f9619a7c5623d07103
47a755ab816b2055d116b047b4aeda15bd1f7351
/build-logic/src/main/java/com/sun/apache/xml/internal/resolver/tools/ResolvingXMLReader.java
8c37a3222e006a60cf7b0d7674e6dda7fc1b2e6b
[]
no_license
MikeAndrson/kotlinc-android
4548581c7972b13b45dff4ccdd11747581349ded
ebc9b1d78bbd97083e860a1e8887b25469a13ecf
refs/heads/master
2023-08-20T05:17:30.605126
2021-10-04T16:06:46
2021-10-04T16:06:46
413,486,864
25
12
null
null
null
null
UTF-8
Java
false
false
3,163
java
/* * reserved comment block * DO NOT REMOVE OR ALTER! */ // ResolvingXMLReader.java - An XMLReader that performs catalog resolution /* * Copyright 2001-2004 The Apache Software Foundation or its licensors, * as applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.sun.apache.xml.internal.resolver.tools; import org.openjdk.javax.xml.parsers.*; import com.sun.apache.xerces.internal.jaxp.SAXParserFactoryImpl; import com.sun.apache.xml.internal.resolver.CatalogManager; import com.sun.org.apache.xml.internal.resolver.*; /** * A SAX XMLReader that performs catalog-based entity resolution. * * <p>This class implements a SAX XMLReader that performs entity resolution * using the CatalogResolver. The actual, underlying parser is obtained * from a SAXParserFactory.</p> * </p> * * @see CatalogResolver * @see org.xml.sax.XMLReader * * @author Norman Walsh * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a> * * @version 1.0 */ public class ResolvingXMLReader extends ResolvingXMLFilter { /** Make the parser Namespace aware? */ public static boolean namespaceAware = true; /** Make the parser validating? */ public static boolean validating = false; /** * Construct a new reader from the JAXP factory. * * <p>In order to do its job, a ResolvingXMLReader must in fact be * a filter. So the only difference between this code and the filter * code is that the constructor builds a new reader.</p> */ public ResolvingXMLReader() { super(); SAXParserFactory spf = catalogManager.useServicesMechanism() ? SAXParserFactory.newInstance() : new SAXParserFactoryImpl(); spf.setNamespaceAware(namespaceAware); spf.setValidating(validating); try { SAXParser parser = spf.newSAXParser(); setParent(parser.getXMLReader()); } catch (Exception ex) { ex.printStackTrace(); } } /** * Construct a new reader from the JAXP factory. * * <p>In order to do its job, a ResolvingXMLReader must in fact be * a filter. So the only difference between this code and the filter * code is that the constructor builds a new reader.</p> */ public ResolvingXMLReader(CatalogManager manager) { super(manager); SAXParserFactory spf = catalogManager.useServicesMechanism() ? SAXParserFactory.newInstance() : new SAXParserFactoryImpl(); spf.setNamespaceAware(namespaceAware); spf.setValidating(validating); try { SAXParser parser = spf.newSAXParser(); setParent(parser.getXMLReader()); } catch (Exception ex) { ex.printStackTrace(); } } }
[ "heystudiosofficial@gmail.com" ]
heystudiosofficial@gmail.com
fa5548b6242a7f05d96046cd891a25acf5537868
7c377882e4789809de9a72dd54c2b0581c418474
/roncoo-education-util/src/main/java/com/roncoo/education/util/enums/NavEnum.java
264a120a195e30ad6b245c946dddd62bdd8ab49e
[ "MIT" ]
permissive
husend/roncoo-education
bcc06f177f0d369507de19e342855fb1248ffcd4
8a5ecc3a61bf8c5c0cfc641b4dc76532f77f23e4
refs/heads/master
2022-09-10T14:11:16.542139
2019-11-07T10:27:14
2019-11-07T10:27:14
220,208,745
0
0
MIT
2022-06-17T02:37:16
2019-11-07T10:19:18
Java
UTF-8
Java
false
false
367
java
/** * Copyright 2015-2017 广州市领课网络科技有限公司 */ package com.roncoo.education.util.enums; import lombok.AllArgsConstructor; import lombok.Getter; @Getter @AllArgsConstructor public enum NavEnum { INDEX("/index", "首页"), COURSE("/list", "录播中心"), RECRUIT("/recruit", "讲师招募"); private String code; private String desc; }
[ "1175674846@qq.com" ]
1175674846@qq.com
4a19ec358f0fd2526c2207996685e5f002752e0e
50bc891c8b464e71b357a8624861731de1e54354
/src/main/java/com/diyiliu/web/grain/facade/StockJpa.java
3a74ebe237fb31f0dabfabb6dc71171bc7aea48a
[]
no_license
diyiliu/dyl-admin-v3
55637d7d860895c37564aafdca8e8c5a4a281e8b
6dd05bdde35aeca60340e2a3c8e28e89c3ee78f1
refs/heads/master
2021-08-08T17:47:46.828602
2018-07-21T03:57:05
2018-07-21T03:57:05
131,172,895
0
0
null
null
null
null
UTF-8
Java
false
false
772
java
package com.diyiliu.web.grain.facade; import com.diyiliu.web.grain.dto.Stock; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; import java.util.List; /** * Description: StockJpa * Author: DIYILIU * Update: 2018-05-21 21:33 */ public interface StockJpa extends JpaRepository<Stock, Long>, JpaSpecificationExecutor<Stock> { Stock findById(long id); void deleteByIdIn(List<Long> ids); @Query(value = "select sum(suttle), sum(money) from grain_stock", nativeQuery = true) List selectSum(); @Query(value = "select sum(money) from grain_stock where status=0", nativeQuery = true) Double selectDebt(); }
[ "572772828@qq.com" ]
572772828@qq.com
f9a94b533fe5d243c800692eaf1b67cec4061e92
e0276b8ecd4039b6c36c54b14349e18e86698291
/app/src/main/java/com/example/administrator/weiraoeducationinstitution/bean/manage/RepairOneBean.java
9a14de2a9bfcbb0b5a90729fc7f95c8891f82f06
[]
no_license
Yangyuyangyu/WREInstitutionFirstEdition
62c285b7f49aced36620c79ff8a849a34b0be455
2c52314e6d314f37a295c1f662c5fcb963f135f7
refs/heads/master
2020-01-23T21:56:06.411238
2016-11-25T05:44:02
2016-11-25T05:44:02
74,729,004
0
0
null
null
null
null
UTF-8
Java
false
false
1,824
java
package com.example.administrator.weiraoeducationinstitution.bean.manage; /** * Created by Administrator on 2016/5/17. */ public class RepairOneBean { // "id": "2", // "user_name": "李四", // "subject": "科目A", // "instrument": "双方的首发", // "remark": "斯蒂芬斯蒂芬斯蒂芬", // "group": "10" private String id; private String user_name; private String subject; private String instrument; private String remark; private String group; private String time; private String course; public String getCourse() { return course; } public void setCourse(String course) { this.course = course; } public String getTime() { return time; } public void setTime(String time) { this.time = time; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUser_name() { return user_name; } public void setUser_name(String user_name) { this.user_name = user_name; } public String getSubject() { return subject; } public void setSubject(String subject) { this.subject = subject; } public String getInstrument() { return instrument; } public void setInstrument(String instrument) { this.instrument = instrument; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getGroup() { return group; } public void setGroup(String group) { this.group = group; } }
[ "394975750@qq.com" ]
394975750@qq.com
100206d043947e88ffff975f1b333fb6ef1af70b
0cdc82a33683281002122944d7f4567d413b05fe
/hsweb-core/src/main/java/org/hswebframework/web/dict/defaults/DefaultDictDefineRepository.java
9478a06400550c047506f524fbdf0a7df26a5a7b
[ "Apache-2.0" ]
permissive
calligonum/hsweb-framework
0d13ca2bafb5a3479bc608d86b85f4c339f50079
3c4e57b428aa5ae35b18c1a25e654e6c4d8e133a
refs/heads/master
2021-05-09T13:13:20.320530
2018-01-26T08:54:20
2018-01-26T08:54:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,368
java
package org.hswebframework.web.dict.defaults; import org.hswebframework.web.dict.*; import java.lang.reflect.Field; import java.util.*; import java.util.stream.Collectors; /** * @author zhouhao * @since 3.0 */ public class DefaultDictDefineRepository implements DictDefineRepository { protected Map<String, DictDefine> parsedDict = new HashMap<>(); public void registerDefine(DictDefine define) { parsedDict.put(define.getId(), define); } @Override public DictDefine getDefine(String id) { return parsedDict.get(id); } private List<Field> parseField(Class type) { if (type == Object.class) { return Collections.emptyList(); } List<Field> lst = new ArrayList<>(); lst.addAll(Arrays.asList(type.getDeclaredFields())); lst.addAll(parseField(type.getSuperclass())); return lst; } @Override public List<ClassDictDefine> getDefine(Class type) { return this.parseDefine(type); } protected List<ClassDictDefine> parseDefine(Class type) { List<ClassDictDefine> defines = new ArrayList<>(); for (Field field : parseField(type)) { Dict dict = field.getAnnotation(Dict.class); if (dict == null) { continue; } String id = dict.id(); DictDefine dictDefine = getDefine(id); if (dictDefine instanceof ClassDictDefine) { defines.add(((ClassDictDefine) dictDefine)); } else { DefaultClassDictDefine define; if (dictDefine != null) { List<ItemDefine> items = dictDefine.getItems() .stream() .map(item -> DefaultItemDefine.builder() .text(item.getText()) .value(item.getValue()) .comments(String.join(",", item.getComments())) .build()) .collect(Collectors.toList()); define = DefaultClassDictDefine.builder() .id(id) .alias(dictDefine.getAlias()) .comments(dictDefine.getComments()) .field(field.getName()) .items(items) .build(); } else { List<ItemDefine> items = Arrays .stream(dict.items()) .map(item -> DefaultItemDefine.builder() .text(item.text()) .value(item.value()) .comments(String.join(",", item.comments())) .build()).collect(Collectors.toList()); define = DefaultClassDictDefine.builder() .id(id) .alias(dict.alias()) .comments(dict.comments()) .field(field.getName()) .items(items) .build(); } defines.add(define); } } return defines; } }
[ "zh.sqy@qq.com" ]
zh.sqy@qq.com
ce94daeeb7f420cd97d86937b6b0befdd71648ae
5bb4a4b0364ec05ffb422d8b2e76374e81c8c979
/sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/PublicIPAddressesImpl.java
186d8375f52a3b7bc948e6be6e68c4658da36766
[ "MIT", "LicenseRef-scancode-generic-cla", "BSD-3-Clause", "LicenseRef-scancode-warranty-disclaimer", "LGPL-2.1-or-later", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
FabianMeiswinkel/azure-sdk-for-java
bd14579af2f7bc63e5c27c319e2653db990056f1
41d99a9945a527b6d3cc7e1366e1d9696941dbe3
refs/heads/main
2023-08-04T20:38:27.012783
2020-07-15T21:56:57
2020-07-15T21:56:57
251,590,939
3
1
MIT
2023-09-02T00:50:23
2020-03-31T12:05:12
Java
UTF-8
Java
false
false
7,847
java
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * def */ package com.microsoft.azure.management.network.v2019_07_01.implementation; import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; import com.microsoft.azure.management.network.v2019_07_01.PublicIPAddresses; import com.microsoft.azure.management.network.v2019_07_01.PublicIPAddress; import rx.Observable; import rx.Completable; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import com.microsoft.azure.arm.resources.ResourceUtilsCore; import com.microsoft.azure.arm.utils.RXMapper; import rx.functions.Func1; import com.microsoft.azure.PagedList; import com.microsoft.azure.Page; class PublicIPAddressesImpl extends GroupableResourcesCoreImpl<PublicIPAddress, PublicIPAddressImpl, PublicIPAddressInner, PublicIPAddressesInner, NetworkManager> implements PublicIPAddresses { protected PublicIPAddressesImpl(NetworkManager manager) { super(manager.inner().publicIPAddresses(), manager); } @Override protected Observable<PublicIPAddressInner> getInnerAsync(String resourceGroupName, String name) { PublicIPAddressesInner client = this.inner(); return client.getByResourceGroupAsync(resourceGroupName, name); } @Override protected Completable deleteInnerAsync(String resourceGroupName, String name) { PublicIPAddressesInner client = this.inner(); return client.deleteAsync(resourceGroupName, name).toCompletable(); } @Override public Observable<String> deleteByIdsAsync(Collection<String> ids) { if (ids == null || ids.isEmpty()) { return Observable.empty(); } Collection<Observable<String>> observables = new ArrayList<>(); for (String id : ids) { final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); final String name = ResourceUtilsCore.nameFromResourceId(id); Observable<String> o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); observables.add(o); } return Observable.mergeDelayError(observables); } @Override public Observable<String> deleteByIdsAsync(String...ids) { return this.deleteByIdsAsync(new ArrayList<String>(Arrays.asList(ids))); } @Override public void deleteByIds(Collection<String> ids) { if (ids != null && !ids.isEmpty()) { this.deleteByIdsAsync(ids).toBlocking().last(); } } @Override public void deleteByIds(String...ids) { this.deleteByIds(new ArrayList<String>(Arrays.asList(ids))); } @Override public PagedList<PublicIPAddress> listByResourceGroup(String resourceGroupName) { PublicIPAddressesInner client = this.inner(); return this.wrapList(client.listByResourceGroup(resourceGroupName)); } @Override public Observable<PublicIPAddress> listByResourceGroupAsync(String resourceGroupName) { PublicIPAddressesInner client = this.inner(); return client.listByResourceGroupAsync(resourceGroupName) .flatMapIterable(new Func1<Page<PublicIPAddressInner>, Iterable<PublicIPAddressInner>>() { @Override public Iterable<PublicIPAddressInner> call(Page<PublicIPAddressInner> page) { return page.items(); } }) .map(new Func1<PublicIPAddressInner, PublicIPAddress>() { @Override public PublicIPAddress call(PublicIPAddressInner inner) { return wrapModel(inner); } }); } @Override public PagedList<PublicIPAddress> list() { PublicIPAddressesInner client = this.inner(); return this.wrapList(client.list()); } @Override public Observable<PublicIPAddress> listAsync() { PublicIPAddressesInner client = this.inner(); return client.listAsync() .flatMapIterable(new Func1<Page<PublicIPAddressInner>, Iterable<PublicIPAddressInner>>() { @Override public Iterable<PublicIPAddressInner> call(Page<PublicIPAddressInner> page) { return page.items(); } }) .map(new Func1<PublicIPAddressInner, PublicIPAddress>() { @Override public PublicIPAddress call(PublicIPAddressInner inner) { return wrapModel(inner); } }); } @Override public PublicIPAddressImpl define(String name) { return wrapModel(name); } @Override public Observable<PublicIPAddress> listVirtualMachineScaleSetPublicIPAddressesAsync(final String resourceGroupName, final String virtualMachineScaleSetName) { PublicIPAddressesInner client = this.inner(); return client.listVirtualMachineScaleSetPublicIPAddressesAsync(resourceGroupName, virtualMachineScaleSetName) .flatMapIterable(new Func1<Page<PublicIPAddressInner>, Iterable<PublicIPAddressInner>>() { @Override public Iterable<PublicIPAddressInner> call(Page<PublicIPAddressInner> page) { return page.items(); } }) .map(new Func1<PublicIPAddressInner, PublicIPAddress>() { @Override public PublicIPAddress call(PublicIPAddressInner inner) { return new PublicIPAddressImpl(inner.name(), inner, manager()); } }); } @Override public Observable<PublicIPAddress> listVirtualMachineScaleSetVMPublicIPAddressesAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String ipConfigurationName) { PublicIPAddressesInner client = this.inner(); return client.listVirtualMachineScaleSetVMPublicIPAddressesAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName) .flatMapIterable(new Func1<Page<PublicIPAddressInner>, Iterable<PublicIPAddressInner>>() { @Override public Iterable<PublicIPAddressInner> call(Page<PublicIPAddressInner> page) { return page.items(); } }) .map(new Func1<PublicIPAddressInner, PublicIPAddress>() { @Override public PublicIPAddress call(PublicIPAddressInner inner) { return new PublicIPAddressImpl(inner.name(), inner, manager()); } }); } @Override public Observable<PublicIPAddress> getVirtualMachineScaleSetPublicIPAddressAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String publicIpAddressName) { PublicIPAddressesInner client = this.inner(); return client.getVirtualMachineScaleSetPublicIPAddressAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, publicIpAddressName) .map(new Func1<PublicIPAddressInner, PublicIPAddress>() { @Override public PublicIPAddress call(PublicIPAddressInner inner) { return new PublicIPAddressImpl(inner.name(), inner, manager()); } }); } @Override protected PublicIPAddressImpl wrapModel(PublicIPAddressInner inner) { return new PublicIPAddressImpl(inner.name(), inner, manager()); } @Override protected PublicIPAddressImpl wrapModel(String name) { return new PublicIPAddressImpl(name, new PublicIPAddressInner(), this.manager()); } }
[ "yaozheng@microsoft.com" ]
yaozheng@microsoft.com
f3459c0d19e160ad05e04e611d30cdb214768733
0e55a1aff4e191ffdd4a15217fbb878a6625c802
/src/test/java/selenium/locators/LocatorXPath.java
db8873e8086907b8f75ad1fd4f2d5d278f769084
[]
no_license
ridvanceko/Java-All-Folders
0ca38d4f7038090edd4be4c0128f91582de19eff
09f28bddca087e31e2f6f032b6d5a1f2a02aac12
refs/heads/main
2023-03-10T01:47:01.876335
2021-02-28T19:22:34
2021-02-28T19:22:34
325,149,426
0
0
null
null
null
null
UTF-8
Java
false
false
1,047
java
package test.java.selenium.locators; import org.junit.Assert; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; public class LocatorXPath { @Test public void absoluteXpath() { //provide chrome drier location System.setProperty("webdriver.chrome.driver", "resources/chromedriver.exe"); // instantiate chrome browser object WebDriver driver = new ChromeDriver(); // navigate to website driver.get("http://the-internet.herokuapp.com/"); WebElement horizontalSliderLink = driver.findElement(By.linkText("Horizontal Slider")); horizontalSliderLink.click(); WebElement header = driver.findElement(By.xpath("/html/body/div[2]/div/div/h3")); System.out.println(header.getText()); Assert.assertEquals("Ceko", "Ridvan"); Assert.assertEquals("Ceko", "Ceko"); //Assert is import from JUnit library } }
[ "ridvanceko@gmail.com" ]
ridvanceko@gmail.com
3710797ed716e21ef2b71857e1b97417de8505bf
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/naver--pinpoint/d340453b4a6bf169b4e5af27ec03fa77871f53c1/before/SlowRateToCalleCheckerTest.java
49dd9b3067941cace7aaf306e4c98044a8fbba47
[]
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
5,569
java
/* * Copyright 2014 NAVER Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.navercorp.pinpoint.web.alarm.checker; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.junit.BeforeClass; import org.junit.Test; import com.navercorp.pinpoint.common.ServiceType; import com.navercorp.pinpoint.web.alarm.CheckerCategory; import com.navercorp.pinpoint.web.alarm.DataCollectorFactory.DataCollectorCategory; import com.navercorp.pinpoint.web.alarm.checker.SlowRateToCalleChecker; import com.navercorp.pinpoint.web.alarm.collector.MapStatisticsCallerDataCollector; import com.navercorp.pinpoint.web.alarm.vo.Rule; import com.navercorp.pinpoint.web.applicationmap.histogram.TimeHistogram; import com.navercorp.pinpoint.web.applicationmap.rawdata.LinkCallDataMap; import com.navercorp.pinpoint.web.applicationmap.rawdata.LinkData; import com.navercorp.pinpoint.web.applicationmap.rawdata.LinkDataMap; import com.navercorp.pinpoint.web.dao.MapStatisticsCallerDao; import com.navercorp.pinpoint.web.vo.Application; import com.navercorp.pinpoint.web.vo.Range; public class SlowRateToCalleCheckerTest { private static final String FROM_SERVICE_NAME = "from_local_service"; private static final String TO_SERVICE_NAME = "to_local_service"; public static MapStatisticsCallerDao dao; @BeforeClass public static void before() { dao = new MapStatisticsCallerDao() { @Override public List<LinkDataMap> selectCallerStatistics(Application callerApplication, Application calleeApplication, Range range) { return null; } @Override public LinkDataMap selectCaller(Application callerApplication, Range range) { long timeStamp = 1409814914298L; LinkDataMap linkDataMap = new LinkDataMap(); Application fromApplication = new Application(FROM_SERVICE_NAME, ServiceType.STAND_ALONE); for (int i = 1 ; i < 6 ; i++) { LinkCallDataMap linkCallDataMap = new LinkCallDataMap(); Application toApplication = new Application(TO_SERVICE_NAME + i, ServiceType.STAND_ALONE); Collection<TimeHistogram> timeHistogramList = new ArrayList<TimeHistogram>(); for (int j = 1 ; j < 11 ; j++) { TimeHistogram timeHistogram = new TimeHistogram(ServiceType.STAND_ALONE, timeStamp); timeHistogram.addCallCountByElapsedTime(i * j * 1000); timeHistogramList.add(timeHistogram); } linkCallDataMap.addCallData(fromApplication.getName(), fromApplication.getServiceTypeCode(), toApplication.getName(), toApplication.getServiceTypeCode(), timeHistogramList); LinkData linkData = new LinkData(fromApplication, toApplication, linkCallDataMap); linkDataMap.addLinkData(linkData); } return linkDataMap; } }; } @Test public void checkTest() { Application application = new Application(FROM_SERVICE_NAME, ServiceType.STAND_ALONE); MapStatisticsCallerDataCollector dataCollector = new MapStatisticsCallerDataCollector(DataCollectorCategory.CALLER_STAT, application, dao, System.currentTimeMillis(), 300000); Rule rule = new Rule(FROM_SERVICE_NAME, CheckerCategory.SLOW_RATE_TO_CALLE.getName(), 70, "testGroup", false, false, TO_SERVICE_NAME + 1); SlowRateToCalleChecker checker = new SlowRateToCalleChecker(dataCollector, rule); checker.check(); assertTrue(checker.isDetected()); } @Test public void checkTest2() { Application application = new Application(FROM_SERVICE_NAME, ServiceType.STAND_ALONE); MapStatisticsCallerDataCollector dataCollector = new MapStatisticsCallerDataCollector(DataCollectorCategory.CALLER_STAT, application, dao, System.currentTimeMillis(), 300000); Rule rule = new Rule(FROM_SERVICE_NAME, CheckerCategory.SLOW_RATE_TO_CALLE.getName(), 71, "testGroup", false, false, TO_SERVICE_NAME + 1); SlowRateToCalleChecker checker = new SlowRateToCalleChecker(dataCollector, rule); checker.check(); assertFalse(checker.isDetected()); } @Test public void checkTest3() { Application application = new Application(FROM_SERVICE_NAME, ServiceType.STAND_ALONE); MapStatisticsCallerDataCollector dataCollector = new MapStatisticsCallerDataCollector(DataCollectorCategory.CALLER_STAT, application, dao, System.currentTimeMillis(), 300000); Rule rule = new Rule(FROM_SERVICE_NAME, CheckerCategory.SLOW_RATE_TO_CALLE.getName(), 90, "testGroup", false, false, TO_SERVICE_NAME + 2); SlowRateToCalleChecker checker = new SlowRateToCalleChecker(dataCollector, rule); checker.check(); assertTrue(checker.isDetected()); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
f7b6579952e1563cacc10ad1d64c0d3abb8c0820
9a6ea6087367965359d644665b8d244982d1b8b6
/src/main/java/X/AbstractC43741ys.java
e664b3e97a94840cc1236a394b7d62156c305036
[]
no_license
technocode/com.wa_2.21.2
a3dd842758ff54f207f1640531374d3da132b1d2
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
refs/heads/master
2023-02-12T11:20:28.666116
2021-01-14T10:22:21
2021-01-14T10:22:21
329,578,591
2
1
null
null
null
null
UTF-8
Java
false
false
7,606
java
package X; import android.database.Cursor; import android.text.TextUtils; import android.util.Pair; import androidx.core.view.inputmethod.EditorInfoCompat; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Random; import java.util.Set; /* renamed from: X.1ys reason: invalid class name and case insensitive filesystem */ public abstract class AbstractC43741ys extends AnonymousClass0PN { public Map A00; public Set A01; public final AnonymousClass009 A02; public final AnonymousClass2LJ A03; public final Random A04 = new Random(); public AbstractC43741ys(AnonymousClass0PQ r3) { super("message_main_verification", EditorInfoCompat.IME_FLAG_FORCE_ASCII, r3); this.A02 = r3.A01; this.A03 = new AnonymousClass2LJ(); this.A00 = new HashMap(); RunnableEBaseShape9S0100000_I1_4 runnableEBaseShape9S0100000_I1_4 = new RunnableEBaseShape9S0100000_I1_4(this, 27); List list = super.A00; if (list == null) { list = new ArrayList(); super.A00 = list; } list.add(runnableEBaseShape9S0100000_I1_4); } @Override // X.AnonymousClass0PN public Pair A07(Cursor cursor) { int i; A0S(); long j = -1; int i2 = 0; while (cursor.moveToNext()) { j = cursor.getLong(cursor.getColumnIndexOrThrow("_id")); i2++; String A0P = A0P(cursor); if (!TextUtils.isEmpty(A0P)) { Set set = this.A01; if (set == null) { set = new HashSet(); this.A01 = set; } String valueOf = String.valueOf(j); set.add(valueOf); Set set2 = this.A01; if (set2 != null) { i = set2.size(); } else { i = 0; } this.A00.put(valueOf, A0P); if (i >= 50) { A0R(); } } } Set set3 = this.A01; if (set3 != null && !set3.isEmpty()) { String join = TextUtils.join(",", this.A01); if (!TextUtils.isEmpty(join)) { this.A06.A05("message_main_verification_failed_message_ids", join); } } return new Pair(Long.valueOf(j), Integer.valueOf(i2)); } @Override // X.AnonymousClass0PN public void A0C() { super.A0C(); this.A06.A04("message_main_verification_start_index", ((AnonymousClass27y) this).A04.A04()); } @Override // X.AnonymousClass0PN public void A0D() { super.A0D(); A0Q(); } /* JADX WARNING: Code restructure failed: missing block: B:154:0x0284, code lost: r0 = move-exception; */ /* JADX WARNING: Code restructure failed: missing block: B:155:0x0285, code lost: if (r6 != null) goto L_0x0287; */ /* JADX WARNING: Code restructure failed: missing block: B:157:?, code lost: r6.close(); */ /* JADX WARNING: Code restructure failed: missing block: B:158:0x028a, code lost: throw r0; */ /* JADX WARNING: Code restructure failed: missing block: B:163:0x028d, code lost: r0 = move-exception; */ /* JADX WARNING: Code restructure failed: missing block: B:165:?, code lost: r5.close(); */ /* JADX WARNING: Code restructure failed: missing block: B:166:0x0291, code lost: throw r0; */ /* JADX WARNING: Code restructure failed: missing block: B:25:0x007e, code lost: if (r0 != false) goto L_0x0080; */ /* JADX WARNING: Code restructure failed: missing block: B:50:0x00f5, code lost: r0 = move-exception; */ /* JADX WARNING: Code restructure failed: missing block: B:51:0x00f6, code lost: if (r5 != null) goto L_0x00f8; */ /* JADX WARNING: Code restructure failed: missing block: B:53:?, code lost: r5.close(); */ /* JADX WARNING: Code restructure failed: missing block: B:54:0x00fb, code lost: throw r0; */ /* JADX WARNING: Code restructure failed: missing block: B:59:0x00fe, code lost: r0 = move-exception; */ /* JADX WARNING: Code restructure failed: missing block: B:61:?, code lost: r6.close(); */ /* JADX WARNING: Code restructure failed: missing block: B:62:0x0102, code lost: throw r0; */ /* JADX WARNING: Removed duplicated region for block: B:132:0x022f A[SYNTHETIC, Splitter:B:132:0x022f] */ /* Code decompiled incorrectly, please refer to instructions dump. */ public java.lang.String A0P(android.database.Cursor r21) { /* // Method dump skipped, instructions count: 783 */ throw new UnsupportedOperationException("Method not decompiled: X.AbstractC43741ys.A0P(android.database.Cursor):java.lang.String"); } /* JADX WARNING: Code restructure failed: missing block: B:10:?, code lost: r2.close(); */ /* JADX WARNING: Code restructure failed: missing block: B:11:0x001f, code lost: throw r0; */ /* JADX WARNING: Code restructure failed: missing block: B:8:0x001b, code lost: r0 = move-exception; */ /* Code decompiled incorrectly, please refer to instructions dump. */ public final void A0Q() { /* r3 = this; r0 = 0 r3.A01 = r0 java.util.Map r0 = r3.A00 r0.clear() X.08d r0 = r3.A05 X.0OQ r2 = r0.A04() X.08m r1 = r3.A06 // Catch:{ all -> 0x0019 } java.lang.String r0 = "message_main_verification_failed_message_ids" r1.A02(r0) r2.close() return L_0x0019: r0 = move-exception throw r0 // Catch:{ all -> 0x001b } L_0x001b: r0 = move-exception r2.close() // Catch:{ all -> 0x001f } L_0x001f: throw r0 */ throw new UnsupportedOperationException("Method not decompiled: X.AbstractC43741ys.A0Q():void"); } /* JADX WARNING: Code restructure failed: missing block: B:23:0x0073, code lost: r0 = move-exception; */ /* JADX WARNING: Code restructure failed: missing block: B:24:0x0074, code lost: if (r2 != null) goto L_0x0076; */ /* JADX WARNING: Code restructure failed: missing block: B:26:?, code lost: r2.close(); */ /* JADX WARNING: Code restructure failed: missing block: B:27:0x0079, code lost: throw r0; */ /* JADX WARNING: Code restructure failed: missing block: B:51:0x00f0, code lost: r0 = move-exception; */ /* JADX WARNING: Code restructure failed: missing block: B:53:?, code lost: r3.close(); */ /* JADX WARNING: Code restructure failed: missing block: B:54:0x00f4, code lost: throw r0; */ /* Code decompiled incorrectly, please refer to instructions dump. */ public final void A0R() { /* // Method dump skipped, instructions count: 245 */ throw new UnsupportedOperationException("Method not decompiled: X.AbstractC43741ys.A0R():void"); } public final void A0S() { String A012 = this.A06.A01("message_main_verification_failed_message_ids"); if (A012 != null) { this.A01 = new HashSet(Arrays.asList(A012.split(","))); } } }
[ "madeinborneo@gmail.com" ]
madeinborneo@gmail.com
7672849681ece86e42c9cf3489f31fdac4792f7e
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project289/src/main/java/org/gradle/test/performance/largejavamultiproject/project289/p1449/Production28983.java
763fddb812465951dc7e823ec72ba071975fe5c2
[]
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
1,971
java
package org.gradle.test.performance.largejavamultiproject.project289.p1449; public class Production28983 { private Production28980 property0; public Production28980 getProperty0() { return property0; } public void setProperty0(Production28980 value) { property0 = value; } private Production28981 property1; public Production28981 getProperty1() { return property1; } public void setProperty1(Production28981 value) { property1 = value; } private Production28982 property2; public Production28982 getProperty2() { return property2; } public void setProperty2(Production28982 value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
d1284575e147a234ddf4ca92f8e44f886410cd0d
26f522cf638887c35dd0de87bddf443d63640402
/src/main/java/com/cczu/thirdapi/andmu/util/AndmuHttpClient.java
3f9555c3acfa9bad4c58377b4eb3986888323d26
[]
no_license
wuyufei2019/JSLYG
4861ae1b78c1a5d311f45e3ee708e52a0b955838
93c4f8da81cecb7b71c2d47951a829dbf37c9bcc
refs/heads/master
2022-12-25T06:01:07.872153
2019-11-20T03:10:18
2019-11-20T03:10:18
222,839,794
0
0
null
2022-12-16T05:03:09
2019-11-20T03:08:29
JavaScript
UTF-8
Java
false
false
5,498
java
package com.cczu.thirdapi.andmu.util; import com.alibaba.fastjson.JSON; import com.cczu.sys.comm.utils.Global; import com.cczu.sys.comm.utils.StringUtils; import com.cczu.thirdapi.andmu.AndmuToken; import com.google.common.collect.Maps; import org.apache.commons.codec.binary.Hex; import org.apache.commons.io.IOUtils; import org.slf4j.LoggerFactory; import org.slf4j.Logger; import java.io.*; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Date; import java.util.Map; public class AndmuHttpClient { private static Logger logger = LoggerFactory.getLogger(AndmuHttpClient.class); private final static String appid = Global.getConfig("andmu-appId"); private final static String andmuRSA = Global.getConfig("andmu-RSA"); private final static String version = Global.getConfig("andmu-interface-version"); public static String doPost(String httpUrl, String body, String token) { HttpURLConnection connection = null; InputStream is = null; OutputStream os = null; BufferedReader br = null; String result = null; Map map = Maps.newHashMap(); try { URL url = new URL(httpUrl); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setConnectTimeout(15000); // 设置读取主机服务器返回数据超时时间:60000毫秒 connection.setReadTimeout(60000); // 默认值为:false,当向远程服务器传送数据/写数据时,需要设置为true connection.setDoOutput(true); connection.setRequestProperty("content-type", "application/json"); connection.setRequestProperty("appid", appid); map.put("appid", appid); String md5 = SecretUtil.md5(body); connection.setRequestProperty("md5", md5); map.put("md5", md5); String time = new Date().getTime() + ""; connection.setRequestProperty("timestamp", time); map.put("timestamp", time); connection.setRequestProperty("version", version); map.put("version", version); if (StringUtils.isNotBlank(token)) { connection.setRequestProperty("token", token); map.put("token", token); } String signature = SecretUtil.rsaSign(JSON.toJSONString(map), andmuRSA); connection.setRequestProperty("signature", signature); // 通过连接对象获取一个输出流 os = connection.getOutputStream(); // 通过输出流对象将参数写出去/传输出去,它是通过字节数组写出的 os.write(body.getBytes()); // 通过连接对象获取一个输入流,向远程读取 is = connection.getInputStream(); // 对输入流对象进行包装:charset根据工作项目组的要求来设置 br = new BufferedReader(new InputStreamReader(is, "UTF-8")); StringBuffer sbf = new StringBuffer(); String temp = null; // 循环遍历一行一行读取数据 while ((temp = br.readLine()) != null) { sbf.append(temp); } result = sbf.toString(); logger.info(result); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { IOUtils.closeQuietly(br); IOUtils.closeQuietly(os); IOUtils.closeQuietly(is); IOUtils.close(connection); } return result; } public static void main(String[] args) { String token = AndmuToken.getInstance().getToken(); System.out.println(token); String andmuAppId = Global.getConfig("andmu-appId"); String andmuRSA = Global.getConfig("andmu-RSA"); String andmuAppkey = Global.getConfig("andmu-appkey"); String andmuSecret = Global.getConfig("andmu-secret"); String andmuSig = null; try { andmuSig = Hex.encodeHexString(MessageDigest.getInstance("MD5"). digest((andmuAppkey + andmuSecret).getBytes("utf-8"))); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } Map map = Maps.newHashMap(); map.put("appKey", andmuAppkey); map.put("sig", andmuSig); System.out.println(JSON.toJSONString(map)); String md5 = null; try { md5 = Hex.encodeHexString(MessageDigest.getInstance("MD5").digest(JSON.toJSONString(map) .getBytes("utf-8"))); } catch (Exception e) { e.printStackTrace(); } Map map2 = Maps.newHashMap(); map2.put("appid", andmuAppId); map2.put("md5", md5); String time = new Date().getTime() + ""; map2.put("timestamp", "1558575845839"); String version = "1.0.0"; map2.put("version", version); String json = JSON.toJSONString(map2); System.out.println(json); String rsa = SecretUtil.rsaSign(json, andmuRSA); System.out.println(rsa); } }
[ "wuyufei2019@sina.com" ]
wuyufei2019@sina.com
cc3ea57f6e4a2c06c0008cf11e601af87815306b
cf3c68154f147a03a48e7a8339f328cae8896b09
/app/src/main/java/com/hills/mcs_02/viewsadapters/AdapterRecyclerViewPublishedTaskDetail.java
00719f0c611dc42ddca78e7a7334ecaffee81fef
[ "Apache-2.0" ]
permissive
Alozavander/CrowdOS_WeSense_CompetitionVersion
5e8f592e081b198bea7e698d8eb60b025cffc213
bdb69a500df391400fc403898fb05f690c209b2a
refs/heads/master
2023-06-03T16:21:18.598674
2021-06-22T02:15:40
2021-06-22T02:15:40
371,559,458
0
0
null
null
null
null
UTF-8
Java
false
false
6,369
java
package com.hills.mcs_02.viewsadapters; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; import com.hills.mcs_02.R; import com.hills.mcs_02.dataBeans.BeanUserTaskWithUser; import com.hills.mcs_02.fragmentspack.MCSRecyclerItemClickListener; import java.io.File; import java.util.List; public class AdapterRecyclerViewPublishedTaskDetail extends RecyclerView.Adapter<RecyclerView.ViewHolder> { private final static String TAG = "Adapter_RecyclerView_remind"; private List<BeanUserTaskWithUser> mBeanUserTaskWithUser; private LayoutInflater mInflater; private Context mContext; private MCSRecyclerItemClickListener mListener; public AdapterRecyclerViewPublishedTaskDetail(Context context, List<BeanUserTaskWithUser> list) { mBeanUserTaskWithUser = list; mContext = context; mInflater = LayoutInflater.from(context); } @Override public long getItemId(int position) { return position; } @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) { View view; if (viewType == 1) { view = mInflater.inflate(R.layout.listview_item_published_taskdetail, viewGroup, false); return new publishedTaskDetailViewHolder(view, mListener); } else { Log.i(TAG, "viewType返回值出错"); //Toast.makeText(mConetxt,"viewType返回值出错",Toast.LENGTH_SHORT).show(); return null; } } @Override public int getItemViewType(int position) { if (mBeanUserTaskWithUser.size() <= 0) { return -1; } else { return 1; } } @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, final int POSITION) { if (viewHolder instanceof publishedTaskDetailViewHolder) { publishedTaskDetailViewHolder holder = (publishedTaskDetailViewHolder) viewHolder; BeanUserTaskWithUser beanCombine_uut = (BeanUserTaskWithUser) mBeanUserTaskWithUser.get(POSITION); holder.userIconIv.setImageResource(beanCombine_uut.getUserIcon()); holder.usernameTv.setText(beanCombine_uut.getUser().getUserName()); /** Load the picture */ File pic = beanCombine_uut.getPic(); if (pic == null || pic.length() == 0) holder.imageView.setVisibility(View.GONE); else Glide.with(mContext).load(pic).centerCrop().into(holder.imageView); /** Use Glide to load pictures, if zoom */ /** Make the picture clickable to enlarge and preview */ holder.imageView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { /*List<IThumbViewInfo> tempList = new ArrayList<IThumbViewInfo>(); tempList.add(new IThumbViewInfo()); GPreviewBuilder.from((Activity)mContext) .to(ImagePreviewActivity.class) .setData()*/ } }); holder.moreDataTv.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { /** Jumpt to the CrowdOS web */ String url = mContext.getString(R.string.webUrl); Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); mContext.startActivity(browserIntent); } }); /** Place the task data uploaded by the task completer */ String content = beanCombine_uut.getUserTask().getContent(); if (content == null) content = "该用户尚未上传数据"; holder.taskContentTv.setText(content); } else { Log.i(TAG, "instance 错误"); //Toast.makeText(mConetxt,"instance 错误",Toast.LENGTH_SHORT).show(); } } @Override public int getItemCount() { return mBeanUserTaskWithUser.size(); } class publishedTaskDetailViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { private ImageView userIconIv; private TextView usernameTv; private TextView taskContentTv; private ImageView imageView; private TextView moreDataTv; private MCSRecyclerItemClickListener mRecyclerItemClickListener; public publishedTaskDetailViewHolder(@NonNull View itemView, MCSRecyclerItemClickListener listener) { super(itemView); userIconIv = (ImageView) itemView.findViewById(R.id.published_taskDetail_tasklv_userIcon); usernameTv = (TextView) itemView.findViewById(R.id.published_taskDetail_tasklv_userName); taskContentTv = (TextView) itemView.findViewById(R.id.published_taskDetail_tasklv_TaskContent); imageView = itemView.findViewById(R.id.published_taskDetail_tasklv_image1); moreDataTv = itemView.findViewById(R.id.published_taskDetail_moreData); this.mRecyclerItemClickListener = listener; itemView.setOnClickListener(this); } @Override public void onClick(View view) { if (mRecyclerItemClickListener != null) { mRecyclerItemClickListener.onItemClick(view, getLayoutPosition()); } } } public void setRecyclerItemClickListener(MCSRecyclerItemClickListener listener) { this.mListener = listener; } public void addHeaderItem(List<BeanUserTaskWithUser> items) { mBeanUserTaskWithUser.addAll(0, items); notifyDataSetChanged(); } public void addFooterItem(List<BeanUserTaskWithUser> items) { mBeanUserTaskWithUser.addAll(items); notifyDataSetChanged(); } }
[ "alohavanhill@qq.com" ]
alohavanhill@qq.com
ae7c6017e80dca4798248f4fc79fbd2fd21bf2a5
5e987be80b50789aecc3729a15ab948b990b287a
/KakaoT1.java
56f8af3bd2eae5c47a1f5945ffd15b4be0de4e89
[]
no_license
sjaqjwor/Alogo-study
8bdf7bd58b121531b992d65edacc6cb90466b260
3cd6aba918d330cbdb3c6a02dcaa1ab4193ab026
refs/heads/master
2021-07-09T12:09:52.866654
2019-03-17T06:35:59
2019-03-17T06:35:59
115,249,288
0
0
null
null
null
null
UTF-8
Java
false
false
741
java
import java.util.regex.Matcher; import java.util.regex.Pattern; public class KakaoT1 { public static void main(String[] args) { System.out.println( solution("+82-010-3444-2323")); solution("01012345678"); } static int solution(String PhoneNumber){ String regex3 = "(\\+82-10-[0-9]{4}-[0-9]{4})"; String regex2= "(010-[0-9]{4}-[0-9]{4})"; String regex1 = "(010[0-9]{4}[0-9]{4})"; String [] str = new String[]{regex1,regex2,regex3}; for(int a=0;a<3;a++){ Pattern pattern = Pattern.compile(str[a]); Matcher m = pattern.matcher(PhoneNumber); if(m.matches()){ return a+1; } } return -1; } }
[ "lsklsk45@naver.com" ]
lsklsk45@naver.com
64cce87b6b4e4ce28442267a01b6812fba2dea71
5120b826c0b659cc609e7cecdf9718aba243dfb0
/platform_only_recipe/hybris/bin/platform/bootstrap/gensrc/de/hybris/platform/catalog/enums/package-info.java
52ca6e7cd69af40c7d61c9123cd666d985cac5a7
[]
no_license
miztli/hybris
8447c85555676742b524aee901a5f559189a469a
ff84a5089a0d99899672e60c3a60436ab8bf7554
refs/heads/master
2022-10-26T07:21:44.657487
2019-05-28T20:30:10
2019-05-28T20:30:10
186,463,896
1
0
null
2022-09-16T18:38:27
2019-05-13T17:13:05
Java
UTF-8
Java
false
false
523
java
/* * * [y] hybris Platform * Copyright (c) 2019 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. */ /** * Contains generated models for each type of de.hybris.platform.jalo.enumeration package. */ package de.hybris.platform.catalog.enums;
[ "miztlimelgoza@miztlis-MacBook-Pro.local" ]
miztlimelgoza@miztlis-MacBook-Pro.local
d35a86b0d7ff62b83d10f863b6d8fd0ef22357c2
02e971977961c696f0842c8540d70adef966c56a
/Trees/src/solution/aritra/problem008/DeleteBinaryTree.java
cf8e69c7bb3c3e61f3bd82ad798a2fc09063ea2e
[]
no_license
aritrac/Java_DS_Advanced
dacf00b24fccb50914bb51d6d58da36e46f08a5e
dc4ca1a747ae8e7e2ff6c31717c06aa9201eafff
refs/heads/master
2021-03-23T01:31:55.969090
2020-07-17T03:28:30
2020-07-17T03:28:30
247,412,880
0
0
null
null
null
null
UTF-8
Java
false
false
1,035
java
package solution.aritra.problem008; import solution.aritra.tree.defs.BinaryTreeNode; import solution.aritra.utils.TreeCreator; /** * Author: Aritra Chatterjee * Problem: Give an algorithm for deleting the tree * Description: We can use post order traversal to delete the tree as we need to delete children first and then the parent */ public class DeleteBinaryTree { public static void main(String[] args) { TreeCreator tc = new TreeCreator(); BinaryTreeNode root = tc.createTree(); tc.displayTree(root); deleteBinaryTree(root); tc.displayTree(root); //since 1 main root node remains, deleting that by setting root to null root = null; } public static void deleteBinaryTree(BinaryTreeNode root){ if(root != null){ deleteBinaryTree(root.getLeft()); deleteBinaryTree(root.getRight()); System.out.println("Deleting " + root.getData()); root.setLeft(null); root.setRight(null); } } }
[ "aritrachatterjee2007@gmail.com" ]
aritrachatterjee2007@gmail.com
6ed8e318b82dc3022bef4c6a8374646a9b955237
ed149d2c56ef234f099ee60abb56fb104484aa44
/conversion/qmrf/src/main/java/it/jrc/ecb/qmrf/Embedded.java
728c790e53ccd00bda43a0b2a3ff50b0c294867b
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
qsardb/qsardb-common
4f643d0ec121cde719cba13a5a3c5ccf386f634c
37adb220772198a1f29f7009ecf56c639a2ec0bc
refs/heads/master
2023-03-16T11:41:57.321993
2021-06-30T10:27:54
2021-06-30T10:27:54
7,751,485
0
0
BSD-3-Clause
2021-07-01T09:47:27
2013-01-22T11:50:00
Java
UTF-8
Java
false
false
202
java
/* * Copyright (c) 2011 University of Tartu */ package it.jrc.ecb.qmrf; import javax.xml.bind.annotation.*; @XmlEnum public enum Embedded { @XmlEnumValue("Yes") YES, @XmlEnumValue("No") NO, ; }
[ "villu.ruusmann@gmail.com" ]
villu.ruusmann@gmail.com
a2fc2e9b30b09a0f0ba60aef62482ed4dd7bb83c
cece8b4f2f586004aa2291df133a026dd3e1154c
/src/main/java/org/xbib/elasticsearch/knapsack/KnapsackState.java
18cb3182825464a919dd4658750dff609980843d
[ "Apache-2.0", "LicenseRef-scancode-public-domain", "CC0-1.0" ]
permissive
pippobaudos/elasticsearch-knapsack
9d4c14fb112ec9eeaf248f47cb363403671ad821
442c820751b4724159291e3da924ead9a943ebe3
refs/heads/master
2021-12-15T12:32:00.073674
2015-10-21T10:22:36
2015-10-21T10:22:36
44,608,809
0
0
Apache-2.0
2021-12-14T21:55:03
2015-10-20T13:39:35
Java
UTF-8
Java
false
false
7,090
java
/* * Copyright (C) 2014 Jörg Prante * * 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.xbib.elasticsearch.knapsack; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Streamable; import org.elasticsearch.common.joda.DateMathParser; import org.elasticsearch.common.joda.Joda; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentParser.Token; import org.joda.time.DateTime; import java.io.IOException; import java.net.URI; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Date; import java.util.concurrent.Callable; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; import static org.elasticsearch.common.xcontent.XContentParser.Token.END_OBJECT; import static org.elasticsearch.common.xcontent.XContentParser.Token.FIELD_NAME; import static org.elasticsearch.common.xcontent.XContentParser.Token.VALUE_NULL; public class KnapsackState implements Streamable, ToXContent { /** * The mode of the knapsack operation */ private String mode; /** * The time stamp of this Knapsack operation */ private DateTime timestamp; /** * The path of the archive involved in this Knapsack operation */ private Path path; /** * The address URI of the Elasticsearch cluster */ private String address; /** * The node name where the knapsack operation is executed */ private String nodeName; public KnapsackState() { } public KnapsackState setMode(String mode) { this.mode = mode; return this; } public String getMode() { return mode; } public KnapsackState setTimestamp(DateTime timestamp) { this.timestamp = timestamp; return this; } public DateTime getTimestamp() { return timestamp; } public KnapsackState setPath(Path path) { this.path = path; return this; } public Path getPath() { return path; } public KnapsackState setClusterAddress(String address) { this.address = address; return this; } public String getClusterAddress() { return address; } public KnapsackState setNodeName(String nodeName) { this.nodeName = nodeName; return this; } public String getNodeName() { return nodeName; } private static Callable<Long> now() { return new Callable<Long>() { @Override public Long call() { return 0L; } }; } private final static DateMathParser dateParser = new DateMathParser(Joda.forPattern("dateOptionalTime")); public KnapsackState fromXContent(XContentParser parser) throws IOException { Long startTimestamp = new Date().getTime(); Path path = null; String address = null; String nodeName = null; String currentFieldName = null; Token token; while ((token = parser.nextToken()) != END_OBJECT) { if (token == FIELD_NAME) { currentFieldName = parser.currentName(); } else if (token.isValue() || token == VALUE_NULL) { switch (currentFieldName) { case "mode": mode = parser.text(); break; case "started": startTimestamp = parser.text() != null ? dateParser.parse(parser.text(), now()) : null; break; case "path": path = parser.text() != null ? Paths.get(URI.create(parser.text())) : null; break; case "cluster_address": address = parser.text(); break; case "node_name": nodeName = parser.text(); break; } } } return new KnapsackState() .setMode(mode) .setTimestamp(new DateTime(startTimestamp)) .setPath(path) .setClusterAddress(address) .setNodeName(nodeName); } @Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject() .field("mode", mode); if (timestamp != null) { builder.field("started", timestamp); } if (path != null) { builder.field("path", path.toUri().toString()); } if (address != null) { builder.field("cluster_address", address); } if (nodeName != null) { builder.field("node_name", nodeName); } builder.endObject(); return builder; } public String id() { StringBuilder sb = new StringBuilder(); sb.append(mode) .append(timestamp) .append(path) .append(address) .append(nodeName); return sb.toString(); } @Override public int hashCode() { return id().hashCode(); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } KnapsackState other = (KnapsackState) obj; return id().equals(other.id()); } @Override public void readFrom(StreamInput in) throws IOException { mode = in.readString(); timestamp = new DateTime(in.readLong()); path = Paths.get(URI.create(in.readString())); address = in.readString(); nodeName = in.readString(); } @Override public void writeTo(StreamOutput out) throws IOException { out.writeString(mode); out.writeLong(timestamp.getMillis()); out.writeString(path.toUri().toString()); out.writeString(address); out.writeString(nodeName); } @Override public String toString() { try { return toXContent(jsonBuilder(), EMPTY_PARAMS).string(); } catch (IOException e) { // ignore } return ""; } }
[ "joergprante@gmail.com" ]
joergprante@gmail.com
74e9e08f47d459eab7a95128f8315de536fa9559
5544144a4a3e5f25a4fd446eadb9ec589a7dd5f3
/EJB3/code/3_LarkU_EJB_EE/src/main/java/ttl/larku/service/ejb/impl/SLStudentServiceSUBClassImpl.java
16e59e4e2e65dd291d075d754b0fa0717a290877
[]
no_license
kumpfdp/JEE
3848566dc9bfa11b3ab9b492c07a75a92ca73be1
37d55cdeec0a6273b3c1041010136e62c289d97d
refs/heads/master
2020-03-19T21:02:22.217608
2018-06-11T12:05:50
2018-06-11T12:05:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
516
java
package ttl.larku.service.ejb.impl; import java.util.List; import javax.ejb.Local; import javax.ejb.Stateless; import javax.enterprise.inject.Specializes; import ttl.larku.domain.Student; /** * Use for CDI Specialization example. @Specializes here will make * the SLStudentServiceImpl become a non candidate for Injection */ @Stateless @Local public class SLStudentServiceSUBClassImpl extends SLStudentServiceImpl { @Override public List<Student> getAllStudents() { return super.getAllStudents(); } }
[ "anil@panix.com" ]
anil@panix.com
aa579e88e4a53c971940bbd918dac569f7600611
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/Hadoop/24_1.java
150f9840d7b42d20719f36edbc7422e9c5a6036d
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
711
java
//,temp,NMLeveldbStateStoreService.java,1020,1034,temp,LeveldbTimelineStateStore.java,402,418 //,3 public class xxx { private void checkVersion() throws IOException { Version loadedVersion = loadVersion(); LOG.info("Loaded NM state version info " + loadedVersion); if (loadedVersion.equals(getCurrentVersion())) { return; } if (loadedVersion.isCompatibleTo(getCurrentVersion())) { LOG.info("Storing NM state version info " + getCurrentVersion()); storeVersion(); } else { throw new IOException( "Incompatible version for NM state: expecting NM state version " + getCurrentVersion() + ", but loading version " + loadedVersion); } } };
[ "sgholami@uwaterloo.ca" ]
sgholami@uwaterloo.ca
eeac5df413b946ee4d9d7ecd4290892c66d09bcd
0e719c6700400b547ca62cfb2d1ab4c74f8218ff
/ssm_case/src/main/java/com/gs/dao/CashTypeDAO.java
d0ab01e9d43f4303dc9fbe6f2a59f9988ed60300
[]
no_license
ChenZhenCZ/JavaWeb
688a6ad92622af24e238c12ce15cdc5c19e75fd9
cc308c4decc3ef5d65ccae26453cbcfbbc3871b4
refs/heads/master
2021-05-16T05:09:47.967350
2018-03-22T00:02:24
2018-03-22T00:02:24
106,273,182
1
0
null
null
null
null
UTF-8
Java
false
false
308
java
package com.gs.dao; import com.gs.bean.CashType; import com.gs.vo.CashTypeVO; import org.springframework.stereotype.Repository; import java.util.List; /** * Created by Administrator on 2017/12/7. */ @Repository public interface CashTypeDAO extends BaseDAO { List<CashTypeVO> getByPid(Long pid); }
[ "2908903432@qq.com" ]
2908903432@qq.com
ee059732febe2bf889b8d5504227a952e8e827f9
2b438c607ca0b2ee575eec4752cc7c5c7792f4cc
/GPS_GSM_Engine/src/engine/Test.java
21f6321900b53283ff91fff04e33e971ae4b6361
[]
no_license
cherkavi/java-code-example
a94a4c5eebd6fb20274dc4852c13e7e8779a7570
9c640b7a64e64290df0b4a6820747a7c6b87ae6d
refs/heads/master
2023-02-08T09:03:37.056639
2023-02-06T15:18:21
2023-02-06T15:18:21
197,267,286
0
4
null
2022-12-15T23:57:37
2019-07-16T21:01:20
Java
WINDOWS-1251
Java
false
false
1,877
java
package engine; import java.io.File; import java.io.FileInputStream; import java.io.PipedInputStream; import java.io.PipedOutputStream; public class Test { public static void main(String[] args){ System.out.println("begin"); try{ /** анализатор для анализа входящих значений, и хранения выборочных данных */ Analizator analisator=new Analizator(); /** труба, в которую нужно записывать прочтенные данные */ PipedOutputStream pipeOutput=new PipedOutputStream(); /** труба, которая принимает данные на другой стороне - в другом потоке */ PipedInputStream pipeInput=new PipedInputStream(pipeOutput); /** слушатель, который слушает входящий поток и передает данные на анализатор - одновременный запуск отдельного потока */ InputListener listener=new InputListener(pipeInput,analisator); FileInputStream fis=new FileInputStream(new File("c:\\com_data.txt")); byte[] buffer=new byte[10]; int readedBytes=0; while(fis.available()>0){ readedBytes=fis.read(buffer); if(readedBytes>0){ pipeOutput.write(buffer,0,readedBytes); pipeOutput.flush(); } } fis.close(); //listener.join(); //pipeOutput.write(bytes); Thread.sleep(2000); listener.stopThread(); }catch(Exception ex){ System.err.println("Exception: "+ex.getMessage()); } System.out.println("end"); } private static byte[] getBytes(byte start, int size){ byte[] returnValue=new byte[size]; for(int counter=start;counter<start+size;counter++){ returnValue[counter-start]=(byte)counter; } return returnValue; } }
[ "technik7job@gmail.com" ]
technik7job@gmail.com
aaf190fdd9bc8ff65b6a5668f6ce20ce5f84bc2b
4ad3e9057ef7013c862ff85422db294c75d51cb2
/activemq-activeio/activeio-core/src/main/java/org/apache/activeio/xnet/hba/NetmaskIPv6AddressPermission.java
827e1cb0d4258a80a8ae5161c8828586779d0481
[]
no_license
WeilerWebServices/Apache
cc888d2167504967bb476a72d0fe45cab238cb8c
6d3e4e4af7cadff351d4c8bf8925524ffaa9ca4d
refs/heads/master
2022-11-25T06:45:04.714855
2020-07-30T02:27:37
2020-07-30T02:27:37
258,622,318
0
0
null
null
null
null
UTF-8
Java
false
false
3,435
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.activeio.xnet.hba; import java.util.regex.Pattern; import java.util.regex.Matcher; import java.util.StringTokenizer; import java.net.InetAddress; import java.net.Inet6Address; /** * @version $Revision$ $Date$ */ public class NetmaskIPv6AddressPermission implements IPAddressPermission { private static final Pattern MASK_VALIDATOR = Pattern.compile("^(([a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4})/((\\d{1,3})|(([a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}))$"); public static boolean canSupport(String mask) { Matcher matcher = MASK_VALIDATOR.matcher(mask); return matcher.matches(); } private final byte[] networkAddressBytes; private final byte[] netmaskBytes; public NetmaskIPv6AddressPermission(String mask) { Matcher matcher = MASK_VALIDATOR.matcher(mask); if (false == matcher.matches()) { throw new IllegalArgumentException("Mask " + mask + " does not match pattern " + MASK_VALIDATOR.pattern()); } networkAddressBytes = new byte[16]; int pos = 0; StringTokenizer tokenizer = new StringTokenizer(matcher.group(1), ":"); while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); int value = Integer.parseInt(token, 16); networkAddressBytes[pos++] = (byte) ((value & 0xff00) >> 8); networkAddressBytes[pos++] = (byte) value; } netmaskBytes = new byte[16]; String netmask = matcher.group(4); if (null != netmask) { int value = Integer.parseInt(netmask); pos = value / 8; int shift = 8 - value % 8; for (int i = 0; i < pos; i++) { netmaskBytes[i] = (byte) 0xff; } netmaskBytes[pos] = (byte) (0xff << shift); } else { pos = 0; tokenizer = new StringTokenizer(matcher.group(5), ":"); while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); int value = Integer.parseInt(token, 16); netmaskBytes[pos++] = (byte) ((value & 0xff00) >> 8); netmaskBytes[pos++] = (byte) value; } } } public boolean implies(InetAddress address) { if (false == address instanceof Inet6Address) { return false; } byte[] byteAddress = address.getAddress(); for (int i = 0; i < 16; i++) { if ((netmaskBytes[i] & byteAddress[i]) != networkAddressBytes[i]) { return false; } } return true; } }
[ "nateweiler84@gmail.com" ]
nateweiler84@gmail.com
8120262ddb534811d35415e4e82fe9f66f703671
2324e5edc2172027ec129af7cc174b2d86d0de20
/lesson141_drawing_accesstocanvas/src/test/java/com/example/lesson141_drawing_accesstocanvas/ExampleUnitTest.java
90bd15c38e566e79e578cc3316416f1f98cc82d9
[]
no_license
denmariupol/StartAndroid
4cc9503a8665b690f17d1f2d88b773f61cde68a1
ec9d66a07c8ab62078b547f7ac866047e9a069de
refs/heads/master
2021-01-12T06:06:27.763874
2017-04-05T11:26:59
2017-04-05T11:26:59
77,301,535
0
0
null
null
null
null
UTF-8
Java
false
false
422
java
package com.example.lesson141_drawing_accesstocanvas; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "denmariupol@mail.ru" ]
denmariupol@mail.ru
0961ce876cecbcca106115afdaadb8c0de655a12
13598b530a21952959b51ecebce81310995b1dcc
/1.P/Curs 4/Exemplu9.java
d8eb31437141ee4b70bc647774569b0cbe98e320
[]
no_license
kashann/java-telacad
04c9c0258e7d872bb34aebaee97ee99c0ead2475
250fe71d2c00ac30af51bf270a845fd85c24c650
refs/heads/master
2020-07-14T18:46:24.503462
2019-08-30T13:37:23
2019-08-30T13:37:23
205,376,727
0
0
null
null
null
null
UTF-8
Java
false
false
639
java
import java.util.concurrent.*; import java.util.*; public class Exemplu9{ public static void main(String [] args){ ExecutorService service = Executors.newSingleThreadExecutor(); try{ Callable<Integer> c = () -> new Random().nextInt(1000); Future<Integer> f = service.submit(c); //possibly other instructions Integer result = f.get(); System.out.println(result); }catch(InterruptedException | ExecutionException e){ e.printStackTrace(); }finally{ service.shutdown(); } } }
[ "kashi_nadim@yahoo.com" ]
kashi_nadim@yahoo.com
d18e337bae14730e0105286142eb20024044a40a
5707f8daf8b59c463e8993c16524ae2cc4a4eac9
/jOOQ/src/main/java/org/jooq/impl/Names.java
ce585405df9050aa3693fd8e04b2cb8501a9cd4c
[ "Apache-2.0" ]
permissive
chacallito/jOOQ
75c5123ead5c1d6fa440a5beeb389aef5b56d7f8
c5bb31338d863bc5dde53a602c3c3a8aec891998
refs/heads/master
2021-03-04T13:28:17.046587
2020-03-09T12:19:49
2020-03-09T12:19:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,942
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. * * Other licenses: * ----------------------------------------------------------------------------- * Commercial licenses for this work are available. These replace the above * ASL 2.0 and offer limited warranties, support, maintenance, and commercial * database integrations. * * For more information, please visit: http://www.jooq.org/licenses * * * * * * * * * * * * * * * * */ package org.jooq.impl; import org.jooq.Name; /** * An internal {@link Name} cache. * * @author Lukas Eder */ final class Names { static final Name N_ACOS = DSL.name("acos"); static final Name N_ARRAY = DSL.name("array"); static final Name N_ARRAY_TABLE = DSL.name("array_table"); static final Name N_ASCII = DSL.name("ascii"); static final Name N_ASIN = DSL.name("asin"); static final Name N_ATAN = DSL.name("atan"); static final Name N_BIT_COUNT = DSL.name("bit_count"); static final Name N_CASE = DSL.name("case"); static final Name N_CAST = DSL.name("cast"); static final Name N_CEIL = DSL.name("ceil"); static final Name N_CHOOSE = DSL.name("choose"); static final Name N_COALESCE = DSL.name("coalesce"); static final Name N_COLUMN_VALUE = DSL.name("COLUMN_VALUE"); static final Name N_CONCAT = DSL.name("concat"); static final Name N_CONVERT = DSL.name("convert"); static final Name N_COSH = DSL.name("cosh"); static final Name N_COT = DSL.name("cot"); static final Name N_CURRENT_DATE = DSL.name("current_date"); static final Name N_CURRENT_SCHEMA = DSL.name("current_schema"); static final Name N_CURRENT_TIME = DSL.name("current_time"); static final Name N_CURRENT_TIMESTAMP = DSL.name("current_timestamp"); static final Name N_CURRENT_USER = DSL.name("current_user"); static final Name N_CURRVAL = DSL.name("currval"); static final Name N_DATEADD = DSL.name("dateadd"); static final Name N_DATEDIFF = DSL.name("datediff"); static final Name N_DEGREES = DSL.name("degrees"); static final Name N_DUAL = DSL.name("dual"); static final Name N_EXTRACT = DSL.name("extract"); static final Name N_FLASHBACK = DSL.name("flashback"); static final Name N_FLOOR = DSL.name("floor"); static final Name N_FUNCTION = DSL.name("function"); static final Name N_GENERATE_SERIES = DSL.name("generate_series"); static final Name N_IIF = DSL.name("iif"); static final Name N_JOIN = DSL.name("join"); static final Name N_JSON_ARRAY = DSL.name("json_array"); static final Name N_JSON_OBJECT = DSL.name("json_object"); static final Name N_LEFT = DSL.name("left"); static final Name N_LOWER = DSL.name("lower"); static final Name N_LPAD = DSL.name("lpad"); static final Name N_LTRIM = DSL.name("ltrim"); static final Name N_MD5 = DSL.name("md5"); static final Name N_MOD = DSL.name("mod"); static final Name N_NEXTVAL = DSL.name("nextval"); static final Name N_NOT = DSL.name("not"); static final Name N_NULLIF = DSL.name("nullif"); static final Name N_NVL = DSL.name("nvl"); static final Name N_NVL2 = DSL.name("nvl2"); static final Name N_OVERLAY = DSL.name("overlay"); static final Name N_PIVOT = DSL.name("pivot"); static final Name N_POSITION = DSL.name("position"); static final Name N_POWER = DSL.name("power"); static final Name N_PRIOR = DSL.name("prior"); static final Name N_RANDOM = DSL.name("rand"); static final Name N_REVERSE = DSL.name("reverse"); static final Name N_RIGHT = DSL.name("right"); static final Name N_ROLLUP = DSL.name("rollup"); static final Name N_ROW = DSL.name("row"); static final Name N_ROWSFROM = DSL.name("rowsfrom"); static final Name N_RPAD = DSL.name("rpad"); static final Name N_RTRIM = DSL.name("rtrim"); static final Name N_SELECT = DSL.name("select"); static final Name N_SIGN = DSL.name("sign"); static final Name N_SINH = DSL.name("sinh"); static final Name N_SPACE = DSL.name("space"); static final Name N_SQRT = DSL.name("sqrt"); static final Name N_SUBSTRING = DSL.name("substring"); static final Name N_SYSTEM_TIME = DSL.unquotedName("system_time"); static final Name N_T = DSL.name("t"); static final Name N_TANH = DSL.name("tanh"); static final Name N_TIMESTAMPDIFF = DSL.name("timestampdiff"); static final Name N_TRIM = DSL.name("trim"); static final Name N_TRUNC = DSL.name("trunc"); static final Name N_UPPER = DSL.name("upper"); static final Name N_VALUES = DSL.name("values"); static final Name N_WIDTH_BUCKET = DSL.name("width_bucket"); }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
d4b1206a4e635878abf6f33fa348c643aef24ca4
c76fda2c453cdcc9c46db2105aae1ea72d0fac8e
/redpig-api/src/main/java/com/redpigmall/api/enums/Lang.java
2ded10a897bb3297fa6f4cb4469a0b174e6e06b0
[]
no_license
18182336296/new
213ba4bf80de1955ce9fdd69f53892bb45a277a2
722c39db381733e37c80b9ac6ec1b1afba25c162
refs/heads/master
2022-11-21T20:43:03.448373
2020-07-19T08:20:23
2020-07-19T08:20:23
280,778,769
0
2
null
null
null
null
UTF-8
Java
false
false
471
java
package com.redpigmall.api.enums; public enum Lang { zh_cn("zh_cn","中文"), yn("yn","Indonesia"), en("en","English"); private Lang(String lang, String ctx) { this.lang = lang; this.ctx = ctx; } private String lang; private String ctx; public String getLang() { return lang; } public void setLang(String lang) { this.lang = lang; } public String getCtx() { return ctx; } public void setCtx(String ctx) { this.ctx = ctx; } }
[ "15361560307@163.com" ]
15361560307@163.com
181424d0903dbe4c755c73c378b0a5e46d8f1396
d2c7893a967738a97583368dbf1e41caeb1d47c7
/aTalk/src/main/java/org/jivesoftware/smackx/externalservicediscovery/ExternalServiceDiscovery.java
5808d40369f0855a9457f3c25bd060f8060f595e
[ "Apache-2.0" ]
permissive
cmeng-git/atalk-android
0b5a7f48d04ba0173852d2f2ccbe786830669603
a821544edc644fdb3f63402340051dc1e86c1c59
refs/heads/master
2023-07-08T08:58:44.604534
2023-07-07T14:24:52
2023-07-07T14:24:52
116,449,957
148
79
Apache-2.0
2023-03-28T10:31:34
2018-01-06T03:27:17
Java
UTF-8
Java
false
false
1,704
java
/** * * Copyright 2017-2022 Eng Chong Meng * * 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.jivesoftware.smackx.externalservicediscovery; import java.util.List; import org.jivesoftware.smack.packet.IQ; /** * The ExternalServiceDiscovery IQ is used retrieve server stun/turn service support from the registered xmpp server. * * @author Eng Chong Meng */ public class ExternalServiceDiscovery extends IQ { private ExternalServices mExternalServices; public ExternalServiceDiscovery() { super(ExternalServices.ELEMENT, ExternalServices.NAMESPACE); } public void setServices(ExternalServices externalServices) { mExternalServices = externalServices; addExtensions(externalServices.getServices()); } public ExternalServices getExternalServices() { return mExternalServices; } public List<ServiceElement> getServices() { return super.getExtensions(ServiceElement.class); } /** * /** {@inheritDoc} */ @Override protected IQChildElementXmlStringBuilder getIQChildElementBuilder(IQChildElementXmlStringBuilder xml) { xml.setEmptyElement(); return xml; } }
[ "cmeng.gm@gmail.com" ]
cmeng.gm@gmail.com
4114368d163b2c3fde0e5d389254a3777527004d
68c83b235ef73a5fdf6ada7960836b8e10c7ecb7
/src/com/hong/py/algorithm/array/NextPermutation.java
f34ea33b7e128bdfebd390cce7a22d4144a08c4e
[]
no_license
hongpingyang/java-base
e149cbc002a63f607c6fb0acd5fc2510b8202513
d3cd7d6a72661b8b64c568385114296a6095ba1d
refs/heads/master
2021-07-24T04:22:05.030509
2020-10-18T15:08:09
2020-10-18T15:08:09
226,322,410
1
0
null
2020-10-18T15:08:10
2019-12-06T12:11:10
Java
UTF-8
Java
false
false
1,854
java
package com.hong.py.algorithm.array; import java.util.Arrays; /** * author: hongpy * create time: 2020-06-18 11:03 * description: * life for code */ public class NextPermutation { public static void main(String[] args) { NextPermutation np = new NextPermutation(); np.nextPermutation(new int[]{1,2,7,4,3,1}); np.nextPermutation(new int[]{1,2,3}); np.nextPermutation(new int[]{3,2,1}); np.nextPermutation(new int[]{1,1,5}); } /** * 查找下一个字典序 * @param datas */ public void nextPermutation(int[] datas) { int first=-1; int select=-1; // 例如 1 3 2 找到 1 first=0 //从后往前找第一个降序的数字 for (int i = datas.length - 1; i >0; i--) { if (datas[i] > datas[i - 1]) { first=i-1; break; } } if (first != -1) { // 例如 1 3 2 找到 2 select=2 for (int i = datas.length - 1; i > first; i--) { if (datas[i] > datas[first]) { select = i; break; } } //交换2个位置 // 例如 1 3 2 -> 2 3 1 int temp = datas[first]; datas[first] = datas[select]; datas[select] = temp; } //反转后面的降序变为升序 //前后两两交换位置 2 3 1 -> 2 1 3 for (int i = first+1; i <datas.length ; i++) { if(i<datas.length-1-(i-first-1)) swap(i,datas.length-1-(i-first-1),datas); } System.out.println(Arrays.toString(datas)); } public void swap(int begin, int end, int[] datas) { int temp = datas[begin]; datas[begin] = datas[end]; datas[end] = temp; } }
[ "hpymn123@163.com" ]
hpymn123@163.com
b6f4f04fe6e2f6f83f2e4a0344b6b472965750aa
67ed109e86416b1448247371c51fef5893115f7d
/pwdgen2/evilcorp/com.evilcorp.pwdgen_source_from_JADX/sources/mono/android/media/MediaSync_OnErrorListenerImplementor.java
fc9f744119d5f682194137798cb5715325a471ca
[]
no_license
Hong5489/FSEC2020
cc9fde303e7dced5a1defa121ddc29b88b95ab0d
9063d2266adf688e1792ea78b3f1b61cd28ece89
refs/heads/master
2022-12-01T15:17:21.314765
2020-08-16T15:35:49
2020-08-16T15:35:49
287,962,248
1
0
null
null
null
null
UTF-8
Java
false
false
1,583
java
package mono.android.media; import android.media.MediaSync; import android.media.MediaSync.OnErrorListener; import java.util.ArrayList; import mono.android.IGCUserPeer; import mono.android.Runtime; import mono.android.TypeManager; public class MediaSync_OnErrorListenerImplementor implements IGCUserPeer, OnErrorListener { public static final String __md_methods = "n_onError:(Landroid/media/MediaSync;II)V:GetOnError_Landroid_media_MediaSync_IIHandler:Android.Media.MediaSync/IOnErrorListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\n"; private ArrayList refList; private native void n_onError(MediaSync mediaSync, int i, int i2); static { Runtime.register("Android.Media.MediaSync+IOnErrorListenerImplementor, Mono.Android", MediaSync_OnErrorListenerImplementor.class, __md_methods); } public MediaSync_OnErrorListenerImplementor() { if (getClass() == MediaSync_OnErrorListenerImplementor.class) { TypeManager.Activate("Android.Media.MediaSync+IOnErrorListenerImplementor, Mono.Android", "", this, new Object[0]); } } public void onError(MediaSync mediaSync, int i, int i2) { n_onError(mediaSync, i, i2); } public void monodroidAddReference(Object obj) { if (this.refList == null) { this.refList = new ArrayList(); } this.refList.add(obj); } public void monodroidClearReferences() { ArrayList arrayList = this.refList; if (arrayList != null) { arrayList.clear(); } } }
[ "hongwei5489@gmail.com" ]
hongwei5489@gmail.com
6aee2ee6de4cceba0d11c09013582c46782e1281
9bf4c9f3b5382350dc05e0408dc4c9f1afe7b796
/src/main/java/com/intelligent/chart/domain/MenuGroup.java
becfec2c6c9fc8479fd1f62b8d167065c4164ac1
[]
no_license
BulkSecurityGeneratorProject/intelligentChart
7f38e655ec84f6c61ab1bafc02a26f9344fb7e1f
b7fafa08be25d24d7e725dc6f5a3ba87e877fa3b
refs/heads/master
2022-12-17T06:59:48.214876
2017-02-09T07:51:43
2017-02-09T07:51:43
296,543,373
0
0
null
2020-09-18T07:13:50
2020-09-18T07:13:49
null
UTF-8
Java
false
false
3,046
java
package com.intelligent.chart.domain; import com.fasterxml.jackson.annotation.JsonIgnore; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import javax.persistence.*; import java.io.Serializable; import java.util.HashSet; import java.util.Set; import java.util.Objects; /** * A MenuGroup. */ @Entity @Table(name = "menu_group") @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public class MenuGroup implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @Column(name = "title") private String title; @Column(name = "icon") private String icon; @Column(name = "seq_order") private Integer seqOrder; @OneToMany(mappedBy = "menuGroup") // @JsonIgnore @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) private Set<Menu> menus = new HashSet<>(); public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getTitle() { return title; } public MenuGroup title(String title) { this.title = title; return this; } public void setTitle(String title) { this.title = title; } public String getIcon() { return icon; } public MenuGroup icon(String icon) { this.icon = icon; return this; } public void setIcon(String icon) { this.icon = icon; } public Integer getSeqOrder() { return seqOrder; } public MenuGroup seqOrder(Integer seqOrder) { this.seqOrder = seqOrder; return this; } public void setSeqOrder(Integer seqOrder) { this.seqOrder = seqOrder; } public Set<Menu> getMenus() { return menus; } public MenuGroup menus(Set<Menu> menus) { this.menus = menus; return this; } public MenuGroup addMenu(Menu menu) { menus.add(menu); menu.setMenuGroup(this); return this; } public MenuGroup removeMenu(Menu menu) { menus.remove(menu); menu.setMenuGroup(null); return this; } public void setMenus(Set<Menu> menus) { this.menus = menus; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } MenuGroup menuGroup = (MenuGroup) o; if (menuGroup.id == null || id == null) { return false; } return Objects.equals(id, menuGroup.id); } @Override public int hashCode() { return Objects.hashCode(id); } @Override public String toString() { return "MenuGroup{" + "id=" + id + ", title='" + title + "'" + ", icon='" + icon + "'" + ", seqOrder='" + seqOrder + "'" + '}'; } }
[ "leeming-jiang@163.com" ]
leeming-jiang@163.com
a6fb022d623735a6b99f53acf4f6b4f64e9c9da6
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/repairnator/learning/3018/Original.java
a10947a2d87440e68fe1143dcf305bc935d554b3
[]
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
693
java
package fr .inria.spirals.repairnator.process.inspectors.properties.repository; public class Original { private String name; private long githubId; private String url; public Original() { this.name = ""; this.githubId = 0; this.url = ""; } public String getName() { return name; } public void setName(String name) { this.name = name; } public long getGithubId() { return githubId; } public void setGithubId(long githubId) { this.githubId = githubId; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
892b9e969de04bae43c160f7b4dbf4a467f37e6d
39b6f83641d1a80a48937c42beb6a73311aebc55
/extensions/jaxb/deployment/src/test/java/io/quarkus/jaxb/deployment/UserProvidedJaxbContextTest.java
b40507bc70911d860df2ebcb1c7a79a45ad83e7d
[ "Apache-2.0" ]
permissive
quarkusio/quarkus
112ecda7236bc061920978ac49289da6259360f4
68af440f3081de7a26bbee655f74bb8b2c57c2d5
refs/heads/main
2023-09-04T06:39:33.043251
2023-09-04T05:44:43
2023-09-04T05:44:43
139,914,932
13,109
2,940
Apache-2.0
2023-09-14T21:31:23
2018-07-06T00:44:20
Java
UTF-8
Java
false
false
3,109
java
package io.quarkus.jaxb.deployment; import static org.assertj.core.api.Assertions.assertThat; import java.io.StringWriter; import jakarta.enterprise.context.control.ActivateRequestContext; import jakarta.enterprise.inject.Produces; import jakarta.inject.Inject; import jakarta.inject.Singleton; import jakarta.xml.bind.JAXBContext; import jakarta.xml.bind.JAXBException; import jakarta.xml.bind.Marshaller; import jakarta.xml.bind.Unmarshaller; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; import io.quarkus.test.QuarkusUnitTest; /** * If the user provides his own {@link JAXBContext} bean then the validation of the default context should not happen * and the presence of conflicting classes, such as {@link io.quarkus.jaxb.deployment.one.Model} and * {@link io.quarkus.jaxb.deployment.two.Model} should not matter. */ public class UserProvidedJaxbContextTest { @RegisterExtension static final QuarkusUnitTest config = new QuarkusUnitTest() .withApplicationRoot((jar) -> jar .addClasses( io.quarkus.jaxb.deployment.one.Model.class, io.quarkus.jaxb.deployment.two.Model.class, UserProvidedJaxbContextTest.JaxbContextProducer.class)); @Inject JAXBContext jaxbContext; @Inject Marshaller marshaller; @Inject Unmarshaller unmarshaller; @Test @ActivateRequestContext public void shouldInjectJaxbBeans() { assertThat(jaxbContext).isNotNull(); assertThat(marshaller).isNotNull(); assertThat(unmarshaller).isNotNull(); } @Test @ActivateRequestContext public void marshalModelOne() throws JAXBException { io.quarkus.jaxb.deployment.one.Model model = new io.quarkus.jaxb.deployment.one.Model(); model.setName1("name1"); StringWriter sw = new StringWriter(); marshaller.marshal(model, sw); assertThat(sw.toString()).isEqualTo("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" + "<model><name1>name1</name1></model>"); } @Test @ActivateRequestContext public void marshalModelTwo() throws JAXBException { io.quarkus.jaxb.deployment.two.Model model = new io.quarkus.jaxb.deployment.two.Model(); model.setName2("name2"); Assertions.assertThatExceptionOfType(JAXBException.class) .isThrownBy(() -> marshaller.marshal(model, new StringWriter())) .withMessage("class io.quarkus.jaxb.deployment.two.Model nor any of its super class is known to this context."); } public static class JaxbContextProducer { @Produces @Singleton JAXBContext produceJaxbContext() { try { return JAXBContext.newInstance(new Class[] { io.quarkus.jaxb.deployment.one.Model.class }); } catch (JAXBException e) { throw new RuntimeException("Could not create new JAXBContext", e); } } } }
[ "ppalaga@redhat.com" ]
ppalaga@redhat.com
519a17443251bd283795c52c011087842986cfd8
20659ddd96ceab5982c90becb482788e9bafeaf0
/net.sf.joptsimple.tests/src/test/java/tests/joptsimple/AbstractOptionSpecOptionsImmutabilityTestCase.java
e3e7a28ec2f5598e0e39de08edf584da43b0856c
[ "MIT" ]
permissive
zang227/jopt-simple
515d2b4250478ad72dca2b48098c3eb2bccd8cd3
55582f0bca9414dd8b341be61a0ef9c0b84de56a
refs/heads/master
2023-06-30T13:54:02.193891
2021-08-04T02:49:30
2021-08-04T02:49:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,853
java
/* The MIT License Copyright (c) 2004-2021 Paul R. Holser, Jr. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package tests.joptsimple; import java.util.List; import joptsimple.AbstractOptionSpec; import org.infinitest.toolkit.UnmodifiableListTestSupport; /** * @author <a href="mailto:pholser@alumni.rice.edu">Paul Holser</a> */ public abstract class AbstractOptionSpecOptionsImmutabilityTestCase extends UnmodifiableListTestSupport<String> { @Override protected List<String> newList() { AbstractOptionSpec<?> spec = newOptionSpec( containedItem() ); return spec.options(); } @Override protected final String newItem() { return "not"; } @Override protected String containedItem() { return "in"; } protected abstract AbstractOptionSpec<?> newOptionSpec( String option ); }
[ "pholser@alumni.rice.edu" ]
pholser@alumni.rice.edu
c122fc59360ab8217d51a99bf930a2eaeef188f0
7ad843a5b11df711f58fdb8d44ed50ae134deca3
/JDK/JDK1.8/src/java/lang/management/ClassLoadingMXBean.java
cdb5af3626b6827d03c4f445c2b382e3d66e0d5b
[ "MIT" ]
permissive
JavaScalaDeveloper/java-source
f014526ad7750ad76b46ff475869db6a12baeb4e
0e6be345eaf46cfb5c64870207b4afb1073c6cd0
refs/heads/main
2023-07-01T22:32:58.116092
2021-07-26T06:42:32
2021-07-26T06:42:32
362,427,367
0
0
null
null
null
null
UTF-8
Java
false
false
3,226
java
/* * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package java.lang.management; /** * The management interface for the class loading system of * the Java virtual machine. * * <p> A Java virtual machine has a single instance of the implementation * class of this interface. This instance implementing this interface is * an <a href="ManagementFactory.html#MXBean">MXBean</a> * that can be obtained by calling * the {@link ManagementFactory#getClassLoadingMXBean} method or * from the {@link ManagementFactory#getPlatformMBeanServer * platform <tt>MBeanServer</tt>}. * * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for * the class loading system within an <tt>MBeanServer</tt> is: * <blockquote> * {@link ManagementFactory#CLASS_LOADING_MXBEAN_NAME * <tt>java.lang:type=ClassLoading</tt>} * </blockquote> * * It can be obtained by calling the * {@link PlatformManagedObject#getObjectName} method. * * @see ManagementFactory#getPlatformMXBeans(Class) * @see <a href="../../../javax/management/package-summary.html"> * JMX Specification.</a> * @see <a href="package-summary.html#examples"> * Ways to Access MXBeans</a> * * @author Mandy Chung * @since 1.5 */ public interface ClassLoadingMXBean extends PlatformManagedObject { /** * Returns the total number of classes that have been loaded since * the Java virtual machine has started execution. * * @return the total number of classes loaded. * */ public long getTotalLoadedClassCount(); /** * Returns the number of classes that are currently loaded in the * Java virtual machine. * * @return the number of currently loaded classes. */ public int getLoadedClassCount(); /** * Returns the total number of classes unloaded since the Java virtual machine * has started execution. * * @return the total number of unloaded classes. */ public long getUnloadedClassCount(); /** * Tests if the verbose output for the class loading system is enabled. * * @return <tt>true</tt> if the verbose output for the class loading * system is enabled; <tt>false</tt> otherwise. */ public boolean isVerbose(); /** * Enables or disables the verbose output for the class loading * system. The verbose output information and the output stream * to which the verbose information is emitted are implementation * dependent. Typically, a Java virtual machine implementation * prints a message each time a class file is loaded. * * <p>This method can be called by multiple threads concurrently. * Each invocation of this method enables or disables the verbose * output globally. * * @param value <tt>true</tt> to enable the verbose output; * <tt>false</tt> to disable. * * @exception java.lang.SecurityException if a security manager * exists and the caller does not have * ManagementPermission("control"). */ public void setVerbose(boolean value); }
[ "panzha@dian.so" ]
panzha@dian.so
29a558769600c1e37f29535972c2d61c98d208a9
702f839dc0cd9ef98f3d6ec5c74aa4c922d5bfe5
/src/main/java/com/thoughtWorks/util/Constant.java
644120fcaa63b01b06e7319b41725c582254d431
[]
no_license
Lance-Mao/EUTWStudio-Sec
cc8b9646050e5708f4f4f17bc88b004b4b75c05d
1dfea5b03162cd35545406bd23b79ef55791c359
refs/heads/master
2018-10-30T03:31:02.626891
2018-08-27T01:00:15
2018-08-27T01:00:15
114,326,031
1
0
null
null
null
null
UTF-8
Java
false
false
1,476
java
package com.thoughtWorks.util; public class Constant { public static final String SEARCH_SUCCESS = "查询成功"; public static final String SEARCH_FAILURE = "查询失败"; public static final String ACCOUNT_NOT_EXIST = "帐号不存在"; public static final String ACCOUNT_OR_PWD_ERROR = "帐号或密码错误"; public static final String ADD_SUCCESS = "添加成功"; public static final String ADD_FAILURE = "添加失败"; public static final String UPDATE_SUCCESS = "修改成功"; public static final String UPDATE_FAILURE = "修改失败"; public static final String ACCOUNT_IS_LOCK = "当前帐号或角色被禁止"; public static final String DELETE_SUCCESS = "删除成功"; public static final String DELETE_FAILURE= "删除失败"; public static final String OPERATION_FAILURE = "操作失败"; public static final String OPERATION_SUCCESS = "操作成功"; //沟通反馈的内容每个问题和回答之间的分隔符 public static final String SPLIT_TAG = "\\$%\\$"; public static final String UPLOAD_FAILURE = "上传失败"; public static final String UPLOAD_SUCCESS = "上传成功"; public static final String TEMP_IMAGE_PATH = "/temp/"; public static final String USER_IMAGE_PATH = "/user/"; public static final String SHORT_TIME_PATTERN = "yyyy-MM-dd"; public static final String ACCOUNT_IS_EXIST = "帐号已存在"; public static int ADMIN_ROLE_ID = 1; }
[ "l" ]
l
c567ef983c04ee7958732ed5ee8bfe80af6674ad
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_089be0ef8be73e1db19926bc44daf03959726152/CachingCVB0Mapper/14_089be0ef8be73e1db19926bc44daf03959726152_CachingCVB0Mapper_s.java
c836dd28d910795336f08f3a871a021684ce7c93
[]
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,560
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.mahout.clustering.lda.cvb; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.mapreduce.Mapper; import org.apache.mahout.math.DenseVector; import org.apache.mahout.math.MatrixSlice; import org.apache.mahout.math.Vector; import org.apache.mahout.math.VectorWritable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.Random; /** * Run ensemble learning via loading the {@link ModelTrainer} with two {@link TopicModel} instances: * one from the previous iteration, the other empty. Inference is done on the first, and the * learning updates are stored in the second, and only emitted at cleanup(). * * In terms of obvious performance improvements still available, the memory footprint in this * Mapper could be dropped by half if we accumulated model updates onto the model we're using * for inference, which might also speed up convergence, as we'd be able to take advantage of * learning <em>during</em> iteration, not just after each one is done. Most likely we don't * really need to accumulate double values in the model either, floats would most likely be * sufficient. Between these two, we could squeeze another factor of 4 in memory efficiency. * * In terms of CPU, we're re-learning the p(topic|doc) distribution on every iteration, starting * from scratch. This is usually only 10 fixed-point iterations per doc, but that's 10x more than * only 1. To avoid having to do this, we would need to do a map-side join of the unchanging * corpus with the continually-improving p(topic|doc) matrix, and then emit multiple outputs * from the mappers to make sure we can do the reduce model averaging as well. Tricky, but * possibly worth it. * * {@link ModelTrainer} already takes advantage (in maybe the not-nice way) of multi-core * availability by doing multithreaded learning, see that class for details. */ public class CachingCVB0Mapper extends Mapper<IntWritable, VectorWritable, IntWritable, VectorWritable> { private static Logger log = LoggerFactory.getLogger(CachingCVB0Mapper.class); protected ModelTrainer modelTrainer; protected int maxIters; protected int numTopics; @Override protected void setup(Context context) throws IOException, InterruptedException { log.info("Retrieving configuration"); Configuration conf = context.getConfiguration(); double eta = conf.getFloat(CVB0Driver.TERM_TOPIC_SMOOTHING, Float.NaN); double alpha = conf.getFloat(CVB0Driver.DOC_TOPIC_SMOOTHING, Float.NaN); long seed = conf.getLong(CVB0Driver.RANDOM_SEED, 1234L); numTopics = conf.getInt(CVB0Driver.NUM_TOPICS, -1); int numTerms = conf.getInt(CVB0Driver.NUM_TERMS, -1); int numUpdateThreads = conf.getInt(CVB0Driver.NUM_UPDATE_THREADS, 1); int numTrainThreads = conf.getInt(CVB0Driver.NUM_TRAIN_THREADS, 4); maxIters = conf.getInt(CVB0Driver.MAX_ITERATIONS_PER_DOC, 10); double modelWeight = conf.getFloat(CVB0Driver.MODEL_WEIGHT, 1f); log.info("Initializing read model"); TopicModel readModel; Path[] modelPaths = CVB0Driver.getModelPaths(conf); if(modelPaths != null && modelPaths.length > 0) { readModel = new TopicModel(conf, eta, alpha, null, numUpdateThreads, modelWeight, modelPaths); } else { log.info("No model files found"); readModel = new TopicModel(numTopics, numTerms, eta, alpha, new Random(seed), null, numTrainThreads, modelWeight); } log.info("Initializing write model"); TopicModel writeModel = modelWeight == 1 ? new TopicModel(numTopics, numTerms, eta, alpha, null, numUpdateThreads) : readModel; log.info("Initializing model trainer"); modelTrainer = new ModelTrainer(readModel, writeModel, numTrainThreads, numTopics, numTerms); modelTrainer.start(); } @Override public void map(IntWritable docId, VectorWritable document, Context context) throws IOException, InterruptedException{ /* where to get docTopics? */ Vector topicVector = new DenseVector(new double[numTopics]).assign(1/numTopics); modelTrainer.train(document.get(), topicVector, true, maxIters); } @Override protected void cleanup(Context context) throws IOException, InterruptedException { log.info("Stopping model trainer"); modelTrainer.stop(); log.info("Writing model"); TopicModel model = modelTrainer.getReadModel(); for(MatrixSlice topic : model) { context.write(new IntWritable(topic.index()), new VectorWritable(topic.vector())); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3c95763b67d46309a7310eb81dcd2d2a52a6b950
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/google--error-prone/846a55129dab110e2b850672ca78cdb51f2c3408/after/PreconditionsExpensiveString.java
ccd9ccd4e9d3dd8f1bcfc3b292572bbdb350cfec
[]
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
4,705
java
/* * Copyright 2011 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.errorprone.refactors; import static com.google.errorprone.matchers.Matchers.allOf; import static com.google.errorprone.matchers.Matchers.anyOf; import static com.google.errorprone.matchers.Matchers.argument; import static com.google.errorprone.matchers.Matchers.expressionMethodSelect; import static com.google.errorprone.matchers.Matchers.kindIs; import static com.google.errorprone.matchers.Matchers.methodSelect; import static com.google.errorprone.matchers.Matchers.staticMethod; import static java.lang.String.format; import com.google.errorprone.VisitorState; import com.google.errorprone.fixes.SuggestedFix; import com.google.errorprone.matchers.Matcher; import com.google.errorprone.matchers.Matchers; import com.sun.source.tree.ExpressionTree; import com.sun.source.tree.LiteralTree; import com.sun.source.tree.MemberSelectTree; import com.sun.source.tree.MethodInvocationTree; import com.sun.source.tree.Tree.Kind; import java.util.List; import java.util.regex.Pattern; /** * Error checker for calls to the Preconditions class in Guava which use * 'expensive' methods of producing the error string. In most cases, users are * better off using the equivalent methods which defer the computation of the * string until the test actually fails. * * @author sjnickerson@google.com (Simon Nickerson) */ public class PreconditionsExpensiveString extends RefactoringMatcher<MethodInvocationTree> { @Override @SuppressWarnings({"vararg", "unchecked"}) public boolean matches(MethodInvocationTree methodInvocationTree, VisitorState state) { return allOf( anyOf( methodSelect(staticMethod( "com.google.common.base.Preconditions", "checkNotNull")), methodSelect(staticMethod( "com.google.common.base.Preconditions", "checkState")), methodSelect(staticMethod( "com.google.common.base.Preconditions", "checkArgument"))), argument(1, Matchers.<ExpressionTree>allOf( kindIs(Kind.METHOD_INVOCATION, ExpressionTree.class), expressionMethodSelect(staticMethod("java.lang.String", "format")), new StringFormatCallContainsNoSpecialFormattingMatcher( Pattern.compile("%[^%s]")) )) ).matches(methodInvocationTree, state); } @Override public Refactor refactor(MethodInvocationTree methodInvocationTree, VisitorState state) { MemberSelectTree method = (MemberSelectTree) methodInvocationTree.getMethodSelect(); List<? extends ExpressionTree> arguments = methodInvocationTree.getArguments(); MethodInvocationTree stringFormat = (MethodInvocationTree) arguments.get(1); // TODO(sjnickerson): Figure out how to get a suggested fix. Basically we // remove the String.format() wrapper, but I don't know how to express // this. This current one is not correct! SuggestedFix fix = null; return new Refactor(arguments.get(1), format("Second argument to Preconditions.%s is a call to " + "String.format() which can be unwrapped", method.getIdentifier().toString()), fix); } private static class StringFormatCallContainsNoSpecialFormattingMatcher implements Matcher<ExpressionTree> { private final Pattern invalidFormatCharacters; StringFormatCallContainsNoSpecialFormattingMatcher( Pattern invalidFormatCharacters) { this.invalidFormatCharacters = invalidFormatCharacters; } @Override public boolean matches(ExpressionTree t, VisitorState state) { if (!(t instanceof MethodInvocationTree)) { return false; } MethodInvocationTree stringFormatInvocation = (MethodInvocationTree) t; if (!(stringFormatInvocation.getArguments().get(0) instanceof LiteralTree)) { return false; } LiteralTree firstArg = (LiteralTree) stringFormatInvocation.getArguments().get(0); String literal = firstArg.getValue().toString(); return !invalidFormatCharacters.matcher(literal).find(); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
b1ef20029b00637155ad414838963153327d2048
f2e744082c66f270d606bfc19d25ecb2510e337c
/sources/com/google/android/setupcompat/internal/ClockProvider.java
fa001e0e87f8d54f4bd055083fc0133516479d24
[]
no_license
AshutoshSundresh/OnePlusSettings-Java
365c49e178612048451d78ec11474065d44280fa
8015f4badc24494c3931ea99fb834bc2b264919f
refs/heads/master
2023-01-22T12:57:16.272894
2020-11-21T16:30:18
2020-11-21T16:30:18
314,854,903
4
2
null
null
null
null
UTF-8
Java
false
false
1,211
java
package com.google.android.setupcompat.internal; import com.google.android.setupcompat.internal.ClockProvider; import java.util.concurrent.TimeUnit; public class ClockProvider { private static final Ticker SYSTEM_TICKER; private static Ticker ticker; public interface Supplier<T> { T get(); } public static long timeInNanos() { return ticker.read(); } public static long timeInMillis() { return TimeUnit.NANOSECONDS.toMillis(timeInNanos()); } public static void resetInstance() { ticker = SYSTEM_TICKER; } public static void setInstance(Supplier<Long> supplier) { ticker = new Ticker() { /* class com.google.android.setupcompat.internal.$$Lambda$ClockProvider$yv5DtHvw2C6wuTWjvKViPvtokI */ @Override // com.google.android.setupcompat.internal.Ticker public final long read() { return ((Long) ClockProvider.Supplier.this.get()).longValue(); } }; } static { $$Lambda$ClockProvider$Xhv6ez4NTBFUn6cNE_oxYP2IXvc r0 = $$Lambda$ClockProvider$Xhv6ez4NTBFUn6cNE_oxYP2IXvc.INSTANCE; SYSTEM_TICKER = r0; ticker = r0; } }
[ "ashutoshsundresh@gmail.com" ]
ashutoshsundresh@gmail.com
a571921df9f2731e96bfd1c23b516a3072cc4242
a2272f1002da68cc554cd57bf9470322a547c605
/src/jdk/jdk.internal.vm.compiler/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DeoptimizeOnIntegerExactTest.java
422577bbd4978aab87320df562792d36c8619011
[]
no_license
framework-projects/java
50af8953ab46c509432c467c9ad69cc63818fa63
2d131cb46f232d3bf909face20502e4ba4b84db0
refs/heads/master
2023-06-28T05:08:00.482568
2021-08-04T08:42:32
2021-08-04T08:42:32
312,414,414
2
0
null
null
null
null
UTF-8
Java
false
false
4,273
java
/* * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * */ package org.graalvm.compiler.replacements.test; import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.code.InvalidInstalledCodeException; import jdk.vm.ci.meta.ResolvedJavaMethod; import jdk.vm.ci.meta.SpeculationLog; import org.graalvm.compiler.code.CompilationResult; import org.graalvm.compiler.core.test.GraalCompilerTest; import org.graalvm.compiler.debug.DebugContext; import org.junit.Test; public class DeoptimizeOnIntegerExactTest extends GraalCompilerTest { private final SpeculationLog speculationLog; static boolean highlyLikely = true; static boolean highlyUnlikely = false; public DeoptimizeOnIntegerExactTest() { speculationLog = getCodeCache().createSpeculationLog(); } public static int testAddExactSnippet(int x, int y) { if (highlyLikely) { return highlyUnlikely ? Math.addExact(x, y) : x; } else { return highlyUnlikely ? y : Math.addExact(x, y); } } public static int testSubtractExactSnippet(int x, int y) { if (highlyLikely) { return highlyUnlikely ? Math.subtractExact(x, y) : x; } else { return highlyUnlikely ? y : Math.subtractExact(x, y); } } public static int testMultiplyExactSnippet(int x, int y) { if (highlyLikely) { return highlyUnlikely ? Math.multiplyExact(x, y) : x; } else { return highlyUnlikely ? y : Math.multiplyExact(x, y); } } public static int testIncrementExactSnippet(int x, int y) { if (highlyLikely) { return highlyUnlikely ? Math.incrementExact(x) : x; } else { return highlyUnlikely ? y : Math.incrementExact(x); } } public static int testDecrementExactSnippet(int x, int y) { if (highlyLikely) { return highlyUnlikely ? Math.decrementExact(x) : x; } else { return highlyUnlikely ? y : Math.decrementExact(x); } } public void testAgainIfDeopt(String methodName, int x, int y) throws InvalidInstalledCodeException { ResolvedJavaMethod method = getResolvedJavaMethod(methodName); // We speculate on the first compilation. The global value numbering will merge the two // floating integer exact operation nodes. InstalledCode code = getCode(method); code.executeVarargs(x, y); if (!code.isValid()) { // At the recompilation, we anchor the floating integer exact operation nodes at their // corresponding branches. code = getCode(method); code.executeVarargs(x, y); // The recompiled code should not get deoptimized. assertTrue(code.isValid()); } } @Test public void testAddExact() throws InvalidInstalledCodeException { testAgainIfDeopt("testAddExactSnippet", Integer.MAX_VALUE, 1); } @Test public void testSubtractExact() throws InvalidInstalledCodeException { testAgainIfDeopt("testSubtractExactSnippet", 0, Integer.MIN_VALUE); } @Test public void testMultiplyExact() throws InvalidInstalledCodeException { testAgainIfDeopt("testMultiplyExactSnippet", Integer.MAX_VALUE, 2); } @Test public void testIncrementExact() throws InvalidInstalledCodeException { testAgainIfDeopt("testIncrementExactSnippet", Integer.MAX_VALUE, 1); } @Test public void testDecrementExact() throws InvalidInstalledCodeException { testAgainIfDeopt("testDecrementExactSnippet", Integer.MIN_VALUE, 1); } @Override protected SpeculationLog getSpeculationLog() { speculationLog.collectFailedSpeculations(); return speculationLog; } @Override protected InstalledCode addMethod(DebugContext debug, final ResolvedJavaMethod method, final CompilationResult compilationResult) { assert speculationLog == compilationResult.getSpeculationLog(); return getBackend().createInstalledCode(debug, method, compilationResult, null, false); } }
[ "chovavea@outlook.com" ]
chovavea@outlook.com
7cac36f1aa490516a816da0e9db1b713ec9317a7
9e20645e45cc51e94c345108b7b8a2dd5d33193e
/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/skillconditionhandlers/OpNotAffectedBySkillSkillCondition.java
4242906332d7841f0624943b11124ef476f58584
[]
no_license
Enryu99/L2jMobius-01-11
2da23f1c04dcf6e88b770f6dcbd25a80d9162461
4683916852a03573b2fe590842f6cac4cc8177b8
refs/heads/master
2023-09-01T22:09:52.702058
2021-11-02T17:37:29
2021-11-02T17:37:29
423,405,362
2
2
null
null
null
null
UTF-8
Java
false
false
1,755
java
/* * This file is part of the L2J Mobius project. * * This program 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 handlers.skillconditionhandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.skills.BuffInfo; import org.l2jmobius.gameserver.model.skills.ISkillCondition; import org.l2jmobius.gameserver.model.skills.Skill; /** * @author Mobius */ public class OpNotAffectedBySkillSkillCondition implements ISkillCondition { private final int _skillId; private final int _skillLevel; public OpNotAffectedBySkillSkillCondition(StatSet params) { _skillId = params.getInt("skillId", -1); _skillLevel = params.getInt("skillLevel", -1); } @Override public boolean canUse(Creature caster, Skill skill, WorldObject target) { final BuffInfo buffInfo = caster.getEffectList().getBuffInfoBySkillId(_skillId); if (_skillLevel > 0) { return (buffInfo == null) || (buffInfo.getSkill().getLevel() < _skillLevel); } return buffInfo == null; } }
[ "MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b" ]
MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b
c6266051021ccec2c5babc69783109ffabf98b5b
f0568343ecd32379a6a2d598bda93fa419847584
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201208/GetAdUnitSizesByStatementResponse.java
db61bf6b95a4841e535134eb474eee585c05351a
[ "Apache-2.0" ]
permissive
frankzwang/googleads-java-lib
bd098b7b61622bd50352ccca815c4de15c45a545
0cf942d2558754589a12b4d9daa5902d7499e43f
refs/heads/master
2021-01-20T23:20:53.380875
2014-07-02T19:14:30
2014-07-02T19:14:30
21,526,492
1
0
null
null
null
null
UTF-8
Java
false
false
1,869
java
package com.google.api.ads.dfp.jaxws.v201208; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.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="rval" type="{https://www.google.com/apis/ads/publisher/v201208}AdUnitSize" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "rval" }) @XmlRootElement(name = "getAdUnitSizesByStatementResponse") public class GetAdUnitSizesByStatementResponse { protected List<AdUnitSize> rval; /** * Gets the value of the rval property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the rval property. * * <p> * For example, to add a new item, do as follows: * <pre> * getRval().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link AdUnitSize } * * */ public List<AdUnitSize> getRval() { if (rval == null) { rval = new ArrayList<AdUnitSize>(); } return this.rval; } }
[ "jradcliff@google.com" ]
jradcliff@google.com
ee1fc5c52d45080afa624596698d7110c8bd3e1f
85d41602dec0c268509f339c1bbc1983e2feecb3
/src/main/java/org/lastaflute/web/login/SyncCheckable.java
61340b55cf472244825a0f1e2a7cf5e35cdd3461
[ "Apache-2.0" ]
permissive
yu1ro/lastaflute
e638505ffe00e01e9dc403816b9e231e76133925
ff7385dd432ac8056ade92c554989fecbc35a4e1
refs/heads/master
2021-01-18T11:21:29.221370
2016-09-25T03:01:59
2016-09-25T03:01:59
56,915,588
0
0
null
2016-04-23T11:20:07
2016-04-23T11:20:07
null
UTF-8
Java
false
false
1,257
java
/* * Copyright 2015-2016 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.lastaflute.web.login; import java.time.LocalDateTime; import org.dbflute.optional.OptionalThing; /** * @author jflute */ public interface SyncCheckable { /** * Get the latest date of synchronized check. * @return The optional date-time that specifies the latest check date. (NullAllowed: no check yet) */ OptionalThing<LocalDateTime> getLastestSyncCheckTime(); /** * Get the latest date of synchronized check. * @param lastestSyncCheckTime The date that specifies the latest check date. (NotNull) */ void manageLastestSyncCheckTime(LocalDateTime lastestSyncCheckTime); }
[ "dbflute@gmail.com" ]
dbflute@gmail.com
335d32f5a3dc01467c53358e4cd3b7c90ddd359b
3a6600d08eb04fa6a215d210ce383d63c474c20a
/android_securecoding_en/Permission and Protection Level/Permission CustomSignaturePermission ProtectedApp/jSSECShared/src/main/java/org/jssec/android/shared/PkgCertWhitelists.java
3862f49461af08fe7d72a1d3bc528646b1981b4a
[]
no_license
abhijeetvader9287/PocZips
7d6a912eac608af847ecc270159df51762e84899
bcbc23e1082dea39125ac3e3f260b9db9286d623
refs/heads/master
2023-05-25T02:18:08.198924
2019-12-31T11:43:52
2019-12-31T11:43:52
143,261,034
0
0
null
2023-04-28T06:06:17
2018-08-02T07:49:10
Java
UTF-8
Java
false
false
1,631
java
/* * Copyright (C) 2012-2017 Japan Smartphone Security Association * * 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.jssec.android.shared; import java.util.HashMap; import java.util.Map; import android.content.Context; public class PkgCertWhitelists { private Map<String, String> mWhitelists = new HashMap<String, String>(); public boolean add(String pkgname, String sha256) { if (pkgname == null) return false; if (sha256 == null) return false; sha256 = sha256.replaceAll(" ", ""); if (sha256.length() != 64) return false; // SHA-256 -> 32 bytes -> 64 chars sha256 = sha256.toUpperCase(); if (sha256.replaceAll("[0-9A-F]+", "").length() != 0) return false; // found non hex char mWhitelists.put(pkgname, sha256); return true; } public boolean test(Context ctx, String pkgname) { // Get the correct hash value which corresponds to pkgname. String correctHash = mWhitelists.get(pkgname); // Compare the actual hash value of pkgname with the correct hash value. return PkgCert.test(ctx, pkgname, correctHash); } }
[ "a.vader@innopix.solutions" ]
a.vader@innopix.solutions
cfd5082d0d61ca4911a01354400b7832c0bce52c
72f763d138d244ce5834f5cdd4cbefb4b4239ad6
/app/src/main/java/com/appli/nyx/formx/ui/fields/DateFieldGenerator.java
3adfd4e515ab7a13d7404e94adaaeea6b278eb55
[]
no_license
tchipi88/FormX
1542d944cf6a42678eacce9394d255736dec5a8c
3a1a0d73b001b09dbce4d5c4691488d21961180b
refs/heads/master
2023-02-25T03:51:25.512625
2020-05-24T19:06:28
2020-05-24T19:06:28
333,015,989
0
0
null
null
null
null
UTF-8
Java
false
false
3,506
java
package com.appli.nyx.formx.ui.fields; import android.content.Context; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import androidx.fragment.app.FragmentManager; import com.appli.nyx.formx.R; import com.appli.nyx.formx.model.firebase.fields.DateQuestion; import com.appli.nyx.formx.ui.fragment.business.form.dialog.DatePickerFragment; import com.appli.nyx.formx.utils.DateUtils; import com.google.android.material.textfield.TextInputEditText; import com.google.android.material.textfield.TextInputLayout; import org.joda.time.LocalDate; public class DateFieldGenerator implements IFieldGenerator<DateQuestion> { @Override public View generateLayout(Context context, DateQuestion field) { return null; } public View generateLayout(FragmentManager fragmentManager, Context context, DateQuestion field) { if (field == null || context == null) { // Aucun champ à générer return null; } // Génération de la vue du champ affichant du texte à partir du layout LayoutInflater inflater = LayoutInflater.from(context); final View fieldView = inflater.inflate(R.layout.viewholder_question_date, null); field.setFieldView(fieldView); final TextInputLayout tilInput = fieldView.findViewById(R.id.datefield_til); final TextInputEditText edtInput = fieldView.findViewById(R.id.datefield_tiet); //LIBELLE if (!TextUtils.isEmpty(field.getLibelle())) { tilInput.setHint(field.getLibelle()); } else { // Supprimer une éventuelle information sur le champ tilInput.setHint(""); } //HELPER TEXT if (!TextUtils.isEmpty(field.getDescription())) { tilInput.setHelperText(field.getDescription()); } else { // Supprimer une éventuelle information sur le champ tilInput.setHelperText(""); } edtInput.setOnClickListener(v -> { DatePickerFragment newFragment = new DatePickerFragment(edtInput); newFragment.show(fragmentManager, "datePicker"); }); return fieldView; } @Override public String getValue(Context context, DateQuestion field) { final View fieldView = field.getFieldView(); final TextInputEditText edtInput = fieldView.findViewById(R.id.datefield_tiet); return edtInput.getText().toString(); } @Override public boolean generateError(Context context, DateQuestion field) { if (field == null || field.getFieldView() == null) { return false; } final View fieldView = field.getFieldView(); final TextInputLayout textfield_til = fieldView.findViewById(R.id.datefield_til); final TextInputEditText textfield_tiet = fieldView.findViewById(R.id.datefield_tiet); textfield_til.setError(null); if (TextUtils.isEmpty(textfield_tiet.getText().toString())) { if (field.isMandatory()) { textfield_til.setError(context.getResources().getText(R.string.error_field_required)); return false; } } else { try { LocalDate dt = DateUtils.getLocalDate(textfield_tiet.getText().toString()); } catch (Exception e) { textfield_til.setError("Not Valid Date"); return false; } } return true; } }
[ "ngansop.arthur@gmail.com" ]
ngansop.arthur@gmail.com
c1dc53e3e60c0854e8636d8c856404b9c0924e50
ba0657f835fe4a2fb0b0524ad2a38012be172bc8
/src/main/java/algorithms/hb/advanced/shortestpath/longestpath/Edge.java
7182707fd3f9733e357183a0a904d8f60794a425
[]
no_license
jsdumas/java-dev-practice
bc2e29670dd6f1784b3a84f52e526a56a66bbba2
db85b830e7927fea863d95f5ea8baf8d3bdc448b
refs/heads/master
2020-12-02T16:28:41.081765
2017-12-08T23:10:53
2017-12-08T23:10:53
96,547,922
0
0
null
null
null
null
UTF-8
Java
false
false
741
java
package algorithms.hb.advanced.shortestpath.longestpath; public class Edge { private int weight; private Vertex startVertex; private Vertex targetVertex; public Edge(Vertex startVertex, Vertex targetVertex, int weight) { this.weight = weight; this.startVertex = startVertex; this.targetVertex = targetVertex; } public int getWeight() { return weight; } public void setWeight(int weight) { this.weight = weight; } public Vertex getStartVertex() { return startVertex; } public void setStartVertex(Vertex startVertex) { this.startVertex = startVertex; } public Vertex getTargetVertex() { return targetVertex; } public void setTargetVertex(Vertex targetVertex) { this.targetVertex = targetVertex; } }
[ "jsdumas@free.fr" ]
jsdumas@free.fr
03c9735331fea6354614976b7206836a949424da
326b59ba3ad20993ce9a9103503faab242f59090
/src/net/minecraft/server/CommandTime.java
7d0ea6fe7341606b75b634113b5bdaba7151f5bf
[]
no_license
MinecraftSources/MinecraftServerDec19
0960ab05ef7a52d2008c199d33dbf6b5f1bdfdbe
c58a9821063cfb5f1c65674ce9c172d945a8fdf9
refs/heads/master
2021-01-17T05:18:33.321026
2015-08-29T03:09:12
2015-08-29T03:09:12
44,114,398
6
2
null
2015-10-12T14:55:05
2015-10-12T14:55:04
null
UTF-8
Java
false
false
2,254
java
package net.minecraft.server; import java.util.List; public class CommandTime extends CommandAbstract { @Override public String getCommand() { return "time"; } @Override public int a() { return 2; } @Override public String c(ICommandListener var1) { return "commands.time.usage"; } @Override public void execute(ICommandListener var1, String[] var2) throws class_bz { if (var2.length > 1) { int var3; if (var2[0].equals("set")) { if (var2[1].equals("day")) { var3 = 1000; } else if (var2[1].equals("night")) { var3 = 13000; } else { var3 = a(var2[1], 0); } this.a(var1, var3); a(var1, this, "commands.time.set", new Object[] { Integer.valueOf(var3) }); return; } if (var2[0].equals("add")) { var3 = a(var2[1], 0); this.b(var1, var3); a(var1, this, "commands.time.added", new Object[] { Integer.valueOf(var3) }); return; } if (var2[0].equals("query")) { if (var2[1].equals("daytime")) { var3 = (int) (var1.e().N() % 24000L); var1.a(class_n.class_a_in_class_n.e, var3); a(var1, this, "commands.time.query", new Object[] { Integer.valueOf(var3) }); return; } if (var2[1].equals("gametime")) { var3 = (int) (var1.e().M() % 2147483647L); var1.a(class_n.class_a_in_class_n.e, var3); a(var1, this, "commands.time.query", new Object[] { Integer.valueOf(var3) }); return; } } } throw new class_cf("commands.time.usage", new Object[0]); } @Override public List tabComplete(ICommandListener var1, String[] var2, class_cj var3) { return var2.length == 1 ? a(var2, new String[] { "set", "add", "query" }) : ((var2.length == 2) && var2[0].equals("set") ? a(var2, new String[] { "day", "night" }) : ((var2.length == 2) && var2[0].equals("query") ? a(var2, new String[] { "daytime", "gametime" }) : null)); } protected void a(ICommandListener var1, int var2) { for (int var3 = 0; var3 < MinecraftServer.P().d.length; ++var3) { MinecraftServer.P().d[var3].b((long) var2); } } protected void b(ICommandListener var1, int var2) { for (int var3 = 0; var3 < MinecraftServer.P().d.length; ++var3) { class_ll var4 = MinecraftServer.P().d[var3]; var4.b(var4.N() + var2); } } }
[ "jpguereque@yahoo.com.mx" ]
jpguereque@yahoo.com.mx
fa80b97c98fcccb0a739015d65bcfaf8457b37cd
aacff33017b788d9ff3647eb53f6f3db84e314de
/code/credit/credit-SYS-Service/src/main/java/com/castiel/provider/SysRoleMenuProviderImpl.java
49551399b5a61e6c77256854de084fc45dec98a6
[]
no_license
lingede/creadit
45f544c1867e4271f8a7129ecab8bc6f0b7339e8
7f974500e0cd0f8dea344c86cb038ad9a11362aa
refs/heads/master
2021-04-09T18:01:23.458376
2018-03-17T06:41:52
2018-03-17T06:41:52
125,601,098
0
0
null
null
null
null
UTF-8
Java
false
false
1,286
java
package com.castiel.provider; import java.util.Date; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.CacheConfig; import org.springframework.cache.annotation.CacheEvict; import org.springframework.transaction.annotation.Transactional; import com.castiel.core.base.BaseProviderImpl; import com.castiel.core.support.dubbo.spring.annotation.DubboService; import com.castiel.dao.sys.SysRoleMenuExpandMapper; import com.castiel.model.generator.SysRoleMenu; @CacheConfig(cacheNames = "sysRoleMenu") @DubboService(interfaceClass = SysRoleMenuProvider.class) public class SysRoleMenuProviderImpl extends BaseProviderImpl<SysRoleMenu> implements SysRoleMenuProvider { @Autowired private SysRoleMenuExpandMapper sysRoleMenuExpandMapper; @Transactional @CacheEvict(value = {"getAuthorize", "sysPermission", "roleMenuDetail"}, allEntries = true) public SysRoleMenu insert(SysRoleMenu record, String userId) { try { record.setEnable(true); record.setCreateBy(userId); record.setCreateTime(new Date()); record.setUpdateBy(userId); record.setUpdateTime(new Date()); sysRoleMenuExpandMapper.insert(record); } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } return record; } }
[ "364649852@qq.com" ]
364649852@qq.com
eed147e6cdc7c446b4123b4293f72de38cbcaf29
e75be673baeeddee986ece49ef6e1c718a8e7a5d
/submissions/blizzard/Corpus/eclipse.jdt.ui/5494.java
99d9087d30d69d586e013c9fd824133f0ed7e165
[ "MIT" ]
permissive
zhendong2050/fse18
edbea132be9122b57e272a20c20fae2bb949e63e
f0f016140489961c9e3c2e837577f698c2d4cf44
refs/heads/master
2020-12-21T11:31:53.800358
2018-07-23T10:10:57
2018-07-23T10:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
144
java
package defaultMethods_in; public interface A_test1 { default int foo() { /*[*/ return /*]*/ 0; } }
[ "tim.menzies@gmail.com" ]
tim.menzies@gmail.com
018c4cd7d811590c03d1e782304de2b4a2f38719
f72c5c691cb38114393ac5d06bc9d5e8194bdeb6
/SSMAuthority/src/main/java/com/gs/service/UserService.java
aca71421fd322def5fef19b5ac4f9400e53ce72b
[]
no_license
ZedZhouZiBin/Javaweb
a3cb6a47c99b2f5fd6766b5579ad4f2e5c55cae8
0169feedc23522e27e7c4448a87846515b59c369
refs/heads/master
2021-09-09T13:03:36.237337
2018-03-16T11:49:54
2018-03-16T11:49:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
255
java
package com.gs.service; import com.gs.bean.User; import com.gs.dao.UserDAO; import org.apache.ibatis.annotations.Param; /** * Created by Administrator on 2017/9/25. */ public interface UserService { User getByPhonePwd(String phone, String pwd); }
[ "1729340612@qq.com" ]
1729340612@qq.com
5ed1f14ae36bc9378e31942c693b27b39d1f0d90
725b0c33af8b93b557657d2a927be1361256362b
/com/planet_ink/coffee_mud/MOBS/Rat.java
8acc806e26ac0e9248a6ccaf07ffcb6910e1f822
[ "Apache-2.0" ]
permissive
mcbrown87/CoffeeMud
7546434750d1ae0418ac2c76d27f872106d2df97
0d4403d466271fe5d75bfae8f33089632ac1ddd6
refs/heads/master
2020-12-30T19:23:07.758257
2014-06-25T00:01:20
2014-06-25T00:01:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,241
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.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2000-2014 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Rat extends StdMOB { @Override public String ID(){return "Rat";} public Rat() { super(); username="a rat"; setDescription("A small furry rodent with a long, leathery tail."); setDisplayText("A rat is here nibbling on something."); CMLib.factions().setAlignment(this,Faction.Align.NEUTRAL); setMoney(0); setWimpHitPoint(2); basePhyStats().setDamage(1); baseCharStats().setMyRace(CMClass.getRace("Rat")); baseCharStats().getMyRace().startRacing(this,false); basePhyStats().setAbility(0); basePhyStats().setLevel(1); basePhyStats().setArmor(90); baseState.setHitPoints(CMLib.dice().roll(basePhyStats().level(),20,basePhyStats().level())); recoverMaxState(); resetToMaxState(); recoverPhyStats(); recoverCharStats(); } }
[ "bo@0d6f1817-ed0e-0410-87c9-987e46238f29" ]
bo@0d6f1817-ed0e-0410-87c9-987e46238f29
9fe2a70c76f05b26bdb33fb488a76c2cdd939586
82398d6a036bc45edf324c37e2a418ee17ec5760
/src/main/java/com/atlassian/jira/rest/client/model/IssueTypeUpdateBean.java
3619a9aea2b8f14c786798f4a3721a62a6330ace
[]
no_license
amondnet/jira-client
7ff59c70cead9d517d031836f961ec0e607366cb
4f9fdf10532fefbcc0d6ae80fd42d357545eee4d
refs/heads/main
2023-04-03T21:42:24.069554
2021-04-15T15:27:20
2021-04-15T15:27:20
358,300,244
0
0
null
null
null
null
UTF-8
Java
false
false
4,423
java
/* * The Jira Cloud platform REST API * Jira Cloud platform REST API documentation * * The version of the OpenAPI document: 1001.0.0-SNAPSHOT * Contact: ecosystem@atlassian.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package com.atlassian.jira.rest.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; /** * IssueTypeUpdateBean */ @JsonPropertyOrder({ IssueTypeUpdateBean.JSON_PROPERTY_NAME, IssueTypeUpdateBean.JSON_PROPERTY_DESCRIPTION, IssueTypeUpdateBean.JSON_PROPERTY_AVATAR_ID }) @JsonTypeName("IssueTypeUpdateBean") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-04-16T00:10:50.175246+09:00[Asia/Seoul]") public class IssueTypeUpdateBean { public static final String JSON_PROPERTY_NAME = "name"; private String name; public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; public static final String JSON_PROPERTY_AVATAR_ID = "avatarId"; private Long avatarId; public IssueTypeUpdateBean name(String name) { this.name = name; return this; } /** * The unique name for the issue type. The maximum length is 60 characters. * @return name **/ @javax.annotation.Nullable @ApiModelProperty(value = "The unique name for the issue type. The maximum length is 60 characters.") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getName() { return name; } public void setName(String name) { this.name = name; } public IssueTypeUpdateBean description(String description) { this.description = description; return this; } /** * The description of the issue type. * @return description **/ @javax.annotation.Nullable @ApiModelProperty(value = "The description of the issue type.") @JsonProperty(JSON_PROPERTY_DESCRIPTION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public IssueTypeUpdateBean avatarId(Long avatarId) { this.avatarId = avatarId; return this; } /** * The ID of an issue type avatar. * @return avatarId **/ @javax.annotation.Nullable @ApiModelProperty(value = "The ID of an issue type avatar.") @JsonProperty(JSON_PROPERTY_AVATAR_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getAvatarId() { return avatarId; } public void setAvatarId(Long avatarId) { this.avatarId = avatarId; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } IssueTypeUpdateBean issueTypeUpdateBean = (IssueTypeUpdateBean) o; return Objects.equals(this.name, issueTypeUpdateBean.name) && Objects.equals(this.description, issueTypeUpdateBean.description) && Objects.equals(this.avatarId, issueTypeUpdateBean.avatarId); } @Override public int hashCode() { return Objects.hash(name, description, avatarId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IssueTypeUpdateBean {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" avatarId: ").append(toIndentedString(avatarId)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "amond@amond.net" ]
amond@amond.net
24d37db3da8a2d3daa228243d1307c9c95b3b5b9
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-38b-2-29-NSGA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/optimization/direct/BOBYQAOptimizer_ESTest_scaffolding.java
57fbc869422892a91e9d43c66cfd14b95f66cd54
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
6,438
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Jan 18 21:32:10 UTC 2020 */ package org.apache.commons.math.optimization.direct; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class BOBYQAOptimizer_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.optimization.direct.BOBYQAOptimizer"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(BOBYQAOptimizer_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.math.exception.MathIllegalStateException", "org.apache.commons.math.linear.BlockFieldMatrix", "org.apache.commons.math.exception.NumberIsTooSmallException", "org.apache.commons.math.util.Incrementor", "org.apache.commons.math.exception.NullArgumentException", "org.apache.commons.math.exception.util.ExceptionContext", "org.apache.commons.math.util.Incrementor$MaxCountExceededCallback", "org.apache.commons.math.optimization.SimpleScalarValueChecker", "org.apache.commons.math.optimization.AbstractConvergenceChecker", "org.apache.commons.math.linear.MatrixUtils", "org.apache.commons.math.exception.NotStrictlyPositiveException", "org.apache.commons.math.linear.RealMatrix", "org.apache.commons.math.optimization.direct.BOBYQAOptimizer$PathIsExploredException", "org.apache.commons.math.linear.MatrixDimensionMismatchException", "org.apache.commons.math.linear.RealLinearOperator", "org.apache.commons.math.exception.MathIllegalArgumentException", "org.apache.commons.math.util.CompositeFormat", "org.apache.commons.math.linear.AbstractFieldMatrix", "org.apache.commons.math.exception.MultiDimensionMismatchException", "org.apache.commons.math.exception.MathParseException", "org.apache.commons.math.optimization.direct.BaseAbstractMultivariateOptimizer", "org.apache.commons.math.exception.DimensionMismatchException", "org.apache.commons.math.exception.MathIllegalNumberException", "org.apache.commons.math.linear.ArrayRealVector", "org.apache.commons.math.optimization.MultivariateOptimizer", "org.apache.commons.math.analysis.MultivariateFunction", "org.apache.commons.math.analysis.BivariateRealFunction", "org.apache.commons.math.linear.RealVectorFormat", "org.apache.commons.math.optimization.ConvergenceChecker", "org.apache.commons.math.analysis.UnivariateFunction", "org.apache.commons.math.exception.OutOfRangeException", "org.apache.commons.math.linear.AnyMatrix", "org.apache.commons.math.exception.NumberIsTooLargeException", "org.apache.commons.math.exception.NoDataException", "org.apache.commons.math.linear.RealVector$2", "org.apache.commons.math.exception.ZeroException", "org.apache.commons.math.exception.TooManyEvaluationsException", "org.apache.commons.math.linear.Array2DRowRealMatrix", "org.apache.commons.math.linear.RealMatrixPreservingVisitor", "org.apache.commons.math.analysis.SincFunction", "org.apache.commons.math.optimization.BaseMultivariateOptimizer", "org.apache.commons.math.optimization.BaseOptimizer", "org.apache.commons.math.linear.SparseRealMatrix", "org.apache.commons.math.analysis.SumSincFunction", "org.apache.commons.math.linear.FieldMatrixPreservingVisitor", "org.apache.commons.math.exception.util.Localizable", "org.apache.commons.math.analysis.DifferentiableUnivariateFunction", "org.apache.commons.math.linear.NonSquareMatrixException", "org.apache.commons.math.linear.AbstractRealMatrix", "org.apache.commons.math.util.Incrementor$1", "org.apache.commons.math.optimization.RealPointValuePair", "org.apache.commons.math.exception.MaxCountExceededException", "org.apache.commons.math.linear.FieldVector", "org.apache.commons.math.exception.MathArithmeticException", "org.apache.commons.math.analysis.DifferentiableMultivariateFunction", "org.apache.commons.math.analysis.MultivariateVectorFunction", "org.apache.commons.math.linear.Array2DRowFieldMatrix", "org.apache.commons.math.linear.BlockRealMatrix", "org.apache.commons.math.optimization.BaseMultivariateSimpleBoundsOptimizer", "org.apache.commons.math.analysis.SincFunction$1", "org.apache.commons.math.exception.util.LocalizedFormats", "org.apache.commons.math.linear.RealVector", "org.apache.commons.math.optimization.direct.BaseAbstractMultivariateSimpleBoundsOptimizer", "org.apache.commons.math.linear.RealMatrixChangingVisitor", "org.apache.commons.math.linear.FieldMatrix", "org.apache.commons.math.optimization.direct.BOBYQAOptimizer", "org.apache.commons.math.exception.util.ExceptionContextProvider", "org.apache.commons.math.linear.OpenMapRealMatrix", "org.apache.commons.math.optimization.GoalType", "org.apache.commons.math.exception.util.ArgUtils" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
8895b671a2d008d67efc48967fe3e500f155507b
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2018/4/MandatoryTransactionsForNodeIndexFacadeTest.java
ff291d1a0d9f67b3acfebf131b6e5be2dd5db1e5
[]
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
1,476
java
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.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.graphdb; import org.junit.Test; import org.neo4j.graphdb.index.Index; import static org.neo4j.graphdb.NodeIndexFacadeMethods.ALL_NODE_INDEX_FACADE_METHODS; public class MandatoryTransactionsForNodeIndexFacadeTest extends AbstractMandatoryTransactionsTest<Index<Node>> { @Test public void shouldRequireTransactionsWhenCallingMethodsOnNodeIndexFacade() { assertFacadeMethodsThrowNotInTransaction( obtainEntity(), ALL_NODE_INDEX_FACADE_METHODS ); } @Override protected Index<Node> obtainEntityInTransaction( GraphDatabaseService graphDatabaseService ) { return graphDatabaseService.index().forNodes( "foo" ); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
fe4defd40c540ae0e197248e9c07baa54e4ce5e2
f5b407377a491a7cd475414c7faeed18468ac5b0
/feilong-core/src/test/java/com/feilong/core/lang/stringutiltest/StringUtilSuiteTests.java
7ac9224cdce73221ffb1b0cb30c4eaa5f28a2e7c
[ "Apache-2.0" ]
permissive
luchao0111/feilong
100a7b7784fc6fbfb8252bd468c52899dc4b5169
4024b8abb5b19f1378295fa8d1bd8ee3b86cfdad
refs/heads/master
2022-05-29T02:09:55.324155
2020-05-06T14:50:17
2020-05-06T14:50:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,625
java
/* * Copyright (C) 2008 feilong * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.feilong.core.lang.stringutiltest; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** * The Class FeiLongStringUtilSuiteTests. * * @author <a href="http://feitianbenyue.iteye.com/">feilong</a> */ @RunWith(Suite.class) @SuiteClasses({ // FormatParameterizedTest.class, GetBytesTest.class, GetBytesAndCharsetNameTest.class, ReplaceAllParameterizedTest.class, ReplaceParameterizedTest.class, ReplaceValuesMapTest.class, SubstringBeginIndexTest.class, SubstringLastTest.class, SubstringStartIndexAndLengthParameterizedTest.class, SubstringWithoutLastLastLengthTest.class, SubstringWithoutLastLastStringTest.class, TokenizeToStringArrayTest.class, TokenizeToStringArrayWithArgsTest.class, // }) public class StringUtilSuiteTests{ }
[ "venusdrogon@163.com" ]
venusdrogon@163.com
f37bf21e6e43d17dfcb301605fa12b769556598f
5d473a369790a6ce6e02788bfa22bc7e6858fa08
/org/apache/catalina/ha/session/ClusterSessionListener.java
16a7bac7787cc75ce13e4b774e77993c1b760264
[]
no_license
toby941/tomcat
a187a3d676b7544f7607c364dedbef6d0bfa0821
2e6f458470ef0671905aed3ba2e8c998e0ff33cd
refs/heads/master
2021-01-23T07:21:41.388214
2013-09-14T04:02:38
2013-09-14T04:02:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,698
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.catalina.ha.session; import java.util.Map; import org.apache.catalina.ha.ClusterListener; import org.apache.catalina.ha.ClusterManager; import org.apache.catalina.ha.ClusterMessage; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; /** * Receive replicated SessionMessage form other cluster node. * @author Filip Hanik * @author Peter Rossbach * @version $Id: ClusterSessionListener.java 1195848 2011-11-01 07:00:21Z kfujino $ */ public class ClusterSessionListener extends ClusterListener { private static final Log log = LogFactory.getLog(ClusterSessionListener.class); /** * The descriptive information about this implementation. */ protected static final String info = "org.apache.catalina.session.ClusterSessionListener/1.1"; //--Constructor--------------------------------------------- public ClusterSessionListener() { } //--Logic--------------------------------------------------- /** * Return descriptive information about this implementation. */ public String getInfo() { return (info); } /** * Callback from the cluster, when a message is received, The cluster will * broadcast it invoking the messageReceived on the receiver. * * @param myobj * ClusterMessage - the message received from the cluster */ @Override public void messageReceived(ClusterMessage myobj) { if (myobj != null && myobj instanceof SessionMessage) { SessionMessage msg = (SessionMessage) myobj; String ctxname = msg.getContextName(); //check if the message is a EVT_GET_ALL_SESSIONS, //if so, wait until we are fully started up Map managers = cluster.getManagers() ; if (ctxname == null) { java.util.Iterator i = managers.keySet().iterator(); while (i.hasNext()) { String key = (String) i.next(); ClusterManager mgr = (ClusterManager) managers.get(key); if (mgr != null) mgr.messageDataReceived(msg); else { //this happens a lot before the system has started // up if (log.isDebugEnabled()) log.debug("Context manager doesn't exist:" + key); } } } else { ClusterManager mgr = (ClusterManager) managers.get(ctxname); if (mgr != null) { mgr.messageDataReceived(msg); } else { if (log.isWarnEnabled()) log.warn("Context manager doesn't exist:" + ctxname); // A no context manager message is replied in order to avoid // timeout of GET_ALL_SESSIONS sync phase. if (msg.getEventType() == SessionMessage.EVT_GET_ALL_SESSIONS) { SessionMessage replymsg = new SessionMessageImpl(ctxname, SessionMessage.EVT_ALL_SESSION_NOCONTEXTMANAGER, null, "NO-CONTEXT-MANAGER","NO-CONTEXT-MANAGER-" + ctxname); cluster.send(replymsg, msg.getAddress()); } } } } return; } /** * Accept only SessionMessage * * @param msg * ClusterMessage * @return boolean - returns true to indicate that messageReceived should be * invoked. If false is returned, the messageReceived method will * not be invoked. */ @Override public boolean accept(ClusterMessage msg) { return (msg instanceof SessionMessage); } }
[ "toby941@gmail.com" ]
toby941@gmail.com
64fa178ba1d1230779532ba63d931738f716e2f6
165103be7256703b3346bea0db2b9bb976f5e64c
/src/com/freshbin/pattern/factory/example/pizza/PepperPizza.java
0b3c6a07d6c732c96962b7951ba613604f3af539
[]
no_license
freshbin/designPattern
cbabe663198c7103bd60ede52422e4e775aca462
a5b0e57c750b4fb5c569cdeb28a679b316eb3d3e
refs/heads/master
2020-04-14T14:50:30.435796
2019-01-27T08:32:54
2019-01-27T08:32:54
163,908,794
2
0
null
null
null
null
UTF-8
Java
false
false
264
java
package com.freshbin.pattern.factory.example.pizza; public class PepperPizza extends Pizza { @Override public void prepare() { // TODO Auto-generated method stub super.setname("PepperPizza"); System.out.println(name+" preparing;"); } }
[ "343625573@qq.com" ]
343625573@qq.com
7c76768123972f3c6128addbfa251b1da12a55b1
1f9f97d0c229f51b135a47747285803b2f2958e5
/src/main/java/charpter08_organizate_data/ver06_duplicate_observed_data/before_refactor/IntervalWindow.java
00a0d4b49f9e6a1883d4bd046e88cfa77e2eeef3
[]
no_license
caoxincx/refactoring
d7b61491a55fd92fa67b34ded641761dda0f5a4e
81403352a5ae93d99633d38522026d85def8b642
refs/heads/master
2020-09-22T09:57:17.563242
2019-12-01T10:28:37
2019-12-01T10:28:37
225,147,145
0
0
null
null
null
null
UTF-8
Java
false
false
2,428
java
package charpter08_organizate_data.ver06_duplicate_observed_data.before_refactor; import java.awt.*; import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; /** * 需求编号:2019D0519 * 问题编号: * 开发人员: caoxin * 创建日期:2019/11/17 * 功能描述: * 修改日期:2019/11/17 * 修改描述: */ public class IntervalWindow extends Frame { private TextField startField; private TextField endField; private TextField lengthField; class SymFocus extends FocusAdapter { @Override public void focusLost(FocusEvent e) { Object source = e.getSource(); if (source == startField) { startFieldFocusLost(e); } else if (source == endField) { endFieldFocusLost(e); } else if (source == lengthField) { lengthFieldFocusLost(e); } } private void lengthFieldFocusLost(FocusEvent e) { if (isNotInteger(lengthField.getText())) { startField.setText("0"); } calculateEnd(); } private void endFieldFocusLost(FocusEvent e) { if (isNotInteger(endField.getText())) { startField.setText("0"); } calculateLength(); } private void startFieldFocusLost(FocusEvent e) { if (isNotInteger(startField.getText())) { startField.setText("0"); } calculateLength(); } private void calculateLength() { try { int start = Integer.parseInt(startField.getText()); int end = Integer.parseInt(endField.getText()); int length = start - end; lengthField.setText(String.valueOf(length)); } catch (NumberFormatException e) { e.printStackTrace(); } } private void calculateEnd() { try { int start = Integer.parseInt(startField.getText()); int length = Integer.parseInt(lengthField.getText()); int end = start - length; endField.setText(String.valueOf(end)); } catch (NumberFormatException e) { e.printStackTrace(); } } private boolean isNotInteger(String text) { return false; } } }
[ "120972361@qq.com" ]
120972361@qq.com
060c08534b59bd852ed9cdb19e6883102cbcb01b
128eb90ce7b21a7ce621524dfad2402e5e32a1e8
/laravel-converted/src/main/java/com/project/convertedCode/includes/vendor/phpdocumentor/type_resolver/src/Types/file_Float__php.java
874698cfdd5abf5efbdc10ea1d3fb42a35e93e1b
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
RuntimeConverter/RuntimeConverterLaravelJava
657b4c73085b4e34fe4404a53277e056cf9094ba
7ae848744fbcd993122347ffac853925ea4ea3b9
refs/heads/master
2020-04-12T17:22:30.345589
2018-12-22T10:32:34
2018-12-22T10:32:34
162,642,356
0
0
null
null
null
null
UTF-8
Java
false
false
2,004
java
package com.project.convertedCode.includes.vendor.phpdocumentor.type_resolver.src.Types; import com.runtimeconverter.runtime.RuntimeStack; import com.runtimeconverter.runtime.interfaces.ContextConstants; import com.runtimeconverter.runtime.includes.RuntimeIncludable; import com.runtimeconverter.runtime.includes.IncludeEventException; import com.runtimeconverter.runtime.classes.RuntimeClassBase; import com.runtimeconverter.runtime.RuntimeEnv; import com.runtimeconverter.runtime.interfaces.UpdateRuntimeScopeInterface; import com.runtimeconverter.runtime.arrays.ZPair; /* Converted with The Runtime Converter (runtimeconverter.com) vendor/phpdocumentor/type-resolver/src/Types/Float_.php */ public class file_Float__php implements RuntimeIncludable { public static final file_Float__php instance = new file_Float__php(); public final void include(RuntimeEnv env, RuntimeStack stack) throws IncludeEventException { Scope2378 scope = new Scope2378(); stack.pushScope(scope); this.include(env, stack, scope); stack.popScope(); } public final void include(RuntimeEnv env, RuntimeStack stack, Scope2378 scope) throws IncludeEventException { // Namespace import was here // Conversion Note: class named Float_ was here in the source code env.addManualClassLoad("phpDocumentor\\Reflection\\Types\\Float_"); } private static final ContextConstants runtimeConverterContextContantsInstance = new ContextConstants() .setDir("/vendor/phpdocumentor/type-resolver/src/Types") .setFile("/vendor/phpdocumentor/type-resolver/src/Types/Float_.php"); public ContextConstants getContextConstants() { return runtimeConverterContextContantsInstance; } private static class Scope2378 implements UpdateRuntimeScopeInterface { public void updateStack(RuntimeStack stack) {} public void updateScope(RuntimeStack stack) {} } }
[ "git@runtimeconverter.com" ]
git@runtimeconverter.com
983b13665064df3c31e1483bdfd53f02aa2b5bf4
b3f6ae5464b4287133138f06fc18cfa07e5c6811
/src/com/miguelcaetano/hyperskill/basic_syntax/hello_java/Main.java
7fedd004af3b22e59527e550983412d2b0f1385d
[]
no_license
KatherineMC2/hyperskill_java_challenges
425dd4f0746746d71f1816dd30a6a755fcfc5ecf
3d307b76563a5ff3a3fb9dc5b5d08e8107aacd25
refs/heads/master
2023-03-22T14:24:17.292342
2021-03-22T01:16:04
2021-03-22T01:16:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
180
java
package com.miguelcaetano.hyperskill.basic_syntax.hello_java; public class Main { public static void main(String[] args) { System.out.println("Hello, Java!"); } }
[ "miguel.a.caetano@gmail.com" ]
miguel.a.caetano@gmail.com
5d3a9b713c1db6c151777bb5a0e9681daef30cd5
29b52f4d202b0e5b3e1b0a4b3130a4a7bbed0392
/EXAMENQTJambiJUANRAUL/src/examenqtjambijuanraul/MainWindow.java
fa5c8f1c2a4436c9c1283608fff59bd51f7deb55
[]
no_license
juanra1997/DI
80b5350a2f4210a583c444e9345a286d44efe650
656d97c147f1dc60d97f3efb5a9aebf80bd182bd
refs/heads/master
2020-03-29T02:31:31.412935
2019-03-12T12:24:08
2019-03-12T12:24:08
149,441,261
0
0
null
null
null
null
UTF-8
Java
false
false
5,174
java
package examenqtjambijuanraul; /******************************************************************************** ** Form generated from reading ui file 'VentanaPrincipal.jui' ** ** Created by: Qt User Interface Compiler version 4.8.7 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! ********************************************************************************/ import com.trolltech.qt.core.*; import com.trolltech.qt.gui.*; public class MainWindow implements com.trolltech.qt.QUiForm<QMainWindow> { public QAction actionAcerda_de; public QAction actionNuevo_vehiculo; public QAction actionBaja_vehiculo; public QAction actionSalir; public QWidget centralwidget; public QPushButton pushButton; public QLabel label; public QMenuBar menubar; public QMenu menuArchivo; public QMenu menuVehiculo; public QMenu menuAcerca_de; public QStatusBar statusbar; public MainWindow() { super(); } @Override public void setupUi(QMainWindow MainWindow) { MainWindow.setObjectName("MainWindow"); MainWindow.resize(new QSize(333, 335).expandedTo(MainWindow.minimumSizeHint())); MainWindow.setWindowIcon(new QIcon(new QPixmap("f1y0bb.png"))); actionAcerda_de = new QAction(MainWindow); actionAcerda_de.setObjectName("actionAcerda_de"); actionAcerda_de.triggered.connect(this, "mensaje()"); actionNuevo_vehiculo = new QAction(MainWindow); actionNuevo_vehiculo.setObjectName("actionNuevo_vehiculo"); actionNuevo_vehiculo.triggered.connect(this, "abrir()"); actionBaja_vehiculo = new QAction(MainWindow); actionBaja_vehiculo.setObjectName("actionBaja_vehiculo"); actionBaja_vehiculo.triggered.connect(this, "baja()"); actionSalir = new QAction(MainWindow); actionSalir.setObjectName("actionSalir"); actionSalir.triggered.connect(MainWindow, "close()"); centralwidget = new QWidget(MainWindow); centralwidget.setObjectName("centralwidget"); pushButton = new QPushButton(centralwidget); pushButton.setObjectName("pushButton"); pushButton.setGeometry(new QRect(100, 50, 131, 51)); pushButton.clicked.connect(this,"abrir()"); label = new QLabel(centralwidget); label.setObjectName("label"); label.setGeometry(new QRect(110, 140, 121, 111)); label.setPixmap(new QPixmap(("f1y0bb.png"))); label.setScaledContents(true); MainWindow.setCentralWidget(centralwidget); menubar = new QMenuBar(MainWindow); menubar.setObjectName("menubar"); menubar.setGeometry(new QRect(0, 0, 333, 26)); menuArchivo = new QMenu(menubar); menuArchivo.setObjectName("menuArchivo"); menuVehiculo = new QMenu(menubar); menuVehiculo.setObjectName("menuVehiculo"); menuAcerca_de = new QMenu(menubar); menuAcerca_de.setObjectName("menuAcerca_de"); MainWindow.setMenuBar(menubar); statusbar = new QStatusBar(MainWindow); statusbar.setObjectName("statusbar"); MainWindow.setStatusBar(statusbar); menubar.addAction(menuArchivo.menuAction()); menubar.addAction(menuVehiculo.menuAction()); menubar.addAction(menuAcerca_de.menuAction()); menuArchivo.addAction(actionSalir); menuVehiculo.addAction(actionNuevo_vehiculo); menuVehiculo.addAction(actionBaja_vehiculo); menuAcerca_de.addAction(actionAcerda_de); retranslateUi(MainWindow); MainWindow.connectSlotsByName(); } // setupUi void retranslateUi(QMainWindow MainWindow) { MainWindow.setWindowTitle(com.trolltech.qt.core.QCoreApplication.translate("MainWindow", "MainWindow", null)); actionAcerda_de.setText(com.trolltech.qt.core.QCoreApplication.translate("MainWindow", "Acerca de...", null)); actionNuevo_vehiculo.setText(com.trolltech.qt.core.QCoreApplication.translate("MainWindow", "Nuevo vehiculo", null)); actionBaja_vehiculo.setText(com.trolltech.qt.core.QCoreApplication.translate("MainWindow", "Baja vehiculo", null)); actionSalir.setText(com.trolltech.qt.core.QCoreApplication.translate("MainWindow", "Salir", null)); pushButton.setText(com.trolltech.qt.core.QCoreApplication.translate("MainWindow", "Abrir", null)); label.setText(""); menuArchivo.setTitle(com.trolltech.qt.core.QCoreApplication.translate("MainWindow", "Archivo", null)); menuVehiculo.setTitle(com.trolltech.qt.core.QCoreApplication.translate("MainWindow", "Vehiculo", null)); menuAcerca_de.setTitle(com.trolltech.qt.core.QCoreApplication.translate("MainWindow", "Acerca de...", null)); } // retranslateUi void abrir(){ Dialog Alta = new Dialog(); QDialog dialog = new QDialog(); Alta.setupUi(dialog); dialog.show(); } void baja(){ QMessageBox.information(null, "Bajas", "Aplicacion en desarrollo"); } void mensaje(){ QMessageBox.information(null, "Acerca de...", "Aplicacion creada por Juan Raul Mellado Garcia"); } }
[ "juanrainmortal22@yahoo.com" ]
juanrainmortal22@yahoo.com
dfba646367781781e4d5486184716fc1c0ee0265
745b525c360a2b15b8d73841b36c1e8d6cdc9b03
/jun_java_plugins/jun_leetcode/src/main/java/com/jun/plugin/leetcode/algorithm/no0147/Solution.java
a3c62d77eaa0b61ca9a8568a369e3d7e89e9e315
[]
no_license
wujun728/jun_java_plugin
1f3025204ef5da5ad74f8892adead7ee03f3fe4c
e031bc451c817c6d665707852308fc3b31f47cb2
refs/heads/master
2023-09-04T08:23:52.095971
2023-08-18T06:54:29
2023-08-18T06:54:29
62,047,478
117
42
null
2023-08-21T16:02:15
2016-06-27T10:23:58
Java
UTF-8
Java
false
false
3,362
java
package com.jun.plugin.leetcode.algorithm.no0147; import com.jun.plugin.leetcode.algorithm.common.ListNode; /** * https://leetcode-cn.com/problems/insertion-sort-list/ * * TODO 芋艿 参考 https://www.cnblogs.com/zqiguoshang/p/5897991.html 博客实现,看的有点懵逼,不是非常理解。 * * 后来,编写了 {@link Solution02} 来实现解决。不过性能上,Solution02 比 Solution 差蛮多。 */ public class Solution { public ListNode insertionSortList(ListNode head) { if (head == null || head.next == null) { return head; } // 虚拟头节点,方便编程 ListNode dummy = new ListNode(Integer.MIN_VALUE); dummy.next = head; // 从头节点开始,插入排序 ListNode prev = head; while (prev.next != null) { // 如果当前节点(prev)比下一个节点大,直接跳到下个节点。TODO 芋艿 if (prev.val <= prev.next.val) { prev = prev.next; continue; } // 删除 prev.next 节点 ListNode tmp = prev.next; prev.next = prev.next.next; // 寻找最后一个比 prev.next 小的节点 ListNode query = dummy; while (tmp.val >= query.next.val) { // 注意,这里的 query.next query = query.next; } // 将 tmp 插入到 query 后面 tmp.next = query.next; query.next = tmp; } return dummy.next; } // public static void bubbleSort(int []arr) { // int[] arr = {12,23,34,56,56,56,78}; // for(int i =0;i<arr.length-1;i++) { // for(int j=0;j<arr.length-i-1;j++) {//-1为了防止溢出 // if(arr[j]>arr[j+1]) { // int temp = arr[j]; // // arr[j]=arr[j+1]; // // arr[j+1]=temp; // } // } // } // } public static void main(String[] args) { Solution solution = new Solution(); if (false) { System.out.println(solution.insertionSortList(ListNode.create(5, 1, 2, 3, 4))); } if (true) { System.out.println(solution.insertionSortList(ListNode.create(5, 2, 3, 4, 1))); } if (false) { ListNode head = new ListNode(4); head.next = new ListNode(2); head.next.next = new ListNode(1); head.next.next.next = new ListNode(3); System.out.println(solution.insertionSortList(head)); } if (false) { ListNode head = new ListNode(-1); head.next = new ListNode(5); head.next.next = new ListNode(3); head.next.next.next = new ListNode(4); head.next.next.next.next = new ListNode(0); System.out.println(solution.insertionSortList(head)); } if (false) { ListNode head = new ListNode(1); head.next = new ListNode(1); System.out.println(solution.insertionSortList(head)); } if (false) { ListNode head = new ListNode(3); head.next = new ListNode(2); head.next.next = new ListNode(4); System.out.println(solution.insertionSortList(head)); } } }
[ "wujun728@163.com" ]
wujun728@163.com
da88ec72a0c05322eb3e82efb8e000059a4610b0
464e189e8f5f83f10386bf0a6c9d5cf5251695fe
/flexy-dbcp/src/test/java/com/vladmihalcea/flexypool/DBCPIntegrationTest.java
6724ae9db4e384a1a771a9bad2cd521227551f8d
[ "Apache-2.0" ]
permissive
ThomasLau/flexy-pool
601c6cbb93f0bb8b407adedf3d1749f69b5fd037
dd93b497d953039c03d4adcfc3d1f3972397f82d
refs/heads/master
2021-01-17T20:18:17.035277
2015-06-21T14:34:36
2015-06-21T14:34:36
37,839,623
2
0
null
2015-06-22T05:54:54
2015-06-22T05:54:54
null
UTF-8
Java
false
false
518
java
package com.vladmihalcea.flexypool; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /** * DBCPIntegrationTest - BasicDataSource Integration Test * * @author Vlad Mihalcea */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "classpath:spring/applicationContext-test.xml") public class DBCPIntegrationTest extends AbstractPoolAdapterIntegrationTest { }
[ "mih_vlad@yahoo.com" ]
mih_vlad@yahoo.com
ee9b80abe87be6d52234c4d2dc3f75e5022c1def
7c75e387de3bbc7c1732d6f21b64dcbc762e6034
/gapi-gateway/src/main/java/io/github/conanchen/shoppingcart/graphql/model/CurrencyInputGQO.java
6abd5b85b296048222887d003a40aedd893ba866
[ "Apache-2.0" ]
permissive
conanchen/netifi-kgmovies
8ce8f3aa5c8fae2304f48792b7f89326597eb169
77da1f463fb52a52fe91396e86840af84635fcb2
refs/heads/master
2020-12-28T05:34:52.317761
2020-04-05T15:01:07
2020-04-05T15:01:07
238,192,065
1
1
null
null
null
null
UTF-8
Java
false
false
904
java
package io.github.conanchen.shoppingcart.graphql.model; import io.github.conanchen.zommon.graphql.model.CurrencyCodeGQO; import lombok.Builder; import lombok.Data; @Data @Builder public class CurrencyInputGQO { private String clientMutationId; private CurrencyCodeGQO code; private String symbol; private String thousandsSeparator; private String decimalSeparator; private Integer decimalDigits; public CurrencyInputGQO() { } public CurrencyInputGQO( String clientMutationId, CurrencyCodeGQO code, String symbol, String thousandsSeparator, String decimalSeparator, Integer decimalDigits) { this.clientMutationId = clientMutationId; this.code = code; this.symbol = symbol; this.thousandsSeparator = thousandsSeparator; this.decimalSeparator = decimalSeparator; this.decimalDigits = decimalDigits; } }
[ "conan8chan@yahoo.com" ]
conan8chan@yahoo.com
d005fd5bd16a1deab1c374cd044eb9d0e6b95908
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/MATH-103b-1-6-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage/org/apache/commons/math/special/Gamma_ESTest_scaffolding.java
fee739ade85996484ea03f18359cfbdcdada78ba
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
2,187
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat May 16 21:42:54 UTC 2020 */ package org.apache.commons.math.special; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class Gamma_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.special.Gamma"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Gamma_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.math.special.Gamma$1", "org.apache.commons.math.MathException", "org.apache.commons.math.MaxIterationsExceededException", "org.apache.commons.math.special.Gamma", "org.apache.commons.math.util.ContinuedFraction", "org.apache.commons.math.ConvergenceException" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
6b0f7c92ff7c762cb4d11be0ff729bf344a00357
e91e2344c2fb46bf968fce9d6c6422aefac85c3e
/mod11-performanceMesure/src/test/java/net/franckbenault/guava/sample/SampleWithStopWatchCommonsTest.java
9e14de8f4e8a3c5c75ab37d744751ff844d7042a
[]
no_license
franck-benault/test-google-collection
bdf1b416baa91031287cc1a975a95c86c3f15c59
16252752b815b9c1e54d1703ea0f85bc10597566
refs/heads/master
2020-06-01T05:42:50.611072
2014-08-20T19:42:43
2014-08-20T19:42:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
332
java
package net.franckbenault.guava.sample; import static org.junit.Assert.*; import org.junit.Test; public class SampleWithStopWatchCommonsTest { @Test(timeout=4000) public void testLongProcess() { long elapsedTime = SampleWithStopWatchCommons.longProcess(); assertTrue(elapsedTime>0); assertTrue(elapsedTime<3500); } }
[ "franck-benault@orange.fr" ]
franck-benault@orange.fr
1357b12471776d6fcb6fcabd816b7e2e35918669
a422de59c29d077c512d66b538ff17d179cc077a
/hsxt/hsxt-gpf/hsxt-gpf-bm/hsxt-gpf-bm-service/src/test/java/com/gy/apply/web/increment/service/impl/PointValueServiceImplTest.java
2c1798f4c5720078125d7091ad02e59a7a63070b
[]
no_license
liveqmock/hsxt
c554e4ebfd891e4cc3d57e920d8a79ecc020b4dd
40bb7a1fe5c22cb5b4f1d700e5d16371a3a74c04
refs/heads/master
2020-03-28T14:09:31.939168
2018-09-12T10:20:46
2018-09-12T10:20:46
148,461,898
0
0
null
2018-09-12T10:19:11
2018-09-12T10:19:10
null
UTF-8
Java
false
false
1,237
java
package com.gy.apply.web.increment.service.impl; import com.gy.hsxt.gpf.bm.service.PointValueService; import com.gy.hsxt.gpf.bm.utils.TimeUtil; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("classpath:spring/spring-global.xml") public class PointValueServiceImplTest { @Autowired private PointValueService pointValueService; @Before public void setUp() throws Exception { } @After public void tearDown() throws Exception { } @Test public void testFindByRowKeyRange() throws Exception{ TimeUtil tt = new TimeUtil(); String startRowKey = tt.getMondayOFWeek(); String endRowKey = tt.getCurrentWeekday(); // // Collection<PointValue> collection = pointValueService.findByRowKeyRange(startRowKey, endRowKey); // Iterator<PointValue> ite = collection.iterator(); // // while(ite.hasNext()) { // PointValue pv = ite.next(); // System.out.println(pv.getResNo()+":"+pv.getPv()); // } } }
[ "864201042@qq.com" ]
864201042@qq.com
d013f5f130f724c45c2f70df406fb94900f9ac32
67280f5eabc7215db02169004861ccd519de2946
/src/main/java/kr/co/shop/web/order/model/master/OcOrderPaymentFailureHistory.java
61c26b1822fd1828cf157b2af4969c8758eca5a4
[]
no_license
kikikikikinanana/es_backend_sample
f0354efcc90c334431b35dc209048e319b0d2844
d8969c2d2255caa24bb9acd85260cbced7e2abcb
refs/heads/master
2022-06-09T08:50:21.190450
2019-09-27T04:58:24
2019-09-27T04:58:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
297
java
package kr.co.shop.web.order.model.master; import kr.co.shop.web.order.model.master.base.BaseOcOrderPaymentFailureHistory; import lombok.Data; import lombok.extern.slf4j.Slf4j; @Slf4j @Data public class OcOrderPaymentFailureHistory extends BaseOcOrderPaymentFailureHistory { }
[ "FIC05239@IC0-W-N08815R.ssg.global" ]
FIC05239@IC0-W-N08815R.ssg.global
870669022b7dc78fd5ca9be9afed025e226bf366
e89dc01c95b8b45404f971517c2789fd21657749
/src/main/java/com/alipay/api/response/AlipayCommerceIotAdvertiserAdBatchqueryResponse.java
82288bdb7d677b89ae95a0e804822046d5325217
[ "Apache-2.0" ]
permissive
guoweiecust/alipay-sdk-java-all
3370466eec70c5422c8916c62a99b1e8f37a3f46
bb2b0dc8208a7a0ab8521a52f8a5e1fcef61aeb9
refs/heads/master
2023-05-05T07:06:47.823723
2021-05-25T15:26:21
2021-05-25T15:26:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,068
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.CreationPlanData; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.commerce.iot.advertiser.ad.batchquery response. * * @author auto create * @since 1.0, 2019-08-13 17:13:07 */ public class AlipayCommerceIotAdvertiserAdBatchqueryResponse extends AlipayResponse { private static final long serialVersionUID = 1612244616273576244L; /** * 投放计划列表数组 */ @ApiListField("result") @ApiField("creation_plan_data") private List<CreationPlanData> result; /** * 计划总数 */ @ApiField("total") private Long total; public void setResult(List<CreationPlanData> result) { this.result = result; } public List<CreationPlanData> getResult( ) { return this.result; } public void setTotal(Long total) { this.total = total; } public Long getTotal( ) { return this.total; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
fe1a5057a66ff9d2785627e6e0d5a0f104e2f9f5
b8f680a3d5f9fa4a6c28fe5dbfc479ecb1079685
/src/ANXGallery/sources/com/miui/gallery/editor/photo/app/MatrixEvaluator.java
e353899e743c56ba993aa3f91c9131b2d10465d5
[]
no_license
nckmml/ANXGallery
fb6d4036f5d730f705172e524a038f9b62984c4c
392f7a28a34556b6784979dd5eddcd9e4ceaaa69
refs/heads/master
2020-12-19T05:07:14.669897
2020-01-22T15:56:10
2020-01-22T15:56:10
235,607,907
0
2
null
null
null
null
UTF-8
Java
false
false
832
java
package com.miui.gallery.editor.photo.app; import android.animation.TypeEvaluator; import android.graphics.Matrix; public class MatrixEvaluator implements TypeEvaluator<Matrix> { private float[] mTempEndValues = new float[9]; private Matrix mTempMatrix = new Matrix(); private float[] mTempStartValues = new float[9]; public Matrix evaluate(float f, Matrix matrix, Matrix matrix2) { matrix.getValues(this.mTempStartValues); matrix2.getValues(this.mTempEndValues); for (int i = 0; i < 9; i++) { float[] fArr = this.mTempEndValues; float f2 = fArr[i]; float[] fArr2 = this.mTempStartValues; fArr[i] = fArr2[i] + ((f2 - fArr2[i]) * f); } this.mTempMatrix.setValues(this.mTempEndValues); return this.mTempMatrix; } }
[ "nico.kuemmel@gmail.com" ]
nico.kuemmel@gmail.com
a9801389d8c7ce155c9429ca9d7b20b2d664b658
fb10774d7a7adb669fb95064fde48051d8496e11
/source/openapi-sdk-message-1.3.4.20170608-sources/com/yiji/openapi/message/common/oldtonew/SmsResponse.java
7978e4fb15130242d377a4a9488ce72b1aedbafd
[]
no_license
jtyjty99999/yiji-nodejs
9297339138df66590d02b637c76a62e54f0747ca
0e3e2e66f89bcc2f6de7466b1adf892b2d903d09
refs/heads/master
2021-01-22T22:35:31.766945
2017-06-25T15:16:36
2017-06-25T15:16:36
85,558,620
0
0
null
null
null
null
UTF-8
Java
false
false
1,144
java
/* * www.yiji.com Inc. * Copyright (c) 2016 All Rights Reserved. */ /* * 修订记录: * muyu@yiji.com 2016-01-22 14:27 创建 */ package com.yiji.openapi.message.common.oldtonew; import com.yiji.openapi.sdk.common.annotation.OpenApiField; import com.yiji.openapi.sdk.common.annotation.OpenApiMessage; import com.yiji.openapi.sdk.common.enums.ApiMessageType; import com.yiji.openapi.sdk.common.message.ApiResponse; /** * @author 木鱼 muyu@yiji.com * @version 2016/1/22 */ @OpenApiMessage(service = "sms", type = ApiMessageType.Response) public class SmsResponse extends ApiResponse { @OpenApiField(desc = "发送时间",demo = "2013-10-11 12:43") private String notifyTime; @OpenApiField(desc = "消息",demo = "发送成功") private String message; public String getNotifyTime() { return notifyTime; } public void setNotifyTime(String notifyTime) { this.notifyTime = notifyTime; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }
[ "tianyi.jiangty@alibaba-inc.com" ]
tianyi.jiangty@alibaba-inc.com
9fb9ed00c87e8db615378b524037cd14d09e5526
398b791d7b90a7b0bb63c6cb1b3c5dbcd481ffe4
/src_win/org/omg/CORBA/StringSeqHelper.java
793a38cb556fa6023fce40c3ac18995df070e518
[]
no_license
wfb0902/openjdk1.8
78fd0e902c0400d0ed4010def1233959471e83a8
1f2cbef22484b47efd8ec9c18084cbf5e176eeb1
refs/heads/master
2020-06-05T15:49:47.729186
2019-06-19T02:52:12
2019-06-19T02:52:12
189,914,200
0
0
null
null
null
null
UTF-8
Java
false
false
1,842
java
package org.omg.CORBA; /** * org/omg/CORBA/StringSeqHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from c:/cygwin64/tmp/openjdk-jdk8u-windows-x64-hotspot/workspace/build/src/corba/src/share/classes/org/omg/PortableInterceptor/CORBAX.idl * Monday, June 3, 2019 9:12:52 PM UTC */ /** An array of Strings */ abstract public class StringSeqHelper { private static String _id = "IDL:omg.org/CORBA/StringSeq:1.0"; public static void insert (org.omg.CORBA.Any a, String[] that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static String[] extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0); __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.StringSeqHelper.id (), "StringSeq", __typeCode); } return __typeCode; } public static String id () { return _id; } public static String[] read (org.omg.CORBA.portable.InputStream istream) { String value[] = null; int _len0 = istream.read_long (); value = new String[_len0]; for (int _o1 = 0;_o1 < value.length; ++_o1) value[_o1] = istream.read_string (); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, String[] value) { ostream.write_long (value.length); for (int _i0 = 0;_i0 < value.length; ++_i0) ostream.write_string (value[_i0]); } }
[ "wfb0902@dingtalk.com" ]
wfb0902@dingtalk.com
746ec462fb69060535dfd3fc7c8f18a573e5bf42
c26631c75ad6d5b52341d625a4090cede7d62a94
/thirdparties-extension/fr.opensagres.xdocreport.itext5.extension/src/main/java/fr/opensagres/xdocreport/itext/extension/IParagraphFactory.java
cf7bcbccc23417d2e739d2036e089752c8d694ca
[]
no_license
dbarra/xdocreport
96912461c518cd50ae1ff21fcb3ed18ff89858c7
6cfaaadeb1edf8f5ffe12068c0442b40746944cf
refs/heads/master
2016-08-11T12:40:15.290628
2015-06-10T06:48:19
2015-06-10T06:48:19
51,185,157
3
0
null
null
null
null
UTF-8
Java
false
false
1,459
java
/** * Copyright (C) 2011-2012 The XDocReport Team <xdocreport@googlegroups.com> * * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package fr.opensagres.xdocreport.itext.extension; import com.itextpdf.text.Paragraph; public interface IParagraphFactory { Paragraph createParagraph(); Paragraph createParagraph( Paragraph title ); }
[ "pascal.leclercq@gmail.com" ]
pascal.leclercq@gmail.com
c8a092cbbba2ff07954576a93532c7d571137ed6
6e2e45683c10f107c7ae6e4e6fc0a9d1d165df3b
/src/main/java/com/nrg/liusen/domain/LimitDataBean.java
516b1729377cc35b226ad611fd90586c6fd68831
[]
no_license
nrg-dev/Liuson
e7afcd2a0eff416696ca890332007408580c7451
0a7c9ae36273c4d7e27d7e105393489f82553adb
refs/heads/master
2022-12-23T02:48:15.676893
2019-11-16T10:36:44
2019-11-16T10:36:44
214,111,314
0
0
null
2022-12-16T01:00:04
2019-10-10T07:04:50
Java
UTF-8
Java
false
false
4,163
java
package com.nrg.liusen.domain; import java.io.Serializable; import java.util.Date; /** * * @author Robert Arjun * @date 27-10-2015 * @copyright NRG This class used to hold the data( POJO Class ) */ public class LimitDataBean implements Serializable{ /** * */ private static final long serialVersionUID = 1L; private String limitProductName; private String limitRawCategory1; private String limitRawCategoory2; private String limitLimitSize; private Date limitDate; private String limitDescription; private String limitProductName1; private String rawCategory; private String limProductCategory; private String limitProjectName; private String limitServiceName; private String limProductCategory1; private String status; public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } /** * @return the limProductCategory1 */ public String getLimProductCategory1() { return limProductCategory1; } /** * @param limProductCategory1 the limProductCategory1 to set */ public void setLimProductCategory1(String limProductCategory1) { this.limProductCategory1 = limProductCategory1; } /** * @return the limitProjectName */ public String getLimitProjectName() { return limitProjectName; } /** * @param limitProjectName the limitProjectName to set */ public void setLimitProjectName(String limitProjectName) { this.limitProjectName = limitProjectName; } /** * @return the limitServiceName */ public String getLimitServiceName() { return limitServiceName; } /** * @param limitServiceName the limitServiceName to set */ public void setLimitServiceName(String limitServiceName) { this.limitServiceName = limitServiceName; } /** * @return the limProductCategory */ public String getLimProductCategory() { return limProductCategory; } /** * @param limProductCategory the limProductCategory to set */ public void setLimProductCategory(String limProductCategory) { this.limProductCategory = limProductCategory; } /** * @return the limitProductName1 */ public String getLimitProductName1() { return limitProductName1; } /** * @param limitProductName1 the limitProductName1 to set */ public void setLimitProductName1(String limitProductName1) { this.limitProductName1 = limitProductName1; } /** * @return the rawCategory */ public String getRawCategory() { return rawCategory; } /** * @param rawCategory the rawCategory to set */ public void setRawCategory(String rawCategory) { this.rawCategory = rawCategory; } /** * @return the limitDescription */ public String getLimitDescription() { return limitDescription; } /** * @param limitDescription the limitDescription to set */ public void setLimitDescription(String limitDescription) { this.limitDescription = limitDescription; } /** * @return the limitProductName */ public String getLimitProductName() { return limitProductName; } /** * @param limitProductName the limitProductName to set */ public void setLimitProductName(String limitProductName) { this.limitProductName = limitProductName; } /** * @return the limitRawCategory1 */ public String getLimitRawCategory1() { return limitRawCategory1; } /** * @param limitRawCategory1 the limitRawCategory1 to set */ public void setLimitRawCategory1(String limitRawCategory1) { this.limitRawCategory1 = limitRawCategory1; } /** * @return the limitRawCategoory2 */ public String getLimitRawCategoory2() { return limitRawCategoory2; } /** * @param limitRawCategoory2 the limitRawCategoory2 to set */ public void setLimitRawCategoory2(String limitRawCategoory2) { this.limitRawCategoory2 = limitRawCategoory2; } /** * @return the limitLimitSize */ public String getLimitLimitSize() { return limitLimitSize; } /** * @param limitLimitSize the limitLimitSize to set */ public void setLimitLimitSize(String limitLimitSize) { this.limitLimitSize = limitLimitSize; } /** * @return the limitDate */ public Date getLimitDate() { return limitDate; } /** * @param limitDate the limitDate to set */ public void setLimitDate(Date limitDate) { this.limitDate = limitDate; } }
[ "46997932+alexjeff@users.noreply.github.com" ]
46997932+alexjeff@users.noreply.github.com
ce7a26ac8a64657366cfbe61c67b420a0da6c250
3acfb6df11412013c50520e812b2183e07c1a8e5
/investharyana/src/main/java/com/hartron/investharyana/repository/Emmision_fuel_typeRepository.java
5db0f0b2065e37a0a0a583fab7680110a941dc0f
[]
no_license
ramanrai1981/investharyana
ad2e5b1d622564a23930d578b25155d5cc9ec97a
b8f359c120f6dae456ec0490156cf34fd0125a30
refs/heads/master
2021-01-19T08:29:32.042236
2017-04-14T18:34:50
2017-04-14T18:34:50
87,635,613
0
0
null
null
null
null
UTF-8
Java
false
false
2,171
java
package com.hartron.investharyana.repository; import com.hartron.investharyana.domain.Emmision_fuel_type; import com.datastax.driver.core.*; import com.datastax.driver.mapping.Mapper; import com.datastax.driver.mapping.MappingManager; import org.springframework.stereotype.Repository; import java.util.ArrayList; import java.util.List; import java.util.UUID; /** * Cassandra repository for the Emmision_fuel_type entity. */ @Repository public class Emmision_fuel_typeRepository { private final Session session; private Mapper<Emmision_fuel_type> mapper; private PreparedStatement findAllStmt; private PreparedStatement truncateStmt; public Emmision_fuel_typeRepository(Session session) { this.session = session; this.mapper = new MappingManager(session).mapper(Emmision_fuel_type.class); this.findAllStmt = session.prepare("SELECT * FROM emmision_fuel_type"); this.truncateStmt = session.prepare("TRUNCATE emmision_fuel_type"); } public List<Emmision_fuel_type> findAll() { List<Emmision_fuel_type> emmision_fuel_typesList = new ArrayList<>(); BoundStatement stmt = findAllStmt.bind(); session.execute(stmt).all().stream().map( row -> { Emmision_fuel_type emmision_fuel_type = new Emmision_fuel_type(); emmision_fuel_type.setId(row.getUUID("id")); emmision_fuel_type.setTypeoffuel(row.getString("typeoffuel")); return emmision_fuel_type; } ).forEach(emmision_fuel_typesList::add); return emmision_fuel_typesList; } public Emmision_fuel_type findOne(UUID id) { return mapper.get(id); } public Emmision_fuel_type save(Emmision_fuel_type emmision_fuel_type) { if (emmision_fuel_type.getId() == null) { emmision_fuel_type.setId(UUID.randomUUID()); } mapper.save(emmision_fuel_type); return emmision_fuel_type; } public void delete(UUID id) { mapper.delete(id); } public void deleteAll() { BoundStatement stmt = truncateStmt.bind(); session.execute(stmt); } }
[ "raman.kumar.rai@gmail.com" ]
raman.kumar.rai@gmail.com
7ab915d591d1172d0a5336723c63ddcf2a9e55fb
3dbbfac39ac33d3fabec60b290118b361736f897
/BOJ/2000/2804.java
5170f72c7de08be4649d5c4c3534b1b16bf089cc
[]
no_license
joshua-qa/PS
7e0a61f764f7746e6b3c693c103da06b845552b7
c49c0b377f85c483b6d274806afb0cbc534500b7
refs/heads/master
2023-05-28T15:01:28.709522
2023-05-21T04:46:29
2023-05-21T04:46:29
77,836,098
7
2
null
null
null
null
UTF-8
Java
false
false
2,270
java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); Task task = new Task(); task.run(in, out); out.close(); } static class Task { public void run(InputReader in, PrintWriter out) { char[] A = in.next().toCharArray(); char[] B = in.next().toCharArray(); int firstMatchA = -1; int firstMatchB = -1; for(int i = 0; i < A.length && firstMatchA < 0; i++) { for(int j = 0; j < B.length; j++) { if(A[i] == B[j]) { firstMatchA = i; firstMatchB = j; break; } } } for(int i = 0; i < B.length; i++) { for(int j = 0; j < A.length; j++) { if(i != firstMatchB && j == firstMatchA) { out.print(B[i]); } else if(i == firstMatchB) { out.print(A[j]); } else { out.print("."); } } out.println(); } } } static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } } }
[ "jgchoi.qa@gmail.com" ]
jgchoi.qa@gmail.com
69c466ef5b953b8ebb1e3e5135eb81312671f449
a4f94f4701a59cafc7407aed2d525b2dff985c95
/samples/calculator-tutorial/languages/calculator/source_gen/jetbrains/mps/calculator/behavior/Calculator_BehaviorDescriptor.java
3ca60dbead8b26b0ef1b15edf6664cc8f0d3a468
[]
no_license
jamice/code-orchestra-core
ffda62860f5b117386aa6455f4fdf61661abbe9e
b2bbf8362be2e2173864c294c635badb2e27ecc6
refs/heads/master
2021-01-15T13:24:53.517854
2013-05-09T21:39:28
2013-05-09T21:39:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
752
java
package jetbrains.mps.calculator.behavior; /*Generated by MPS */ import jetbrains.mps.lang.core.behavior.BaseConcept_BehaviorDescriptor; import jetbrains.mps.lang.core.behavior.INamedConcept_BehaviorDescriptor; import jetbrains.mps.smodel.SNode; import jetbrains.mps.lang.core.behavior.INamedConcept_Behavior; public class Calculator_BehaviorDescriptor extends BaseConcept_BehaviorDescriptor implements INamedConcept_BehaviorDescriptor { public Calculator_BehaviorDescriptor() { } public String virtual_getFqName_1213877404258(SNode thisNode) { return INamedConcept_Behavior.virtual_getFqName_1213877404258(thisNode); } @Override public String getConceptFqName() { return "jetbrains.mps.calculator.structure.Calculator"; } }
[ "a.a.eliseyev@gmail.com" ]
a.a.eliseyev@gmail.com
d6af5962d350227d23b549c36882c4171ee1a818
652b2842d281b98f06170545cd3af9b49bc65849
/netty-example/src/main/java/cmc/lucky/basic/keepalive/KeepAliveMessage.java
c249288ba519f9467653955fb6f66cab4610a208
[]
no_license
LUCKYZHOUSTAR/JAVA-repository
bc55d028252eb2588c69f0ae921dd229fe4f4f38
fb7538db24b0f35a05101d8932d77db0dd297389
refs/heads/master
2022-12-27T06:59:43.700820
2020-05-28T02:44:47
2020-05-28T02:44:47
110,965,806
1
1
null
2022-12-16T10:40:41
2017-11-16T11:56:07
Java
UTF-8
Java
false
false
462
java
package cmc.lucky.basic.keepalive; public class KeepAliveMessage implements java.io.Serializable{ private static final long serialVersionUID = 479148324800517968L; private String sn ; private int reqCode ; // 1:心跳请求 2:心跳反馈 public String getSn() { return sn; } public void setSn(String sn) { this.sn = sn; } public int getReqCode() { return reqCode; } public void setReqCode(int reqCode) { this.reqCode = reqCode; } }
[ "chaoqiang.zhou@Mtime.com" ]
chaoqiang.zhou@Mtime.com
aa885e3df96a68f956806bddda56d9a7ded445cd
4c9cae739c23b2d2cd7350a8a1316cb2b014a1f5
/ojAlgo-master/src/org/ojalgo/type/ColourData.java
2e9f45f2d1fff65176f146838c577f407c7ae6a1
[ "MIT" ]
permissive
sunjun-group/test-projects
ce5d4d981181ca9a4bceb5cfc87484623be0d541
23333142fb8be4b03b6db736f57ed1e0e7a60daa
refs/heads/master
2021-09-20T03:41:58.346514
2018-08-03T02:21:09
2018-08-03T02:21:09
110,089,618
0
2
null
null
null
null
UTF-8
Java
false
false
3,421
java
/* * Copyright 1997-2017 Optimatika * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.ojalgo.type; import org.ojalgo.function.PrimitiveFunction; /** * @author apete */ public class ColourData extends Object { public static final ColourData BLACK = new ColourData(0, 0, 0); public static final ColourData WHITE = new ColourData(255, 255, 255); private static final int LIMIT = 256; public static ColourData random() { final int tmpR = (int) PrimitiveFunction.FLOOR.invoke(LIMIT * Math.random()); final int tmpG = (int) PrimitiveFunction.FLOOR.invoke(LIMIT * Math.random()); final int tmpB = (int) PrimitiveFunction.FLOOR.invoke(LIMIT * Math.random()); return new ColourData(tmpR, tmpG, tmpB); } public static ColourData valueOf(final String colourAsHexString) { final int i = Integer.decode(colourAsHexString).intValue(); return new ColourData((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF); } private final int myValue; public ColourData(final float r, final float g, final float b) { this((int) ((r * 255F) + 0.5F), (int) ((g * 255F) + 0.5F), (int) ((b * 255F) + 0.5F)); } public ColourData(final float r, final float g, final float b, final float a) { this((int) ((r * 255F) + 0.5F), (int) ((g * 255F) + 0.5F), (int) ((b * 255F) + 0.5F), (int) ((a * 255F) + 0.5F)); } public ColourData(final int rgb) { myValue = 0xff000000 | rgb; } public ColourData(final int rgba, final boolean alpha) { if (alpha) { myValue = rgba; } else { myValue = 0xff000000 | rgba; } } public ColourData(final int r, final int g, final int b) { this(r, g, b, 255); } public ColourData(final int r, final int g, final int b, final int a) { myValue = ((a & 0xFF) << 24) | ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | ((b & 0xFF) << 0); } public int getAlpha() { return (myValue >> 24) & 0xff; } public int getBlue() { return (myValue >> 0) & 0xFF; } public int getGreen() { return (myValue >> 8) & 0xFF; } public int getRed() { return (myValue >> 16) & 0xFF; } public int getRGB() { return myValue; } public String toHexString() { return TypeUtils.toHexString(myValue); } }
[ "lylypp6987@gmail.com" ]
lylypp6987@gmail.com
92af405d27c15f0cc879ab29ac1c15108f2570e4
e03d21d7f21f3a2136c6450b093ad53e1b021586
/kaipin-sch/main/src/java/com/kaipin/enterprise/repository/dao/msg/IMsgUserInterviewDao.java
414b1c008cd905be2453be68984eeb70f2d08d03
[]
no_license
huagnkangjie/kaipin
d035da2bbda9bf1a125826a598962b443a7dfc3e
8e3dfb2203fb119b8de9636e73ceba2a4405e627
refs/heads/master
2018-12-11T08:32:20.792022
2018-09-12T15:06:02
2018-09-12T15:06:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
374
java
package com.kaipin.enterprise.repository.dao.msg; import com.kaipin.enterprise.model.msg.MsgUserInterview; public interface IMsgUserInterviewDao { public int deleteByPrimaryKey(String id); public int insertSelective(MsgUserInterview record); public MsgUserInterview selectByPrimaryKey(String id); public int updateByPrimaryKeySelective(MsgUserInterview record); }
[ "1059976050@qq.com" ]
1059976050@qq.com