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
34f2649d756bf5fc4ec89a1a326317884ccaca0c
12ce41794f36a8ff2e82286d2e39c8687bd86c8e
/cms-web/src/main/java/com/xzjie/et/ad/web/controller/SystemAdController.java
6e75fda8aae92723615a76706092822ea88df860
[ "Apache-2.0" ]
permissive
lhongjum/cms
89bf47953e9beed0eef3d27316a85ca7e821c1c9
b754167d97165c744462b845dc28244a2e736345
refs/heads/master
2023-02-22T10:31:26.930021
2020-12-02T15:56:14
2020-12-02T15:56:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,110
java
package com.xzjie.et.ad.web.controller; import com.xzjie.core.utils.RegexUtils; import com.xzjie.core.utils.StringUtils; import com.xzjie.et.ad.service.AdPositionService; import com.xzjie.et.ad.service.AdService; import com.xzjie.common.web.utils.MapResult; import com.xzjie.et.core.web.BaseController; import com.xzjie.mybatis.page.Page; import com.xzjie.mybatis.page.PageEntity; import com.xzjie.et.ad.model.Ad; import com.xzjie.et.ad.model.AdPosition; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.Date; import java.util.Map; @Controller @RequestMapping("${web.adminPath}/ad") public class SystemAdController extends BaseController { private final Logger LOG = LogManager.getLogger(getClass()); @Autowired private AdService adService; @Autowired private AdPositionService adPositionService; @RequestMapping(value = {"", "/", "index"}) public String index() { return getRemoteView("ad/ad_index"); } @RequestMapping("addview") public String addView() { return getRemoteView("ad/ad_add"); } @RequestMapping("edit/{id}") public String editView(@PathVariable Long id, Map<String, Object> map) { Ad model = adService.get(id); AdPosition position = adPositionService.get(model.getPositionId()); map.put("position", position); map.put("model", model); return getRemoteView("ad/ad_add"); } /** * 广告位置页面 * * @return */ @RequestMapping(value = {"position", "position/index"}) public String position() { return getRemoteView("ad/ad_position_index"); } @RequestMapping("position/addview") public String positionView() { return getRemoteView("ad/ad_position_add"); } /** * 广告位修改页面 * * @param id * @param map * @return */ @RequestMapping("position/{id}") public String positionEditView(@PathVariable Long id, Map<String, Object> map) { AdPosition model = adPositionService.get(id); map.put("model", model); return getRemoteView("ad/ad_position_add"); } @RequestMapping("add") @ResponseBody public Map<String, Object> save(Ad model) { if (StringUtils.isBlank(model.getAdName())) { return MapResult.mapError("453", "广告名称不能为空"); } if (StringUtils.isBlank(model.getAdCode())) { return MapResult.mapError("453", "广告图片不能为空"); } if (StringUtils.isNotBlank(model.getEmail()) && !RegexUtils.checkEmail(model.getEmail())) { return MapResult.mapError("454", "联系人Email不合法"); } if (StringUtils.isNotBlank(model.getPhone()) && !RegexUtils.checkPhone(model.getPhone())) { return MapResult.mapError("455", "联系人电话不合法"); } try { model.setSiteId(getSiteId()); model.setCreateDate(new Date()); adService.save(model); return MapResult.mapOK("451"); } catch (Exception e) { LOG.error("添加广告错误:{}", e); } return MapResult.mapError("452"); } @RequestMapping("update") @ResponseBody public Map<String, Object> update(Ad model){ if (StringUtils.isBlank(model.getAdName())) { return MapResult.mapError("453", "广告名称不能为空"); } if (StringUtils.isBlank(model.getAdCode())) { return MapResult.mapError("453", "广告图片不能为空"); } if (StringUtils.isNotBlank(model.getEmail()) && !RegexUtils.checkEmail(model.getEmail())) { return MapResult.mapError("454", "联系人Email不合法"); } if (StringUtils.isNotBlank(model.getPhone()) && !RegexUtils.checkPhone(model.getPhone())) { return MapResult.mapError("455", "联系人电话不合法"); } try { adService.update(model); return MapResult.mapOK("456"); } catch (Exception e) { LOG.error("修改广告信息错误:{}", e.getMessage()); } return MapResult.mapError("457"); } @RequestMapping("position/add") @ResponseBody public Map<String, Object> saveAdPosition(AdPosition model) { model.setUserId(getUserId()); try { model.setSiteId(getSiteId()); Long id = adPositionService.save2(model); return MapResult.mapOK(id, "400"); } catch (Exception e) { LOG.error("添加广告位错误:{}", e); } return MapResult.mapError("401"); } @RequestMapping("position/delete/{id}") @ResponseBody public Map<String, Object> delete(@PathVariable Long id) { try { adPositionService.delete(id); return MapResult.mapOK(id, "403"); } catch (Exception e) { LOG.error("删除广告位错误:{}", e); } return MapResult.mapError("404"); } @RequestMapping("delete/{id}") @ResponseBody public Map<String, Object> adDelete(@PathVariable Long id) { try { adService.delete(id); return MapResult.mapOK(id, "403"); } catch (Exception e) { LOG.error("删除广告位错误:{}", e.getMessage()); } return MapResult.mapError("404"); } @RequestMapping("datapage") @ResponseBody public Map<String, Object> adDataPage(Ad model, Page page) { PageEntity<Ad> pageEntity = new PageEntity<Ad>(); model.setSiteId(getSiteId()); pageEntity.setT(model); pageEntity.setPage(page); try { PageEntity<Ad> res = adService.getListPage(pageEntity); return MapResult.bootPage(res.getRows(), res.getPage()); } catch (Exception e) { LOG.error("获得广告数据错误:{}", e); } return MapResult.mapError("450"); } /** * 分页获得广告位置的数据 * * @param model * @param page * @return */ @RequestMapping("position/datapage") @ResponseBody public Map<String, Object> positionDataPage(AdPosition model, Page page) { PageEntity<AdPosition> pageEntity = new PageEntity<AdPosition>(); model.setSiteId(getSiteId()); pageEntity.setT(model); pageEntity.setPage(page); try { PageEntity<AdPosition> res = adService.getPositionListPage(pageEntity); return MapResult.bootPage(res.getRows(), res.getPage()); } catch (Exception e) { LOG.error("获得广告位数据错误:{}", e.getMessage()); } return MapResult.mapError("402"); } }
[ "513961835@qq.com" ]
513961835@qq.com
1969cac80961ea321a4704814b9b5c829a01daef
e304b9cd2840b35c484540289dda475d900c1052
/business-center/user-center/src/main/java/com/open/capacity/user/config/PasswordConfig.java
8135fe31950f3d28012ca04b6f9e9f33c692252b
[ "Apache-2.0" ]
permissive
pq1518110364/open-capacity-platform
9ce7b380e71ea01e594a4775df84477df8ef982f
feb46e49c496bd9aea8908fc577d6773f50a0619
refs/heads/master
2022-07-01T06:35:54.500928
2020-01-07T06:39:38
2020-01-07T06:39:38
232,259,768
2
1
Apache-2.0
2022-06-21T02:35:27
2020-01-07T06:39:07
JavaScript
UTF-8
Java
false
false
642
java
package com.open.capacity.user.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; /** * @author 作者 owen E-mail: 624191343@qq.com * @version 创建时间:2017年11月12日 上午22:57:51 * 密码工具类 */ @Configuration public class PasswordConfig { /** * 装配BCryptPasswordEncoder用户密码的匹配 * @return */ @Bean public PasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } }
[ "33628596+pq1518110364@users.noreply.github.com" ]
33628596+pq1518110364@users.noreply.github.com
d299768cb1ed4a6952c091fe3654e1af75954db3
b295cffc1de37330b0b8d28a4d81faac01de7f22
/CODE/android/device/eostek/common/apps/SetupWizard2/src/com/eostek/isynergy/setmeup/timezone/PullTimezoneParser.java
82a89eea59fbe7ad60bf7e79811beec33543df57
[]
no_license
windxixi/test
fc2487d73a959050d8ad37d718b09a243660ec64
278a167c26fb608f700b81656f32e734f536c9f9
refs/heads/master
2023-03-16T19:59:41.941474
2016-07-25T04:18:41
2016-07-25T04:18:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,951
java
package com.eostek.isynergy.setmeup.timezone; import java.io.IOException; import java.io.InputStream; import java.io.StringReader; import java.util.ArrayList; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlPullParserFactory; import com.eostek.isynergy.setmeup.model.TimeZoneModel; public class PullTimezoneParser { public static ArrayList<TimeZoneModel> Parse(String provinceString) { ArrayList<TimeZoneModel> timezoneArray = new ArrayList<TimeZoneModel>(); try { XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); XmlPullParser parser = factory.newPullParser(); parser.setInput(new StringReader(provinceString)); timezoneArray = ParseXml(parser); } catch (XmlPullParserException e) { e.printStackTrace(); } return timezoneArray; } public static ArrayList<TimeZoneModel> Parse(InputStream provinceIS) { ArrayList<TimeZoneModel> timezoneArray = new ArrayList<TimeZoneModel>(); try { XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); XmlPullParser parser = factory.newPullParser(); parser.setInput(provinceIS, "utf-8"); timezoneArray = ParseXml(parser); } catch (XmlPullParserException e) { e.printStackTrace(); } return timezoneArray; } public static ArrayList<TimeZoneModel> ParseXml(XmlPullParser parser) { ArrayList<TimeZoneModel> timezoneArray = new ArrayList<TimeZoneModel>(); TimeZoneModel timezoneTemp = null; try { int eventType = parser.getEventType(); while (eventType != XmlPullParser.END_DOCUMENT) { switch (eventType) { case XmlPullParser.START_DOCUMENT: break; case XmlPullParser.START_TAG: String tagName = parser.getName(); if (tagName.equals("timezone")) { timezoneTemp = new TimeZoneModel(); timezoneTemp.setTimeZoneId(parser.getAttributeValue(0)); timezoneTemp.setTimeZoneName(parser.getAttributeValue(1)); timezoneTemp.setGmt(parser.getAttributeValue(2)); timezoneArray.add(timezoneTemp); } break; case XmlPullParser.END_TAG: break; case XmlPullParser.END_DOCUMENT: break; } eventType = parser.next(); } } catch (XmlPullParserException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return timezoneArray; } }
[ "gracie.zhou@ieostek.com" ]
gracie.zhou@ieostek.com
06c11f5a05b6bd408c3e46b769e0465414f4cd0e
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/68/523.java
0e083da2a3b3e2148f147e03763c0d5b1d4401f4
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
663
java
package <missing>; public class GlobalMembers { public static int Main() { int n; int i; int j; int k; int m; int q; int p; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { n = Integer.parseInt(tempVar); } for (i = 6;i <= n;i = i + 2) { for (m = 3;m < i - 2;m++) { p = Math.sqrt(m); q = Math.sqrt(i - m); for (j = 2;j <= p;j++) { if (m % j == 0) { break; } } for (k = 2;k <= q;k++) { if ((i - m) % k == 0) { break; } } if (j == (p + 1) && k == (q + 1)) { break; } } System.out.printf("%d=%d+%d\n",i,m,i - m); } } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
d190659b9d33e3fc7b2a594c6178971924acf042
4fec3607ee6a32b7376a08123ff6f70e4eb7c0b6
/JDBC170617/src/tw/jdbc/GiftExample170625.java
c946a50fe71d8bb991b870e9be6ae1f09cd49767
[]
no_license
DoubleJen/JDBC170617
0003d9eca8a1123a426d4ad57bbfd9ff5c6555af
8c0fd7e0360c5a2befc348c4d8f2d5e4de1dc9fb
refs/heads/master
2020-03-28T19:50:33.816322
2017-06-25T06:34:30
2017-06-25T06:34:30
94,603,744
0
0
null
null
null
null
UTF-8
Java
false
false
2,975
java
package tw.jdbc; //批次 import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.util.Properties; import org.json.JSONArray; import org.json.JSONObject; public class GiftExample170625 { public static void main(String[] args) { long start = System.currentTimeMillis(); String strUrl = "http://data.coa.gov.tw/Service/OpenData/ODwsv/ODwsvAgriculturalProduce.aspx"; String json = getJSONString(strUrl); Properties prop = new Properties(); prop.setProperty("user", "root"); prop.setProperty("password", "root"); //2. Build Connection try(Connection conn =DriverManager.getConnection("jdbc:mysql://127.0.0.1/double", prop)){ //3. SQL Statement String sql = "INSERT INTO gift (gid, Name, Feature, SalePlace, ProduceOrg, SpecAndPrice, OrderUrl, ContactTel, Column1)" + " VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"; PreparedStatement pstmt = conn.prepareStatement(sql); JSONArray root = new JSONArray(json); for(int i= 0; i<root.length(); i++){ JSONObject row = root.getJSONObject(i); String gid = row.getString("ID"); String Name = row.getString("Name"); String Feature = row.getString("Feature"); String SalePlace = row.getString("SalePlace"); String ProduceOrg = row.getString("ProduceOrg"); String SpecAndPrice = row.getString("SpecAndPrice"); String OrderUrl = row.getString("OrderUrl"); String ContactTel = row.getString("ContactTel"); String Column1 = row.getString("Column1"); //到進資料庫前, 可於此處進行資料檢查, ex正規化 pstmt.setString(1, gid); pstmt.setString(2, Name); pstmt.setString(3, Feature); pstmt.setString(4, SalePlace); pstmt.setString(5, ProduceOrg); pstmt.setString(6, SpecAndPrice); pstmt.setString(7, OrderUrl); pstmt.setString(8, ContactTel); pstmt.setString(9, Column1); //批次 pstmt.addBatch(); } pstmt.executeBatch(); System.out.println("OK"); System.out.println(System.currentTimeMillis() - start); }catch(Exception e){ System.out.println(e); } } private static String getJSONString(String strUrl){ StringBuilder sb = new StringBuilder(); try { URL url = new URL(strUrl); HttpURLConnection conn = (HttpURLConnection)url.openConnection(); conn.connect(); BufferedReader reader = new BufferedReader( new InputStreamReader(conn.getInputStream(),"UTF-8")) ; String line = null; while ( (line = reader.readLine()) != null){ sb.append(line); } reader.close(); System.out.println(sb); } catch (Exception e) { System.out.println(e); } return sb.toString(); } }
[ "Mac@Mac-PC" ]
Mac@Mac-PC
f3e44c92b357fd2ea95939b6e8ded351a1bcb7fe
f8a14fec331ec56dd7e070fc032604117f155085
/dataparser/src/main/java/ru/l2/dataparser/holder/skilldata/skillacquire/SkillAcquireInfo.java
1886549c980dc54ec1302b4c4086fccb96f573dd
[]
no_license
OFRF/BladeRush
c2f06d050a1f2d79a9b50567b9f1152d6d755149
87329d131c0fcc8417ed15479298fdb90bc8f1d2
refs/heads/master
2023-03-25T13:51:04.404738
2020-05-04T14:37:23
2020-05-04T14:37:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,784
java
package ru.l2.dataparser.holder.skilldata.skillacquire; import ru.l2.dataparser.annotations.array.IntArray; import ru.l2.dataparser.annotations.array.ObjectArray; import ru.l2.dataparser.annotations.array.StringArray; import ru.l2.dataparser.annotations.value.IntValue; import ru.l2.dataparser.annotations.value.ObjectValue; import ru.l2.dataparser.annotations.value.StringValue; /** * @author KilRoy */ public class SkillAcquireInfo { @StringValue private String skill_name; @IntValue private int get_lv; @IntValue private int lv_up_sp; @StringValue private boolean auto_get; @ObjectValue private AcquireItemNeeded item_needed; @IntArray private int[] quest_needed; @IntValue private int social_class; @StringValue private String residence_skill; @StringValue private String pledge_type; @ObjectArray private final AcquireRace[] race = new AcquireRace[0]; @StringArray private String[] prerequisite_skill; public String getSkillName() { return skill_name; } public int getNeedLevel() { return get_lv; } public int getLvlUpSP() { return lv_up_sp; } public boolean isAutoGet() { return auto_get; } public AcquireItemNeeded getItemNeeded() { return item_needed; } public int[] getQuestNeeded() { return quest_needed; } public int getSocialClass() { return social_class; } public String getResidenceSkill() { return residence_skill; } public String getPledgeType() { return pledge_type; } public AcquireRace[] getRace() { return race; } public String[] getPrerequisiteSkill() { return prerequisite_skill; } }
[ "yadrov995@gmail.com" ]
yadrov995@gmail.com
97460dc34c5247c079cb81184055b4d9772d5151
c53ee32324d283c5b652d0db764af1a298dd988d
/606.construct-string-from-binary-tree.106278886.ac.java
e5390107c88b0fde12c5e323bf1b430c14b81022
[]
no_license
zhuolikevin/leetcode-java
f5f984e3db99359e2e5df621f1896dfd57030a93
712c93bade63829ca13bd88a4ef0600f3439be6d
refs/heads/master
2020-12-29T00:59:04.999430
2017-08-15T17:58:12
2017-08-15T17:58:12
94,374,971
3
0
null
null
null
null
UTF-8
Java
false
false
1,070
java
/* * [606] Construct String from Binary Tree * * https://leetcode.com/problems/construct-string-from-binary-tree * * Easy (51.90%) * Total Accepted: * Total Submissions: * Testcase Example: '[1,2,3,4]' * * Can you solve this problem? 🤔 */ /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ public class Solution { public String tree2str(TreeNode t) { if (t == null) return ""; StringBuilder sb = new StringBuilder(); sb.append(String.valueOf(t.val)); if (t.left == null && t.right != null) { return sb.append("()(" + tree2str(t.right) + ")").toString(); } else if (t.left == null && t.right == null) { return sb.toString(); } else { sb.append("(" + tree2str(t.left) + ")"); if (t.right != null) sb.append("(" + tree2str(t.right) + ")"); return sb.toString(); } } }
[ "lizhuogo@gmail.com" ]
lizhuogo@gmail.com
fe3fabc46601f1d8d89c6a613460faf535622719
bf2ae0af58aed5b03e982e711e80968f505dab19
/thread/src/main/java/com/kq/concurrent/completablefuture/CompletableFutureGetTimeoutDemo.java
ada8df60253a1c03c694c1f63d7de9a3ef66fe41
[ "Apache-2.0" ]
permissive
kongq1983/concurrent
4c0204cec859a417ddbef7f50e78a2e2700cbe4a
c4e6268f5c9eabf0fcb94774f9f683ad854e8dc8
refs/heads/master
2023-06-21T10:42:19.581234
2022-11-02T09:24:53
2022-11-02T09:24:53
185,146,249
0
0
Apache-2.0
2023-06-14T22:26:02
2019-05-06T07:33:19
Java
UTF-8
Java
false
false
1,279
java
package com.kq.concurrent.completablefuture; import org.apache.commons.lang3.time.StopWatch; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; /** * CompletableFutureGetTimeoutDemo * * @author kq * @date 2019-09-19 */ public class CompletableFutureGetTimeoutDemo { public static void main(String[] args) throws Exception{ StopWatch stopWatch = new StopWatch(); stopWatch.start(); //设置超时3s String result = CompletableFuture.supplyAsync(() -> { try { Thread.sleep(5000L); } catch (InterruptedException e) { e.printStackTrace(); } return "hello"; }).get(3, TimeUnit.SECONDS); // 会抛异常 //Exception in thread "main" java.util.concurrent.TimeoutException // at java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1771) // at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915) // at com.kq.concurrent.completablefuture.CompletableFutureGetTimeoutDemo.main(CompletableFutureGetTimeoutDemo.java:29) stopWatch.stop(); System.out.printf("result=%s,spent time = %s",result,stopWatch.toString()); } }
[ "king@qq.com" ]
king@qq.com
feabf6f6fa55c5982042e2087941e41f00c84d86
5aaebaafeb75c7616689bcf71b8dd5ab2c89fa3b
/src/ANXGallery/sources/com/google/protobuf/DurationProto.java
0211600423e841bf595f62cda10c29653efec0ae
[]
no_license
gitgeek4dx/ANXGallery9
9bf2b4da409ab16492e64340bde4836d716ea7ec
af2e3c031d1857fa25636ada923652b66a37ff9e
refs/heads/master
2022-01-15T05:23:24.065872
2019-07-25T17:34:35
2019-07-25T17:34:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,866
java
package com.google.protobuf; import com.google.protobuf.Descriptors.Descriptor; import com.google.protobuf.Descriptors.FileDescriptor; import com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner; import com.google.protobuf.GeneratedMessageV3.FieldAccessorTable; public final class DurationProto { /* access modifiers changed from: private */ public static FileDescriptor descriptor; static final Descriptor internal_static_google_protobuf_Duration_descriptor = ((Descriptor) getDescriptor().getMessageTypes().get(0)); static final FieldAccessorTable internal_static_google_protobuf_Duration_fieldAccessorTable = new FieldAccessorTable(internal_static_google_protobuf_Duration_descriptor, new String[]{"Seconds", "Nanos"}); static { FileDescriptor.internalBuildGeneratedFileFrom(new String[]{"\n\u001egoogle/protobuf/duration.proto\u0012\u000fgoogle.protobuf\"*\n\bDuration\u0012\u000f\n\u0007seconds\u0018\u0001 \u0001(\u0003\u0012\r\n\u0005nanos\u0018\u0002 \u0001(\u0005B|\n\u0013com.google.protobufB\rDurationProtoP\u0001Z*github.com/golang/protobuf/ptypes/durationø\u0001\u0001¢\u0002\u0003GPBª\u0002\u001eGoogle.Protobuf.WellKnownTypesb\u0006proto3"}, new FileDescriptor[0], new InternalDescriptorAssigner() { public ExtensionRegistry assignDescriptors(FileDescriptor fileDescriptor) { DurationProto.descriptor = fileDescriptor; return null; } }); } private DurationProto() { } public static FileDescriptor getDescriptor() { return descriptor; } public static void registerAllExtensions(ExtensionRegistry extensionRegistry) { registerAllExtensions((ExtensionRegistryLite) extensionRegistry); } public static void registerAllExtensions(ExtensionRegistryLite extensionRegistryLite) { } }
[ "sv.xeon@gmail.com" ]
sv.xeon@gmail.com
6ab914b1333509fb08dbaf25d45ab035811434eb
4009427dfce1ba6c8be62b332be5c3b1a4156b52
/spring-boot-tools/spring-boot-loader/src/it/executable-props/src/main/java/org/springframework/launcher/it/props/SpringConfiguration.java
54e39662f25a9fe9e8859327b88b83f1c29da7bf
[ "Apache-2.0" ]
permissive
sidosangwon/spring-boot
321bf4af53b4a68ef963b0e08bac0aa06d9f7fed
ca69156afdd6a9ec97ec4bc2f9277499848ba409
refs/heads/master
2021-01-16T00:50:16.436944
2015-01-21T13:20:06
2015-01-21T13:20:06
29,590,738
1
0
null
2015-01-21T13:30:04
2015-01-21T13:30:03
null
UTF-8
Java
false
false
1,416
java
/* * Copyright 2012-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.boot.load.it.props; import java.io.IOException; import javax.annotation.PostConstruct; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.support.PropertiesLoaderUtils; /** * Spring configuration. * * @author Phillip Webb */ @Configuration @ComponentScan public class SpringConfiguration { private String message = "Jar"; @PostConstruct public void init() throws IOException { String value = PropertiesLoaderUtils.loadAllProperties("application.properties").getProperty("message"); if (value!=null) { this.message = value; } } public void run(String... args) { System.err.println("Hello Embedded " + this.message + "!"); } }
[ "dsyer@pivotal.io" ]
dsyer@pivotal.io
aa8ff2292995299210bddc1591bbf115d0286603
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project30/src/test/java/org/gradle/test/performance30_4/Test30_351.java
92ff491ad2d185886d86bddca98609d16a2f64c7
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance30_4; import static org.junit.Assert.*; public class Test30_351 { private final Production30_351 production = new Production30_351("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
8bb2961cd16906ad180013241473dfa1c8b69d25
a047e7725bab3c5b1c814cdd6042eea2894f4223
/src/main/java/com/taobao/api/request/TimeGetRequest.java
1e7358029949d94b293ab508ad43863c5cb1f65d
[]
no_license
yangdd1205/taobao-sdk-java
8a2d8604f1634d62c2ffbcbddf4d8516c9f83dbb
50582240cb3c14de3c67b753a82428256bd93c72
refs/heads/master
2020-12-25T12:17:48.330795
2012-04-06T04:04:36
2012-04-06T04:04:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,216
java
package com.taobao.api.request; import java.util.Map; import com.taobao.api.TaobaoRequest; import com.taobao.api.internal.util.TaobaoHashMap; import com.taobao.api.response.TimeGetResponse; import com.taobao.api.ApiRuleException; /** * TOP API: taobao.time.get request * * @author auto create * @since 1.0, 2011-09-09 13:49:10 */ public class TimeGetRequest implements TaobaoRequest<TimeGetResponse> { private TaobaoHashMap udfParams; // add user-defined text parameters private Long timestamp; public Long getTimestamp() { return this.timestamp; } public void setTimestamp(Long timestamp) { this.timestamp = timestamp; } public String getApiMethodName() { return "taobao.time.get"; } public Map<String, String> getTextParams() { TaobaoHashMap txtParams = new TaobaoHashMap(); if(udfParams != null) { txtParams.putAll(this.udfParams); } return txtParams; } public void putOtherTextParam(String key, String value) { if(this.udfParams == null) { this.udfParams = new TaobaoHashMap(); } this.udfParams.put(key, value); } public Class<TimeGetResponse> getResponseClass() { return TimeGetResponse.class; } public void check() throws ApiRuleException { } }
[ "ggd543@gmail.com" ]
ggd543@gmail.com
9adf255a7a770afb5379b157d4b87d14aa04b2a5
b6cc26e4338559055b45057eefd2162c67bf1cb8
/component/viewer/dnd/impl/src/main/java/uk/co/objectconnexions/expressiveobjects/viewer/dnd/icon/SubviewIconSpecification.java
a7dba3e5dccbae622e0edb4dd46c45655b98ac0e
[ "Apache-2.0" ]
permissive
objectconnexions/expressive-objects
6aa36611138ee33e4dbf855531c85c4b8b7db0e8
a5ced6694cfb2daf24ba09c94cc4e1864384224c
refs/heads/master
2023-08-07T18:29:15.670839
2019-11-14T07:20:19
2019-11-14T07:20:19
215,518,136
0
0
Apache-2.0
2023-07-22T18:56:10
2019-10-16T10:12:57
Java
UTF-8
Java
false
false
2,784
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 uk.co.objectconnexions.expressiveobjects.viewer.dnd.icon; import uk.co.objectconnexions.expressiveobjects.viewer.dnd.view.Axes; import uk.co.objectconnexions.expressiveobjects.viewer.dnd.view.Content; import uk.co.objectconnexions.expressiveobjects.viewer.dnd.view.View; import uk.co.objectconnexions.expressiveobjects.viewer.dnd.view.ViewRequirement; import uk.co.objectconnexions.expressiveobjects.viewer.dnd.view.ViewSpecification; import uk.co.objectconnexions.expressiveobjects.viewer.dnd.view.border.ObjectBorder; import uk.co.objectconnexions.expressiveobjects.viewer.dnd.view.field.OneToOneField; import uk.co.objectconnexions.expressiveobjects.viewer.dnd.view.lookup.OpenObjectDropDownBorder; public class SubviewIconSpecification extends IconSpecification { private static final ViewSpecification spec = new IconSpecification(); @Override public boolean canDisplay(final ViewRequirement requirement) { return super.canDisplay(requirement) && requirement.is(ViewRequirement.CLOSED) && requirement.is(ViewRequirement.SUBVIEW); } @Override public View createView(final Content content, final Axes axes, final int sequence) { final View view = super.createView(content, axes, sequence); /* * boolean isEditable = content instanceof OneToOneField && * ((OneToOneField) content).isEditable().isAllowed(); boolean * hasOptions = content.isOptionEnabled(); if (isEditable && hasOptions) * { return new OpenObjectDropDownBorder(view, spec); } return view; */ if (content instanceof OneToOneField && ((OneToOneField) content).isEditable().isVetoed()) { return new ObjectBorder(view); } else { if (content.isOptionEnabled()) { return new ObjectBorder(new OpenObjectDropDownBorder(view, spec)); } else { return new ObjectBorder(view); } } } }
[ "rmatthews@objectconnexions.co.uk" ]
rmatthews@objectconnexions.co.uk
63dad6edc0a34b38d3d8c651f6c810583fa9a9ef
209a458aedc36e1a01c682851a01df775cb75033
/DictionaryOrder.java
c2c502398da1d8988b6852121f5b0cc0ca1113c9
[]
no_license
TravisWay/javaHardWay
de972c859a508d47c0141c29e40f57982a3b16b4
e87c718aad4f97e88eb44cf4312b5b1375ca4a50
refs/heads/master
2021-01-20T03:29:09.067394
2017-04-27T02:29:27
2017-04-27T02:29:27
89,544,379
0
0
null
null
null
null
UTF-8
Java
false
false
2,287
java
import java.util.Scanner; public class DictionaryOrder { public static void main( String[] args ) { Scanner keyboard = new Scanner(System.in); String name; System.out.print( "Make up the name of a programming language! " ); name = keyboard.nextLine(); name= name.toLowerCase(); System.out.println(name); if ( name.compareTo("c++") < 0 ) System.out.println( name + " comes BEFORE c++" ); if ( name.compareTo("c++") == 0 ) System.out.println( "c++ isn't a made-up language!" ); if ( name.compareTo("c++") > 0 ) System.out.println( name + " comes AFTER c++" ); if ( name.compareTo("go") < 0 ) System.out.println( name + " comes BEFORE go" ); if ( name.compareTo("go") == 0 ) System.out.println( "go isn't a made-up language!" ); if ( name.compareTo("go") > 0 ) System.out.println( name + " comes AFTER go" ); if ( name.compareTo("java") < 0 ) System.out.println( name + " comes BEFORE java" ); if ( name.compareTo("java") == 0 ) System.out.println( "java isn't a made-up language!" ); if ( name.compareTo("java") > 0 ) System.out.println( name + " comes AFTER java" ); if ( name.compareTo("lisp") < 0 ) System.out.println( name + " comes BEFORE lisp" ); if ( name.compareTo("lisp") == 0 ) System.out.println( "lisp isn't a made-up language!" ); if ( name.compareTo("lisp") > 0 ) System.out.println( name + " comes AFTER lisp" ); if ( name.compareTo("python") < 0 ) System.out.println( name + " comes BEFORE python" ); if ( name.compareTo("python") == 0 ) System.out.println( "python isn't a made-up language!" ); if ( name.compareTo("python") > 0 ) System.out.println( name + " comes AFTER python" ); if ( name.compareTo("ruby") < 0 ) System.out.println( name + " comes BEFORE ruby" ); if ( name.compareTo("ruby") == 0 ) System.out.println( "ruby isn't a made-up language!" ); if ( name.compareTo("ruby") > 0 ) System.out.println( name + " comes AFTER ruby" ); if ( name.compareTo("visualbasic") < 0 ) System.out.println( name + " comes BEFORE visualbasic" ); if ( name.compareTo("visualbasic") == 0 ) System.out.println( "visualbasic isn't a made-up language!" ); if ( name.compareTo("visualbasic") > 0 ) System.out.println( name + " comes AFTER visualbasic" ); } }
[ "travis_sti@yahoo.com" ]
travis_sti@yahoo.com
57f03a165839ba7d65504c02fe97f1cd8988d884
9a6ea6087367965359d644665b8d244982d1b8b6
/src/main/java/X/C52222am.java
0e94cb6e16d4e0d4bdebcabd1076717d02659e3e
[]
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
1,678
java
package X; import android.view.View; import com.google.android.search.verification.client.R; import com.whatsapp.conversationslist.ConversationsFragment; import java.util.ArrayList; import java.util.List; /* renamed from: X.2am reason: invalid class name and case insensitive filesystem */ public final /* synthetic */ class C52222am implements AbstractC47722Jh { public final /* synthetic */ ConversationsFragment A00; public /* synthetic */ C52222am(ConversationsFragment conversationsFragment) { this.A00 = conversationsFragment; } @Override // X.AbstractC47722Jh public final void A1d(CharSequence charSequence, CharSequence charSequence2, View.OnClickListener onClickListener) { ConversationsFragment conversationsFragment = this.A00; ActivityC004902h A0A = conversationsFragment.A0A(); if (A0A != null) { C36901n6 A002 = C36901n6.A00(A0A.findViewById(R.id.pager_holder), charSequence, 0); A002.A06(charSequence2, onClickListener); A002.A05(C004302a.A00(A0A, R.color.bulkArchiveSnackbarButton)); C59372nX r1 = new C59372nX(conversationsFragment, A0A); List list = ((AbstractC24951Dr) A002).A01; if (list == null) { list = new ArrayList(); ((AbstractC24951Dr) A002).A01 = list; } list.add(r1); conversationsFragment.A0D = A002; A002.A05.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver$OnGlobalLayoutListenerC47692Je(conversationsFragment)); conversationsFragment.A0D.A04(); return; } throw null; } }
[ "madeinborneo@gmail.com" ]
madeinborneo@gmail.com
6276aff272da62608c85eee5b4e5f62be96d6f7b
9d9c1e4cd7b9947812ff21a16352f11bb820f9e7
/6 EXERCISE HTTP PROTOCOL/p2CreateClasses/src/main/java/app/web/HttpRequestImpl.java
28d205986fdd8fcca96e811ff1a78064fbe28307
[ "MIT" ]
permissive
TsvetanNikolov123/JAVA---Java-Web-Development-Basics
3ef3d3f23c5fb9e055d2a2d7485ae2c616a37bb7
0513097dc9443520c987a2b7be32cd14d0476610
refs/heads/master
2022-07-07T02:40:09.463112
2021-09-18T18:18:24
2021-09-18T18:18:24
165,831,918
0
0
MIT
2022-06-21T02:31:30
2019-01-15T10:31:00
Java
UTF-8
Java
false
false
2,646
java
package main.java.app.web; import java.util.*; public class HttpRequestImpl implements HttpRequest { private Map<String, String> headers; private Map<String, String> bodyParameters; private String method; private String requestUrl; public HttpRequestImpl(String request) { this.headers = new LinkedHashMap<>(); this.bodyParameters = new LinkedHashMap<>(); parseRequest(request); } private void parseRequest(String request) { List<String> requestLines = Arrays.asList(request.split(System.lineSeparator())); if (requestLines.isEmpty()) { return; } String[] tokens = requestLines.get(0).split(" "); setMethod(tokens[0]); setRequestUrl(tokens[1]); parseHeaders(requestLines); parseBodyParameters(requestLines); } private void parseHeaders(List<String> requestLines) { requestLines .stream() .skip(1) .filter(h -> h.contains(": ")) .map(header -> header.split(": ")) .forEach(headersKvp -> { addHeader(headersKvp[0], headersKvp[1]); }); } private void parseBodyParameters(List<String> requestLines) { if (!requestLines.get(requestLines.size() - 2).equals("")) { return; } Arrays.stream(requestLines.get(requestLines.size() - 1) .split("&")) .map(bodyParameter -> bodyParameter.split("=")) .forEach(bpKvp -> { addBodyParameter(bpKvp[0], bpKvp[1]); }); } @Override public Map<String, String> getHeaders() { return Collections.unmodifiableMap(this.headers); } @Override public Map<String, String> getBodyParameters() { return Collections.unmodifiableMap(this.bodyParameters); } @Override public String getMethod() { return this.method; } @Override public void setMethod(String method) { this.method = method; } @Override public String getRequestUrl() { return this.requestUrl; } @Override public void setRequestUrl(String requestUrl) { this.requestUrl = requestUrl; } @Override public void addHeader(String header, String value) { this.headers.put(header, value); } @Override public void addBodyParameter(String parameter, String value) { this.bodyParameters.put(parameter, value); } @Override public boolean isResource() { return requestUrl.contains("."); } }
[ "tsdman1985@gmail.com" ]
tsdman1985@gmail.com
9128e2aa95ebed67717eb5541ccc9be456c210a9
f7295dfe3c303e1d656e7dd97c67e49f52685564
/smali/com/mi/milink/sdk/base/os/HandlerThreadEx.java
6f621d452c76c9fc726a693f88a85a81914df02d
[]
no_license
Eason-Chen0452/XiaoMiGame
36a5df0cab79afc83120dab307c3014e31f36b93
ba05d72a0a0c7096d35d57d3b396f8b5d15729ef
refs/heads/master
2022-04-14T11:08:31.280151
2020-04-14T08:57:25
2020-04-14T08:57:25
255,541,211
0
1
null
null
null
null
UTF-8
Java
false
false
7,550
java
package com.mi.milink.sdk.base.os; import android.os.Handler; import android.os.Handler.Callback; import android.os.HandlerThread; import android.os.Message; import android.os.Messenger; public class HandlerThreadEx implements Handler.Callback { private Handler.Callback callback; private Handler handler; private boolean ipcable; private Messenger messenger; private String name; private int priority = 0; private HandlerThread thread; public HandlerThreadEx(String paramString, Handler.Callback paramCallback) { this(paramString, true, paramCallback); } public HandlerThreadEx(String paramString, boolean paramBoolean, int paramInt, Handler.Callback paramCallback) { setName(paramString); setIpcable(paramBoolean); setPriority(paramInt); setCallback(paramCallback); start(); } public HandlerThreadEx(String paramString, boolean paramBoolean, Handler.Callback paramCallback) { this(paramString, paramBoolean, 0, paramCallback); } public Handler getHandler() { start(); return this.handler; } public Messenger getMessenger() { start(); return this.messenger; } public String getName() { return this.name; } public int getPriority() { return this.priority; } public boolean handleMessage(Message paramMessage) { if (this.callback != null) { return this.callback.handleMessage(paramMessage); } return false; } public boolean isIpcable() { return this.ipcable; } public void setCallback(Handler.Callback paramCallback) { this.callback = paramCallback; } protected void setIpcable(boolean paramBoolean) { this.ipcable = paramBoolean; } public void setName(String paramString) { this.name = paramString; if ((this.thread != null) && (this.thread.isAlive())) { this.thread.setName(paramString); } } public void setPriority(int paramInt) { this.priority = paramInt; } /* Error */ protected void start() { // Byte code: // 0: aload_0 // 1: monitorenter // 2: aload_0 // 3: getfield 79 com/mi/milink/sdk/base/os/HandlerThreadEx:thread Landroid/os/HandlerThread; // 6: ifnull +39 -> 45 // 9: aload_0 // 10: getfield 79 com/mi/milink/sdk/base/os/HandlerThreadEx:thread Landroid/os/HandlerThread; // 13: invokevirtual 84 android/os/HandlerThread:isAlive ()Z // 16: ifeq +29 -> 45 // 19: aload_0 // 20: getfield 57 com/mi/milink/sdk/base/os/HandlerThreadEx:handler Landroid/os/Handler; // 23: ifnull +22 -> 45 // 26: aload_0 // 27: getfield 77 com/mi/milink/sdk/base/os/HandlerThreadEx:ipcable Z // 30: ifeq +12 -> 42 // 33: aload_0 // 34: getfield 61 com/mi/milink/sdk/base/os/HandlerThreadEx:messenger Landroid/os/Messenger; // 37: astore_1 // 38: aload_1 // 39: ifnull +6 -> 45 // 42: aload_0 // 43: monitorexit // 44: return // 45: aload_0 // 46: getfield 79 com/mi/milink/sdk/base/os/HandlerThreadEx:thread Landroid/os/HandlerThread; // 49: ifnonnull +22 -> 71 // 52: aload_0 // 53: new 81 android/os/HandlerThread // 56: dup // 57: aload_0 // 58: invokevirtual 87 com/mi/milink/sdk/base/os/HandlerThreadEx:getName ()Ljava/lang/String; // 61: aload_0 // 62: invokevirtual 89 com/mi/milink/sdk/base/os/HandlerThreadEx:getPriority ()I // 65: invokespecial 92 android/os/HandlerThread:<init> (Ljava/lang/String;I)V // 68: putfield 79 com/mi/milink/sdk/base/os/HandlerThreadEx:thread Landroid/os/HandlerThread; // 71: aload_0 // 72: getfield 79 com/mi/milink/sdk/base/os/HandlerThreadEx:thread Landroid/os/HandlerThread; // 75: invokevirtual 84 android/os/HandlerThread:isAlive ()Z // 78: ifne +10 -> 88 // 81: aload_0 // 82: getfield 79 com/mi/milink/sdk/base/os/HandlerThreadEx:thread Landroid/os/HandlerThread; // 85: invokevirtual 93 android/os/HandlerThread:start ()V // 88: aload_0 // 89: getfield 79 com/mi/milink/sdk/base/os/HandlerThreadEx:thread Landroid/os/HandlerThread; // 92: invokevirtual 84 android/os/HandlerThread:isAlive ()Z // 95: ifeq +22 -> 117 // 98: aload_0 // 99: new 95 android/os/Handler // 102: dup // 103: aload_0 // 104: getfield 79 com/mi/milink/sdk/base/os/HandlerThreadEx:thread Landroid/os/HandlerThread; // 107: invokevirtual 99 android/os/HandlerThread:getLooper ()Landroid/os/Looper; // 110: aload_0 // 111: invokespecial 102 android/os/Handler:<init> (Landroid/os/Looper;Landroid/os/Handler$Callback;)V // 114: putfield 57 com/mi/milink/sdk/base/os/HandlerThreadEx:handler Landroid/os/Handler; // 117: aload_0 // 118: getfield 77 com/mi/milink/sdk/base/os/HandlerThreadEx:ipcable Z // 121: ifeq -79 -> 42 // 124: aload_0 // 125: getfield 57 com/mi/milink/sdk/base/os/HandlerThreadEx:handler Landroid/os/Handler; // 128: ifnull -86 -> 42 // 131: aload_0 // 132: new 104 android/os/Messenger // 135: dup // 136: aload_0 // 137: getfield 57 com/mi/milink/sdk/base/os/HandlerThreadEx:handler Landroid/os/Handler; // 140: invokespecial 107 android/os/Messenger:<init> (Landroid/os/Handler;)V // 143: putfield 61 com/mi/milink/sdk/base/os/HandlerThreadEx:messenger Landroid/os/Messenger; // 146: goto -104 -> 42 // 149: astore_1 // 150: aload_0 // 151: monitorexit // 152: aload_1 // 153: athrow // Local variable table: // start length slot name signature // 0 154 0 this HandlerThreadEx // 37 2 1 localMessenger Messenger // 149 4 1 localObject Object // Exception table: // from to target type // 2 38 149 finally // 45 71 149 finally // 71 88 149 finally // 88 117 149 finally // 117 146 149 finally } /* Error */ public void stop() { // Byte code: // 0: aload_0 // 1: monitorenter // 2: aload_0 // 3: getfield 79 com/mi/milink/sdk/base/os/HandlerThreadEx:thread Landroid/os/HandlerThread; // 6: ifnull +15 -> 21 // 9: aload_0 // 10: getfield 79 com/mi/milink/sdk/base/os/HandlerThreadEx:thread Landroid/os/HandlerThread; // 13: invokevirtual 84 android/os/HandlerThread:isAlive ()Z // 16: istore_1 // 17: iload_1 // 18: ifne +6 -> 24 // 21: aload_0 // 22: monitorexit // 23: return // 24: aload_0 // 25: getfield 79 com/mi/milink/sdk/base/os/HandlerThreadEx:thread Landroid/os/HandlerThread; // 28: invokevirtual 111 android/os/HandlerThread:quit ()Z // 31: pop // 32: aload_0 // 33: aconst_null // 34: putfield 79 com/mi/milink/sdk/base/os/HandlerThreadEx:thread Landroid/os/HandlerThread; // 37: goto -16 -> 21 // 40: astore_2 // 41: aload_0 // 42: monitorexit // 43: aload_2 // 44: athrow // Local variable table: // start length slot name signature // 0 45 0 this HandlerThreadEx // 16 2 1 bool boolean // 40 4 2 localObject Object // Exception table: // from to target type // 2 17 40 finally // 24 37 40 finally } } /* Location: C:\Users\Administrator\Desktop\apk\dex2jar\classes-dex2jar.jar!\com\mi\milink\sdk\base\os\HandlerThreadEx.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "chen_guiq@163.com" ]
chen_guiq@163.com
a455829a0efc986cf04ab72deb53dbcae6141d03
f5d5b368c1ae220b59cfb26bc26526b494c54d0e
/Radioforbikram/src/com/lilait/MusicPlayerService.java
92cdd9d2eb15209aa4eee59c10ec6a6e097cbc84
[]
no_license
kishordgupta/2012_bkup
3778c26082697b1cf223e27822d8efe90b35fc76
53ef4014fb3e11158c3f9242cb1f829e02e3ef69
refs/heads/master
2021-01-10T08:25:57.122415
2020-10-16T12:06:52
2020-10-16T12:06:52
47,512,520
0
0
null
null
null
null
UTF-8
Java
false
false
7,347
java
package com.lilait; import java.io.IOException; import radioklub.sekhontech.com.utils.ParserM3UToURL; import radioklub.sekhontech.com.utils.Utils; import com.spoledge.aacdecoder.MultiPlayer; import com.spoledge.aacdecoder.PlayerCallback; import android.app.Service; import android.content.Context; import android.content.Intent; import android.media.AudioManager; import android.media.AudioTrack; import android.media.MediaPlayer; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.Binder; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.util.Log; import android.widget.Toast; public class MusicPlayerService extends Service { //Constant public static final String NOTIFICATION = "com.vg.intent.notification.musicplayer"; public static final String STATUS = "STATUS"; public static final String STATUS_PLAYING = "Playing"; public static final String STATUS_STOPPED = "Stopped"; public static final String STATUS_BUFFERING = "Buffering"; public static final String STATUS_SERVICE_STARTED = "ServiceStarted"; public static final String PLAY_THIS_ONE = "PlayThisOne"; //Member variables private static final String TAG = "MusicPlayerSevices"; private StreamBinder mBinder; private MediaPlayer mMediaPlayer; private MultiPlayer mPlayer; private PlayerCallback mPlayerCallback; private Handler mHandler; private boolean mIsMP3Pause = false; //Radio state variables private String mRadioTitle; private boolean mIsPlaying = false; /* Service Lifecycle Event Handler * (non-Javadoc) * @see android.app.Service#onCreate() */ @Override public void onCreate() { mBinder = new StreamBinder(); initMusicPlayer(); super.onCreate(); sendNotification(STATUS, STATUS_SERVICE_STARTED); mHandler = new Handler(); Log.d(TAG, "onCreate complete"); } @Override public int onStartCommand(Intent intent, int flags, int startId) { if (mBinder == null) mBinder = new StreamBinder(); if (mPlayer == null) initMusicPlayer(); if (mMediaPlayer == null) mMediaPlayer = new MediaPlayer(); handlingRequest(intent); Log.d(TAG, "onStartCommand complete"); return Service.START_NOT_STICKY; //START_NOT_STICKY still work } @Override public IBinder onBind(Intent intent) { return mBinder; } /* MusicPlayerSevice functions * */ public void playRadio(final String url) { if (mIsMP3Pause) { mMediaPlayer.start(); mIsMP3Pause = false; } else { //TODO Thread thread = new Thread(new Runnable() { @Override public void run() { ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); final NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); // Connectivity issue, we quit if (networkInfo == null || networkInfo.getState() != NetworkInfo.State.CONNECTED) { return; } String newUrl = ""; if (url.contains(".m3u")) { newUrl = ParserM3UToURL.parse(url); } else { newUrl = url; } final String finalUrl = newUrl; mHandler.post(new Runnable() { @Override public void run() { mIsPlaying = true; if (finalUrl.endsWith(".mp3")) { //TODO //Create media player to play instead Log.d(TAG, "Start media player"); mPlayer.stop(); try { mMediaPlayer.setDataSource(finalUrl); mMediaPlayer.prepareAsync(); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SecurityException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalStateException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } mMediaPlayer.start(); mIsMP3Pause = false; } else { Log.d(TAG, "Start multi player"); mPlayer.playAsync(finalUrl); } } }); } }); thread.start(); } } public void stopRadio() { mIsPlaying = false; if (mMediaPlayer.isPlaying()) { Log.d(TAG, "Stop media player"); mMediaPlayer.stop(); } else { Log.d(TAG, "Stop multi player"); mPlayer.stop(); } } public void pauseRadio() { mIsPlaying = false; if (mMediaPlayer.isPlaying()) { Log.d(TAG, "Pause media player"); mIsMP3Pause = true; mMediaPlayer.pause(); } else { Log.d(TAG, "Stop multi player"); mPlayer.stop(); } } public String getRadioTitle() { return mRadioTitle; } public boolean isPlaying() { return mIsPlaying; } //Internal function private void initMusicPlayer() { if (mPlayer == null) { mPlayerCallback = new PlayerCallback() { @Override public void playerStopped(int perf) { sendNotification(STATUS, STATUS_STOPPED); } @Override public void playerStarted() { sendNotification(STATUS, STATUS_PLAYING); } @Override public void playerPCMFeedBuffer(boolean isPlaying, int bufSizeMs, int bufCapacityMs) { if (!isPlaying) { sendNotification(STATUS, STATUS_BUFFERING); } } @Override public void playerMetadata(String key, String value) { if (key != null && key.equals("StreamTitle")) { mRadioTitle = Utils.stripHtml(value); sendNotification(STATUS, mRadioTitle); } } @Override public void playerException(Throwable throwable) { final Throwable finalThrow = throwable; mHandler.post(new Runnable() { @Override public void run() { stopRadio(); Toast.makeText(getApplicationContext(), finalThrow.getMessage() , Toast.LENGTH_LONG).show(); sendNotification(STATUS, STATUS_STOPPED); } }); } @Override public void playerAudioTrackCreated(AudioTrack arg0) {} }; //Workaround try { java.net.URL.setURLStreamHandlerFactory( new java.net.URLStreamHandlerFactory(){ public java.net.URLStreamHandler createURLStreamHandler( String protocol ) { Log.d( TAG, "Asking for stream handler for protocol: '" + protocol + "'" ); if ("icy".equals( protocol )) return new com.spoledge.aacdecoder.IcyURLStreamHandler(); return null; } }); } catch (Throwable t) { Log.w( TAG, "Cannot set the ICY URLStreamHandler - maybe already set ? - " + t ); } mPlayer = new MultiPlayer(mPlayerCallback); } } private void handlingRequest(Intent intent) { Bundle bundle = intent.getExtras(); if (bundle != null) { String url = bundle.getString(PLAY_THIS_ONE); if (url != null) { playRadio(url); Log.d(TAG, "Receive playing request : " + url); } else { stopRadio(); Log.d(TAG, "Receive stop request"); } } } private void sendNotification(String key, String value) { Intent intent = new Intent(NOTIFICATION); intent.putExtra(key, value); sendBroadcast(intent); } // Nested class public class StreamBinder extends Binder { public MusicPlayerService getService() { return MusicPlayerService.this; } } }
[ "kdgupta87@gmail.com" ]
kdgupta87@gmail.com
4ee02c4fb764dc7b32942642d8975baf8af32414
7889c6d8f2e4314b777fe9ff2af02e742fd3f35a
/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebContainerStatsImpl.java
a4668b3509c30e87ac522d9c7fc1b11db4b969a1
[ "LicenseRef-scancode-generic-cla", "LGPL-2.1-or-later", "MPL-1.1", "JSON", "LGPL-2.1-only", "MPL-1.0", "Apache-2.0", "LicenseRef-scancode-unknown", "X11", "W3C", "GPL-1.0-or-later", "CPL-1.0", "LicenseRef-scancode-oracle-openjdk-exception-2.0", "W3C-19980720", "LicenseRef-scancode-indiana-extreme", "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference", "EPL-1.0", "AFL-2.1", "LGPL-2.0-or-later", "LicenseRef-scancode-warranty-disclaimer", "Apache-1.1", "GPL-2.0-only", "Plexus", "xpp", "CDDL-1.0", "MIT", "BSD-2-Clause" ]
permissive
apache/geronimo
62a342bd56d55fbcc614a62df85ec55b4f8c19c6
9a930877a047348d82ba5b3b544ffa55af5b150f
refs/heads/trunk
2023-08-22T08:17:26.852926
2013-03-21T00:35:41
2013-03-21T00:35:41
240,468
27
34
Apache-2.0
2023-07-25T17:23:50
2009-07-01T08:09:43
Java
UTF-8
Java
false
false
6,803
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.geronimo.management.geronimo.stats; import javax.management.j2ee.statistics.CountStatistic; import javax.management.j2ee.statistics.RangeStatistic; import javax.management.j2ee.statistics.TimeStatistic; import org.apache.geronimo.management.stats.CountStatisticImpl; import org.apache.geronimo.management.stats.RangeStatisticImpl; import org.apache.geronimo.management.stats.StatisticImpl; import org.apache.geronimo.management.stats.StatsImpl; import org.apache.geronimo.management.stats.TimeStatisticImpl; /** * Jetty implementation of the Geronimo stats interface WebContainerStats * * @version $Revision: 1.0$ */ public class JettyWebContainerStatsImpl extends StatsImpl implements JettyWebContainerStats { private RangeStatisticImpl activeRequestCount; private TimeStatisticImpl requestDuration; private CountStatisticImpl response1xx; private CountStatisticImpl response2xx; private CountStatisticImpl response3xx; private CountStatisticImpl response4xx; private CountStatisticImpl response5xx; private CountStatisticImpl statsOnMs; // time elapsed since the stats collection public JettyWebContainerStatsImpl() { activeRequestCount = new RangeStatisticImpl("Active Request Count", StatisticImpl.UNIT_COUNT, "The number of requests being processed concurrently"); requestDuration = new TimeStatisticImpl("Request Duration", StatisticImpl.UNIT_TIME_MILLISECOND, "The length of time that it's taken to handle individual requests"); response1xx = new CountStatisticImpl("Response 1xx", StatisticImpl.UNIT_COUNT, "The number of 1xx responses"); response2xx = new CountStatisticImpl("Response 2xx", StatisticImpl.UNIT_COUNT, "The number of 2xx responses"); response3xx = new CountStatisticImpl("Response 3xx", StatisticImpl.UNIT_COUNT, "The number of 3xx responses"); response4xx = new CountStatisticImpl("Response 4xx", StatisticImpl.UNIT_COUNT, "The number of 4xx responses"); response5xx = new CountStatisticImpl("Response 5xx", StatisticImpl.UNIT_COUNT, "The number of 5xx responses"); statsOnMs = new CountStatisticImpl("Stats Duration", StatisticImpl.UNIT_TIME_MILLISECOND, "The length of time that statistics have been collected."); addStat("ActiveRequestCount", activeRequestCount); addStat("RequestDuration", requestDuration); addStat("Responses1xx", response1xx); addStat("Responses2xx", response2xx); addStat("Responses3xx", response3xx); addStat("Responses4xx", response4xx); addStat("Responses5xx", response5xx); addStat("StatsDuration", statsOnMs); // TODO - remove this } /** * Public methods to return the interfaces for statistics. * These are used by the objects (such as the web console) that * retrieve the stats for presentation purposes. */ public RangeStatistic getActiveRequestCount() { return activeRequestCount; } public TimeStatistic getRequestDuration() { return requestDuration; } /** * @return Gets the number of 1xx status returned by this * context since last call of stats reset. */ public CountStatistic getResponses1xx() { return response1xx; } /** * @return Gets the number of 2xx status returned by this * context since last call of stats reset. */ public CountStatistic getResponses2xx() { return response2xx; } /** * @return Gets the number of 3xx status returned by this * context since last call of stats reset. */ public CountStatistic getResponses3xx() { return response3xx; } /** * @return Gets the number of 4xx status returned by this * context since last call of stats reset. */ public CountStatistic getResponses4xx() { return response4xx; } /** * @return Gets the number of 5xx status returned by this * context since last call of stats reset. */ public CountStatistic getResponses5xx() { return response5xx; } /** * @return Time in millis since statistics collection was started. */ public CountStatistic getStatsOnMs() { return statsOnMs; } /** * Public methods to return the implementations for statistics. * These are used by the JettyContainerImpl to set the values. */ public RangeStatisticImpl getActiveRequestCountImpl() { return activeRequestCount; } public TimeStatisticImpl getRequestDurationImpl() { return requestDuration; } /** * @return Gets the number of 1xx status returned by this * context since last call of stats reset. */ public CountStatisticImpl getResponses1xxImpl() { return response1xx; } /** * @return Gets the number of 2xx status returned by this * context since last call of stats reset. */ public CountStatisticImpl getResponses2xxImpl() { return response2xx; } /** * @return Gets the number of 3xx status returned by this * context since last call of stats reset. */ public CountStatisticImpl getResponses3xxImpl() { return response3xx; } /** * @return Gets the number of 4xx status returned by this * context since last call of stats reset. */ public CountStatisticImpl getResponses4xxImpl() { return response4xx; } /** * @return Gets the number of 5xx status returned by this * context since last call of stats reset. */ public CountStatisticImpl getResponses5xxImpl() { return response5xx; } /** * @return Time in millis since statistics collection was started. */ public CountStatisticImpl getStatsOnMsImpl() { return statsOnMs; } }
[ "djencks@apache.org" ]
djencks@apache.org
ca05533972c02d016edeb2f5726c1e5e68c981da
610e3f2d3ee2d04241bc0d05dd91cef127d842c0
/src/com/ivend/iintegrationservice/_2010/_12/IIntegrationServiceSaveStockTransferListAPIExceptionFaultFaultMessage.java
e0cc06b01f6ee7cfdc2c775ba9db8f227f84803c
[]
no_license
MasterInc/InventoryUpdateWS
5d9ff02b7cf868035e68a6410714b087edcde367
a768dfefc0ee4dc6b6e4467a0a74b49707846dcf
refs/heads/master
2021-01-10T16:16:46.270984
2015-11-27T21:34:01
2015-11-27T21:34:01
46,999,934
0
0
null
null
null
null
UTF-8
Java
false
false
1,292
java
package com.ivend.iintegrationservice._2010._12; import javax.xml.ws.WebFault; /** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.2.4-b01 * Generated source version: 2.2 * */ @WebFault(name = "APIException", targetNamespace = "http://www.iVend.com/IIntegrationService/2010/12") public class IIntegrationServiceSaveStockTransferListAPIExceptionFaultFaultMessage extends Exception { /** * Java type that goes as soapenv:Fault detail element. * */ private APIException faultInfo; /** * * @param message * @param faultInfo */ public IIntegrationServiceSaveStockTransferListAPIExceptionFaultFaultMessage(String message, APIException faultInfo) { super(message); this.faultInfo = faultInfo; } /** * * @param message * @param faultInfo * @param cause */ public IIntegrationServiceSaveStockTransferListAPIExceptionFaultFaultMessage(String message, APIException faultInfo, Throwable cause) { super(message, cause); this.faultInfo = faultInfo; } /** * * @return * returns fault bean: com.ivend.iintegrationservice._2010._12.APIException */ public APIException getFaultInfo() { return faultInfo; } }
[ "jahir.nava@gmail.com" ]
jahir.nava@gmail.com
4b9d9530d5ea26a37e11e691273ee00a04a04917
c35500eea5b33131d911c05de69ec14184eda679
/soa-client/src/main/java/org/ebayopensource/turmeric/runtime/sif/impl/internal/pipeline/AsyncResponse.java
1d127b812fb8f39cb984dedae52f0dfb190f247b
[ "Apache-2.0" ]
permissive
ramananandh/MyPublicRepo
42b9fd2c1fce41fd0de9b828531aa4ada2c75185
686129c380f438f0858428cc19c2ebc7f5e6b13f
refs/heads/master
2020-06-06T17:49:41.818826
2011-08-29T06:34:07
2011-08-29T06:34:07
1,922,268
0
1
null
null
null
null
UTF-8
Java
false
false
5,261
java
/******************************************************************************* * Copyright (c) 2006-2010 eBay 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 *******************************************************************************/ package org.ebayopensource.turmeric.runtime.sif.impl.internal.pipeline; import java.util.List; import java.util.Map; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import javax.xml.ws.Response; import org.ebayopensource.turmeric.runtime.common.exceptions.ServiceException; import org.ebayopensource.turmeric.runtime.common.exceptions.ServiceInvocationException; import org.ebayopensource.turmeric.runtime.common.impl.internal.pipeline.BaseMessageImpl; import org.ebayopensource.turmeric.runtime.common.impl.internal.utils.IAsyncResponsePoller; import org.ebayopensource.turmeric.runtime.common.pipeline.Message; import org.ebayopensource.turmeric.runtime.common.types.ByteBufferWrapper; import org.ebayopensource.turmeric.runtime.sif.impl.internal.service.BaseServiceDispatchImpl; import org.ebayopensource.turmeric.runtime.sif.impl.internal.service.RawDispatchData; import org.ebayopensource.turmeric.runtime.sif.service.InvokerExchange; public class AsyncResponse<T> implements Response<T> { private final ClientMessageContextImpl m_msgContext; private final Future<?> m_transportResponse; private boolean m_wasGetSuccessful = false; private T m_Response; private IAsyncResponsePoller m_poller; private Map<String, Object> m_context = null; private ExecutionException m_execException = null; private RuntimeException m_runtimeException = null; public AsyncResponse(ClientMessageContextImpl msgContext) { // Store the msgContext to process the response m_msgContext = msgContext; if (m_msgContext.getTransport().supportsPoll()) { m_poller = m_msgContext.getServicePoller(); } // Store the future returned by the transport m_transportResponse = m_msgContext.getFutureResponse(); } public boolean cancel(boolean mayInterruptIfRunning) { return m_transportResponse.cancel(mayInterruptIfRunning); } public T get() throws InterruptedException, ExecutionException { if (m_wasGetSuccessful) { if (m_execException != null) throw m_execException; if (m_runtimeException != null) throw m_runtimeException; return m_Response; } ClientMessageProcessor cmp; try { cmp = ClientMessageProcessor.getInstance(); cmp.processResponse(m_msgContext); Message inboundMessage = m_msgContext.getResponseMessage(); try { if (m_msgContext.getOutParams() != null) handleOutParamsResponse(inboundMessage, m_msgContext .getOutParams()); else if (m_msgContext.getOutBuffer() != null) handleRawByteResponse(inboundMessage, m_msgContext .getOutBuffer()); else handleTypedResponse(inboundMessage); } finally { m_wasGetSuccessful = true; if (m_poller != null) { m_poller.remove(m_transportResponse); } } return m_Response; } catch (ServiceException e) { m_execException = new ExecutionException(e); throw m_execException; } catch (RuntimeException e) { m_runtimeException = e; throw m_runtimeException; } } @SuppressWarnings("unchecked") private void handleTypedResponse(Message inboundMessage) throws ServiceException, ServiceInvocationException { BaseServiceDispatchImpl.checkForErrors( (BaseMessageImpl) inboundMessage, m_msgContext, m_msgContext .getAdminName()); m_Response = (T) inboundMessage.getParam(0); m_context = AsyncUtils.extractContext(inboundMessage); } @SuppressWarnings("unchecked") private void handleRawByteResponse(Message inboundMessage, ByteBufferWrapper outWrapper) throws ServiceException, ServiceInvocationException { BaseServiceDispatchImpl.getOutBoundRawData(inboundMessage, outWrapper); m_context = AsyncUtils.extractContext(inboundMessage); m_Response = (T) new InvokerExchange(null, outWrapper); } @SuppressWarnings("unchecked") private void handleOutParamsResponse(Message inboundMessage, List<Object> outParams) throws ServiceException, ServiceInvocationException { BaseServiceDispatchImpl.checkForErrors( (BaseMessageImpl) inboundMessage, m_msgContext, m_msgContext .getAdminName()); BaseServiceDispatchImpl.getOutParams(inboundMessage, outParams); m_context = AsyncUtils.extractContext(inboundMessage); m_Response = (T) new RawDispatchData(null, outParams); } public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { m_transportResponse.get(timeout, unit); return get(); } public boolean isCancelled() { return m_transportResponse.isCancelled(); } public boolean isDone() { return m_transportResponse.isDone(); } public Map<String, Object> getContext() { return m_context; } public ClientMessageContextImpl getMessageContext() { return m_msgContext; } }
[ "anav@ebay.com" ]
anav@ebay.com
e475b92451a5fdf28c9b5d6ac5abb0dcec94c615
b78d96a8660f90649035c7a6d6698cabb2946d62
/solutions/ModelJoin/src/main/java/CIM/IEC61970/Generation/Production/impl/NuclearGeneratingUnitImpl.java
7d98cfeb8b038091be09f88b038213b0d979384c
[ "MIT" ]
permissive
suchaoxiao/ttc2017smartGrids
d7b677ddb20a0adc74daed9e3ae815997cc86e1a
2997f1c202f5af628e50f5645c900f4d35f44bb7
refs/heads/master
2021-06-19T10:21:22.740676
2017-07-14T12:13:22
2017-07-14T12:13:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
840
java
/** */ package CIM.IEC61970.Generation.Production.impl; import CIM.IEC61970.Generation.Production.NuclearGeneratingUnit; import CIM.IEC61970.Generation.Production.ProductionPackage; import org.eclipse.emf.ecore.EClass; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Nuclear Generating Unit</b></em>'. * <!-- end-user-doc --> * * @generated */ public class NuclearGeneratingUnitImpl extends GeneratingUnitImpl implements NuclearGeneratingUnit { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected NuclearGeneratingUnitImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return ProductionPackage.Literals.NUCLEAR_GENERATING_UNIT; } } //NuclearGeneratingUnitImpl
[ "hinkel@fzi.de" ]
hinkel@fzi.de
3e6227a4116c0308ac9d8e999e21f49cd0c07328
c6d8dd7aba171163214253a3da841056ea2f6c87
/serenity-junit/src/test/java/net/thucydides/samples/SamplePassingNonWebScenarioWithManualTests.java
66d9fa034123484bb5745640ddcf95df129bffb4
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
serenity-bdd/serenity-core
602b8369f9527bea21a30104a45ba9b6e4d48238
ab6eaa5018e467b43e4f099e7682ce2924a9b12f
refs/heads/main
2023-09-01T22:37:02.079831
2023-09-01T17:24:41
2023-09-01T17:24:41
26,201,720
738
656
NOASSERTION
2023-09-08T14:33:06
2014-11-05T03:44:57
HTML
UTF-8
Java
false
false
357
java
package net.thucydides.samples; import net.serenitybdd.junit.runners.SerenityRunner; import net.serenitybdd.annotations.Manual; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(SerenityRunner.class) public class SamplePassingNonWebScenarioWithManualTests { @Test @Manual public void a_manual_test() throws Throwable {} }
[ "john.smart@wakaleo.com" ]
john.smart@wakaleo.com
aeebba395475317cb282b07ac448dff0e7791236
a0506c8e12e7c6c2ad9f9ef3db61ff77edb42d20
/Information-other-communication/src/main/java/com/lanjiu/im/communication/client/information/HeartBeatReqHandler.java
60d2ab9b77966ebc295fcf321c262dfec88a6231
[]
no_license
zhangtao007/janissary
f3455431c672778c035ffc69e4726f10a32b2cd1
36f20de81e04140173209ae91a082bfdbc5abb34
refs/heads/master
2023-04-14T03:06:21.200752
2021-04-26T01:18:06
2021-04-26T01:18:06
352,592,849
0
0
null
null
null
null
UTF-8
Java
false
false
4,444
java
package com.lanjiu.im.communication.client.information; import com.lanjiu.im.communication.util.IMSContacts; import com.lanjiu.pro.business.BusinessProtocolMessageStandard; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.handler.timeout.IdleState; import io.netty.handler.timeout.IdleStateEvent; import org.apache.log4j.Logger; import java.util.concurrent.atomic.AtomicInteger; import static com.lanjiu.im.communication.server.ChannelList.channelInformationGroup; public class HeartBeatReqHandler extends ChannelInboundHandlerAdapter { //private final Logger log=Logger.getLogger(HeartBeatReqHandler.class); //ChannelHandlerAdapter private final Logger log = Logger.getLogger(HeartBeatReqHandler.class); //线程安全心跳失败计数器 private AtomicInteger unRecPongTimes = new AtomicInteger(1); @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { recieveBeatHeatPackage(ctx, msg); } /** * 事件触发器,该处用来处理客户端空闲超时,发送心跳维持连接。 */ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { if (evt instanceof IdleStateEvent) { IdleStateEvent event = (IdleStateEvent) evt; if (event.state() == IdleState.READER_IDLE) { log.info("===客户端===(READER_IDLE 读超时)"); } else if (event.state() == IdleState.WRITER_IDLE) { //log.info("===客户端===(WRITER_IDLE 写超时)"); unRecPongTimes.getAndIncrement(); //服务端未进行pong心跳响应的次数小于3,则进行发送心跳,否则则断开连接。 if(unRecPongTimes.intValue() < 3){ //发送心跳,维持连接 BusinessProtocolMessageStandard.CheckUnifiedEntranceMessage replyMsg = buildHeartBeat(); ctx.channel().writeAndFlush(replyMsg) ; //log.info("客户端:发送心跳"); }else{ channelInformationGroup.disconnect(); channelInformationGroup.close(); ctx.channel().close(); //log.info("断开当前失效连接,下次请求时,新建连接"); } //log.info("unRecPongTimes.intValue: " + unRecPongTimes.intValue()); } else if (event.state() == IdleState.ALL_IDLE) { log.info("===客户端===(ALL_IDLE 总超时)"); } } } /** * 创建心跳包请求消息 * */ private BusinessProtocolMessageStandard.CheckUnifiedEntranceMessage buildHeartBeat(){ BusinessProtocolMessageStandard.Head header = BusinessProtocolMessageStandard.Head.newBuilder().setMsgType(IMSContacts.MsgType.HEART_PACKAGE).build(); BusinessProtocolMessageStandard.UnifiedEntranceMessage message = BusinessProtocolMessageStandard.UnifiedEntranceMessage.newBuilder().setHead(header).build(); BusinessProtocolMessageStandard.CheckUnifiedEntranceMessage checkUnifiedEntranceMessage = BusinessProtocolMessageStandard.CheckUnifiedEntranceMessage.newBuilder() .setUnifiedEntranceMessage(message).build(); return checkUnifiedEntranceMessage; } /** * 异常处理 */ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { cause.printStackTrace(); ctx.close(); } public void recieveBeatHeatPackage(ChannelHandlerContext ctx, Object msg){ // log.info("Client msg:" + LocalDateTime.now()); BusinessProtocolMessageStandard.CheckUnifiedEntranceMessage CheckUnifiedEntranceMessage = (BusinessProtocolMessageStandard.CheckUnifiedEntranceMessage) msg; BusinessProtocolMessageStandard.UnifiedEntranceMessage message = CheckUnifiedEntranceMessage.getUnifiedEntranceMessage(); //服务器端心跳回复 if(message != null && message.getHead().getMsgType().equals(IMSContacts.MsgType.HEART_PACKAGE)){ //清零心跳失败计数器 unRecPongTimes = new AtomicInteger(1); //log.info("client receive server pong msg :---->"+message); //ctx.fireUserEventTriggered(IdleState.READER_IDLE); }else{ ctx.fireChannelRead(msg); } } }
[ "zha_gtao@126.com" ]
zha_gtao@126.com
02872cae5b834a00181ae61a8da46225065787c6
35632ad905d8f7057fafd811613e0f2383305e3c
/subgrade-impl/src/main/java/com/dwarfeng/subgrade/impl/handler/CuratorDistributedLockHandler.java
b415e62155ddf0bc037267312dd8a7d5920eb129
[ "Apache-2.0" ]
permissive
DwArFeng/subgrade
82a1589863676598701525e4deb80b5ae014e0cb
b41da26629b1d3b46e549784cc4786a4a2ca03ea
refs/heads/master
2023-08-22T17:51:16.659855
2023-08-07T05:20:05
2023-08-07T06:44:49
235,097,227
2
0
Apache-2.0
2023-09-01T16:00:49
2020-01-20T12:32:41
Java
UTF-8
Java
false
false
6,375
java
package com.dwarfeng.subgrade.impl.handler; import com.dwarfeng.subgrade.stack.exception.HandlerException; import com.dwarfeng.subgrade.stack.handler.DistributedLockHandler; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.recipes.leader.LeaderLatch; import org.apache.curator.framework.recipes.leader.LeaderLatchListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** * 线上处理器的通用实现。 * * <p> * 本处理器实现线程安全。 * * @author DwArFeng * @since 1.3.0 */ public class CuratorDistributedLockHandler implements DistributedLockHandler { private static final Logger LOGGER = LoggerFactory.getLogger(CuratorDistributedLockHandler.class); private final CuratorFramework curatorFramework; private final String leaderLatchPath; private final Worker worker; private final Lock lock = new ReentrantLock(); private final InternalLeaderLatchListener leaderLatchListener = new InternalLeaderLatchListener(); private boolean onlineFlag = false; private LeaderLatch leaderLatch = null; private boolean lockHoldingFlag = false; private boolean startedFlag = false; private boolean workingFlag = false; public CuratorDistributedLockHandler(CuratorFramework curatorFramework, String leaderLatchPath, Worker worker) { this.curatorFramework = curatorFramework; this.leaderLatchPath = leaderLatchPath; this.worker = worker; } @Override public boolean isOnline() { lock.lock(); try { return onlineFlag; } finally { lock.unlock(); } } @Override public void online() throws HandlerException { lock.lock(); try { if (onlineFlag) { return; } // 日志记录。 LOGGER.info("驱动器上线..."); leaderLatch = new LeaderLatch(curatorFramework, leaderLatchPath); leaderLatch.addListener(leaderLatchListener); leaderLatch.start(); onlineFlag = true; } catch (Exception e) { HandlerUtil.transformAndThrowException(e); } finally { lock.unlock(); } } @Override public void offline() throws HandlerException { lock.lock(); try { if (!onlineFlag) { return; } // 日志记录。 LOGGER.info("驱动器下线..."); rest(); leaderLatch.close(LeaderLatch.CloseMode.NOTIFY_LEADER); leaderLatch = null; onlineFlag = false; } catch (Exception e) { HandlerUtil.transformAndThrowException(e); } finally { lock.unlock(); } } @Override public boolean isStarted() { lock.lock(); try { return startedFlag; } finally { lock.unlock(); } } @Override public void start() throws HandlerException { lock.lock(); try { if (startedFlag) { return; } // 日志记录。 LOGGER.info("驱动器启动..."); if (lockHoldingFlag) { work(); } startedFlag = true; } catch (Exception e) { HandlerUtil.transformAndThrowException(e); } finally { lock.unlock(); } } @Override public void stop() throws HandlerException { lock.lock(); try { if (!startedFlag) { return; } // 日志记录。 LOGGER.info("驱动器停止..."); rest(); startedFlag = false; } catch (HandlerException e) { throw e; } catch (Exception e) { throw new HandlerException(e); } finally { lock.unlock(); } } @Override public boolean isLockHolding() { lock.lock(); try { return lockHoldingFlag; } finally { lock.unlock(); } } @Override public boolean isWorking() { lock.lock(); try { return workingFlag; } finally { lock.unlock(); } } private void work() throws Exception { if (workingFlag) { return; } // 记录日志。 LOGGER.info("驱动器开始工作..."); worker.work(); workingFlag = true; } private void rest() throws Exception { if (!workingFlag) { return; } // 记录日志。 LOGGER.info("驱动器停止工作..."); worker.rest(); workingFlag = false; } private class InternalLeaderLatchListener implements LeaderLatchListener { @Override public void isLeader() { lock.lock(); try { if (lockHoldingFlag) { return; } // 日志记录。 LOGGER.info("驱动器持有锁..."); try { if (startedFlag) { work(); } } catch (Exception e) { LOGGER.warn("驱动器开始工作调度发生异常, 工作将不会开始, 异常信息如下:", e); } lockHoldingFlag = true; } finally { lock.unlock(); } } @Override public void notLeader() { lock.lock(); try { if (!lockHoldingFlag) { return; } // 日志记录。 LOGGER.info("驱动器释放锁..."); try { rest(); } catch (Exception e) { String message = "驱动器停止工作调度发生异常, 分布式锁逻辑被破坏, 异常信息如下:"; LOGGER.error(message, e); } lockHoldingFlag = false; } finally { lock.unlock(); } } } }
[ "915724865@qq.com" ]
915724865@qq.com
0cb41b6710ab06d365c6bd9786528f7999574407
5ebfe7bb05c0bf9a1f957eeb53b9d925038df0b7
/lightning/src/main/java/com/slack/api/lightning/handler/LightningEventHandler.java
b8a6448302d9e1ec0bcb450ce3cc0a9aedfe9882
[ "MIT" ]
permissive
aoberoi/java-slack-sdk
0c0fba0f57fabbd1f5095176e7548649bede6435
807f4c12799326fe406e452532178f269f142a29
refs/heads/master
2020-12-22T05:02:15.520881
2020-01-27T21:36:39
2020-01-27T21:36:39
236,676,613
0
0
MIT
2020-01-28T06:59:53
2020-01-28T06:59:52
null
UTF-8
Java
false
false
531
java
package com.slack.api.lightning.handler; import com.slack.api.app_backend.events.payload.EventsApiPayload; import com.slack.api.lightning.context.builtin.DefaultContext; import com.slack.api.lightning.response.Response; import com.slack.api.methods.SlackApiException; import com.slack.api.model.event.Event; import java.io.IOException; @FunctionalInterface public interface LightningEventHandler<E extends Event> { Response apply(EventsApiPayload<E> event, DefaultContext context) throws IOException, SlackApiException; }
[ "seratch@gmail.com" ]
seratch@gmail.com
5ba4b153fc13b119d229d9f8f05d29ebe2b2bcf6
2b7b6dc3f0697651130ae11240676d5c12fbf83a
/src/main/java/xmht/datastructuresandalgorithms/msb/sort/QuickSort.java
437488149d07aaab17f78f824344dd046d68754c
[]
no_license
shengjk/sjmsDemo
f0110c8b50a5e67f83ded432ed031563bd9eea3c
c6f2ee7f05ee833bfd07592f29d276b130da3e3b
refs/heads/master
2022-06-27T04:33:44.925795
2021-05-07T12:53:21
2021-05-07T12:53:21
78,197,119
0
0
null
2022-06-20T23:02:35
2017-01-06T10:22:55
Java
UTF-8
Java
false
false
3,737
java
package xmht.datastructuresandalgorithms.msb.sort; /** * @author shengjk1 * @date 2021/2/16 */ public class QuickSort { public static void swap(int[] arr, int i, int j) { int tmp = arr[i]; arr[i] = arr[j]; arr[j] = tmp; } public static int partition(int[] arr, int L, int R) { if (L > R) { return -1; } if (L == R) { return L; } int lessEqual = L - 1; int index = L; while (index < R) { if (arr[index] <= arr[R]) { swap(arr, index, ++lessEqual); } index++; } swap(arr, ++lessEqual, R); return lessEqual; } public static int[] netherlandsFlag(int[] arr, int L, int R) { if (L > R) { return new int[]{-1, -1}; } if (L == R) { return new int[]{L, R}; } int less = L - 1; int more = R; int index = L; while (index < more) { if (arr[index] == arr[R]) { index++; } else if (arr[index] < arr[R]) { swap(arr, index++, ++less); } else { swap(arr, index, --more); } } swap(arr, more, R); return new int[]{less + 1, more}; } public static void quickSort1(int[] arr) { if (arr == null || arr.length < 2) { return; } process1(arr, 0, arr.length - 1); } public static void process1(int[] arr, int L, int R) { if (L >= R) { return; } int M = partition(arr, L, R); process1(arr, L, M - 1); process1(arr, M + 1, R); } public static void quickSort2(int[] arr) { if (arr == null || arr.length < 2) { return; } process2(arr, 0, arr.length - 1); } public static void process2(int[] arr, int L, int R) { if (L >= R) { return; } int[] equalArea = netherlandsFlag(arr, L, R); process2(arr, L, equalArea[0] - 1); process2(arr, equalArea[1] + 1, R); } public static void quickSort3(int[] arr) { if (arr == null || arr.length < 2) { return; } process3(arr, 0, arr.length - 1); } public static void process3(int[] arr, int L, int R) { if (L >= R) { return; } swap(arr, L + (int) (Math.random() * (R - L + 1)), R); int[] equalArea = netherlandsFlag(arr, L, R); process3(arr, L, equalArea[0] - 1); process3(arr, equalArea[1] + 1, R); } // for test public static int[] generateRandomArray(int maxSize, int maxValue) { int[] arr = new int[(int) ((maxSize + 1) * Math.random())]; for (int i = 0; i < arr.length; i++) { arr[i] = (int) ((maxValue + 1) * Math.random()) - (int) (maxValue * Math.random()); } return arr; } // for test public static int[] copyArray(int[] arr) { if (arr == null) { return null; } int[] res = new int[arr.length]; for (int i = 0; i < arr.length; i++) { res[i] = arr[i]; } return res; } // for test public static boolean isEqual(int[] arr1, int[] arr2) { if ((arr1 == null && arr2 != null) || (arr1 != null && arr2 == null)) { return false; } if (arr1 == null && arr2 == null) { return true; } if (arr1.length != arr2.length) { return false; } for (int i = 0; i < arr1.length; i++) { if (arr1[i] != arr2[i]) { return false; } } return true; } // for test public static void printArray(int[] arr) { if (arr == null) { return; } for (int i = 0; i < arr.length; i++) { System.out.print(arr[i] + " "); } System.out.println(); } // for test public static void main(String[] args) { int testTime = 500000; int maxSize = 100; int maxValue = 100; boolean succeed = true; for (int i = 0; i < testTime; i++) { int[] arr1 = generateRandomArray(maxSize, maxValue); int[] arr2 = copyArray(arr1); int[] arr3 = copyArray(arr1); quickSort1(arr1); quickSort2(arr2); quickSort3(arr3); if (!isEqual(arr1, arr2) || !isEqual(arr2, arr3)) { succeed = false; break; } } System.out.println(succeed ? "Nice!" : "Oops!"); } }
[ "a" ]
a
9bc9582ce54be763fd1564f7d2c1d145680554ac
59ca721ca1b2904fbdee2350cd002e1e5f17bd54
/aliyun-java-sdk-emr/src/main/java/com/aliyuncs/emr/transform/v20160408/ModifyFlowProjectResponseUnmarshaller.java
b4dec248d0f3892c9d41f827417fb86264b4addf
[ "Apache-2.0" ]
permissive
longtx/aliyun-openapi-java-sdk
8fadfd08fbcf00c4c5c1d9067cfad20a14e42c9c
7a9ab9eb99566b9e335465a3358553869563e161
refs/heads/master
2020-04-26T02:00:35.360905
2019-02-28T13:47:08
2019-02-28T13:47:08
173,221,745
2
0
NOASSERTION
2019-03-01T02:33:35
2019-03-01T02:33:35
null
UTF-8
Java
false
false
1,161
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.emr.transform.v20160408; import com.aliyuncs.emr.model.v20160408.ModifyFlowProjectResponse; import com.aliyuncs.transform.UnmarshallerContext; public class ModifyFlowProjectResponseUnmarshaller { public static ModifyFlowProjectResponse unmarshall(ModifyFlowProjectResponse modifyFlowProjectResponse, UnmarshallerContext context) { modifyFlowProjectResponse.setRequestId(context.stringValue("ModifyFlowProjectResponse.RequestId")); modifyFlowProjectResponse.setData(context.booleanValue("ModifyFlowProjectResponse.Data")); return modifyFlowProjectResponse; } }
[ "haowei.yao@alibaba-inc.com" ]
haowei.yao@alibaba-inc.com
e31f8e3ae8d61424721112eeb95f3d63c3768e10
86c8070be1a9c89cc23e3aeb2696864e156ef3de
/src/dm/Conf.java
f80d48356f29dd663ab310bd9fbb7eaf6c4ad808
[]
no_license
Rbabnasr1/associationAlgorithms-
736104bd8fb637cc2601c74089e10dda7d9db075
a5647102e6593765cefe22db828adc053d999c36
refs/heads/master
2020-12-30T11:03:20.454052
2017-07-31T04:01:50
2017-07-31T04:01:50
98,846,712
0
0
null
null
null
null
UTF-8
Java
false
false
913
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package dm; /** * * @author rabab */ public class Conf { private String x; private String y; private float con; /** * @return the x */ public String getX() { return x; } /** * @param x the x to set */ public void setX(String x) { this.x = x; } /** * @return the y */ public String getY() { return y; } /** * @param y the y to set */ public void setY(String y) { this.y = y; } /** * @return the con */ public float getCon() { return con; } /** * @param con the con to set */ public void setCon(float con) { this.con = con; } }
[ "you@example.com" ]
you@example.com
84bf277c0834ed6c45d924800fae0aee7cb6dfdb
447520f40e82a060368a0802a391697bc00be96f
/apks/playstore_apps/com_spotify_music/source/com/spotify/music/features/churnlockedstate/card/ChurnLockedStateCardDialogActivity.java
f18f9f41ddf64ef5f19960556002143f7ddfaa9a
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
2,941
java
package com.spotify.music.features.churnlockedstate.card; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Build.VERSION; import android.os.Bundle; import android.view.View; import android.widget.Button; import com.spotify.instrumentation.PageIdentifiers; import com.spotify.music.features.checkout.web.PremiumSignupActivity; import com.spotify.music.features.churnlockedstate.ChurnLockedStateEndActivity; import com.spotify.music.spotlets.slate.container.view.SlateView; import im; import mks; import mnu; import nhb; import oxw; import oxx; import pas; import pat; import pbt; import pbu; import ueb; public class ChurnLockedStateCardDialogActivity extends nhb implements pat { public pas f; public mnu g; public mks h; public Button i; public Button j; public ChurnLockedStateCardDialogActivity() {} public static Intent a(Context paramContext, boolean paramBoolean) { paramContext = new Intent(paramContext, ChurnLockedStateCardDialogActivity.class); paramContext.putExtra("arsenal-debug-sign-in", paramBoolean); return paramContext; } private void b(boolean paramBoolean) { this.j.setLinksClickable(paramBoolean); this.i.setClickable(paramBoolean); } public final ueb G_() { return ueb.a(PageIdentifiers.w, null); } public final void a(String paramString) { startActivityForResult(PremiumSignupActivity.a(this, oxw.h().a(Uri.parse(paramString)).a(this.h).b(getIntent().getBooleanExtra("arsenal-debug-sign-in", false)).a()), 0); } public final void b(String paramString) {} public final void j() { b(true); } public final void k() { b(false); } public final void l() { finish(); } public final void n() { if (Build.VERSION.SDK_INT >= 16) { im.b(this); return; } startActivity(ChurnLockedStateEndActivity.a(getApplicationContext())); } protected void onActivityResult(int paramInt1, int paramInt2, Intent paramIntent) { if (paramInt1 != 0) { super.onActivityResult(paramInt1, paramInt2, paramIntent); return; } this.f.a(paramInt2, paramIntent); } public void onBackPressed() { this.f.e(); } protected void onCreate(Bundle paramBundle) { super.onCreate(paramBundle); this.f.a(this); Object localObject = new SlateView(this); setContentView((View)localObject); ((SlateView)localObject).a(new pbt(this)); ((SlateView)localObject).a(pbu.a); localObject = this.f; boolean bool; if (paramBundle == null) { bool = true; } else { bool = false; } ((pas)localObject).a(bool); } protected void onStart() { super.onStart(); this.f.a(); } protected void onStop() { super.onStop(); this.f.b(); } public final void r() { this.g.a(2131755654, 0, new Object[0]); } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
71c09d0458fa97536cd29c1791ee8582293b7962
d653be0f37a8c528b2754a87a540451bb5478d69
/alibaba-sentinel-datasource-spring-cloud/src/test/java/com/alibaba/cloud/sentinel/datasource/NacosDataSourcePropertiesTests.java
2064ce812a63d2f68cd209251c50b1fc2a28cf28
[ "Apache-2.0" ]
permissive
FelixZQiu/spring-cloud-alibaba
76b6f42a5aeaae0fda52926cac470b0eb92c88ae
d8e9f800cc79f56e1aa4d68b71737bc36e4cdc60
refs/heads/master
2021-07-05T14:28:55.903762
2020-10-31T06:55:07
2020-10-31T06:55:07
196,821,387
0
0
null
2019-07-14T10:10:36
2019-07-14T10:10:35
null
UTF-8
Java
false
false
2,890
java
/* * Copyright (C) 2018 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 com.alibaba.cloud.sentinel.datasource; import com.alibaba.cloud.sentinel.datasource.config.NacosDataSourceProperties; import com.alibaba.cloud.sentinel.datasource.factorybean.NacosDataSourceFactoryBean; import static org.junit.Assert.assertEquals; import org.junit.Test; /** * @author <a href="mailto:fangjian0423@gmail.com">Jim</a> */ public class NacosDataSourcePropertiesTests { @Test public void testNacosWithAddr() { NacosDataSourceProperties nacosDataSourceProperties = new NacosDataSourceProperties(); nacosDataSourceProperties.setServerAddr("127.0.0.1:8848"); nacosDataSourceProperties.setRuleType(RuleType.FLOW); nacosDataSourceProperties.setDataId("sentinel"); nacosDataSourceProperties.setGroupId("custom-group"); nacosDataSourceProperties.setDataType("xml"); assertEquals("Nacos groupId was wrong", "custom-group", nacosDataSourceProperties.getGroupId()); assertEquals("Nacos dataId was wrong", "sentinel", nacosDataSourceProperties.getDataId()); assertEquals("Nacos default data type was wrong", "xml", nacosDataSourceProperties.getDataType()); assertEquals("Nacos rule type was wrong", RuleType.FLOW, nacosDataSourceProperties.getRuleType()); assertEquals("Nacos default factory bean was wrong", NacosDataSourceFactoryBean.class.getName(), nacosDataSourceProperties.getFactoryBeanName()); } @Test public void testNacosWithProperties() { NacosDataSourceProperties nacosDataSourceProperties = new NacosDataSourceProperties(); nacosDataSourceProperties.setAccessKey("ak"); nacosDataSourceProperties.setSecretKey("sk"); nacosDataSourceProperties.setEndpoint("endpoint"); nacosDataSourceProperties.setNamespace("namespace"); nacosDataSourceProperties.setRuleType(RuleType.SYSTEM); assertEquals("Nacos ak was wrong", "ak", nacosDataSourceProperties.getAccessKey()); assertEquals("Nacos sk was wrong", "sk", nacosDataSourceProperties.getSecretKey()); assertEquals("Nacos endpoint was wrong", "endpoint", nacosDataSourceProperties.getEndpoint()); assertEquals("Nacos namespace was wrong", "namespace", nacosDataSourceProperties.getNamespace()); assertEquals("Nacos rule type was wrong", RuleType.SYSTEM, nacosDataSourceProperties.getRuleType()); } }
[ "fangjian0423@gmail.com" ]
fangjian0423@gmail.com
45fdf1e85f65b057e22a567d477642e2ee922441
08b4760455d2e2e72621554ce6589a8eb203c075
/integration/mediation-tests/tests-sample/src/test/java/org/wso2/carbon/esb/samples/test/mediation/jason/Sample440TestCase.java
d5a0724f491f2f93d37d0ef08e3f828607bce869
[ "Apache-2.0" ]
permissive
wso2/micro-integrator
4df1cf138b570e45424c3c874c6d04dbaee188d7
c81c7d56138571869ac9d177d28d0ef2d12ca419
refs/heads/master
2023-09-01T00:22:17.250098
2023-08-29T09:14:29
2023-08-29T09:14:29
176,206,805
180
210
Apache-2.0
2023-09-11T05:14:48
2019-03-18T04:53:55
Java
UTF-8
Java
false
false
1,911
java
/* *Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * *WSO2 Inc. 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.wso2.carbon.esb.samples.test.mediation.jason; import org.json.JSONObject; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import org.wso2.carbon.esb.samples.test.util.ESBSampleIntegrationTest; import org.wso2.esb.integration.common.utils.clients.JSONClient; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; public class Sample440TestCase extends ESBSampleIntegrationTest { @BeforeClass(alwaysRun = true) public void setEnvironment() throws Exception { super.init(); } @Test(groups = "wso2.esb", description = "JSON to SOAP conversion using sample 440") public void testJSONToSOAPConversion() throws Exception { JSONClient jsonClient = new JSONClient(); JSONObject response = jsonClient .sendSimpleStockQuoteRequest(getProxyServiceURLHttp("JSONProxy"), "IBM", "getQuote"); assertNotNull(response, "Response is null"); JSONObject returnElement = response.getJSONObject("getQuoteResponse"); assertNotNull(returnElement, "return element contents is null"); assertEquals(returnElement.getJSONObject("return").getString("symbol"), "IBM", "Symbol is mismatch"); } }
[ "nirothipan@gmail.com" ]
nirothipan@gmail.com
a85840b7296d336490fbd4d39f472ba5a289bd88
a5bcbc7ed5f50cde2ccb862aa3450a0aa6cfbde8
/01-algorithm/src/main/java/org/sprintdragon/algorithm/lc/TItle384.java
48e9347aafb108294d36078d6aa7e5cc3f9311e4
[]
no_license
psiitoy/accumulate
f733b35929864658e8eeb342792521afaf2f1aac
1059cf22d1b2d3cc7919e185ae94d380e045bf8f
refs/heads/master
2022-05-04T05:35:14.261835
2022-04-09T12:26:21
2022-04-09T12:26:21
100,947,657
0
0
null
null
null
null
UTF-8
Java
false
false
1,090
java
package org.sprintdragon.algorithm.lc; import java.util.Random; public class TItle384 { static class Solution { int[] nums; Random random; public Solution(int[] nums) { this.nums = nums; random = new Random(); } /** * Resets the array to its original configuration and return it. */ public int[] reset() { return nums; } /** * Returns a random shuffling of the array. */ public int[] shuffle() { int ranNums[] = new int[nums.length]; for (int i = 0; i < nums.length; i++) { ranNums[i] = nums[i]; } for (int i = 0; i < nums.length; i++) { swap(ranNums, i, random.nextInt(nums.length)); } return ranNums; } private void swap(int[] nums, int a, int b) { if (a != b) { int tmp = nums[a]; nums[a] = nums[b]; nums[b] = tmp; } } } }
[ "psiitoy@126.com" ]
psiitoy@126.com
3a0084975b759a96ec673dfd7588e842de942c23
bde23cd306fb30d9638ab0c6bc62362a5475b96f
/Hello/src/com/youeclass/customview/CheckBoxGroup.java
912d2efc293fe749cb7faacd9bc4a2b3e8d96efa
[]
no_license
examw/youeclass_android
352d0ceef8aa887a61d3ed85244224c22435a752
2cd8ce018708db3ab47c44a7a547b7cf4f821cc6
refs/heads/master
2021-01-19T15:01:25.545244
2015-03-26T02:39:39
2015-03-26T02:39:39
32,064,642
0
1
null
null
null
null
UTF-8
Java
false
false
1,998
java
package com.youeclass.customview; import java.util.ArrayList; import java.util.List; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.widget.LinearLayout; public class CheckBoxGroup extends LinearLayout{ private List<MyCheckBox> checkboxList = new ArrayList<MyCheckBox>(); private StringBuffer buf = new StringBuffer(); public CheckBoxGroup(Context context) { // TODO Auto-generated constructor stub super(context); } public CheckBoxGroup(Context context, AttributeSet attrs) { super(context,attrs); } @Override public void addView(View child, int index) { // TODO Auto-generated method stub LinearLayout.LayoutParams lp = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT, 1); lp.setMargins(0, 0, 0, 10); child.setLayoutParams(lp); super.addView(child, index); checkboxList.add((MyCheckBox) child); } @Override public void addView(View child) { // TODO Auto-generated method stub LinearLayout.LayoutParams lp = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT, 1); lp.setMargins(0, 0, 0, 10); child.setLayoutParams(lp); super.addView(child); checkboxList.add((MyCheckBox) child); } public String getValue() { if(buf.length()>0) { buf.delete(0, buf.length()); } for(MyCheckBox cb: checkboxList) { if(cb.isChecked()) { buf.append(cb.getValue()).append(","); } } return buf.length()>0?buf.deleteCharAt(buf.length()-1).toString():""; } @Override public void removeAllViews() { // TODO Auto-generated method stub super.removeAllViews(); checkboxList.removeAll(checkboxList); } @Override public void removeViewAt(int index) { // TODO Auto-generated method stub super.removeViewAt(index); checkboxList.remove(index); } public void clearCheck() { // TODO Auto-generated method stub for(MyCheckBox cb: checkboxList) { if(cb.isChecked()) { cb.setFlag(-1); cb.setChecked(false); } } } }
[ "fw121fw4@163.com" ]
fw121fw4@163.com
7d5add2b36f0caafdf229d3b80ed7e7c826383a3
c7f90a96b5d739c5d64c9789304e15f549744a58
/src/test/java/hanfak/shopofhan/infrastructure/settings/SettingsTest.java
9dd2102ec5d95688c2b6e75c1b6c38113d45b5c6
[]
no_license
hanfak/ShopOfHan
bd45056ed986e09e99646813aea36f48f501d631
22618dbec94378e6e79be4ec1d877469c20f89fd
refs/heads/master
2021-01-25T07:02:15.888996
2018-02-10T19:38:41
2018-02-10T19:38:41
93,646,922
0
0
null
null
null
null
UTF-8
Java
false
false
2,130
java
package hanfak.shopofhan.infrastructure.settings; import hanfak.shopofhan.infrastructure.properties.PropertiesReader; import hanfak.shopofhan.infrastructure.properties.Settings; import org.assertj.core.api.WithAssertions; import org.junit.Test; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; public class SettingsTest implements WithAssertions { @Test public void mySqlDbPortTest() throws Exception { PropertiesReader properties = mock(PropertiesReader.class); Settings settings = new Settings(properties); when(properties.readProperty("server.port")).thenReturn("8081"); assertThat(settings.serverPort()).isEqualTo(8081); } @Test public void databaseUrlTest() throws Exception { PropertiesReader properties = mock(PropertiesReader.class); Settings settings = new Settings(properties); when(properties.readProperty("database.shopOfHanUrl")).thenReturn("jdbc:mysql://172.17.0.3:3306/"); assertThat(settings.databaseURL()).isEqualTo("jdbc:mysql://172.17.0.3:3306/"); } @Test public void databaseUsernameTest() throws Exception { PropertiesReader properties = mock(PropertiesReader.class); Settings settings = new Settings(properties); when(properties.readProperty("database.username")).thenReturn("admin"); assertThat(settings.databaseUsername()).isEqualTo("admin"); } @Test public void databasePasswordTest() throws Exception { PropertiesReader properties = mock(PropertiesReader.class); Settings settings = new Settings(properties); when(properties.readProperty("database.password")).thenReturn("password"); assertThat(settings.databasePassword()).isEqualTo("password"); } @Test public void databaseNameTest() throws Exception { PropertiesReader properties = mock(PropertiesReader.class); Settings settings = new Settings(properties); when(properties.readProperty("database.name")).thenReturn("blah"); assertThat(settings.databaseName()).isEqualTo("blah"); } }
[ "fakira.work@gmail.com" ]
fakira.work@gmail.com
59afcbff93a33c7cede74988f9b9917ee5b0b000
1dc8b58c0e85fb5a8574b17748774d11d7621b83
/java/aur.java
f621e98889363c83bd6683cbab91eefa6f7671b8
[]
no_license
AndroidAppz/OGYouTube
74800e1dc0bcf7fddab9e4eeac1f358404b0ad2d
09b18440e90832ded189161e99dd384d6550fcd0
refs/heads/master
2021-06-26T13:00:20.421413
2017-06-27T11:31:32
2017-06-27T11:31:32
74,985,874
7
4
null
null
null
null
UTF-8
Java
false
false
525
java
/* * Decompiled with CFR 0_110. * * Could not load the following classes: * java.lang.Object * java.lang.Runnable * java.lang.String */ final class aur implements Runnable { private /* synthetic */ String a; private /* synthetic */ long b; private /* synthetic */ auq c; aur(auq auq2, String string, long l) { this.c = auq2; this.a = string; this.b = l; } public final void run() { this.c.a.a(this.a, this.b); this.c.a.a(this.toString()); } }
[ "admin@timo.de.vc" ]
admin@timo.de.vc
3fee6873b94c9b26751fbbd2d2770afe4d0177cc
84125a032c2b2e150f62616c15f0089016aca05d
/src/com/prep2020/medium/Problem254.java
54f517b2de88ceb3d5afee5cc5dea4ee1dd89cc3
[]
no_license
achowdhury80/leetcode
c577acc1bc8bce3da0c99e12d6d447c74fbed5c3
5ec97794cc5617cd7f35bafb058ada502ee7d802
refs/heads/master
2023-02-06T01:08:49.888440
2023-01-22T03:23:37
2023-01-22T03:23:37
115,574,715
1
0
null
null
null
null
UTF-8
Java
false
false
716
java
package com.prep2020.medium; import java.util.*; public class Problem254 { public List<List<Integer>> getFactors(int n) { List<List<Integer>> result = new ArrayList<>(); helper(result, 2, n, new ArrayList<>()); return result; } private void helper(List<List<Integer>> result, int start, int n, List<Integer> temp) { if (n == 1) { if (temp.size() > 1) result.add(new ArrayList<>(temp)); return; } for(int i = start; i <= n; i++) { if (n % i != 0) continue; temp.add(i); helper(result, i, n / i, temp); temp.remove(temp.size() - 1); } } public static void main(String[] args) { Problem254 problem = new Problem254(); System.out.println(problem.getFactors(12)); } }
[ "aychowdh@microsoft.com" ]
aychowdh@microsoft.com
86d977594eb8f6bbbba6495a23b4539ad49b9b5a
471a1d9598d792c18392ca1485bbb3b29d1165c5
/jadx-MFP/src/main/java/com/myfitnesspal/feature/diary/ui/dialog/FriendDiaryPasswordDialogFragment.java
ca955fe13c7b379b0de06ae7f1dfb6d4121fc148
[]
no_license
reed07/MyPreferencePal
84db3a93c114868dd3691217cc175a8675e5544f
365b42fcc5670844187ae61b8cbc02c542aa348e
refs/heads/master
2020-03-10T23:10:43.112303
2019-07-08T00:39:32
2019-07-08T00:39:32
129,635,379
2
0
null
null
null
null
UTF-8
Java
false
false
1,958
java
package com.myfitnesspal.feature.diary.ui.dialog; import android.os.Bundle; import com.myfitnesspal.android.R; import com.myfitnesspal.feature.diary.event.PasswordCanceledEvent; import com.myfitnesspal.feature.diary.event.PasswordEnteredEvent; import com.myfitnesspal.shared.ui.dialog.EditTextBaseDialogFragment; import com.myfitnesspal.shared.ui.dialog.MfpAlertDialogBuilder; import com.squareup.otto.Bus; import dagger.Lazy; import javax.inject.Inject; public class FriendDiaryPasswordDialogFragment extends EditTextBaseDialogFragment { @Inject Lazy<Bus> bus; /* access modifiers changed from: protected */ public String getInitialText() { return null; } public static FriendDiaryPasswordDialogFragment newInstance() { return new FriendDiaryPasswordDialogFragment(); } public void onCreate(Bundle bundle) { super.onCreate(bundle); component().inject(this); } /* access modifiers changed from: protected */ public String getTitle() { return getString(R.string.password_required); } /* access modifiers changed from: protected */ public void setBuilderProperties(MfpAlertDialogBuilder mfpAlertDialogBuilder) { mfpAlertDialogBuilder.setCancelable(false).setCanceledOnTouchOutside(false); } /* access modifiers changed from: protected */ public void setEditTextProperties() { this.editText.setHint(R.string.enter_password); this.editText.setInputType(129); } /* access modifiers changed from: protected */ public void onOkClicked(String str) { postEventAndHideSoftInput(new PasswordEnteredEvent(str)); } /* access modifiers changed from: protected */ public void onCancelClicked() { postEventAndHideSoftInput(new PasswordCanceledEvent()); } private void postEventAndHideSoftInput(Object obj) { ((Bus) this.bus.get()).post(obj); hideSoftInput(); } }
[ "anon@ymous.email" ]
anon@ymous.email
86135b583a002ae5ed4ab65f75bddfca817d8629
30455dcf8d0db40aaa36cd54a6cf75a83812fcfb
/src/main/java/org/apache/http/client/utils/CloneUtils.java
f264eb7cf0e111dd8068b06ad6f286bd4cf83b5a
[]
no_license
excellmania/FastCharger
76c294ca3d172bfdc8bbba46c0f9d38a7e444510
536d0ead49ee2574e7f6a889e81515b899c23a9a
refs/heads/master
2020-05-01T03:26:45.850182
2019-03-23T05:53:49
2019-03-23T05:53:49
177,245,158
0
0
null
null
null
null
UTF-8
Java
false
false
1,169
java
package org.apache.http.client.utils; import java.lang.reflect.InvocationTargetException; import org.apache.http.annotation.Immutable; @Immutable public class CloneUtils { private CloneUtils() { } public static Object clone(Object obj) { if (obj == null) { return null; } if (obj instanceof Cloneable) { try { try { return obj.getClass().getMethod("clone", (Class[]) null).invoke(obj, (Object[]) null); } catch (InvocationTargetException e) { Throwable cause = e.getCause(); if (cause instanceof CloneNotSupportedException) { throw ((CloneNotSupportedException) cause); } throw new Error("Unexpected exception", cause); } catch (IllegalAccessException e2) { throw new IllegalAccessError(e2.getMessage()); } } catch (NoSuchMethodException e3) { throw new NoSuchMethodError(e3.getMessage()); } } throw new CloneNotSupportedException(); } }
[ "47793867+excellmania@users.noreply.github.com" ]
47793867+excellmania@users.noreply.github.com
3c86fdaaa226bb78c60efa2dc69f5b079d8fe11a
13db50c9dcbc94b91cab7a6bbf08ab94f29b64f9
/my_javaee/src/DATA_ejb_test_data/entity_bean/generated_via_EJB_view/LocalEntityCMPwithLocalInt_Test.java
b52e2b18ad1998c3d83667c604682958a9ff8095
[]
no_license
IdeaUJetBrains/my_ejb_project
9df98f280e6a95c4ad96b7b5f01a80472497c791
30fb8d984fadbdedf73a020577d71c1a44344fe3
refs/heads/master
2022-11-09T06:17:15.628059
2020-06-16T09:53:34
2020-06-16T09:53:34
272,671,090
0
0
null
null
null
null
UTF-8
Java
false
false
174
java
package DATA_ejb_test_data.entity_bean.generated_via_EJB_view; import javax.ejb.EJBLocalObject; public interface LocalEntityCMPwithLocalInt_Test extends EJBLocalObject { }
[ "olga.pavlova@jetbrains.com" ]
olga.pavlova@jetbrains.com
573a1e5c4483cb80c449ac2593fad82478a0796d
e7c3fc6b07dd3be4ebe5fc17f24c19dcb50c819b
/springboot-helloworld/src/test/java/springboot/HelloWorldControllerTest.java
5fdaa94056ea1bfcfd9c033baa53caa0a9f816ca
[]
no_license
Yinjiaju/Hello-World
8f5aa7e03ff501a8583105fd29770605f908d133
2baee845c1e4b0ceb094cb85d310915897142f8a
refs/heads/master
2022-07-15T04:44:55.625157
2021-04-20T09:47:26
2021-04-20T09:47:26
138,845,371
1
0
null
2022-06-29T18:11:36
2018-06-27T07:26:22
JavaScript
UTF-8
Java
false
false
441
java
package springboot; import static org.junit.Assert.*; import org.junit.Test; import com.test.helloworld.controller.HelloWorldController; /** * Spring Boot HelloWorldController 测试 - {@link HelloWorldControllerTest} * * Created by bysocket on 16/4/26. */ public class HelloWorldControllerTest { @Test public void testSayHello() { assertEquals("Hello,World!",new HelloWorldController().sayHello()); } }
[ "Administrator@windows10.microdone.cn" ]
Administrator@windows10.microdone.cn
51bed3276af5683e96cdd35cb060efa80f75bf7a
ddd36c2e3bc51eb5086afefe2700150b5a359ee8
/src/org/transinfo/cacis/util/DWRSupplementaryDetails.java
80931af9c2aa004f48595530b77f382ea8ff86e1
[]
no_license
trandaiduong1990/CACISISS_PADSS
a99bd9e673eaf4897d817d8884953eaa2170ce53
acf2b4634c7ca5ae10ffc205a91375cab3072cb7
refs/heads/master
2021-01-10T01:56:36.101356
2015-11-25T02:11:23
2015-11-25T02:11:23
46,832,469
0
1
null
null
null
null
UTF-8
Java
false
false
5,169
java
package org.transinfo.cacis.util; public class DWRSupplementaryDetails { private String supplCustomerName; private String supplSurName; private String supplEmbossingName; private String strSupplDob; private String supplPob; private String supplGender; private String supplMaritalStatus; private String supplIdNumber; private String strSupplIdDate; private String strSupplIdExpire; private String supplIdPlace; private String supplNationality; private String supplEmail; private String supplIncome; private String relationShip; private String supplementaryAddressaddress1; private String supplementaryAddressaddress2; private String supplementaryAddresscity; private String supplementaryAddressstate; private String supplementaryAddresscountry; private String supplementaryAddresspostalCode; private String applicationformphone; private String supplementaryAddressfax; public String getSupplCustomerName() { return supplCustomerName; } public void setSupplCustomerName(String supplCustomerName) { this.supplCustomerName = supplCustomerName; } public String getSupplSurName() { return supplSurName; } public void setSupplSurName(String supplSurName) { this.supplSurName = supplSurName; } public String getSupplEmbossingName() { return supplEmbossingName; } public void setSupplEmbossingName(String supplEmbossingName) { this.supplEmbossingName = supplEmbossingName; } public String getStrSupplDob() { return strSupplDob; } public void setStrSupplDob(String strSupplDob) { this.strSupplDob = strSupplDob; } public String getSupplPob() { return supplPob; } public void setSupplPob(String supplPob) { this.supplPob = supplPob; } public String getSupplGender() { return supplGender; } public void setSupplGender(String supplGender) { this.supplGender = supplGender; } public String getSupplMaritalStatus() { return supplMaritalStatus; } public void setSupplMaritalStatus(String supplMaritalStatus) { this.supplMaritalStatus = supplMaritalStatus; } public String getSupplIdNumber() { return supplIdNumber; } public void setSupplIdNumber(String supplIdNumber) { this.supplIdNumber = supplIdNumber; } public String getStrSupplIdDate() { return strSupplIdDate; } public void setStrSupplIdDate(String strSupplIdDate) { this.strSupplIdDate = strSupplIdDate; } public String getStrSupplIdExpire() { return strSupplIdExpire; } public void setStrSupplIdExpire(String strSupplIdExpire) { this.strSupplIdExpire = strSupplIdExpire; } public String getSupplIdPlace() { return supplIdPlace; } public void setSupplIdPlace(String supplIdPlace) { this.supplIdPlace = supplIdPlace; } public String getSupplNationality() { return supplNationality; } public void setSupplNationality(String supplNationality) { this.supplNationality = supplNationality; } public String getSupplEmail() { return supplEmail; } public void setSupplEmail(String supplEmail) { this.supplEmail = supplEmail; } public String getSupplIncome() { return supplIncome; } public void setSupplIncome(String supplIncome) { this.supplIncome = supplIncome; } public String getRelationShip() { return relationShip; } public void setRelationShip(String relationShip) { this.relationShip = relationShip; } public String getSupplementaryAddressaddress1() { return supplementaryAddressaddress1; } public void setSupplementaryAddressaddress1(String supplementaryAddressaddress1) { this.supplementaryAddressaddress1 = supplementaryAddressaddress1; } public String getSupplementaryAddressaddress2() { return supplementaryAddressaddress2; } public void setSupplementaryAddressaddress2(String supplementaryAddressaddress2) { this.supplementaryAddressaddress2 = supplementaryAddressaddress2; } public String getSupplementaryAddresscity() { return supplementaryAddresscity; } public void setSupplementaryAddresscity(String supplementaryAddresscity) { this.supplementaryAddresscity = supplementaryAddresscity; } public String getSupplementaryAddressstate() { return supplementaryAddressstate; } public void setSupplementaryAddressstate(String supplementaryAddressstate) { this.supplementaryAddressstate = supplementaryAddressstate; } public String getSupplementaryAddresscountry() { return supplementaryAddresscountry; } public void setSupplementaryAddresscountry(String supplementaryAddresscountry) { this.supplementaryAddresscountry = supplementaryAddresscountry; } public String getSupplementaryAddresspostalCode() { return supplementaryAddresspostalCode; } public void setSupplementaryAddresspostalCode( String supplementaryAddresspostalCode) { this.supplementaryAddresspostalCode = supplementaryAddresspostalCode; } public String getApplicationformphone() { return applicationformphone; } public void setApplicationformphone(String applicationformphone) { this.applicationformphone = applicationformphone; } public String getSupplementaryAddressfax() { return supplementaryAddressfax; } public void setSupplementaryAddressfax(String supplementaryAddressfax) { this.supplementaryAddressfax = supplementaryAddressfax; } }
[ "trandaiduong1990@gmail.com" ]
trandaiduong1990@gmail.com
db9d6ec74a4ec7fe3850f82bb008251ed52ed5a6
068945723437420f718abe9dfe6a04fe71dd516d
/src/test/java/com/example/zeyin/algorithm/leetCode/leetcode56Test.java
dce340809e41e5c7581d0dfed833c3927e3905a9
[]
no_license
zeyin1/ZEYIN
b25b496cb3785225a19852fd70e4d7828ba21ef8
574089a95ad1c75e7e77c354d013f7c9438e111b
refs/heads/master
2021-05-17T21:30:12.643931
2021-03-28T10:12:07
2021-03-28T10:12:07
250,961,046
1
0
null
null
null
null
UTF-8
Java
false
false
567
java
package com.example.zeyin.algorithm.leetCode; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; /** * @Description: 用一句话描述 * @Author: zeyin * @Date: 2020年11月21日 10:22 * @Modify: */ @SpringBootTest public class leetcode56Test { @Test public void test() { int[][] nums = {{1, 3}, {2, 6}, {8, 10}, {15, 18}}; int[][] res = leetcode56.merge(nums); for (int i = 0; i < res.length; i++) { System.out.println(res[i][0] + " " + res[i][1]); } } }
[ "you@example.com" ]
you@example.com
0a745f3ab025b66ab849b8151117bfc9fad6ef72
ac4050019f9e15b2c7935270abbc4acd3f597d63
/tour/app/src/main/java/com/zjhj/tour/view/ShopUserLayout.java
03132ac3fdf2189de646e59db953fcc63371aee9
[]
no_license
xiaoxiongmeipigu/tour
2efc90c5f99af5001d1eef9967c536eac6fc640a
c15018d27167363d8387868d2b32116f519eb8fd
refs/heads/master
2021-01-20T10:09:08.812295
2017-07-25T03:13:05
2017-07-25T03:13:05
90,325,634
0
0
null
null
null
null
UTF-8
Java
false
false
3,161
java
package com.zjhj.tour.view; import android.content.Context; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.OrientationHelper; import android.support.v7.widget.RecyclerView; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; import com.zjhj.commom.result.IndexData; import com.zjhj.commom.result.MapiDiscussResult; import com.zjhj.commom.result.MapiResourceResult; import com.zjhj.tour.R; import com.zjhj.tour.adapter.DiscussItemAdapter; import com.zjhj.tour.util.ControllerUtil; import java.util.ArrayList; import java.util.List; import butterknife.Bind; import butterknife.ButterKnife; import butterknife.OnClick; /** * Created by brain on 2017/5/10. */ public class ShopUserLayout extends RelativeLayout { @Bind(R.id.recyclerView) RecyclerView recyclerView; @Bind(R.id.more_ll) LinearLayout moreLl; @Bind(R.id.count_tv) TextView countTv; private Context mContext; private View view; List<MapiDiscussResult> list; List<IndexData> mList; DiscussItemAdapter mAdapter; String id = ""; String type = "0"; public ShopUserLayout(Context context) { super(context); mContext = context; initView(); initListener(); } public ShopUserLayout(Context context, AttributeSet attrs) { super(context, attrs); mContext = context; initView(); initListener(); } public ShopUserLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mContext = context; initView(); initListener(); } private void initView() { if (isInEditMode()) return; view = LayoutInflater.from(mContext).inflate(R.layout.layout_shop_user, this); ButterKnife.bind(this, view); mList = new ArrayList<>(); list = new ArrayList<>(); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(mContext); linearLayoutManager.setOrientation(OrientationHelper.VERTICAL); recyclerView.setHasFixedSize(true); recyclerView.setLayoutManager(linearLayoutManager); mAdapter = new DiscussItemAdapter(mContext, mList); recyclerView.setAdapter(mAdapter); } private void initListener() { } public void load(List<MapiDiscussResult> data,String id,String type) { this.id = id; this.type = type; list.clear(); mList.clear(); list.addAll(data); int count = 0; int pos = 0; for (MapiDiscussResult mapiItemResult : list) { pos++; mList.add(new IndexData(count++, "ITEM", mapiItemResult)); if(pos<list.size()) mList.add(new IndexData(count++, "DIVIDER", new ArrayList<MapiResourceResult>())); } mAdapter.notifyDataSetChanged(); } @OnClick(R.id.more_ll) public void onClick() { ControllerUtil.go2DiscussList(id,type); } }
[ "zouwei_13146216093@163.com" ]
zouwei_13146216093@163.com
6e8152a62592e8710940423e5e27a7eef46b2103
95bca8b42b506860014f5e7f631490f321f51a63
/local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/llelements/ShowLineListDataElementMapAction.java
e4a14b50ebf71388c8ee95bd2c613a0af146b6f4
[ "BSD-3-Clause" ]
permissive
hispindia/HP-2.7
d5174d2c58423952f8f67d9846bec84c60dfab28
bc101117e8e30c132ce4992a1939443bf7a44b61
refs/heads/master
2022-12-25T04:13:06.635159
2020-09-29T06:32:53
2020-09-29T06:32:53
84,940,096
0
0
BSD-3-Clause
2022-12-15T23:53:32
2017-03-14T11:13:27
Java
UTF-8
Java
false
false
1,742
java
package org.hisp.dhis.ll.action.llelements; import java.util.List; import org.hisp.dhis.linelisting.LineListDataElementMap; import org.hisp.dhis.linelisting.LineListElement; import org.hisp.dhis.linelisting.LineListService; import com.opensymphony.xwork2.Action; public class ShowLineListDataElementMapAction implements Action { // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- private LineListService lineListService; public void setLineListService( LineListService lineListService ) { this.lineListService = lineListService; } // ------------------------------------------------------------------------- // Input & output // ------------------------------------------------------------------------- private String lineListElementId; public void setLineListElementId( String lineListElementId ) { this.lineListElementId = lineListElementId; } private List<LineListDataElementMap> lineListDataElementMap; public List<LineListDataElementMap> getLineListDataElementMap() { return lineListDataElementMap; } // ------------------------------------------------------------------------- // Action // ------------------------------------------------------------------------- public String execute() throws Exception { LineListElement lineListElement = lineListService.getLineListElement( Integer.parseInt( lineListElementId ) ); // lineListDataElementMap = // lineListService.getLinelistDataelementMappings( lineListElement, ); return SUCCESS; } }
[ "mithilesh.hisp@gmail.com" ]
mithilesh.hisp@gmail.com
96420f70caf2f4aed79b3e680abc0bbb1e14b024
f9fcde801577e7b9d66b0df1334f718364fd7b45
/icepdf-5.1.2/icepdf/viewer/src/org/icepdf/ri/common/ComponentKeyBinding.java
2e2248e93de660d940a0864c4a80c8ee3dc2d4cc
[ "Apache-2.0" ]
permissive
numbnet/icepdf_FULL-versii
86d74147dc107e4f2239cd4ac312f15ebbeec473
b67e1ecb60aca88cacdca995d24263651cf8296b
refs/heads/master
2021-01-12T11:13:57.107091
2016-11-04T16:43:45
2016-11-04T16:43:45
72,880,329
1
1
null
null
null
null
UTF-8
Java
false
false
3,704
java
/* * Copyright 2006-2015 ICEsoft Technologies Inc. * * 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.icepdf.ri.common; import org.icepdf.core.pobjects.Document; import org.icepdf.ri.common.views.DocumentViewController; import javax.swing.*; import java.awt.*; import java.awt.datatransfer.StringSelection; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; /** * Utility for adding key bindings to a view container for common functionality * usually handled by the existence of menu key listeners. This class currently * only adds the copy text keyboard command (ctr-c) to view container but can * be easily extended to handle other keyboard mappings. * * @since 4.2.2 */ @SuppressWarnings("serial") public class ComponentKeyBinding { /** * Installs the component key binding on the specified JComponent. * * @param controller SwingController used by various keyboard commands * @param viewerContainer view container to add keyboard mappings too */ public static void install(final SwingController controller, final JComponent viewerContainer) { Action copyText = new AbstractAction() { public void actionPerformed(ActionEvent e) { Document document = controller.getDocument(); DocumentViewController documentViewController = controller.getDocumentViewController(); if (document != null && controller.havePermissionToExtractContent() && !(documentViewController.getDocumentViewModel().isSelectAll() && document.getNumberOfPages() > 250)) { // get the text. StringSelection stringSelection = new StringSelection( documentViewController.getSelectedText()); Toolkit.getDefaultToolkit().getSystemClipboard(). setContents(stringSelection, null); } else { Runnable doSwingWork = new Runnable() { public void run() { org.icepdf.ri.util.Resources.showMessageDialog( viewerContainer, JOptionPane.INFORMATION_MESSAGE, controller.getMessageBundle(), "viewer.dialog.information.copyAll.title", "viewer.dialog.information.copyAll.msg", 250); } }; SwingUtilities.invokeLater(doSwingWork); } } }; // add copy text command to input map InputMap inputMap = viewerContainer.getInputMap( JComponent.WHEN_IN_FOCUSED_WINDOW); inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, Event.CTRL_MASK), "copyText"); viewerContainer.getActionMap().put("copyText", copyText); } }
[ "patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74" ]
patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74
f5113d4fbf265c880d405fc4a4cff8a4a029c9ef
902564d740bee866d7798df985a25f0f664f6240
/src/trunk/game-center/src/main/java/com/fantingame/game/gamecenter/controller/paycallback/TestAction.java
a648fe058b3d521651080a1c88090ca548ca7e9f
[]
no_license
hw233/Server-java
539b416821ad67d22120c7146b4c3c7d4ad15929
ff74787987f146553684bd823d6bd809eb1e27b6
refs/heads/master
2020-04-29T04:46:03.263306
2016-05-20T12:45:44
2016-05-20T12:45:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
369
java
package com.fantingame.game.gamecenter.controller.paycallback; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; @Controller public class TestAction { @RequestMapping("/test.do") public ModelAndView test() { return new ModelAndView("test"); } }
[ "dogdog7788@qq.com" ]
dogdog7788@qq.com
11bf75cc678630f1f4027b7aee4c0261bc3c3464
c7e5147a0c87ac6c5dd80e8f18f860d6e8512d34
/app/src/test/java/currentlocatio/android/arifhasnat/androidwebapipractice/ExampleUnitTest.java
9d8747deea997a1b75c7ea32903f3b3f99279987
[]
no_license
arifhasnatnstucsteonGit/AndroidWebApiPractices
f1d3e8cb3227951f16fff742d2f2e2c89f8f934e
c885e4e9d207917fbab58ada834c825a7eeb528b
refs/heads/master
2021-01-19T05:20:34.373011
2016-06-11T11:47:07
2016-06-11T11:47:07
60,904,667
0
0
null
null
null
null
UTF-8
Java
false
false
348
java
package currentlocatio.android.arifhasnat.androidwebapipractice; import org.junit.Test; import static org.junit.Assert.*; /** * To work on unit tests, switch the Test Artifact in the Build Variants view. */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "you@example.com" ]
you@example.com
501eae270026ee4642862e44d42ea946a3949e9f
e8cd24201cbfadef0f267151ea5b8a90cc505766
/group26/723161901/src/com/litestruts/strutsBean/Action.java
3ef046aa3d504416a3c6d6df2308cbeaeb4b439b
[]
no_license
XMT-CN/coding2017-s1
30dd4ee886dd0a021498108353c20360148a6065
382f6bfeeeda2e76ffe27b440df4f328f9eafbe2
refs/heads/master
2021-01-21T21:38:42.199253
2017-06-25T07:44:21
2017-06-25T07:44:21
94,863,023
0
0
null
null
null
null
UTF-8
Java
false
false
921
java
package com.litestruts.strutsBean; import java.util.HashMap; public class Action { private String name; private String clazz; private HashMap<String, String> parameters; public Action() { super(); } public Action(String name, String clazz) { super(); this.name = name; this.clazz = clazz; } public Action(String name, String clazz, HashMap<String, String> parameters) { super(); this.name = name; this.clazz = clazz; this.parameters = parameters; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getClazz() { return clazz; } public void setClazz(String clazz) { this.clazz = clazz; } public HashMap<String, String> getParameters() { return parameters; } public void setParameters(HashMap<String, String> parameters) { this.parameters = parameters; } }
[ "542194147@qq.com" ]
542194147@qq.com
f99166b6b136c9d61b47ef93715a3cf3f1e3a1a8
bceecc732b12b0e303ac35dc7eb7d2e8458a431e
/src/main/java/com/fasterxml/jackson/perf/cbor/CBORStdReadVanilla.java
dcbace9870a993ddb54a0872dbcb5eba5c70fb3a
[]
no_license
FasterXML/jackson-benchmarks
77ee1989c873e3e98016de13568257223bbf2e73
b002c84ebefa61ff86a77d854564433da6a054b3
refs/heads/2.15
2023-09-03T14:58:14.509551
2023-08-20T00:15:13
2023-08-20T00:15:13
19,600,108
13
13
null
2023-08-20T00:15:14
2014-05-09T05:26:21
Java
UTF-8
Java
false
false
967
java
package com.fasterxml.jackson.perf.cbor; import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.annotations.Scope; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.dataformat.cbor.CBORFactory; import com.fasterxml.jackson.dataformat.cbor.databind.CBORMapper; import com.fasterxml.jackson.perf.ReadPerfBaseFullJackson; import com.fasterxml.jackson.perf.data.InputConverter; import com.fasterxml.jackson.perf.model.MediaItem; @State(Scope.Thread) public class CBORStdReadVanilla extends ReadPerfBaseFullJackson<MediaItem> { private final static CBORFactory _cf = CBORFactory.builder() // .disable(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES) .build(); private static final ObjectMapper MAPPER = new CBORMapper(_cf); private final static InputConverter CBORS = InputConverter.stdConverter(MAPPER); public CBORStdReadVanilla() { super(MediaItem.class, CBORS, MAPPER); } }
[ "tatu.saloranta@iki.fi" ]
tatu.saloranta@iki.fi
17f68a3c29c154bbffe2380cf07c7af2118dd756
881ec42c677f2d954fdc2317ad582c88fb87c752
/TodoApp/TodoRest/src/main/java/com/skilldistillery/todoapp/repositories/TodoRepository.java
ee21de20a1140305300fef8a2abedcf9c6826a5c
[]
no_license
stoprefresh/archive
f51119220fbcb4bccc82306c0483903502f1859e
0bde3917fb9cb7e002d3abb18088fee9df4371ec
refs/heads/master
2022-12-21T20:33:08.251833
2019-10-17T14:13:10
2019-10-17T14:13:10
215,808,299
0
0
null
2022-12-16T09:52:36
2019-10-17T14:08:48
Java
UTF-8
Java
false
false
495
java
package com.skilldistillery.todoapp.repositories; import java.util.List; import java.util.Set; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import com.skilldistillery.todoapp.entities.Todo; @Repository public interface TodoRepository extends JpaRepository<Todo, Integer >{ List<Todo> findByUser_Id(int uid); Set<Todo> findByUser_userName(String username); Todo findByIdAndUser_userName(int id, String username); }
[ "marsigliamiguel@protonmail.com" ]
marsigliamiguel@protonmail.com
c71c0035b91cedc49633c524fe3b23f2f96566ba
2a317cd5006075eeb8e9b282de69734aa6e2daf8
/com.bodaboda_source_code/sources/com/google/android/gms/drive/realtime/internal/event/zzd.java
dac7901e3394e639d186d7cde466330c77049964
[]
no_license
Akuku25/bodaapp
ee1ed22b0ad05c11aa8c8d4595f5b50da338fbe0
c4f54b5325d035b54d0288a402558aa1592a165f
refs/heads/master
2020-04-28T03:52:04.729338
2019-03-11T08:24:30
2019-03-11T08:24:30
174,954,616
0
0
null
null
null
null
UTF-8
Java
false
false
2,351
java
package com.google.android.gms.drive.realtime.internal.event; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.data.DataHolder; import com.google.android.gms.common.internal.safeparcel.zza; import com.google.android.gms.common.internal.safeparcel.zzb; import java.util.List; public class zzd implements Creator<ParcelableEventList> { static void zza(ParcelableEventList parcelableEventList, Parcel parcel, int i) { int zzK = zzb.zzK(parcel); zzb.zzc(parcel, 1, parcelableEventList.zzFG); zzb.zzc(parcel, 2, parcelableEventList.zzmv, false); zzb.zza(parcel, 3, parcelableEventList.zzXv, i, false); zzb.zza(parcel, 4, parcelableEventList.zzXw); zzb.zzb(parcel, 5, parcelableEventList.zzXx, false); zzb.zzH(parcel, zzK); } public /* synthetic */ Object createFromParcel(Parcel x0) { return zzbB(x0); } public /* synthetic */ Object[] newArray(int x0) { return zzcV(x0); } public ParcelableEventList zzbB(Parcel parcel) { boolean z = false; List list = null; int zzJ = zza.zzJ(parcel); DataHolder dataHolder = null; List list2 = null; int i = 0; while (parcel.dataPosition() < zzJ) { int zzI = zza.zzI(parcel); switch (zza.zzaP(zzI)) { case 1: i = zza.zzg(parcel, zzI); break; case 2: list2 = zza.zzc(parcel, zzI, ParcelableEvent.CREATOR); break; case 3: dataHolder = (DataHolder) zza.zza(parcel, zzI, DataHolder.CREATOR); break; case 4: z = zza.zzc(parcel, zzI); break; case 5: list = zza.zzC(parcel, zzI); break; default: zza.zzb(parcel, zzI); break; } } if (parcel.dataPosition() == zzJ) { return new ParcelableEventList(i, list2, dataHolder, z, list); } throw new zza.zza("Overread allowed size end=" + zzJ, parcel); } public ParcelableEventList[] zzcV(int i) { return new ParcelableEventList[i]; } }
[ "wanyama19@gmail.com" ]
wanyama19@gmail.com
9317a70050576abfc565fed0a4f5ee867f9148b4
a593e9692422dab3172073eea9776f5db635a94e
/src/main/java/org/apache/uima/ruta/condition/PartOfCondition.java
e1388bd8c347c3e9e26fc3368365700f372cdc99
[]
no_license
renaud/ruta-core
7f76c15301c6967d981436312b5552973852520a
d076d30febf9956edd354b0ba194f33ace9c08cb
refs/heads/master
2021-01-19T13:24:59.374971
2015-08-20T15:14:59
2015-08-20T15:14:59
41,102,128
0
0
null
null
null
null
UTF-8
Java
false
false
2,629
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.uima.ruta.condition; import java.util.Collection; import java.util.List; import org.apache.uima.cas.Type; import org.apache.uima.cas.text.AnnotationFS; import org.apache.uima.ruta.RutaStream; import org.apache.uima.ruta.expression.list.TypeListExpression; import org.apache.uima.ruta.expression.type.TypeExpression; import org.apache.uima.ruta.rule.EvaluatedCondition; import org.apache.uima.ruta.rule.RuleElement; import org.apache.uima.ruta.type.RutaBasic; import org.apache.uima.ruta.visitor.InferenceCrowd; public class PartOfCondition extends TypeSentiveCondition { public PartOfCondition(TypeExpression type) { super(type); } public PartOfCondition(TypeListExpression list) { super(list); } @Override public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream, InferenceCrowd crowd) { if (!isWorkingOnList()) { Type t = type.getType(element.getParent()); boolean result = check(t, annotation, element, stream); return new EvaluatedCondition(this, result); } else { boolean result = false; List<Type> types = getList().getList(element.getParent(), stream); for (Type t : types) { result |= check(t, annotation, element, stream); if (result == true) { break; } } return new EvaluatedCondition(this, result); } } private boolean check(Type t, AnnotationFS annotation, RuleElement element, RutaStream stream) { RutaBasic beginAnchor = stream.getBeginAnchor(annotation.getBegin()); Collection<AnnotationFS> beginAnchors = beginAnchor.getBeginAnchors(t); return beginAnchor.isPartOf(t) || (beginAnchors != null && !beginAnchors.isEmpty()); } }
[ "renaud@apache.org" ]
renaud@apache.org
cc1f312cf3b63c7e54e09481e81d6c4c39859437
ddb495d703e2290a7f2fe51cbfdb615a718292ad
/sample/src/test/java/net/e6tech/sample/cassandra/CassandraTest.java
51b89458b939fe67b7f34aec1e631428931ca9f3
[]
no_license
futehkao/elements
f60d973e1430a9b75efdeb720bb6ac74d16b44c2
5ef950f6078972c0bf0d02b6571f014ba1284668
refs/heads/master
2023-08-25T07:02:17.879356
2023-08-22T20:00:07
2023-08-22T20:00:07
76,207,275
17
13
null
2022-02-08T16:37:11
2016-12-11T23:45:53
Java
UTF-8
Java
false
false
4,047
java
/* * Copyright 2015-2019 Futeh Kao * * 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 net.e6tech.sample.cassandra; import com.datastax.oss.driver.api.core.CqlSession; import com.datastax.oss.driver.api.core.cql.BoundStatement; import com.datastax.oss.driver.api.core.cql.PreparedStatement; import com.datastax.oss.driver.api.core.cql.ResultSet; import net.e6tech.elements.cassandra.Schema; import net.e6tech.elements.cassandra.Session; import net.e6tech.elements.cassandra.Sibyl; import net.e6tech.elements.cassandra.driver.v4.SessionV4; import net.e6tech.elements.cassandra.etl.PartitionContext; import net.e6tech.elements.common.launch.LaunchController; import net.e6tech.elements.common.resources.Provision; import net.e6tech.elements.common.resources.Resources; import net.e6tech.elements.common.util.MapBuilder; import net.e6tech.elements.common.util.concurrent.ThreadPool; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.concurrent.CountDownLatch; public class CassandraTest { public static Provision provision; @BeforeAll public static void launch() { LaunchController controller = new LaunchController(); controller.launchScript("conf/provisioning/cassandra/boostrap2.groovy") .addLaunchListener(p -> provision = p.getInstance(Provision.class)) .launch(); } @Test void basic() throws InterruptedException { Schema schema = provision.newInstance(Schema.class); schema.createTables("elements", TimeTable.class); schema.createTables("elements", DerivedTable.class); schema.createTables("elements", ReduceTable.class); List<Long> ids = Arrays.asList(1L, 2L, 3L); ThreadPool pool = ThreadPool.fixedThreadPool("test", 50); int threads = 5; CountDownLatch latch = new CountDownLatch(threads); for (int i = 0; i < threads; i++) { long id = i; pool.execute(() -> { provision.open().accept(Resources.class, Sibyl.class, (resources, s) -> { SessionV4 v4 = (SessionV4) resources.getInstance(Session.class); CqlSession cql = v4.unwrap(); PreparedStatement pstmt = cql.prepare("select * from time_table where creation_time in :ids "); BoundStatement bound = pstmt.bind(); bound = bound.setList("ids", ids, Long.class); ResultSet rs = cql.execute(bound); List<TimeTable> testTables = s.all(TimeTable.class, "select * from time_table where creation_time in :ids", MapBuilder.of("ids", ids)); List<TimeTable> list = new ArrayList<>(); TimeTable test = new TimeTable(); test.setCreationTime(System.currentTimeMillis()); test.setId(id); test.setName("test"); list.add(test); s.save(list, TimeTable.class, null); latch.countDown(); }); }); } latch.await(); PartitionContext context = provision.newInstance(PartitionContext.class); context.setStartTime(System.currentTimeMillis()); context.setBatchSize(100); context.setExtractAll(true); context.setTimeLag(0); new TimeTransmutator().run(context); } }
[ "futeh@episodesix.com" ]
futeh@episodesix.com
9d876b8bfbd47eb6c7ecf73dc5e6acf073e86564
bdbc3a79bc73ba77a7d83629fe7ba94cfebf7efe
/edot-server/src/main/java/com/asiainfo/frame/utils/SystemUtil.java
4a720df4079f49f1cdefb7968ffb266d7ee8f580
[]
no_license
876860131robert/edot
3d8b856493866ad91b5237d6cc4630c889570802
45a0bde8cdba875281c3c81b63ac53008e6fc35a
refs/heads/master
2021-01-19T16:47:15.090957
2017-08-22T06:57:13
2017-08-22T06:57:13
101,027,248
1
0
null
null
null
null
UTF-8
Java
false
false
8,174
java
package com.asiainfo.frame.utils; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.lang.management.ManagementFactory; import java.lang.management.OperatingSystemMXBean; import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.net.UnknownHostException; import java.util.Enumeration; import java.util.Properties; /** * @Title SystemUtil.java * @Description: 系统基本信息获取类 * @author: Administrator * @date: 2017年8月14日上午11:30:19 * */ public class SystemUtil { // 当前实例 private static SystemUtil currentSystem = null; private static InetAddress localHost = null; private SystemUtil() { try { localHost = InetAddress.getLocalHost(); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace(); } } /** * 单例模式获取对象 * * @return */ public static SystemUtil getInstance() { if (currentSystem == null) currentSystem = new SystemUtil(); return currentSystem; } /** * 获取服务器IP地址 * @return */ @SuppressWarnings("unchecked") public static String getServerIp(){ String SERVER_IP = null; try { Enumeration netInterfaces = NetworkInterface.getNetworkInterfaces(); InetAddress ip = null; while (netInterfaces.hasMoreElements()) { NetworkInterface ni = (NetworkInterface) netInterfaces.nextElement(); ip = (InetAddress) ni.getInetAddresses().nextElement(); SERVER_IP = ip.getHostAddress(); if (!ip.isSiteLocalAddress() && !ip.isLoopbackAddress() && ip.getHostAddress().indexOf(":") == -1) { SERVER_IP = ip.getHostAddress(); break; } else { ip = null; } } } catch (SocketException e) { // TODO Auto-generated catch block e.printStackTrace(); } return SERVER_IP; } /** * 获取用户机器名称 * * @return */ public static String getHostName() { return localHost.getHostName(); } /** * 获取C盘卷 序列号 * * @return */ public String getDiskNumber() { String line = ""; String HdSerial = "";// 记录硬盘序列号 try { Process proces = Runtime.getRuntime().exec("cmd /c dir c:");// 获取命令行参数 BufferedReader buffreader = new BufferedReader( new InputStreamReader(proces.getInputStream())); while ((line = buffreader.readLine()) != null) { if (line.indexOf("卷的序列号是 ") != -1) { // 读取参数并获取硬盘序列号 HdSerial = line.substring(line.indexOf("卷的序列号是 ") + "卷的序列号是 ".length(), line.length()); break; } } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return HdSerial; } /** * 获取Mac地址 * * @return Mac地址,例如:F0-4D-A2-39-24-A6 */ public static String getLocalMac(InetAddress ia) throws SocketException { // TODO Auto-generated method stub //获取网卡,获取地址 byte[] mac = NetworkInterface.getByInetAddress(ia).getHardwareAddress(); System.out.println("mac数组长度:"+mac.length); StringBuffer sb = new StringBuffer(""); for(int i=0; i<mac.length; i++) { if(i!=0) { sb.append("-"); } //字节转换为整数 int temp = mac[i]&0xff; String str = Integer.toHexString(temp); System.out.println("每8位:"+str); if(str.length()==1) { sb.append("0"+str); }else { sb.append(str); } } System.out.println("本机MAC地址:"+sb.toString().toUpperCase()); return sb.toString().toUpperCase(); } /** * 获取当前系统名称 * * @return 当前系统名,例如: windows xp */ public static String getSystemName() { Properties sysProperty = System.getProperties(); // 系统名称 String systemName = sysProperty.getProperty("os.name"); return systemName; } private static String getMacFromBytes(byte[] bytes) { StringBuffer mac = new StringBuffer(); byte currentByte; boolean first = false; for (byte b : bytes) { if (first) { mac.append("-"); } currentByte = (byte) ((b & 240) >> 4); mac.append(Integer.toHexString(currentByte)); currentByte = (byte) (b & 15); mac.append(Integer.toHexString(currentByte)); first = true; } return mac.toString().toUpperCase(); } /** * 获取系统硬盘信息 * * @return */ public static String getDiskInfo() { StringBuffer sb=new StringBuffer(); File[] roots = File.listRoots();// 获取磁盘分区列表 for (File file : roots) { long totalSpace=file.getTotalSpace(); long freeSpace=file.getFreeSpace(); long usableSpace=file.getUsableSpace(); if(totalSpace>0){ sb.append(file.getPath() + "(总计:"); sb.append(Math.round(((double)totalSpace/ (1024*1024*1024))*100/100.0) + "GB "); if(Math.round((((double)usableSpace/ (1024*1024*1024))*100)/100.0)<=1){ sb.append("剩余:" + Math.round((((double)usableSpace/ (1024*1024))*100)/100.0) + "MB)<br>"); }else{ sb.append("剩余:" + Math.round((((double)usableSpace/ (1024*1024*1024))*100)/100.0) + "GB)<br>"); } // sb.append("已使用" + Math.round((((double)(totalSpace-usableSpace)/(1024*1024*1024))*100)/100.0) + "G<br>"); } } return sb.toString(); } /** * 系统内存信息 * * @return */ public static String getEMS() { StringBuffer sb=new StringBuffer(); OperatingSystemMXBean osmb = (OperatingSystemMXBean) ManagementFactory .getOperatingSystemMXBean(); sb.append("系统物理内存总计:" + ((com.sun.management.OperatingSystemMXBean) osmb).getTotalPhysicalMemorySize() / 1024 / 1024 + "MB<br>"); sb.append("系统物理可用内存总计:" + ((com.sun.management.OperatingSystemMXBean) osmb).getFreePhysicalMemorySize() / 1024 / 1024 + "MB"); return sb.toString(); } /** * @return */ public static String getDiskFileList() { StringBuffer sb = new StringBuffer(); String[] fileList = null; File[] roots = File.listRoots();// 获取硬盘分区列表; for (File file : roots) { long totalSpace = file.getTotalSpace(); fileList = file.list(); if (totalSpace > 0) { sb.append(file.getPath() + "下目录和文件:"); for (int i = 0; i < fileList.length; i++) { sb.append(fileList[i] + "/n"); } } } return sb.toString(); } public static void main(String[] args) { getDiskFileList(); String kk=getEMS(); System.out.println(kk); InetAddress addr; try { addr = InetAddress.getLocalHost(); String ip=addr.getHostAddress().toString(); //获取本机ip System.out.println(ip); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
[ "876860131@qq.com" ]
876860131@qq.com
f28ac3d537eef9a31e8b1815bc122d72a9ba3cc5
43d07af1742e01001c17eba4196f30156b08fbcc
/com/sun/tools/javap/DisassemblerTool.java
8319e20760df30d5fe067507a03558af85266aad
[]
no_license
kSuroweczka/jdk
b408369b4b87ab09a828aa3dbf9132aaf8bb1b71
7ec3e8e31fcfb616d4a625191bcba0191ca7c2d4
refs/heads/master
2021-12-30T00:58:24.029054
2018-02-01T10:07:14
2018-02-01T10:07:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,427
java
/* */ package com.sun.tools.javap; /* */ /* */ import java.io.Writer; /* */ import java.nio.charset.Charset; /* */ import java.util.Locale; /* */ import java.util.concurrent.Callable; /* */ import javax.tools.DiagnosticListener; /* */ import javax.tools.JavaFileManager; /* */ import javax.tools.JavaFileObject; /* */ import javax.tools.OptionChecker; /* */ import javax.tools.StandardJavaFileManager; /* */ import javax.tools.Tool; /* */ /* */ public abstract interface DisassemblerTool extends Tool, OptionChecker /* */ { /* */ public abstract DisassemblerTask getTask(Writer paramWriter, JavaFileManager paramJavaFileManager, DiagnosticListener<? super JavaFileObject> paramDiagnosticListener, Iterable<String> paramIterable1, Iterable<String> paramIterable2); /* */ /* */ public abstract StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> paramDiagnosticListener, Locale paramLocale, Charset paramCharset); /* */ /* */ public static abstract interface DisassemblerTask extends Callable<Boolean> /* */ { /* */ public abstract void setLocale(Locale paramLocale); /* */ /* */ public abstract Boolean call(); /* */ } /* */ } /* Location: D:\dt\jdk\tools.jar * Qualified Name: com.sun.tools.javap.DisassemblerTool * JD-Core Version: 0.6.2 */
[ "starlich.1207@gmail.com" ]
starlich.1207@gmail.com
dbe5adf5227f1811a8f87af750f92129aa7b153f
8bca6164fc085936891cda5ff7b2341d3d7696c5
/bootstrap/gensrc/de/hybris/platform/commercefacades/product/ProductOption.java
789771036e431f357341a0ebe4df147d1bcc82e8
[]
no_license
rgonthina1/newplatform
28819d22ba48e48d4edebbf008a925cad0ebc828
1cdc70615ea4e86863703ca9a34231153f8ef373
refs/heads/master
2021-01-19T03:03:22.221074
2016-06-20T14:49:25
2016-06-20T14:49:25
61,548,232
1
0
null
null
null
null
UTF-8
Java
false
false
4,592
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! * --- Generated at 20 Jun, 2016 7:36:27 PM * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2000-2013 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package de.hybris.platform.commercefacades.product; public enum ProductOption { /** <i>Generated enum value</i> for <code>ProductOption.DELIVERY_MODE_AVAILABILITY</code> value defined at extension <code>commercefacades</code>. */ DELIVERY_MODE_AVAILABILITY , /** <i>Generated enum value</i> for <code>ProductOption.VARIANT_MATRIX</code> value defined at extension <code>commercefacades</code>. */ VARIANT_MATRIX , /** <i>Generated enum value</i> for <code>ProductOption.VARIANT_MATRIX_MEDIA</code> value defined at extension <code>commercefacades</code>. */ VARIANT_MATRIX_MEDIA , /** <i>Generated enum value</i> for <code>ProductOption.BASIC</code> value defined at extension <code>commercefacades</code>. */ BASIC , /** <i>Generated enum value</i> for <code>ProductOption.STOCK</code> value defined at extension <code>commercefacades</code>. */ STOCK , /** <i>Generated enum value</i> for <code>ProductOption.URL</code> value defined at extension <code>commercefacades</code>. */ URL , /** <i>Generated enum value</i> for <code>ProductOption.SUMMARY</code> value defined at extension <code>commercefacades</code>. */ SUMMARY , /** <i>Generated enum value</i> for <code>ProductOption.DESCRIPTION</code> value defined at extension <code>commercefacades</code>. */ DESCRIPTION , /** <i>Generated enum value</i> for <code>ProductOption.IMAGES</code> value defined at extension <code>commercefacades</code>. */ IMAGES , /** <i>Generated enum value</i> for <code>ProductOption.VARIANT_MATRIX_PRICE</code> value defined at extension <code>commercefacades</code>. */ VARIANT_MATRIX_PRICE , /** <i>Generated enum value</i> for <code>ProductOption.VARIANT_MATRIX_STOCK</code> value defined at extension <code>commercefacades</code>. */ VARIANT_MATRIX_STOCK , /** <i>Generated enum value</i> for <code>ProductOption.PROMOTIONS</code> value defined at extension <code>commercefacades</code>. */ PROMOTIONS , /** <i>Generated enum value</i> for <code>ProductOption.VARIANT_MATRIX_BASE</code> value defined at extension <code>commercefacades</code>. */ VARIANT_MATRIX_BASE , /** <i>Generated enum value</i> for <code>ProductOption.VARIANT_FIRST_VARIANT</code> value defined at extension <code>commercefacades</code>. */ VARIANT_FIRST_VARIANT , /** <i>Generated enum value</i> for <code>ProductOption.PRICE</code> value defined at extension <code>commercefacades</code>. */ PRICE , /** <i>Generated enum value</i> for <code>ProductOption.VARIANT_FULL</code> value defined at extension <code>commercefacades</code>. */ VARIANT_FULL , /** <i>Generated enum value</i> for <code>ProductOption.VARIANT_MATRIX_ALL_OPTIONS</code> value defined at extension <code>commercefacades</code>. */ VARIANT_MATRIX_ALL_OPTIONS , /** <i>Generated enum value</i> for <code>ProductOption.CLASSIFICATION</code> value defined at extension <code>commercefacades</code>. */ CLASSIFICATION , /** <i>Generated enum value</i> for <code>ProductOption.GALLERY</code> value defined at extension <code>commercefacades</code>. */ GALLERY , /** <i>Generated enum value</i> for <code>ProductOption.VARIANT_MATRIX_URL</code> value defined at extension <code>commercefacades</code>. */ VARIANT_MATRIX_URL , /** <i>Generated enum value</i> for <code>ProductOption.CATEGORIES</code> value defined at extension <code>commercefacades</code>. */ CATEGORIES , /** <i>Generated enum value</i> for <code>ProductOption.VOLUME_PRICES</code> value defined at extension <code>acceleratorfacades</code>. */ VOLUME_PRICES , /** <i>Generated enum value</i> for <code>ProductOption.REVIEW</code> value defined at extension <code>commercefacades</code>. */ REVIEW , /** <i>Generated enum value</i> for <code>ProductOption.PRICE_RANGE</code> value defined at extension <code>commercefacades</code>. */ PRICE_RANGE , /** <i>Generated enum value</i> for <code>ProductOption.REFERENCES</code> value defined at extension <code>commercefacades</code>. */ REFERENCES }
[ "Kalpana" ]
Kalpana
ce222543f4eda14c5ca56db2670f870021946c65
9a6ea6087367965359d644665b8d244982d1b8b6
/src/main/java/X/C32651fL.java
d012cef07c99ac3d0160d92f7107a38e06798bca
[]
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
238
java
package X; /* renamed from: X.1fL reason: invalid class name and case insensitive filesystem */ public class C32651fL implements AbstractC19950vs { @Override // X.AbstractC19950vs public Object get() { return 2; } }
[ "madeinborneo@gmail.com" ]
madeinborneo@gmail.com
cea07ba4b5b7db3a1f925b4d2f8d3e459ea0eabf
8bbfd739201dcf2b6363706dc50177cb7b2f0b03
/src/main/java/emidus/app/EmidusApp.java
515726c717d473ff00942af7a1cd0914862fe584
[]
no_license
BulkSecurityGeneratorProject/emidus-com-app
f85dbe673a4181194d0c148a6bd0e8483d4b11c1
97d56d26f8a9fb1609f621672710d8b55dad29b7
refs/heads/master
2022-12-10T07:25:08.649000
2019-03-19T11:16:54
2019-03-19T11:16:54
296,671,165
0
0
null
2020-09-18T16:16:03
2020-09-18T16:16:02
null
UTF-8
Java
false
false
4,530
java
package emidus.app; import emidus.app.config.ApplicationProperties; import emidus.app.config.DefaultProfileUtil; import io.github.jhipster.config.JHipsterConstants; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.netflix.zuul.EnableZuulProxy; import org.springframework.core.env.Environment; import javax.annotation.PostConstruct; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Arrays; import java.util.Collection; @SpringBootApplication @EnableConfigurationProperties({LiquibaseProperties.class, ApplicationProperties.class}) @EnableDiscoveryClient @EnableZuulProxy public class EmidusApp { private static final Logger log = LoggerFactory.getLogger(EmidusApp.class); private final Environment env; public EmidusApp(Environment env) { this.env = env; } /** * Initializes emidus. * <p> * Spring profiles can be configured with a program argument --spring.profiles.active=your-active-profile * <p> * You can find more information on how profiles work with JHipster on <a href="https://www.jhipster.tech/profiles/">https://www.jhipster.tech/profiles/</a>. */ @PostConstruct public void initApplication() { Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles()); if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) { log.error("You have misconfigured your application! It should not run " + "with both the 'dev' and 'prod' profiles at the same time."); } if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_CLOUD)) { log.error("You have misconfigured your application! It should not " + "run with both the 'dev' and 'cloud' profiles at the same time."); } } /** * Main method, used to run the application. * * @param args the command line arguments */ public static void main(String[] args) { SpringApplication app = new SpringApplication(EmidusApp.class); DefaultProfileUtil.addDefaultProfile(app); Environment env = app.run(args).getEnvironment(); logApplicationStartup(env); } private static void logApplicationStartup(Environment env) { String protocol = "http"; if (env.getProperty("server.ssl.key-store") != null) { protocol = "https"; } String serverPort = env.getProperty("server.port"); String contextPath = env.getProperty("server.servlet.context-path"); if (StringUtils.isBlank(contextPath)) { contextPath = "/"; } String hostAddress = "localhost"; try { hostAddress = InetAddress.getLocalHost().getHostAddress(); } catch (UnknownHostException e) { log.warn("The host name could not be determined, using `localhost` as fallback"); } log.info("\n----------------------------------------------------------\n\t" + "Application '{}' is running! Access URLs:\n\t" + "Local: \t\t{}://localhost:{}{}\n\t" + "External: \t{}://{}:{}{}\n\t" + "Profile(s): \t{}\n----------------------------------------------------------", env.getProperty("spring.application.name"), protocol, serverPort, contextPath, protocol, hostAddress, serverPort, contextPath, env.getActiveProfiles()); String configServerStatus = env.getProperty("configserver.status"); if (configServerStatus == null) { configServerStatus = "Not found or not setup for this application"; } log.info("\n----------------------------------------------------------\n\t" + "Config Server: \t{}\n----------------------------------------------------------", configServerStatus); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
598a27cca24d157aebb5bb6ffd7f0bbd1def2661
03eddd8bd97847de405494ac6119d76191bf819b
/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/valuesets/V3PaymentTerms.java
222ca792f292baadc8e449ce150670b7eee22798
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
sashrika/hapi-fhir
e9cc8430a869cd2de78d8317c6656b77dfb61fd9
3fa7c545265942290c3cd06152c2ca7f9935105c
refs/heads/master
2021-01-17T23:19:20.982619
2015-07-13T14:31:02
2015-07-13T14:31:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,446
java
package org.hl7.fhir.instance.model.valuesets; /* Copyright (c) 2011+, HL7, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Generated on Wed, Jul 8, 2015 17:35-0400 for FHIR v0.5.0 public enum V3PaymentTerms { /** * Payment in full for products and/or services is required as soon as the service is performed or goods delivered. */ COD, /** * Payment in full for products and/or services is required 30 days from the time the service is performed or goods delivered. */ N30, /** * Payment in full for products and/or services is required 60 days from the time the service is performed or goods delivered. */ N60, /** * Payment in full for products and/or services is required 90 days from the time the service is performed or goods delivered. */ N90, /** * added to help the parsers */ NULL; public static V3PaymentTerms fromCode(String codeString) throws Exception { if (codeString == null || "".equals(codeString)) return null; if ("COD".equals(codeString)) return COD; if ("N30".equals(codeString)) return N30; if ("N60".equals(codeString)) return N60; if ("N90".equals(codeString)) return N90; throw new Exception("Unknown V3PaymentTerms code '"+codeString+"'"); } public String toCode() { switch (this) { case COD: return "COD"; case N30: return "N30"; case N60: return "N60"; case N90: return "N90"; default: return "?"; } } public String getSystem() { return "http://hl7.org/fhir/v3/PaymentTerms"; } public String getDefinition() { switch (this) { case COD: return "Payment in full for products and/or services is required as soon as the service is performed or goods delivered."; case N30: return "Payment in full for products and/or services is required 30 days from the time the service is performed or goods delivered."; case N60: return "Payment in full for products and/or services is required 60 days from the time the service is performed or goods delivered."; case N90: return "Payment in full for products and/or services is required 90 days from the time the service is performed or goods delivered."; default: return "?"; } } public String getDisplay() { switch (this) { case COD: return "Cash on Delivery"; case N30: return "Net 30 days"; case N60: return "Net 60 days"; case N90: return "Net 90 days"; default: return "?"; } } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
d4bc539c1f9f8fadaa692260fe0311b0be21fdba
db08b66b0e39e25a59dd830deceda8cf1296bbdb
/jtester.integrated/src/test/java/org/jtester/module/jmockit/mockbug/SayHelloImpl.java
5df4973ceda9c40acf3c19b4f314a05de6bc0b6a
[]
no_license
pengsong31/jtester
a3c577e26699d44c9a815cafa4f3ad5201358552
51bb78a7212d1cab4ce0a6e4a778476e77b5c28b
refs/heads/master
2020-05-02T19:19:22.618616
2013-08-23T08:24:17
2013-08-23T08:24:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
455
java
package org.jtester.module.jmockit.mockbug; import org.jtester.module.core.utility.MessageHelper; public class SayHelloImpl { public SayHelloImpl() { MessageHelper.info("init log"); } public String sayHello() { MessageHelper.info("如果@Mock 一个实现类的第一次运行的时候,静态变量会被置为null,此处抛出NullPointerException"); return "say hello:" + getName(); } private String getName() { return "darui.wu"; } }
[ "darui.wu@163.com" ]
darui.wu@163.com
e4efca645d1b94f7388add8bbd402b700691f262
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-iovcc/src/main/java/com/aliyuncs/iovcc/model/v20180501/ListAssistHistoryDetailsRequest.java
0606d77c1d2556da50e1b326f1e66a4bb02d493a
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
1,907
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.iovcc.model.v20180501; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.iovcc.Endpoint; /** * @author auto create * @version */ public class ListAssistHistoryDetailsRequest extends RpcAcsRequest<ListAssistHistoryDetailsResponse> { private String projectId; private String assistId; public ListAssistHistoryDetailsRequest() { super("iovcc", "2018-05-01", "ListAssistHistoryDetails", "iovcc"); setMethod(MethodType.GET); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public String getProjectId() { return this.projectId; } public void setProjectId(String projectId) { this.projectId = projectId; if(projectId != null){ putQueryParameter("ProjectId", projectId); } } public String getAssistId() { return this.assistId; } public void setAssistId(String assistId) { this.assistId = assistId; if(assistId != null){ putQueryParameter("AssistId", assistId); } } @Override public Class<ListAssistHistoryDetailsResponse> getResponseClass() { return ListAssistHistoryDetailsResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
a6fb459adb8b6d641baa5547d316025d6927a7dd
edc6693ada84d2392bf6c1ac24097ab8b5a9d040
/r2.apps/zxing/core/src/com/google/zxing/oned/UPCEReader.java
a4f72bfe35c128c636b5b55052dd722f08c35194
[]
no_license
he-actlab/r2.code
e544a60ba6eb90a94023d09843574b23725a5c14
b212d1e8fe90b87b5529bf01eb142d7b54c7325b
refs/heads/master
2023-03-30T10:48:43.476138
2016-02-15T15:58:54
2016-02-15T15:58:54
354,711,273
1
0
null
null
null
null
UTF-8
Java
false
false
4,856
java
/* * Copyright 2008 ZXing 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 com.google.zxing.oned; import chord.analyses.r2.lang.*; import com.google.zxing.BarcodeFormat; import com.google.zxing.ChecksumException; import com.google.zxing.FormatException; import com.google.zxing.NotFoundException; import com.google.zxing.common.BitArray; /** * <p>Implements decoding of the UPC-E format.</p> * <p/> * <p><a href="http://www.barcodeisland.com/upce.phtml">This</a> is a great reference for * UPC-E information.</p> * * @author Sean Owen */ public final class UPCEReader extends UPCEANReader { /** * The pattern that marks the middle, and end, of a UPC-E pattern. * There is no "second half" to a UPC-E barcode. */ private static final int[] MIDDLE_END_PATTERN = {1, 1, 1, 1, 1, 1}; /** * See {@link #L_AND_G_PATTERNS}; these values similarly represent patterns of * even-odd parity encodings of digits that imply both the number system (0 or 1) * used, and the check digit. */ private static final int[][] NUMSYS_AND_CHECK_DIGIT_PATTERNS = { {0x38, 0x34, 0x32, 0x31, 0x2C, 0x26, 0x23, 0x2A, 0x29, 0x25}, {0x07, 0x0B, 0x0D, 0x0E, 0x13, 0x19, 0x1C, 0x15, 0x16, 0x1A} }; private final int[] decodeMiddleCounters; public UPCEReader() { decodeMiddleCounters = new int[4]; } protected int decodeMiddle(BitArray row, int[] startRange, StringBuffer result) throws NotFoundException { int[] counters = decodeMiddleCounters; counters[0] = 0; counters[1] = 0; counters[2] = 0; counters[3] = 0; int end = row.getSize(); int rowOffset = startRange[1]; int lgPatternFound = 0; for (int x = 0; x < 6 && rowOffset < end; x++) { int bestMatch = decodeDigit(row, counters, rowOffset, (int [][])L_AND_G_PATTERNS); //additional accept // bestMatch = Loosen.loosen(bestMatch); result.append((char) ('0' + bestMatch % 10)); for (int i = 0; i < counters.length; i++) { rowOffset += counters[i]; } //additional accept // bestMatch = Loosen.loosen(bestMatch); if (bestMatch >= 10) { lgPatternFound |= 1 << (5 - x); } } determineNumSysAndCheckDigit(result, lgPatternFound); return rowOffset; } protected int[] decodeEnd(BitArray row, int endStart) throws NotFoundException { return findGuardPattern(row, endStart, true, MIDDLE_END_PATTERN); } protected boolean checkChecksum(String s) throws FormatException, ChecksumException { return super.checkChecksum(convertUPCEtoUPCA(s)); } private static void determineNumSysAndCheckDigit(StringBuffer resultString, int lgPatternFound) throws NotFoundException { for (int numSys = 0; numSys <= 1; numSys++) { for (int d = 0; d < 10; d++) { if (lgPatternFound == NUMSYS_AND_CHECK_DIGIT_PATTERNS[numSys][d]) { resultString.insert(0, (char) ('0' + numSys)); resultString.append((char) ('0' + d)); return; } } } throw NotFoundException.getNotFoundInstance(); } BarcodeFormat getBarcodeFormat() { return BarcodeFormat.UPC_E; } /** * Expands a UPC-E value back into its full, equivalent UPC-A code value. * * @param upce UPC-E code as string of digits * @return equivalent UPC-A code as string of digits */ public static String convertUPCEtoUPCA(String upce) { char[] upceChars = new char[6]; upce.getChars(1, 7, upceChars, 0); StringBuffer result = new StringBuffer(12); result.append(upce.charAt(0)); char lastChar = upceChars[5]; switch (lastChar) { case '0': case '1': case '2': result.append(upceChars, 0, 2); result.append(lastChar); result.append("0000"); result.append(upceChars, 2, 3); break; case '3': result.append(upceChars, 0, 3); result.append("00000"); result.append(upceChars, 3, 2); break; case '4': result.append(upceChars, 0, 4); result.append("00000"); result.append(upceChars[4]); break; default: result.append(upceChars, 0, 5); result.append("0000"); result.append(lastChar); break; } result.append(upce.charAt(7)); return result.toString(); } }
[ "jspark@gatech.edu" ]
jspark@gatech.edu
fa134dfc0c7ed37af0c10b394f4fcf0bb623046e
57b95a057dc4c7526736cb90abda10ef68ef9a8d
/designer_base/src/com/fr/design/style/color/NewColorSelectBox.java
917938259fab0ab2f2213e1db93c2301d7babeca
[]
no_license
jingedawang/fineRep
1f97702f8690d6119a817bba8f44c265e9d7fcb5
fce3e7a9238dd13fc168bf475f93496abd4a9f39
refs/heads/master
2021-01-18T08:21:05.238130
2016-02-28T11:15:25
2016-02-28T11:15:25
null
0
0
null
null
null
null
GB18030
Java
false
false
2,496
java
package com.fr.design.style.color; import java.awt.Color; import javax.swing.JPanel; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import com.fr.base.background.ColorBackground; import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; import com.fr.design.style.AbstractSelectBox; /** * Color select pane. */ public class NewColorSelectBox extends AbstractSelectBox<Color> implements UIObserver { private static final long serialVersionUID = 2782150678943960557L; private Color color; private NewColorSelectPane colorPane = new NewColorSelectPane(); private UIObserverListener uiObserverListener; public NewColorSelectBox(int preferredWidth) { initBox(preferredWidth); iniListener(); } private void iniListener(){ if(shouldResponseChangeListener()){ this.addSelectChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { if(uiObserverListener == null){ return; } uiObserverListener.doChange(); } }); } } /** * 初始化下拉面板 * @param preferredWidth 面板大小 * @return 面板 */ public JPanel initWindowPane(double preferredWidth) { // 下拉的时候重新生成面板,以刷新最近使用颜色 colorPane = new NewColorSelectPane(); colorPane.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { hidePopupMenu(); color = ((NewColorSelectPane)e.getSource()).getColor(); fireDisplayComponent(ColorBackground.getInstance(color)); } }); return colorPane; } /** * * @return */ public Color getSelectObject() { return this.color; } /** * * @param color */ public void setSelectObject(Color color) { this.color = color; colorPane.setColor(color); fireDisplayComponent(ColorBackground.getInstance(color)); } @Override /** * 祖册监听 * @param listener 监听 */ public void registerChangeListener(UIObserverListener listener) { uiObserverListener = listener; } @Override /** * 是否响应监听 * @return 同上 */ public boolean shouldResponseChangeListener() { return true; } }
[ "develop@finereport.com" ]
develop@finereport.com
d253739107bd233f7f3061790197e8b5296c0c5f
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/ant/multimedia/encode/AndroidMuxer.java
3d2d0653bc57ae9dd305530df8d59c60685d7695
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,323
java
package com.ant.multimedia.encode; import android.annotation.TargetApi; import android.media.MediaCodec; import android.media.MediaCodec.BufferInfo; import android.media.MediaFormat; import android.media.MediaMuxer; import com.alipay.alipaylogger.Log; import java.io.File; import java.io.IOException; import java.nio.ByteBuffer; @TargetApi(18) public class AndroidMuxer extends BaseMuxer { private int a; private MediaMuxer b; private boolean c; protected int mNumTracks; protected int mNumTracksFinished; protected String mOutputPath; private AndroidMuxer(String outputFile) { Log.d("AndroidMuxer", "AndroidMuxer create: " + outputFile); this.mOutputPath = outputFile; try { this.b = new MediaMuxer(outputFile, 0); } catch (IOException e) { Log.e("AndroidMuxer", "MediaMuxer:" + e.getMessage(), e); } this.c = false; this.mNumTracks = 0; this.mNumTracksFinished = 0; this.a = 2; } public void setTrackNum(int num) { this.a = num; } public static AndroidMuxer create(String outputFile) { return new AndroidMuxer(outputFile); } public int addTrack(MediaFormat trackFormat) { Log.d("AndroidMuxer", "addTrack: " + trackFormat.toString()); if (this.c) { throw new RuntimeException("format changed twice"); } int track = this.b.addTrack(trackFormat); this.mNumTracks++; if (e()) { a(); } return track; } public void setOrientation(int orientation) { if (this.b != null) { this.b.setOrientationHint(orientation); } } private void a() { this.b.start(); this.c = true; } public void clean() { if (!e()) { Log.d("AndroidMuxer", "clean " + this.mOutputPath + ", ret: " + new File(this.mOutputPath).delete()); return; } Log.d("AndroidMuxer", "clean nothing mNumTracks:" + this.mNumTracks + ", but mExpectedNumTracks: " + this.a); } private void b() { Log.d("AndroidMuxer", "muxer stop begin"); if (this.c) { try { this.b.stop(); } catch (Exception e) { Log.e("AndroidMuxer", "android muxer stop exp", e); } } try { this.b.release(); } catch (Exception e2) { Log.e("AndroidMuxer", "android muxer release exp", e2); } finally { this.c = false; } Log.d("AndroidMuxer", "muxer stop end"); } public boolean isStarted() { return this.c; } private void c() { Log.d("AndroidMuxer", "signalEndOfTrack"); this.mNumTracksFinished++; } public void writeSampleData(MediaCodec encoder, int trackIndex, int bufferIndex, ByteBuffer encodedData, BufferInfo bufferInfo) { if ((bufferInfo.flags & 4) != 0) { c(); } if ((bufferInfo.flags & 2) != 0) { Log.d("AndroidMuxer", "ignoring BUFFER_FLAG_CODEC_CONFIG"); encoder.releaseOutputBuffer(bufferIndex, false); } else if (bufferInfo.size == 0) { Log.d("AndroidMuxer", "ignoring zero size buffer"); encoder.releaseOutputBuffer(bufferIndex, false); if (d()) { b(); } } else if (!this.c) { Log.d("AndroidMuxer", "writeSampleData called before muxer started. Ignoring packet. Track index: " + trackIndex + "num of tracks added: " + this.mNumTracks); encoder.releaseOutputBuffer(bufferIndex, false); } else { bufferInfo.presentationTimeUs = a(bufferInfo.presentationTimeUs, trackIndex); this.b.writeSampleData(trackIndex, encodedData, bufferInfo); Log.d("AndroidMuxer", "track index: " + trackIndex + ", ts:" + bufferInfo.presentationTimeUs); encoder.releaseOutputBuffer(bufferIndex, false); if (d()) { b(); } } } public void forceStop() { b(); } private boolean d() { return this.mNumTracks == this.mNumTracksFinished; } private boolean e() { return this.mNumTracks == this.a; } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
976712054e961b7e266eb470e95f93e5cc853ec4
dcb64d4a551470dc077b6502a2fe583e78275abc
/Fathom_com.brynk.fathom-dex2jar.src/com/facebook/soloader/Elf64_Phdr.java
29856f4a0573508ca694ae3fc49d49e47d07273e
[]
no_license
lenjonemcse/Fathom-Drone-Android-App
d82799ee3743404dd5d7103152964a2f741b88d3
f3e3f0225680323fa9beb05c54c98377f38c1499
refs/heads/master
2022-01-13T02:10:31.014898
2019-07-10T19:42:02
2019-07-10T19:42:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
594
java
package com.facebook.soloader; final class Elf64_Phdr { public static final int p_align = 48; public static final int p_filesz = 32; public static final int p_flags = 4; public static final int p_memsz = 40; public static final int p_offset = 8; public static final int p_paddr = 24; public static final int p_type = 0; public static final int p_vaddr = 16; } /* Location: C:\Users\c_jealom1\Documents\Scripts\Android\Fathom_com.brynk.fathom\Fathom_com.brynk.fathom-dex2jar.jar * Qualified Name: com.facebook.soloader.Elf64_Phdr * JD-Core Version: 0.6.0 */
[ "jean-francois.lombardo@exfo.com" ]
jean-francois.lombardo@exfo.com
b2006bf5977a00f00cc106dcc12e8d5217fba507
4e8d52f594b89fa356e8278265b5c17f22db1210
/WebServiceArtifacts/CI_CI_PERSONAL_DATA/com/oracle/xmlns/enterprise/tools/schemas/m475145/PROPDISABLEDTypeShape.java
6dd9c3803264408662b47bf3b6de146812828a7e
[]
no_license
ouniali/WSantipatterns
dc2e5b653d943199872ea0e34bcc3be6ed74c82e
d406c67efd0baa95990d5ee6a6a9d48ef93c7d32
refs/heads/master
2021-01-10T05:22:19.631231
2015-05-26T06:27:52
2015-05-26T06:27:52
36,153,404
1
2
null
null
null
null
UTF-8
Java
false
false
1,338
java
package com.oracle.xmlns.enterprise.tools.schemas.m475145; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; /** * <p>Java class for PROP_DISABLEDTypeShape complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="PROP_DISABLEDTypeShape"> * &lt;simpleContent> * &lt;extension base="&lt;http://xmlns.oracle.com/Enterprise/Tools/schemas/M475145.V1>PROP_DISABLEDTypeDef"> * &lt;/extension> * &lt;/simpleContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PROP_DISABLEDTypeShape", propOrder = { "value" }) public class PROPDISABLEDTypeShape { @XmlValue protected String value; /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } }
[ "ouni_ali@yahoo.fr" ]
ouni_ali@yahoo.fr
11ecaa251bfd41a46b742b45f56f356319a1a781
96d1cfc06b1fea0471396777b5bc57e0599101c6
/app/src/androidTest/java/com/fti/mycalc/ExampleInstrumentedTest.java
2d52dfc1d06299d2fd259094e25a31090196cc0e
[]
no_license
HafizaSidqi/tugasPrakAndroid
5cb6bdb6843b893b69aa8c3d079d92773b019d0f
ff91d3f3f41c7a8fbd8a2ea631a4456511ae733e
refs/heads/master
2023-04-05T00:56:22.525626
2021-04-06T16:03:38
2021-04-06T16:03:38
355,221,405
0
0
null
null
null
null
UTF-8
Java
false
false
742
java
package com.fti.mycalc; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.fti.mycalc", appContext.getPackageName()); } }
[ "you@example.com" ]
you@example.com
0149d8dab93c6b4355f249e9ff41f1691ae62ee0
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14599-15-9-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/observation/internal/DefaultObservationManager_ESTest_scaffolding.java
fe0e47a983859598b9a60d9d78dd8a95a8d0c110
[]
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
460
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Apr 04 07:44:01 UTC 2020 */ package org.xwiki.observation.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DefaultObservationManager_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
bebf62e4ff67e734c49b2b8990a2be225d2758e9
3efa417c5668b2e7d1c377c41d976ed31fd26fdc
/src/br/com/mind5/business/bankAccount/model/decisionTree/BankaccRootSearchStore.java
ffa018c25be0de6efc736d84939f05dabef82c0d
[]
no_license
grazianiborcai/Agenda_WS
4b2656716cc49a413636933665d6ad8b821394ef
e8815a951f76d498eb3379394a54d2aa1655f779
refs/heads/master
2023-05-24T19:39:22.215816
2023-05-15T15:15:15
2023-05-15T15:15:15
109,902,084
0
0
null
2022-06-29T19:44:56
2017-11-07T23:14:21
Java
UTF-8
Java
false
false
1,846
java
package br.com.mind5.business.bankAccount.model.decisionTree; import java.util.ArrayList; import java.util.List; import br.com.mind5.business.bankAccount.info.BankaccInfo; import br.com.mind5.business.bankAccount.model.action.BankaccVisiMergeBankaccarchStore; import br.com.mind5.business.bankAccount.model.action.BankaccVisiRootSelect; import br.com.mind5.model.action.ActionLazy; import br.com.mind5.model.action.ActionStd; import br.com.mind5.model.action.commom.ActionLazyCommom; import br.com.mind5.model.action.commom.ActionStdCommom; import br.com.mind5.model.checker.ModelChecker; import br.com.mind5.model.checker.ModelCheckerHelperQueue; import br.com.mind5.model.checker.common.ModelCheckerDummy; import br.com.mind5.model.decisionTree.DeciTreeOption; import br.com.mind5.model.decisionTree.DeciTreeTemplateWrite; public final class BankaccRootSearchStore extends DeciTreeTemplateWrite<BankaccInfo> { public BankaccRootSearchStore(DeciTreeOption<BankaccInfo> option) { super(option); } @Override protected ModelChecker<BankaccInfo> buildCheckerHook(DeciTreeOption<BankaccInfo> option) { List<ModelChecker<BankaccInfo>> queue = new ArrayList<>(); ModelChecker<BankaccInfo> checker; checker = new ModelCheckerDummy<BankaccInfo>(); queue.add(checker); return new ModelCheckerHelperQueue<>(queue); } @Override protected List<ActionStd<BankaccInfo>> buildActionsOnPassedHook(DeciTreeOption<BankaccInfo> option) { List<ActionStd<BankaccInfo>> actions = new ArrayList<>(); ActionStd<BankaccInfo> searchStore = new ActionStdCommom<BankaccInfo>(option, BankaccVisiMergeBankaccarchStore.class); ActionLazy<BankaccInfo> select = new ActionLazyCommom<BankaccInfo>(option, BankaccVisiRootSelect.class); searchStore.addPostAction(select); actions.add(searchStore); return actions; } }
[ "mmaciel@mind5.com" ]
mmaciel@mind5.com
ff992bb0e7288862ad8d0351478796292de6b007
5ac2fb4db63c9383abad7931025d5ac9bc7259d3
/Tama_app/build/generated/source/r/dev/debug/android/support/graphics/drawable/animated/R.java
f6315e5763ee2a593323ec68166e8b353a7b32b7
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
Testtaccount/TamaAndroid
097f48f913c23449c983fa1260a1696b06742cc8
82912bd3cb80c9fc274c0c23adc005bba85b7fb7
refs/heads/master
2021-09-19T08:26:09.108350
2018-07-25T12:33:20
2018-07-25T12:35:42
139,688,915
0
0
null
null
null
null
UTF-8
Java
false
false
7,630
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package android.support.graphics.drawable.animated; public final class R { public static final class attr { public static final int font = 0x7f010162; public static final int fontProviderAuthority = 0x7f01015b; public static final int fontProviderCerts = 0x7f01015e; public static final int fontProviderFetchStrategy = 0x7f01015f; public static final int fontProviderFetchTimeout = 0x7f010160; public static final int fontProviderPackage = 0x7f01015c; public static final int fontProviderQuery = 0x7f01015d; public static final int fontStyle = 0x7f010161; public static final int fontWeight = 0x7f010163; } public static final class bool { public static final int abc_action_bar_embed_tabs = 0x7f0d0000; } public static final class color { public static final int notification_action_color_filter = 0x7f0f0001; public static final int notification_icon_bg_color = 0x7f0f009b; public static final int ripple_material_light = 0x7f0f00aa; public static final int secondary_text_default_material_light = 0x7f0f00ac; } public static final class dimen { public static final int compat_button_inset_horizontal_material = 0x7f0b00a4; public static final int compat_button_inset_vertical_material = 0x7f0b00a5; public static final int compat_button_padding_horizontal_material = 0x7f0b00a6; public static final int compat_button_padding_vertical_material = 0x7f0b00a7; public static final int compat_control_corner_material = 0x7f0b00a8; public static final int notification_action_icon_size = 0x7f0b0127; public static final int notification_action_text_size = 0x7f0b0128; public static final int notification_big_circle_margin = 0x7f0b0129; public static final int notification_content_margin_start = 0x7f0b0029; public static final int notification_large_icon_height = 0x7f0b012a; public static final int notification_large_icon_width = 0x7f0b012b; public static final int notification_main_column_padding_top = 0x7f0b002a; public static final int notification_media_narrow_margin = 0x7f0b002b; public static final int notification_right_icon_size = 0x7f0b012c; public static final int notification_right_side_padding_top = 0x7f0b0027; public static final int notification_small_icon_background_padding = 0x7f0b012d; public static final int notification_small_icon_size_as_large = 0x7f0b012e; public static final int notification_subtext_size = 0x7f0b012f; public static final int notification_top_pad = 0x7f0b0130; public static final int notification_top_pad_large_text = 0x7f0b0131; } public static final class drawable { public static final int notification_action_background = 0x7f02059b; public static final int notification_bg = 0x7f02059c; public static final int notification_bg_low = 0x7f02059d; public static final int notification_bg_low_normal = 0x7f02059e; public static final int notification_bg_low_pressed = 0x7f02059f; public static final int notification_bg_normal = 0x7f0205a0; public static final int notification_bg_normal_pressed = 0x7f0205a1; public static final int notification_icon_background = 0x7f0205a2; public static final int notification_template_icon_bg = 0x7f020621; public static final int notification_template_icon_low_bg = 0x7f020622; public static final int notification_tile_bg = 0x7f0205a3; public static final int notify_panel_notification_icon_bg = 0x7f0205a4; } public static final class id { public static final int action_container = 0x7f1002d7; public static final int action_divider = 0x7f1002de; public static final int action_image = 0x7f1002d8; public static final int action_text = 0x7f1002d9; public static final int actions = 0x7f1002e7; public static final int async = 0x7f100069; public static final int blocking = 0x7f10006a; public static final int chronometer = 0x7f1002e3; public static final int forever = 0x7f10006b; public static final int icon = 0x7f10009c; public static final int icon_group = 0x7f1002e8; public static final int info = 0x7f1002e4; public static final int italic = 0x7f10006c; public static final int line1 = 0x7f100019; public static final int line3 = 0x7f10001a; public static final int normal = 0x7f100047; public static final int notification_background = 0x7f1002e5; public static final int notification_main_column = 0x7f1002e0; public static final int notification_main_column_container = 0x7f1002df; public static final int right_icon = 0x7f1002e6; public static final int right_side = 0x7f1002e1; public static final int text = 0x7f100022; public static final int text2 = 0x7f100023; public static final int time = 0x7f1002e2; public static final int title = 0x7f100026; } public static final class integer { public static final int status_bar_notification_info_maxnum = 0x7f0e000f; } public static final class layout { public static final int notification_action = 0x7f0300d2; public static final int notification_action_tombstone = 0x7f0300d3; public static final int notification_template_custom_big = 0x7f0300da; public static final int notification_template_icon_group = 0x7f0300db; public static final int notification_template_part_chronometer = 0x7f0300df; public static final int notification_template_part_time = 0x7f0300e0; } public static final class string { public static final int status_bar_notification_info_overflow = 0x7f080041; } public static final class style { public static final int TextAppearance_Compat_Notification = 0x7f0c0095; public static final int TextAppearance_Compat_Notification_Info = 0x7f0c0096; public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0c01b7; public static final int TextAppearance_Compat_Notification_Time = 0x7f0c0099; public static final int TextAppearance_Compat_Notification_Title = 0x7f0c009b; public static final int Widget_Compat_NotificationActionContainer = 0x7f0c009d; public static final int Widget_Compat_NotificationActionText = 0x7f0c009e; } public static final class styleable { public static final int[] FontFamily = { 0x7f01015b, 0x7f01015c, 0x7f01015d, 0x7f01015e, 0x7f01015f, 0x7f010160 }; public static final int[] FontFamilyFont = { 0x7f010161, 0x7f010162, 0x7f010163 }; public static final int FontFamilyFont_font = 1; public static final int FontFamilyFont_fontStyle = 0; public static final int FontFamilyFont_fontWeight = 2; public static final int FontFamily_fontProviderAuthority = 0; public static final int FontFamily_fontProviderCerts = 3; public static final int FontFamily_fontProviderFetchStrategy = 4; public static final int FontFamily_fontProviderFetchTimeout = 5; public static final int FontFamily_fontProviderPackage = 1; public static final int FontFamily_fontProviderQuery = 2; } }
[ "avetik.avetik@gmail.com" ]
avetik.avetik@gmail.com
c6441551c29739b7461d11f2426c8ac16efb1022
b5c58560a5df73fa8ce97879631bd3296dd026fb
/src/jsortie/quicksort/partitioner/kthstatistic/floydrivest/partitionselector/FloydRivestSamplePartitionSelector.java
98edf40fc7f54b1122b93ecb45b797bb863c7e8b
[ "MIT" ]
permissive
JamesBarbetti/jsortie
272669c2fbe35acf05a2656268ab609537ab8e19
8086675235a598f6b081a4edd591012bf5408abf
refs/heads/main
2023-04-13T08:50:56.132423
2021-04-18T04:57:14
2021-04-18T04:57:14
358,776,751
0
0
null
null
null
null
UTF-8
Java
false
false
2,034
java
package jsortie.quicksort.partitioner.kthstatistic.floydrivest.partitionselector; public class FloydRivestSamplePartitionSelector implements ThreeWaySamplePartitionSelector { @Override public int getSampleStart ( int start, int stop, int k, int c ) { int m = (stop -start); double leftOfPivot = (k-start) * (double) (c-1) / (double) (m-1); int sampleStart = k - (int)Math.floor(leftOfPivot+.5); if (stop<sampleStart+c) { sampleStart=stop-c; } if (sampleStart<start) { sampleStart=start; } return sampleStart; } //Note, Floyd & Rivest //set d = Math.sqrt ( Math.log ( count ) ); //Because they want "misfortune" to be //vanishingly unlikely! //(On the order of 1/count). But... maybe not, huh @Override public double getDelta ( double d, double m, double c, double t) { //j=desired sample rank d = (d==0) ? Math.sqrt( Math.log(m)) : d; double stddevTimes2 = Math.sqrt( (m+1)*(m+1-c)/(c+1) ); double delta = stddevTimes2 * d * (c+1) / (m+1); //Almost... the original Floyd-Rivest formula //(but with (c+1) and (m+1) in place of c // and m, in a few places. if (delta<.5) { delta = .5; } return delta; } @Override public int fixLowerSampleTarget ( int sampleStart , double t1, double t2 , double j1, double j2 , int sampleStop) { double k1 = Math.floor(j1+.5); double k2 = Math.floor(j2+.5); if (k1<=sampleStart) { return sampleStart; } else if (k1==k2) { k1 = k2 - 1; } return (int)k1; } @Override public int fixUpperSampleTarget ( int sampleStart, double t1, double t2 , double j1 , double j2, int sampleStop) { double k1 = Math.floor(j1+.5); double k2 = Math.floor(j2+.5); if (k1<=sampleStart && k2<=sampleStart) { return sampleStart+1; } if (sampleStop<=k2) { return sampleStop-1; } return (int)k2; } }
[ "james_barbetti@yahoo.com" ]
james_barbetti@yahoo.com
610bd9b2f6bd773d51735f486be1167227452ea0
052d648a7b0f6c249804bc026db19075d7975aed
/Entitybean/src/com/dtv/oss/domain/CatvTerminalHome.java
67268e20001f9b292906faed591e5e512fcbc297
[]
no_license
worldup/boss
84fa357934a7a374d3d0617607391d0446e3b37d
667dc568c35c3f38b506d21375e298819e58bc33
refs/heads/master
2021-01-13T01:36:56.187120
2015-02-10T14:01:37
2015-02-10T14:01:37
30,594,799
0
1
null
null
null
null
UTF-8
Java
false
false
443
java
package com.dtv.oss.domain; import javax.ejb.CreateException; import javax.ejb.FinderException; import com.dtv.oss.dto.CatvTerminalDTO; public interface CatvTerminalHome extends javax.ejb.EJBLocalHome { public CatvTerminal create(java.lang.String id) throws CreateException; public CatvTerminal create(CatvTerminalDTO dto) throws CreateException; public CatvTerminal findByPrimaryKey(java.lang.String id) throws FinderException; }
[ "worldup@163.com" ]
worldup@163.com
3c9a5a5699a4217f7fca92b7b4d436d5ab5dd917
9a6b83abe2ef1b78a9bc0550abb57f93c12af897
/src/main/java/org/cyclops/integrateddynamics/core/part/read/PartStateReaderBase.java
8c6561fa16f29b8f846861e71edd2c748462751f
[ "MIT" ]
permissive
CyclopsMC/IntegratedDynamics
17fa3b5ebb3548e04e4f5714e8259df16991a6a1
5d944061d749912c5b5428cf8343cfc29e073a6a
refs/heads/master-1.20
2023-09-03T18:20:49.515418
2023-08-29T16:54:10
2023-08-29T16:54:10
33,450,119
131
102
MIT
2023-08-09T08:55:29
2015-04-05T18:10:24
Java
UTF-8
Java
false
false
1,705
java
package org.cyclops.integrateddynamics.core.part.read; import org.cyclops.integrateddynamics.api.evaluate.variable.IValue; import org.cyclops.integrateddynamics.api.evaluate.variable.IValueType; import org.cyclops.integrateddynamics.api.part.aspect.IAspect; import org.cyclops.integrateddynamics.api.part.aspect.IAspectRead; import org.cyclops.integrateddynamics.api.part.aspect.IAspectVariable; import org.cyclops.integrateddynamics.api.part.aspect.property.IAspectProperties; import org.cyclops.integrateddynamics.api.part.read.IPartStateReader; import org.cyclops.integrateddynamics.api.part.read.IPartTypeReader; import org.cyclops.integrateddynamics.core.part.PartStateBase; import java.util.IdentityHashMap; import java.util.Map; /** * A default implementation of the {@link IPartStateReader}. * @author rubensworks */ public class PartStateReaderBase<P extends IPartTypeReader> extends PartStateBase<P> implements IPartStateReader<P> { private final Map<IAspect, IAspectVariable> aspectVariables = new IdentityHashMap<>(); @SuppressWarnings("unchecked") @Override public <V extends IValue, T extends IValueType<V>> IAspectVariable<V> getVariable(IAspectRead<V, T> aspect) { return aspectVariables.get(aspect); } @Override public void setVariable(IAspect aspect, IAspectVariable variable) { aspectVariables.put(aspect, variable); } @Override public void resetVariables() { this.aspectVariables.clear(); } @Override public void setAspectProperties(IAspect aspect, IAspectProperties properties) { super.setAspectProperties(aspect, properties); this.aspectVariables.remove(aspect); } }
[ "rubensworks@gmail.com" ]
rubensworks@gmail.com
55e7aa8b3a37d1043442e90d3fd3389a41730405
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-418-1-21-PESA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/doc/DefaultDocumentAccessBridge_ESTest.java
ccc07215daea09f649bcc0501944f54594481ee8
[]
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
578
java
/* * This file was automatically generated by EvoSuite * Fri Apr 03 02:37:27 UTC 2020 */ package com.xpn.xwiki.doc; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class DefaultDocumentAccessBridge_ESTest extends DefaultDocumentAccessBridge_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
93a0b5cf6b59d1f74ff6827fad5c655b34b6c3be
78f62e06bdcafc955bcf216a146cb7ecbba772ec
/src/main/java/com/alipay/api/response/AlipayCommerceCityfacilitatorCityQueryResponse.java
b2921a505b6736ecf5d1fb3f28220cc5b4465e4e
[ "Apache-2.0" ]
permissive
woniu1983/onlinepay_demo
aa773523787bd9f5cf968983ed662d0b49032b5e
10e6ca10096c85eaf5dacdef19768e999d1c3b78
refs/heads/master
2022-05-31T15:59:56.992836
2019-06-20T04:18:39
2019-06-20T04:18:39
133,897,776
1
0
Apache-2.0
2022-05-20T20:50:48
2018-05-18T03:24:20
Java
UTF-8
Java
false
false
828
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.CityFunction; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.commerce.cityfacilitator.city.query response. * * @author auto create * @since 1.0, 2015-12-15 11:19:13 */ public class AlipayCommerceCityfacilitatorCityQueryResponse extends AlipayResponse { private static final long serialVersionUID = 4749397754749672312L; /** * 城市列表 */ @ApiListField("citys") @ApiField("city_function") private List<CityFunction> citys; public void setCitys(List<CityFunction> citys) { this.citys = citys; } public List<CityFunction> getCitys( ) { return this.citys; } }
[ "Ryan@MWWM" ]
Ryan@MWWM
e2026a5461845ced5af7a3b705ac4dd3a030fa5d
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/apereo--cas/7028e8201d289108088204881900026b80cd4efd/after/DefaultAuthenticationResultBuilder.java
0304061e1e623c04dd68540af8c044897b1d90de
[]
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
7,842
java
package org.apereo.cas.authentication; import com.google.common.collect.ImmutableSet; import org.apereo.cas.authentication.principal.Principal; import org.apereo.cas.authentication.principal.Service; import org.apereo.cas.util.CollectionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.time.ZonedDateTime; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashSet; import java.util.Map; import java.util.Optional; import java.util.Set; /** * This is {@link DefaultAuthenticationResultBuilder}. * * @author Misagh Moayyed * @since 4.2.0 */ public class DefaultAuthenticationResultBuilder implements AuthenticationResultBuilder { private static final Logger LOGGER = LoggerFactory.getLogger(DefaultAuthenticationResultBuilder.class); private static final long serialVersionUID = 6180465589526463843L; private Credential providedCredential; private Set<Authentication> authentications = Collections.synchronizedSet(new LinkedHashSet<>()); private PrincipalElectionStrategy principalElectionStrategy; /** * Instantiates a new default authentication result builder. * * @param principalElectionStrategy the principal election strategy */ public DefaultAuthenticationResultBuilder(final PrincipalElectionStrategy principalElectionStrategy) { this.principalElectionStrategy = principalElectionStrategy; } @Override public Optional<Authentication> getInitialAuthentication() { if (this.authentications.isEmpty()) { LOGGER.warn("Authentication chain is empty as no authentications have been collected"); } return this.authentications.stream().findFirst(); } @Override public AuthenticationResultBuilder collect(final Authentication authentication) { this.authentications.add(authentication); return this; } @Override public AuthenticationResultBuilder collect(final Credential credential) { this.providedCredential = credential; return this; } @Override public AuthenticationResult build() { return build(null); } @Override public AuthenticationResult build(final Service service) { final Authentication authentication = buildAuthentication(); if (authentication == null) { LOGGER.info("Authentication result cannot be produced because no authentication is recorded into in the chain. Returning " + "null"); return null; } LOGGER.debug("Building an authentication result for authentication {} and service {}", authentication, service); final DefaultAuthenticationResult res = new DefaultAuthenticationResult(authentication, service); res.setCredentialProvided(this.providedCredential != null); return res; } private boolean isEmpty() { return this.authentications.isEmpty(); } private Authentication buildAuthentication() { if (isEmpty()) { LOGGER.warn("No authentication event has been recorded; CAS cannot finalize the authentication result"); return null; } final Map<String, Object> authenticationAttributes = new HashMap<>(); final Map<String, Object> principalAttributes = new HashMap<>(); final AuthenticationBuilder authenticationBuilder = DefaultAuthenticationBuilder.newInstance(); buildAuthenticationHistory(this.authentications, authenticationAttributes, principalAttributes, authenticationBuilder); final Principal primaryPrincipal = getPrimaryPrincipal(this.authentications, principalAttributes); authenticationBuilder.setPrincipal(primaryPrincipal); LOGGER.debug("Determined primary authentication principal to be [{}]", primaryPrincipal); authenticationBuilder.setAttributes(authenticationAttributes); LOGGER.debug("Collected authentication attributes for this result are [{}]", authenticationAttributes); authenticationBuilder.setAuthenticationDate(ZonedDateTime.now()); final Authentication auth = authenticationBuilder.build(); LOGGER.debug("Authentication result commenced at [{}]", auth.getAuthenticationDate()); return auth; } private static void buildAuthenticationHistory(final Set<Authentication> authentications, final Map<String, Object> authenticationAttributes, final Map<String, Object> principalAttributes, final AuthenticationBuilder authenticationBuilder) { LOGGER.debug("Collecting authentication history based on [{}] authentication events", authentications.size()); authentications.stream().forEach(authn -> { final Principal authenticatedPrincipal = authn.getPrincipal(); LOGGER.debug("Evaluating authentication principal [{}] for inclusion in result", authenticatedPrincipal); principalAttributes.putAll(authenticatedPrincipal.getAttributes()); LOGGER.debug("Collected principal attributes [{}] for inclusion in this result for principal [{}]", principalAttributes, authenticatedPrincipal.getId()); authn.getAttributes().keySet().stream().forEach(attrName -> { if (authenticationAttributes.containsKey(attrName)) { LOGGER.debug("Collecting multi-valued authentication attribute [{}]", attrName); final Object oldValue = authenticationAttributes.remove(attrName); LOGGER.debug("Converting authentication attribute [{}] to a collection of values", attrName); final Collection<Object> listOfValues = CollectionUtils.convertValueToCollection(oldValue); final Object newValue = authn.getAttributes().get(attrName); listOfValues.addAll(CollectionUtils.convertValueToCollection(newValue)); authenticationAttributes.put(attrName, listOfValues); LOGGER.debug("Collected multi-valued authentication attribute [{}] -> [{}]", attrName, listOfValues); } else { final Object value = authn.getAttributes().get(attrName); if (value != null) { authenticationAttributes.put(attrName, value); LOGGER.debug("Collected single authentication attribute [{}] -> [{}]", attrName, value); } else { LOGGER.warn("Authentication attribute [{}] has no value and is not collected", attrName); } } }); LOGGER.debug("Finalized authentication attributes [{}] for inclusion in this authentication result", authenticationAttributes); authenticationBuilder.addSuccesses(authn.getSuccesses()) .addFailures(authn.getFailures()) .addCredentials(authn.getCredentials()); }); } /** * Principal id is and must be enforced to be the same for all authentications. * Based on that restriction, it's safe to simply grab the first principal id in the chain * when composing the authentication chain for the caller. */ private Principal getPrimaryPrincipal(final Set<Authentication> authentications, final Map<String, Object> principalAttributes) { return this.principalElectionStrategy.nominate(ImmutableSet.copyOf(authentications), principalAttributes); } public void setPrincipalElectionStrategy(final PrincipalElectionStrategy principalElectionStrategy) { this.principalElectionStrategy = principalElectionStrategy; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
6054b182ded5753015fc5b85e894b437be34e234
9e048428ca10f604c557784f4b28c68ce9b5cccb
/bitcamp-java-basic/src/step02/Exam08_6.java
3b2894f2db987bd368f37c0896e4a1d06fee0510
[]
no_license
donhee/bitcamp
6c90ec687e00de07315f647bdb1fda0e277c3937
860aa16d86cbd6faeb56b1f5c70b5ea5d297aef0
refs/heads/master
2021-01-24T11:44:48.812897
2019-02-20T00:06:07
2019-02-20T00:06:07
123,054,172
0
0
null
null
null
null
UTF-8
Java
false
false
1,443
java
// 형변환 - 명시적 형변환 II package step02; public class Exam08_6 { public static void main(String[] args) { byte b = 100; short s = 100; int i = 100; long l = 100; // 큰 메모리의 값을 작은 메모리에 저장하는 경우 // => 작은 메모리에 들어갈 수 있는 // 값인 경우에 형변환을 해야 한다. byte b2 = (byte)s; // 명시적 형변환 System.out.println(b2); b2 = (byte)i; // 명시적 형변환 System.out.println(b2); b2 = (byte)l; // 명시적 형변환 System.out.println(b2); // => 작은 메모리에 들어갈 값 보다 큰 값을 // 명시적 형변환을 수행하여 값을 넣으려 하면 // 값이 짤린다!!!! // 예) int i2 = 0b0000_0000_0000_0000_0000_0001_0010_1100; // 300 (10진수); b2 = (byte) i2; System.out.println(b2); // 0b0010_1100 // 44 // 특별한 경우 큰 값을 작은 메모리에 넣는 것은 아무런 의미가 없다. // 해서는 안된다. // 다만, // 큰 메모리의 값을 바이트 단위로 쪼개고 싶을 때 // 이 방식을 사용한다. } } // 명시적 형병환 // - 큰 메모리의 값을 작은 메모리로 변환 // - 부동소수점을 정수로 변환 할 때 // 문법 //
[ "231313do@gmail.com" ]
231313do@gmail.com
2cc0836d0ead15c0f6aaea198acfca32eee6fe2a
4711c23b3c14f2e552af0dfda4047cb94a86e7c9
/app/src/main/java/com/hsy/flightpacket/bean/dao/TeachActivity.java
2048e6af0ac436bbfe09be87ed1a10261b27bf4b
[]
no_license
pigeon88/FlightPacket
f391430d3b51c7821498854f1805b43f6767c7bb
49329dea8e5632ca3c769c28b110220d60f0849f
refs/heads/master
2020-04-10T08:54:40.030980
2018-12-08T08:24:19
2018-12-08T08:24:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,003
java
package com.hsy.flightpacket.bean.dao; import org.greenrobot.greendao.annotation.Entity; import org.greenrobot.greendao.annotation.Id; import org.greenrobot.greendao.annotation.Generated; import java.util.List; /** * Created by xiongweimin on 2018/8/9. */ @Entity public class TeachActivity { @Id(autoincrement = true) private Long id;//id private String jihao; private String jizhanghao; private Boolean shifei; private String zhengjia; private String fujia; private Long planId; public String getFujia() { return this.fujia; } public void setFujia(String fujia) { this.fujia = fujia; } public String getZhengjia() { return this.zhengjia; } public void setZhengjia(String zhengjia) { this.zhengjia = zhengjia; } public Boolean getShifei() { return this.shifei; } public void setShifei(Boolean shifei) { this.shifei = shifei; } public String getJizhanghao() { return this.jizhanghao; } public void setJizhanghao(String jizhanghao) { this.jizhanghao = jizhanghao; } public String getJihao() { return this.jihao; } public void setJihao(String jihao) { this.jihao = jihao; } public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } public Long getPlanId() { return this.planId; } public void setPlanId(Long planId) { this.planId = planId; } @Generated(hash = 78069223) public TeachActivity(Long id, String jihao, String jizhanghao, Boolean shifei, String zhengjia, String fujia, Long planId) { this.id = id; this.jihao = jihao; this.jizhanghao = jizhanghao; this.shifei = shifei; this.zhengjia = zhengjia; this.fujia = fujia; this.planId = planId; } @Generated(hash = 1213871707) public TeachActivity() { } }
[ "yangyuanping_cd@shishike.com" ]
yangyuanping_cd@shishike.com
b01c62e4a24152c7df666974c6d570a29df3d08d
b801d688e01ca0ea993c1a84e1bc164967258aff
/javase-sample/grpc-sample/src/main/java/com/github/jitwxs/sample/grpc/example2/Example2Client.java
9b7cc12a215528a5a95dc082b559cb5b0077796b
[ "Apache-2.0" ]
permissive
jitwxs/blog-sample
1a1e4152b48939baa5b09a2704dd089dfbe520ed
5123346e01a1ec94cc56b5afbd45732487d7ecb8
refs/heads/master
2022-02-24T06:04:26.341746
2022-02-16T14:11:26
2022-02-16T14:11:26
131,931,262
339
243
Apache-2.0
2021-09-20T15:25:44
2018-05-03T02:32:58
Java
UTF-8
Java
false
false
1,894
java
package com.github.jitwxs.sample.grpc.example2; import com.github.jitwxs.sample.grpc.common.ProtobufUtils; import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; import io.grpc.StatusRuntimeException; import com.github.jitwxs.sample.grpc.common.Constant; import com.github.jitwxs.sample.grpc.UserRpcProto; import com.github.jitwxs.sample.grpc.UserRpcServiceGrpc; import lombok.extern.slf4j.Slf4j; import java.util.Iterator; import java.util.concurrent.TimeUnit; /** * Grpc 客户端 * @author jitwxs * @date 2019年12月20日 1:06 */ @Slf4j public class Example2Client { public static void main(String[] args) throws Exception { // STEP1 构造 Channel 和 BlockingStub ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", Constant.RUNNING_PORT) // Channels are secure by default (via SSL/TLS). For the example we disable TLS to avoid needing certificates. .usePlaintext() .build(); UserRpcServiceGrpc.UserRpcServiceBlockingStub blockingStub = UserRpcServiceGrpc.newBlockingStub(channel); int requestAge = 20; log.info("Will try to query age = " + requestAge + " ..."); // STEP2 发起 gRPC 请求 UserRpcProto.AgeRequest request = UserRpcProto.AgeRequest.newBuilder().setAge(20).build(); try { Iterator<UserRpcProto.UserResponse> iterator = blockingStub.listByAgeStream(request); while (iterator.hasNext()) { UserRpcProto.UserResponse response = iterator.next(); log.info("Response: " + ProtobufUtils.toJson(response)); } } catch (StatusRuntimeException e) { log.error("RPC failed: {}", e.getStatus()); } finally { // STEP3 关闭 Channel channel.shutdown().awaitTermination(5, TimeUnit.SECONDS); } } }
[ "jitwxs@foxmail.com" ]
jitwxs@foxmail.com
9136a16deaea3607455be2549aa54a2a489d0249
f28dce60491e33aefb5c2187871c1df784ccdb3a
/src/main/java/com/prolificinteractive/materialcalendarview/spans/DotSpan.java
9a53653b997bf7a440e0cefa0100d5ea90d10413
[ "Apache-2.0" ]
permissive
JackChan1999/boohee_v5.6
861a5cad79f2bfbd96d528d6a2aff84a39127c83
221f7ea237f491e2153039a42941a515493ba52c
refs/heads/master
2021-06-11T23:32:55.977231
2017-02-14T18:07:04
2017-02-14T18:07:04
81,962,585
8
6
null
null
null
null
UTF-8
Java
false
false
1,205
java
package com.prolificinteractive.materialcalendarview.spans; import android.graphics.Canvas; import android.graphics.Paint; import android.text.style.LineBackgroundSpan; public class DotSpan implements LineBackgroundSpan { private static final float DEFAULT_RADIUS = 3.0f; private final int color; private final float radius; public DotSpan() { this.radius = 3.0f; this.color = 0; } public DotSpan(int color) { this.radius = 3.0f; this.color = color; } public DotSpan(float radius) { this.radius = radius; this.color = 0; } public DotSpan(float radius, int color) { this.radius = radius; this.color = color; } public void drawBackground(Canvas canvas, Paint paint, int left, int right, int top, int baseline, int bottom, CharSequence charSequence, int start, int end, int lineNum) { int oldColor = paint.getColor(); if (this.color != 0) { paint.setColor(this.color); } canvas.drawCircle((float) ((left + right) / 2), ((float) bottom) + this.radius, this .radius, paint); paint.setColor(oldColor); } }
[ "jackychan2040@gmail.com" ]
jackychan2040@gmail.com
efeb6842f660c4e623dfb625a00a575dc4149d25
61762955942bbf8c782a480cb8ce3616735323b4
/src/main/java/com/bow/bitmap/DeleteFashionException.java
295807df3e8c6702f67dcfe5b4ea17bac7f389e0
[]
no_license
williamxww/minibase
86e643bc5408f1e133ab0c13684e669eb46f01fd
fa78714a90378c0ee92a8d537e93eea4ffce3644
refs/heads/master
2021-07-05T19:13:16.156643
2017-09-29T15:35:28
2017-09-29T15:35:28
105,288,766
0
0
null
null
null
null
UTF-8
Java
false
false
295
java
package com.bow.bitmap; import com.bow.chainexception.*; public class DeleteFashionException extends ChainException { public DeleteFashionException() {super();} public DeleteFashionException(String s) {super(null,s);} public DeleteFashionException(Exception e, String s) {super(e,s);} }
[ "vivid_xiang@163.com" ]
vivid_xiang@163.com
1cdbe5295f141bdafee9784657da3c2de056d80b
ea219a5bd1bbd914be79896238add65be8f06ddf
/src/queues/QueueUsingTwoStacks.java
df1eb745e779d1da047fd34e81d86f7d97469ff1
[ "MIT" ]
permissive
TT-talhatariq/hackerrank-data-structures
e2e00f63636bddbc5505e4537d5e50ac523a9604
9fc16684368f02a5a943e3194a956d18b4a3906c
refs/heads/master
2023-02-10T02:50:48.928699
2021-01-03T18:47:43
2021-01-03T18:47:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
752
java
package queues; import java.util.LinkedList; import java.util.Scanner; public class QueueUsingTwoStacks { private static Scanner in = new Scanner(System.in); public static void main(String[] args) { int queries = in.nextInt(); performQueries(queries); } private static void performQueries(int queries){ LinkedList<Integer> linkedList = new LinkedList<>(); while (queries-- > 0){ int type = in.nextInt(); if(type == 1){ int data = in.nextInt(); linkedList.add(data); } else if(type == 2){ linkedList.pop(); } else { System.out.println(linkedList.peek()); } } } }
[ "anish_bt2k16@dtu.ac.in" ]
anish_bt2k16@dtu.ac.in
666d5e6c7443d8c259912b84798ddf378126e723
940405ba6161e6add4ccc79c5d520f81ff9f7433
/geonetwork-gaap/geonetwork-gaap-domain/src/main/java/org/geonetwork/gaap/domain/util/MetadataPermissionsFactory.java
0752e64b222644f3d5083bfb74474cb6e13eaa74
[]
no_license
isabella232/ebrim
e5276b1fc9a084811b3384b2e66b70337fdbe05c
949e6bad1f1db4dc089a0025e332aaf04ce14a84
refs/heads/master
2023-03-15T20:18:13.577538
2012-06-13T15:25:15
2012-06-13T15:25:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,425
java
package org.geonetwork.gaap.domain.util; import org.geonetwork.gaap.domain.group.Group; import org.geonetwork.gaap.domain.operation.MetadataPermissions; import org.geonetwork.gaap.domain.operation.Permission; import org.geonetwork.gaap.domain.operation.Operation; import java.util.Set; import java.util.HashSet; /** * Factory class for MetadataPermissions test * * @author Jose */ public class MetadataPermissionsFactory { public static MetadataPermissions create() { MetadataPermissions permissions = new MetadataPermissions(); permissions.setMetadataUuid("aaaa-bbbb-dddd-ssss"); Operation op = new Operation(); op.setName("view"); Set<Permission> operationsAllowed = new HashSet<Permission>(); Permission opAllowed = new Permission(); opAllowed.setMetadataUuid("aaaa-bbbb-dddd-ssss"); opAllowed.setOperation(op); Group group = new Group(); group.setUuid("ggg-aaa1"); opAllowed.setGroup(group); operationsAllowed.add(opAllowed); Permission opAllowed2 = new Permission(); opAllowed2.setMetadataUuid("aaaa-bbbb-dddd-ssss"); opAllowed2.setOperation(op); Group group2 = new Group(); group2.setUuid("ggg-aaa2"); opAllowed2.setGroup(group2); operationsAllowed.add(opAllowed2); permissions.setPermissions(operationsAllowed); return permissions; } public static MetadataPermissions create2() { MetadataPermissions permissions = new MetadataPermissions(); permissions.setMetadataUuid("aaaa-bbbb-dddd-ssss"); Operation op = new Operation(); op.setName("view"); Set<Permission> operationsAllowed = new HashSet<Permission>(); Permission opAllowed = new Permission(); opAllowed.setOperation(op); Group group = new Group(); group.setUuid("ggg-aaa1"); opAllowed.setGroup(group); operationsAllowed.add(opAllowed); Permission opAllowed2 = new Permission(); opAllowed2.setOperation(op); Group group2 = new Group(); group2.setUuid("ggg-aaa2"); opAllowed2.setGroup(group2); operationsAllowed.add(opAllowed2); permissions.setPermissions(operationsAllowed); return permissions; } }
[ "jesse.eichar@camptocamp.com" ]
jesse.eichar@camptocamp.com
f674ad4c44bfb66e52c1b00b189b325f30062c99
9957990444057b97f839474391840f91b83731f8
/src/main/java/org/zalando/intellij/swagger/completion/field/completion/swagger/ResponsesCompletion.java
3d72abc604901405e1ea112b1e4dd1f9423448f5
[ "MIT" ]
permissive
zalando/intellij-swagger
6a995ca51bbd8b2fd2c6252c9269129b5588e36b
e16b44c5294789b708206601e1cc9b47004d5437
refs/heads/master
2023-08-31T07:56:44.942335
2023-08-29T13:41:19
2023-08-29T13:41:19
58,516,325
1,209
96
MIT
2023-09-07T13:22:47
2016-05-11T05:21:18
Java
UTF-8
Java
false
false
666
java
package org.zalando.intellij.swagger.completion.field.completion.swagger; import com.intellij.codeInsight.completion.CompletionResultSet; import org.zalando.intellij.swagger.completion.CompletionHelper; import org.zalando.intellij.swagger.completion.field.FieldCompletion; import org.zalando.intellij.swagger.completion.field.model.common.CommonFields; class ResponsesCompletion extends FieldCompletion { ResponsesCompletion( final CompletionHelper completionHelper, final CompletionResultSet completionResultSet) { super(completionHelper, completionResultSet); } public void fill() { CommonFields.responses().forEach(this::addUnique); } }
[ "sebastian.h.monte@gmail.com" ]
sebastian.h.monte@gmail.com
0b6a2d0557279fb43dab73095a1cf72f28b35b59
5f5ba74d1def1357159dd3e157dfd432cd198e30
/src/interfazgraficausuario/Init.java
3ca282a5afe53df9e99439a4fa5e380530925848
[]
no_license
n-rogica/AccentureClase4
a224e2283991cc72627f561c11f2f9330a5f5b62
d5e89e528a297d6c4a42bf69f4be0293af8ce10e
refs/heads/master
2020-04-29T18:12:12.912394
2019-03-18T15:34:13
2019-03-18T15:34:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,633
java
package interfazgraficausuario; public class Init { public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Ventana.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Ventana.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Ventana.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Ventana.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> Incrementador i = new Incrementador(); java.awt.EventQueue.invokeLater(() -> new Ventana(i).setVisible(true)); } }
[ "arteysoft@gmail.com" ]
arteysoft@gmail.com
fbd18094780327a8140533cfd4bd4a1a2225b8bd
174927158a2846c6908f0154bbae3137c99b4c3a
/src/main/java/org/cosmo/common/util/ObjectRing.java
f755c103f78d131010795c637195e5682402d43d
[]
no_license
cosmoking/cosmo
6b71387d2b9f3cdfaa1f7c8cc93dc1bc9c2d2818
54701e3aef0104f3c910de2e5a08e91fe33ee841
refs/heads/master
2021-01-01T17:21:26.105294
2012-05-29T04:17:36
2012-05-29T04:17:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,564
java
/******************************************************************************* * Copyright 2012 Jack Wang * * 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.cosmo.common.util; import java.lang.reflect.Array; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReferenceArray; public class ObjectRing<T> { private AtomicInteger _cursor; private AtomicReferenceArray<T> _objects; private int _size; public ObjectRing (Class<T> objectClass, int size) { _objects = new AtomicReferenceArray(size); _cursor = new AtomicInteger(0); } public void insert (T object) { //_objects[_cursor.next()] = object; /* while(true) { int currentCursor = _cursor.get() ; int newCursor = (currentCursor + 1) % _size; T currentObject = _objects.get(currentCursor); if () _cursor.compareAndSet(currentCursor, newCursor)) { _objects[newCursor] = object; break; } } */ } }
[ "jackwang65@gmail.com" ]
jackwang65@gmail.com
7969c6c560b51fbb46df8a1a86fa377b0f5c4e5e
e0e2db0ba71f0a6f5d6251c8f3a22b17a135f5f2
/src/main/java/be/ceau/podcastparser/namespace/custom/impl/PromoDeejay.java
48f21bd7b3b675c863f4cdcad5c05f6413ab44c4
[ "Apache-2.0" ]
permissive
mdewilde/podcast-parser
8e456052c1f2ba192a91632069dd183db35cda38
319bea2956af19562aaef03ab80132953bbd3516
refs/heads/master
2022-11-22T17:36:54.246498
2019-07-17T19:05:32
2019-07-17T19:05:32
116,054,440
9
1
null
2022-11-16T12:36:27
2018-01-02T20:31:33
Java
UTF-8
Java
false
false
1,701
java
/* Copyright 2019 Marceau Dewilde <m@ceau.be> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package be.ceau.podcastparser.namespace.custom.impl; import javax.xml.stream.XMLStreamException; import be.ceau.podcastparser.PodcastParserContext; import be.ceau.podcastparser.models.core.Item; import be.ceau.podcastparser.models.support.OtherValueKey; import be.ceau.podcastparser.namespace.Namespace; public class PromoDeejay implements Namespace { private static final String NAME = "http://promodeejay.net/api/xml/"; @Override public String getName() { return NAME; } @Override public void process(PodcastParserContext ctx, Item item) throws XMLStreamException { switch (ctx.getReader().getLocalName()) { case "fileID": item.addOtherValue(OtherValueKey.PROMODEEJAY_FILE_ID, ctx.getElementText()); break; case "kind": item.addOtherValue(OtherValueKey.PROMODEEJAY_KIND, ctx.getElementText()); break; default : Namespace.super.process(ctx, item); break; } } } /* corpus statistics 40673 --> http://promodeejay.net/api/xml/ level=item localName=fileID attributes=[]] 40673 --> http://promodeejay.net/api/xml/ level=item localName=kind attributes=[]] */
[ "m@ceau.be" ]
m@ceau.be
77ed788ac3fb4395ff3958e9b5b4f79d1350fa70
6925337bc74e9f80527859651b9771cf33bc7d99
/input/code-fracz-645/sources/Class00000181Worse.java
ae1df1042a1a054f5f73e82fd608a75d9635a24d
[]
no_license
fracz/code-quality-tensorflow
a58bb043aa0a6438d7813b0398d12c998d70ab49
50dac5459faf44f1b7fa8321692a8c7c44f0d23c
refs/heads/master
2018-11-14T15:28:03.838106
2018-09-07T11:09:28
2018-09-07T11:09:28
110,887,549
0
0
null
null
null
null
UTF-8
Java
false
false
349
java
// original filename: 00040139.txt // before public class Class00000181Worse { @Override public PropertyConstraintRule writeNodePropertyExistenceConstraint(long ruleId, int label, int propertyKey) throws CreateConstraintFailureException { throw propertyExistenceConstraintsNotAllowed(new NodePropertyExistenceConstraint(label, propertyKey)); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
97c5141737674cc297c01b19ea8e1573bd65e62c
04cf8a62dc7c6cd872794b5bc2067500f31a277b
/app/src/main/java/com/zhizhong/farmer/module/order/activity/SelectOhterFarmerActivity.java
b4d30aaae38e02897d66c64c6b8b44236729c99f
[]
no_license
20180910/Farmer
3def5b87cb762766b5e191b7b3711b3848226568
2c3390f1ddf68d837e7b520fb8e5654189314a6f
refs/heads/master
2020-03-28T10:20:52.020803
2017-10-31T07:45:32
2017-10-31T07:45:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,784
java
package com.zhizhong.farmer.module.order.activity; import android.content.Intent; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.view.View; import com.github.baseclass.adapter.LoadMoreAdapter; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.zhizhong.farmer.GetSign; import com.zhizhong.farmer.R; import com.zhizhong.farmer.base.BaseActivity; import com.zhizhong.farmer.base.MySub; import com.zhizhong.farmer.module.my.activity.AddFarmerActivity; import com.zhizhong.farmer.module.order.Constant; import com.zhizhong.farmer.module.order.adapter.SelectOtherFarmerAdapter; import com.zhizhong.farmer.module.order.network.ApiRequest; import com.zhizhong.farmer.module.order.network.response.OtherFarmerObj; import com.zhizhong.farmer.module.order.network.request.XiaDingDanItem; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import butterknife.BindView; import butterknife.OnClick; /** * Created by administartor on 2017/8/5. */ public class SelectOhterFarmerActivity extends BaseActivity implements LoadMoreAdapter.OnLoadMoreListener{ @BindView(R.id.rv_select_other_farmer) RecyclerView rv_select_other_farmer; SelectOtherFarmerAdapter adapter; private String crops; private List<OtherFarmerObj> otherFarmerList; @Override protected int getContentView() { setAppTitle("选择其他农户"); setAppRightTitle("添加农户"); return R.layout.act_select_other_farmer; } @Override protected void initView() { crops=getIntent().getStringExtra(Constant.IParam.crops); String str = (String) getIntent().getSerializableExtra(Constant.IParam.otherFarmerBean); if(!TextUtils.isEmpty(str)){ otherFarmerList = new Gson().fromJson(str,new TypeToken<List<OtherFarmerObj>>(){}.getType()); } adapter=new SelectOtherFarmerAdapter(mContext,R.layout.item_other_farmer,pageSize); adapter.setCrops(crops); rv_select_other_farmer.setLayoutManager(new LinearLayoutManager(mContext)); rv_select_other_farmer.setAdapter(adapter); } @Override protected void initData() { showProgress(); getData(1,false); } private void getData(int page, boolean isLoad) { Map<String,String> map=new HashMap<String,String>(); map.put("user_id",getUserId()); map.put("crops",crops); map.put("sign", GetSign.getSign(map)); addSubscription(ApiRequest.getOtherFarmerList(map).subscribe(new MySub<List<OtherFarmerObj>>(mContext,pl_load) { @Override public void onMyNext(List<OtherFarmerObj> list) { if(isLoad){ pageNum++; adapter.addList(list,true); }else{ pageNum=2; adapter.setList(list,true); } } })); } @OnClick({R.id.tv_other_farmer_commit,R.id.app_right_tv}) protected void onViewClick(View v) { switch (v.getId()){ case R.id.app_right_tv: STActivityForResult(AddFarmerActivity.class,100); break; case R.id.tv_other_farmer_commit: List<OtherFarmerObj> list = adapter.getList(); if(isEmpty(list)){ showMsg("请选择农户"); return; } XiaDingDanItem obj=new XiaDingDanItem(); XiaDingDanItem.BodyBean bodyBean ; List<XiaDingDanItem.BodyBean>orderList=new ArrayList<>(); for (int i = 0; i < list.size(); i++) { OtherFarmerObj item = list.get(i); if(item.isSelect()&&item.isSelectHaiChong()){ bodyBean= new XiaDingDanItem.BodyBean(); bodyBean.setFarmer_id(item.getId()); /* bodyBean.setMs(item.getArea()); bodyBean.setName(item.getFarmers_name()); bodyBean.setDiseases_pests(item.getHaiChong()); if(item.isNeedZhuJi()){ bodyBean.setZhuji("需要"); }else{ bodyBean.setZhuji("自购"); } if(item.isNeedWeiFei()){ bodyBean.setWeifei("需要"); }else{ bodyBean.setWeifei("自购"); } if(item.isNeedNongYao()){ bodyBean.setLongyao("需要"); }else{ bodyBean.setLongyao("自购"); }*/ orderList.add(bodyBean); } } obj.setBody(orderList); if(orderList.size()==0||orderList==null){ showMsg("请选择农户和病虫害"); return; } Intent intent=new Intent(); intent.putExtra(Constant.IParam.otherFarmerBean,new Gson().toJson(list)); intent.putExtra(Constant.IParam.xiaDanBean,obj); setResult(RESULT_OK,intent); finish(); break; } } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(resultCode==RESULT_OK){ switch (requestCode){ case 100: showLoading(); Map<String,String> map=new HashMap<String,String>(); map.put("user_id",getUserId()); map.put("crops",crops); map.put("sign", GetSign.getSign(map)); addSubscription(ApiRequest.getOtherFarmerList(map).subscribe(new MySub<List<OtherFarmerObj>>(mContext,pl_load) { @Override public void onMyNext(List<OtherFarmerObj> list) { pageNum=2; adapter=new SelectOtherFarmerAdapter(mContext,R.layout.item_other_farmer,pageSize); adapter.setCrops(crops); adapter.setList(list,true); rv_select_other_farmer.setAdapter(adapter); } })); break; } } } @Override public void loadMore() { getData(pageNum,true); } }
[ "2380253499@qq.com" ]
2380253499@qq.com
1428e027c5915c7753e5bd8a6140e09ee7a4aded
e82c1473b49df5114f0332c14781d677f88f363f
/MED-CLOUD/med-service/src/main/java/nta/med/service/ihis/handler/nuri/NUR1123U00grdMasterHandler.java
d5c3865db3c18d90b2c63128ca76361872c8462f
[]
no_license
zhiji6/mih
fa1d2279388976c901dc90762bc0b5c30a2325fc
2714d15853162a492db7ea8b953d5b863c3a8000
refs/heads/master
2023-08-16T18:35:19.836018
2017-12-28T09:33:19
2017-12-28T09:33:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,073
java
package nta.med.service.ihis.handler.nuri; import java.util.List; import javax.annotation.Resource; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import org.vertx.java.core.Vertx; import nta.med.core.domain.nur.Nur0102; import nta.med.core.infrastructure.socket.handler.ScreenHandler; import nta.med.data.dao.medi.nur.Nur0102Repository; import nta.med.service.ihis.proto.CommonModelProto; import nta.med.service.ihis.proto.NuriServiceProto; import nta.med.service.ihis.proto.SystemServiceProto; import nta.med.service.ihis.proto.SystemServiceProto.ComboResponse; import nta.med.service.ihis.proto.NuriServiceProto.NUR1123U00grdMasterRequest; @Service @Scope("prototype") public class NUR1123U00grdMasterHandler extends ScreenHandler<NuriServiceProto.NUR1123U00grdMasterRequest, SystemServiceProto.ComboResponse> { @Resource private Nur0102Repository nur0102Repository; @Override @Transactional(readOnly = true) public ComboResponse handle(Vertx vertx, String clientId, String sessionId, long contextId, NUR1123U00grdMasterRequest request) throws Exception { SystemServiceProto.ComboResponse.Builder response = SystemServiceProto.ComboResponse.newBuilder(); String hospCode = getHospitalCode(vertx, sessionId); List<Nur0102> listInfo = nur0102Repository.findByCodeTypeLanguage(hospCode, "WATCH_TEMPLATE", getLanguage(vertx, sessionId)); if(!CollectionUtils.isEmpty(listInfo)){ for (Nur0102 nur0102 : listInfo) { CommonModelProto.ComboListItemInfo.Builder info = CommonModelProto.ComboListItemInfo.newBuilder() .setCode(nur0102.getCode() == null ? "" : nur0102.getCode()) .setCodeName(nur0102.getCodeName() == null ? "" : nur0102.getCodeName()); response.addComboItem(info); } } return response.build(); } }
[ "duc_nt@nittsusystem-vn.com" ]
duc_nt@nittsusystem-vn.com
8d6e3c025189a130152b7ff382c4679c32d0054c
ce37dfd57992fe46479e2fc444edf04bab78b30f
/SeleniumProject/src/dataDriven/ExcelOps.java
732f6ca9d62ae9f194fdb2252e540af5960fb4f4
[]
no_license
shaath/Swetha
4965a29e6b9404414c17e2bb16b866eded24720f
797a05895e2d5e291f645d2dfe3afa388d451967
refs/heads/master
2021-01-21T22:35:32.958697
2017-09-02T02:00:24
2017-09-02T02:00:24
102,165,472
0
0
null
null
null
null
UTF-8
Java
false
false
1,532
java
package dataDriven; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import method.OrgHRM; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; public class ExcelOps { public static void main(String[] args) throws IOException { OrgHRM om=new OrgHRM(); String xlpath="F:\\Swetha_Recordings\\Swetha\\SeleniumProject\\src\\testdata\\Emp_TestData.xlsx"; String xlout="F:\\Swetha_Recordings\\Swetha\\SeleniumProject\\src\\results\\EmpRes.xlsx"; FileInputStream fi=new FileInputStream(xlpath); XSSFWorkbook wb=new XSSFWorkbook(fi); XSSFSheet ws=wb.getSheet("Empreg"); // XSSFRow r=ws.getRow(8); // XSSFCell c=r.getCell(0); // System.out.println(c.getStringCellValue()); int rc=ws.getLastRowNum(); System.out.println(rc); om.org_Launch("http://opensource.demo.orangehrmlive.com"); om.org_Login("Admin", "admin"); for (int i = 1; i <= rc; i++) { XSSFRow r=ws.getRow(i); XSSFCell c1=r.getCell(0); XSSFCell c2=r.getCell(1); XSSFCell c3=r.createCell(2); String f=c1.getStringCellValue(); String l=c2.getStringCellValue(); System.out.println(f+"---"+l); String res=om.org_Empreg(f, l); c3.setCellValue(res); } FileOutputStream fo=new FileOutputStream(xlout); wb.write(fo); wb.close(); om.org_Logout(); om.org_Close(); } }
[ "you@example.com" ]
you@example.com
4605e9f0c21aaa9fbf97fdbf7c841ed89cb9a21f
1ce518b09521578e26e79a1beef350e7485ced8c
/source/app/src/main/java/com/newrelic/agent/android/measurement/producer/CustomMetricProducer.java
995bc1d4ad6017800ff471cdbe1891d19500eae8
[]
no_license
yash2710/AndroidStudioProjects
7180eb25e0f83d3f14db2713cd46cd89e927db20
e8ba4f5c00664f9084f6154f69f314c374551e51
refs/heads/master
2021-01-10T01:15:07.615329
2016-04-03T09:19:01
2016-04-03T09:19:01
55,338,306
1
1
null
null
null
null
UTF-8
Java
false
false
1,816
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.newrelic.agent.android.measurement.producer; import com.newrelic.agent.android.measurement.CustomMetricMeasurement; import com.newrelic.agent.android.measurement.MeasurementType; import com.newrelic.agent.android.metric.MetricUnit; // Referenced classes of package com.newrelic.agent.android.measurement.producer: // BaseMeasurementProducer public class CustomMetricProducer extends BaseMeasurementProducer { public CustomMetricProducer() { super(MeasurementType.Custom); } public void produceMeasurement(String s, String s1, int i, double d, double d1) { produceMeasurement(s1, s, i, d, d1, null, null); } public void produceMeasurement(String s, String s1, int i, double d, double d1, MetricUnit metricunit, MetricUnit metricunit1) { StringBuffer stringbuffer = new StringBuffer(); stringbuffer.append(s1.replaceAll("[/\\[\\]|*]", "")); stringbuffer.append("/"); stringbuffer.append(s.replaceAll("[/\\[\\]|*]", "")); if (metricunit != null || metricunit1 != null) { stringbuffer.append("["); if (metricunit1 != null) { stringbuffer.append(metricunit1.getLabel()); } if (metricunit != null) { stringbuffer.append("|"); stringbuffer.append(metricunit.getLabel()); } stringbuffer.append("]"); } produceMeasurement(((com.newrelic.agent.android.measurement.Measurement) (new CustomMetricMeasurement(stringbuffer.toString(), i, d, d1)))); } }
[ "13bce123@nirmauni.ac.in" ]
13bce123@nirmauni.ac.in
a64422e534323525d403018a960fd70262977bed
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-78b-3-5-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/apache/commons/math/ode/events/EventState_ESTest.java
705b65294429881d431dcc8904f2b7f8aeb7e379
[]
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
1,924
java
/* * This file was automatically generated by EvoSuite * Tue Jan 21 22:27:15 UTC 2020 */ package org.apache.commons.math.ode.events; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import org.apache.commons.math.ode.events.EventHandler; import org.apache.commons.math.ode.events.EventState; import org.apache.commons.math.ode.sampling.StepInterpolator; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class EventState_ESTest extends EventState_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { EventHandler eventHandler0 = mock(EventHandler.class, new ViolatedAssumptionAnswer()); doReturn((-1.0), 1.1, 0.0).when(eventHandler0).g(anyDouble() , any(double[].class)); EventState eventState0 = new EventState(eventHandler0, 1.557407724654902, 0.0, (-279)); double[] doubleArray0 = new double[2]; StepInterpolator stepInterpolator0 = mock(StepInterpolator.class, new ViolatedAssumptionAnswer()); doReturn(Double.POSITIVE_INFINITY).when(stepInterpolator0).getCurrentTime(); doReturn((Object) doubleArray0, (Object) null, (Object) null).when(stepInterpolator0).getInterpolatedState(); doReturn(false, false).when(stepInterpolator0).isForward(); boolean boolean0 = eventState0.evaluateStep(stepInterpolator0); assertFalse(eventState0.stop()); assertEquals(0.0, eventState0.getConvergence(), 0.01); assertEquals(Double.NaN, eventState0.getEventTime(), 0.01); assertEquals((-279), eventState0.getMaxIterationCount()); assertTrue(boolean0); assertEquals(1.557407724654902, eventState0.getMaxCheckInterval(), 0.01); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
9b7f5ee8df517506f5d1d8848ad4ede3f98473e0
b2e1f2d9f9964372a5d033e33da495914a680e6a
/redis/redis-meta/src/test/java/com/ctrip/xpipe/redis/meta/server/cluster/AbstractMetaServerClusterTest.java
140ae408829824b99e3656a0917d97ed86e0d05f
[ "Apache-2.0" ]
permissive
nereuschen/x-pipe
5dcd20289500af5108e9723f28b28a7464a37261
1ad41ab085fc522fa900d27b0893d4a06d5a8764
refs/heads/master
2021-05-03T13:25:23.836886
2016-10-26T09:45:50
2016-10-26T09:45:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,965
java
package com.ctrip.xpipe.redis.meta.server.cluster; import java.util.LinkedList; import java.util.List; import org.apache.curator.framework.CuratorFramework; import org.junit.Before; import org.springframework.context.ApplicationContext; import com.ctrip.xpipe.redis.meta.server.AbstractMetaServerTest; import com.ctrip.xpipe.redis.meta.server.TestMetaServer; import com.ctrip.xpipe.zk.ZkClient; import com.ctrip.xpipe.zk.impl.DefaultZkClient; /** * @author wenchao.meng * * Jul 26, 2016 */ public class AbstractMetaServerClusterTest extends AbstractMetaServerTest{ private int zkPort = portUsable(defaultZkPort()); @Before public void beforeAbstractMetaServerClusterTest(){ startZk(zkPort); } protected CuratorFramework getCuratorFramework() throws Exception{ return getCuratorFramework(zkPort); } protected CuratorFramework getCuratorFramework(int zkPort) throws Exception{ ZkClient client = new DefaultZkClient(); client.setZkAddress(String.format("localhost:%d", zkPort)); client.initialize(); client.start(); return client.get(); } @Override protected ApplicationContext createSpringContext() { return null; } protected void createMetaServers(int serverCount) throws Exception{ for(int i=0 ; i<serverCount ; i++){ int port = portUsable(defaultMetaServerPort()); TestMetaServer testMetaServer = new TestMetaServer(i + 1, port, zkPort); testMetaServer.initialize(); testMetaServer.start(); add(testMetaServer); } } public List<TestMetaServer> getServers() { return new LinkedList<>(getRegistry().getComponents(TestMetaServer.class).values()); } public TestMetaServer getLeader(){ for(TestMetaServer server : getServers()){ if(server.isLeader()){ return server; } } return null; } public TestMetaServer getRandomNotLeader(){ for(TestMetaServer server : getServers()){ if(!server.isLeader()){ return server; } } return null; } }
[ "oytmfc@gmail.com" ]
oytmfc@gmail.com
e8dc91f5c0eec9b3d756863ac23aa465de517b06
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project47/src/test/java/org/gradle/test/performance47_2/Test47_145.java
e384db886b6852606c5436b1e64912cb45c1762f
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance47_2; import static org.junit.Assert.*; public class Test47_145 { private final Production47_145 production = new Production47_145("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
940189193c5c2dcf7f1084ba5a08bd120c3053e2
05102319b57b59ac4c72296f126e7deab8aa4285
/src/main/java/net/imglib2/ops/function/real/RealMaxFunction.java
34bc39057e249a4c2ccd3e26b098d7fd540f2d9c
[ "BSD-2-Clause" ]
permissive
imagej/imagej-deprecated
2874c811f0ac1056785903d337542a7745d53127
484e5885a23cdc43a746f08fbae6823dfda88d61
refs/heads/master
2023-09-05T17:46:38.321427
2023-04-21T21:21:42
2023-04-21T21:21:42
42,454,800
0
2
BSD-2-Clause
2023-04-21T21:19:58
2015-09-14T14:45:39
Java
UTF-8
Java
false
false
2,203
java
/* * #%L * ImageJ2 software for multidimensional image processing and analysis. * %% * Copyright (C) 2009 - 2023 ImageJ2 developers. * %% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * #L% */ package net.imglib2.ops.function.real; import net.imglib2.ops.function.Function; import net.imglib2.type.numeric.RealType; /** * Computes the maximum value another function takes on across a region. * * @author Barry DeZonia * @deprecated Use net.imagej.ops instead. */ @Deprecated public class RealMaxFunction<T extends RealType<T>> extends AbstractRealStatFunction<T> { // -- constructor -- public RealMaxFunction(Function<long[],T> otherFunc) { super(otherFunc); } // -- abstract method overrides -- @Override protected double value(StatCalculator<T> calc) { return calc.max(); } // -- Function methods -- @Override public RealMaxFunction<T> copy() { return new RealMaxFunction<T>(otherFunc.copy()); } }
[ "ctrueden@wisc.edu" ]
ctrueden@wisc.edu
c5619639cfca86baac9155ba0f5c93060a083388
7b74527c03af2c0aa909d936a45315faae70264b
/kettle-plugins/hdfs/src/test/java/org/pentaho/big/data/kettle/plugins/hdfs/vfs/HadoopVfsFileChooserDialogTest.java
1e500ea94e779dd5c5f5fc5ceacf04dd7b7b2fa8
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
LoseYourself/big-data-plugin-8.0
22d7a9a24f3d2f1ddf27d62287b65a41bbd38da8
0cc7b301bc59d6da1507f90df66464efc3de96d0
refs/heads/master
2020-03-14T21:03:43.191289
2018-05-04T02:06:32
2018-05-04T02:06:32
131,788,250
4
2
Apache-2.0
2018-05-17T05:43:32
2018-05-02T02:36:06
Java
UTF-8
Java
false
false
4,572
java
/******************************************************************************* * * Pentaho Big Data * * Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com * ******************************************************************************* * * 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.pentaho.big.data.kettle.plugins.hdfs.vfs; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Tree; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.pentaho.big.data.api.cluster.NamedClusterService; import org.pentaho.big.data.plugins.common.ui.NamedClusterWidgetImpl; import org.pentaho.runtime.test.RuntimeTester; import org.pentaho.runtime.test.action.RuntimeTestActionService; import org.pentaho.vfs.ui.VfsBrowser; import org.pentaho.vfs.ui.VfsFileChooserDialog; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doCallRealMethod; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.times; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; public class HadoopVfsFileChooserDialogTest { private HadoopVfsFileChooserDialog hadoopVfsFileChooserDialog = null; private static final Integer SELECTED_INDEX = -1; private static final String[] NAMED_CLUSTER_NAMES = {"name1", "name2", "name3"}; @Before public void Initialization() { hadoopVfsFileChooserDialog = mock( HadoopVfsFileChooserDialog.class ); } @After public void finalize() { hadoopVfsFileChooserDialog = null; } @Test public void testActivate() { doCallRealMethod().when( hadoopVfsFileChooserDialog ).activate(); VfsFileChooserDialog vfsFileChooserDialog = mock( VfsFileChooserDialog.class ); Combo combo = mock( Combo.class ); Tree tree = mock( Tree.class ); VfsBrowser vfsBrowser = mock( VfsBrowser.class ); doNothing().when( combo ).setText( anyString() ); vfsFileChooserDialog.openFileCombo = combo; doNothing().when( tree ).removeAll(); vfsBrowser.fileSystemTree = tree; vfsFileChooserDialog.vfsBrowser = vfsBrowser; doCallRealMethod().when( vfsFileChooserDialog ).setRootFile( null ); doCallRealMethod().when( vfsFileChooserDialog ).setInitialFile( null ); hadoopVfsFileChooserDialog.vfsFileChooserDialog = vfsFileChooserDialog; NamedClusterWidgetImplExtend namedClusterWidgetImpl = mock( NamedClusterWidgetImplExtend.class ); Combo namedClusterCombo = mock( Combo.class ); when( namedClusterCombo.getSelectionIndex() ).thenReturn( SELECTED_INDEX ); doNothing().when( namedClusterCombo ).removeAll(); doNothing().when( namedClusterCombo ).setItems( any() ); doNothing().when( namedClusterCombo ).select( SELECTED_INDEX ); when( namedClusterWidgetImpl.getNameClusterCombo() ).thenReturn( namedClusterCombo ); when( namedClusterWidgetImpl.getNamedClusterNames() ).thenReturn( NAMED_CLUSTER_NAMES ); doCallRealMethod().when( namedClusterWidgetImpl ).initiate(); doNothing().when( namedClusterWidgetImpl ).setSelectedNamedCluster( anyString() ); when( hadoopVfsFileChooserDialog.getNamedClusterWidget() ).thenReturn( namedClusterWidgetImpl ); hadoopVfsFileChooserDialog.activate(); verify( namedClusterWidgetImpl, times( 1 ) ).initiate(); } private class NamedClusterWidgetImplExtend extends NamedClusterWidgetImpl { public NamedClusterWidgetImplExtend( Composite parent, boolean showLabel, NamedClusterService namedClusterService, RuntimeTestActionService runtimeTestActionService, RuntimeTester clusterTester ) { super( parent, showLabel, namedClusterService, runtimeTestActionService, clusterTester ); } /*Overriding for visibility change only*/ @Override public String[] getNamedClusterNames() { return super.getNamedClusterNames(); } } }
[ "snj1314@163.com" ]
snj1314@163.com
efcff3ab618ea9353a3b4692da440a94100d8efb
c1986ccc437bbb5cfe61a6d60ba4fad189d910c2
/src/T3/IS_RPG_MAS_39393_40581_41038/lib/JADE/src/examples/ontology/ontologyServer/SetTime.java
957dd614763676b1f1ccc85d4af39950325b9f82
[]
no_license
dmr-goncalves/IS
7da569f0ae7350707dc3aec0c2cda1362aff4052
c948c8faa6c8a8b4af7f5ffd0d7bf1e1b8575b99
refs/heads/master
2021-01-21T20:16:11.745204
2017-06-10T15:53:35
2017-06-10T15:53:35
90,955,246
0
0
null
null
null
null
UTF-8
Java
false
false
299
java
package examples.ontology.ontologyServer; import java.util.Date; import jade.content.AgentAction; public class SetTime implements AgentAction { private Date time; public Date getTime() { return time; } public void setTime(Date time) { this.time = time; } }
[ "dmr.goncalves@campus.fct.unl.pt" ]
dmr.goncalves@campus.fct.unl.pt
c8b03906f6d64eec21dd091629872b9aa5b78152
da6dd8545876016e60d1e78480b44502b166a3d6
/app/src/main/java/com/wnw/lovebaby/bean/address/County.java
2cefaeac7ebd63fae31f96d206817404e0a27cdb
[]
no_license
wangnaiwen/LoveBabyAndroid
109560c96eee1d5912b3f4a752c5943db39b6f6b
7690f43ea7b6f8116616e80f0d8cb85f9f3b7854
refs/heads/master
2020-06-13T01:42:51.203861
2017-06-05T11:49:39
2017-06-05T11:49:39
75,467,434
0
0
null
null
null
null
UTF-8
Java
false
false
458
java
package com.wnw.lovebaby.bean.address; /** * Created by wnw on 2016/12/14. */ public class County { private String areaId; private String areaName; public String getAreaId() { return areaId; } public void setAreaId(String areaId) { this.areaId = areaId; } public String getAreaName() { return areaName; } public void setAreaName(String areaName) { this.areaName = areaName; } }
[ "1464524269@qq.com" ]
1464524269@qq.com