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
1fcbec2082db804f440019447fb9fa9c61980a74
441fa6c927cbb51cfccfc412d9382268f5df78d0
/hibernate_manytomany/hibernate_inheritance_tableperclass/src/main/java/com/mycompany/hibernate_inheritance_tableperclass/CD.java
e33e8d128f1f8133ff369e1258dbb4d1c52e2b39
[]
no_license
Anusha-A/Spring-All-projects
dbdd1f891d16e8d4e21856a1f384a796ffc5f1f1
c35f1f6e55deeff4b57b76c9afb5d7af9251d14c
refs/heads/master
2022-07-16T06:05:16.118904
2019-12-15T02:25:46
2019-12-15T02:25:46
228,117,890
0
0
null
2022-06-21T02:26:58
2019-12-15T02:27:47
CSS
UTF-8
Java
false
false
709
java
package com.mycompany.hibernate_inheritance_tableperclass; import java.util.Date; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.Table; import lombok.Data; @Entity @Table(name = "cd") @Data @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) public class CD { @Id private int id; private String title; private String artist; private Date purchaseDate; private double cost; public CD() { } public CD(String title, String artist, Date purchaseDate, double cost) { this.title = title; this.artist = artist; this.purchaseDate = purchaseDate; this.cost = cost; } }
[ "b8ibmjava29@iiht.tech" ]
b8ibmjava29@iiht.tech
87473925dce49a5844f5ef2edde1694bac8796c1
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/10/10_529a4e71bf37618977f82a33485ba6d7bb3e3884/ApiModel/10_529a4e71bf37618977f82a33485ba6d7bb3e3884_ApiModel_s.java
c913a53ebd6b174f2e9d6d70a2c5ff688ec8df71
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,913
java
package com.astrider.sfc.src.model; import java.util.ArrayList; import javax.servlet.http.HttpServletRequest; import com.astrider.sfc.app.lib.BaseModel; import com.astrider.sfc.app.lib.Mapper; import com.astrider.sfc.app.lib.Validator; import com.astrider.sfc.src.helper.SanteUtils; import com.astrider.sfc.src.helper.WeeklyLogUtils; import com.astrider.sfc.src.model.dao.NutrientDao; import com.astrider.sfc.src.model.dao.UserStatsDao; import com.astrider.sfc.src.model.dao.WeeklyLogDao; import com.astrider.sfc.src.model.vo.db.NutrientVo; import com.astrider.sfc.src.model.vo.db.UserStatsVo; import com.astrider.sfc.src.model.vo.db.UserVo; import com.astrider.sfc.src.model.vo.db.WeeklyLogVo; import com.astrider.sfc.src.model.vo.form.AddNutrientFormVo; /** * API関連Model. * * @author astrider * */ public class ApiModel extends BaseModel { /** * ユーザーステータス取得API. * * @param request * @return */ public boolean getStats(HttpServletRequest request) { UserVo user = SanteUtils.getLoginUser(request); if (user == null) { return returnFailStatus(request); } UserStatsDao userStatsDao = new UserStatsDao(); UserStatsVo userStats = userStatsDao.selectByUserId(user.getUserId()); userStatsDao.close(); if (userStats == null) { return returnFailStatus(request); } request.setAttribute("userStats", userStats); request.setAttribute("success", true); return true; } /** * 栄養素取得API. * * @param request * @return */ public boolean getNutrients(HttpServletRequest request) { UserVo user = SanteUtils.getLoginUser(request); if (user == null) { return returnFailStatus(request); } WeeklyLogVo weekVo = WeeklyLogUtils.getCurrentLog(user.getUserId()); NutrientDao nutrientDao = new NutrientDao(); ArrayList<NutrientVo> nutrients = nutrientDao.selectAll(); nutrientDao.close(); request.setAttribute("ingested", weekVo); request.setAttribute("desired", nutrients); request.setAttribute("success", true); return true; } /** * 円グラフ用API. * * @param request * @return */ public boolean getChartSource(HttpServletRequest request) { UserVo user = SanteUtils.getLoginUser(request); if (user == null) { return returnFailStatus(request); } // requestParametersからweekAgoを取得 int weekAgo = 0; try { weekAgo = Integer.valueOf(request.getParameter("weekAgo")); if (weekAgo < 0) { weekAgo = 0; } } catch (NumberFormatException e) { weekAgo = 0; } double[] items = SanteUtils.getNutrientBalances(user.getUserId(), weekAgo); if (items == null) { return returnFailStatus(request); } request.setAttribute("items", items); request.setAttribute("success", true); return true; } public boolean addNutrient(HttpServletRequest request) { UserVo user = SanteUtils.getLoginUser(request); if (user == null) { return returnFailStatus(request); } Mapper<AddNutrientFormVo> mapper = new Mapper<AddNutrientFormVo>(); AddNutrientFormVo form = mapper.fromHttpRequest(request); Validator<AddNutrientFormVo> validator = new Validator<AddNutrientFormVo>(form); if (!validator.valid()) { return returnFailStatus(request); } WeeklyLogDao weeklyLogDao = new WeeklyLogDao(); WeeklyLogVo weeklyLog = weeklyLogDao.selectCurrentWeek(user.getUserId()); addNutrientToAmountById(weeklyLog, form.getNutrientId(), form.getAmount()); weeklyLogDao.update(weeklyLog); weeklyLogDao.close(); WeeklyLogUtils.updateCurrentTotalBalance(user.getUserId()); request.setAttribute("success", true); return true; } private boolean returnFailStatus(HttpServletRequest request) { request.setAttribute("success", false); request.setAttribute("message", "failed"); return false; } private void addNutrientToAmountById(WeeklyLogVo weeklyLog, int nutrientId, int amount) { switch (nutrientId) { case 1: weeklyLog.setMilk(weeklyLog.getMilk() + amount); break; case 2: weeklyLog.setEgg(weeklyLog.getEgg() + amount); break; case 3: weeklyLog.setMeat(weeklyLog.getMeat() + amount); break; case 4: weeklyLog.setBean(weeklyLog.getBean() + amount); break; case 5: weeklyLog.setVegetable(weeklyLog.getVegetable() + amount); break; case 6: weeklyLog.setFruit(weeklyLog.getFruit() + amount); break; case 7: weeklyLog.setMineral(weeklyLog.getMineral() + amount); break; case 8: weeklyLog.setCrop(weeklyLog.getCrop() + amount); break; case 9: weeklyLog.setPotato(weeklyLog.getPotato() + amount); break; case 10: weeklyLog.setFat(weeklyLog.getFat() + amount); break; case 11: weeklyLog.setSuguar(weeklyLog.getSuguar() + amount); break; default: break; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ef0609d03d7e904c332a528742d2c55992c0d3ed
1ef2c6182582592157414cd0aaf0a3f629e1bf25
/joy-plugins/src/main/java/org/joy/plugin/monitor/jdbc/jwebap/JwebapJdbcPlugin.java
8997fbbff90ba1f6e2774aff9b9735454635f7e9
[]
no_license
zenjava/joy
95af28c0eeb7213ae2a42a12f9a8e41d29b8fda9
dc1eb57dfe0429455b18c833302ef2b34fd7d0a5
refs/heads/master
2021-01-22T19:30:44.484376
2014-10-31T06:06:16
2014-10-31T06:06:18
34,838,163
1
0
null
2015-04-30T06:30:54
2015-04-30T06:30:54
null
UTF-8
Java
false
false
1,257
java
package org.joy.plugin.monitor.jdbc.jwebap; import org.joy.core.init.service.IPlugin; import org.joy.core.init.support.properties.JoyProperties; import org.joy.plugin.monitor.jdbc.jwebap.model.po.TSysSqlLog; import org.jwebap.startup.Startup; import org.springframework.stereotype.Component; import java.net.URL; /** * JwebapJdbc插件,使用jwebap项目的jdbc监控部分,用于sql性能监控和参数填充 * * @since 1.0.0 * @author Kevice * @time 2013-2-5 上午12:39:07 */ @Component public class JwebapJdbcPlugin implements IPlugin { public String getName() { return "Jwebap JDBC监控"; } public void startup() { } //TODO public static void preInit() { URL url = JwebapJdbcPlugin.class.getClassLoader().getResource("conf/jwebap.xml"); Startup.startup(url); } public void destroy() { } public boolean isEnabled() { return JoyProperties.PLUGIN_JWEBAP_JDBC_ENABLED; } public int getInitPriority() { return 0; } @Override public String getSqlMigrationPrefix() { return "JWEBAP_JDBC"; } @Override public String getPoPackage() { return TSysSqlLog.class.getPackage().getName(); } @Override public String getCtxConfLocation() { return "classpath*:/conf/plugin-appCtx-jwebap-jdbc.xml"; } }
[ "kevice@qq.com" ]
kevice@qq.com
ed4427208800bd6ba64d0ab4b8e5e1356d5cd023
7a682dcc4e284bced37d02b31a3cd15af125f18f
/bitcamp-java-basic/src/main/java/design_pattern/composite/Node.java
15717993367dca076e23e41fa74b6f0bc6f01a46
[]
no_license
eomjinyoung/bitcamp-java-20190527
a415314b74954f14989042c475a4bf36b7311a8c
09f1b677587225310250078c4371ed94fe428a35
refs/heads/master
2022-03-15T04:33:15.248451
2019-11-11T03:33:58
2019-11-11T03:33:58
194,775,330
4
3
null
null
null
null
UTF-8
Java
false
false
195
java
package design_pattern.composite; public abstract class Node { protected String title; public String getTitle() { return this.title; } public abstract void getFileInfo(); }
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
71f17ce61916f889ff9919f05c608252de79e531
56d1c5242e970ca0d257801d4e627e2ea14c8aeb
/src/com/csms/leetcode/number/n400/n420/Leetcode423.java
0a1f765486e84e49f863188bfdd26cc0a2f6230c
[]
no_license
dai-zi/leetcode
e002b41f51f1dbd5c960e79624e8ce14ac765802
37747c2272f0fb7184b0e83f052c3943c066abb7
refs/heads/master
2022-12-14T11:20:07.816922
2020-07-24T03:37:51
2020-07-24T03:37:51
282,111,073
0
0
null
null
null
null
UTF-8
Java
false
false
160
java
package com.csms.leetcode.number.n400.n420; //从英文中重建数字 //中等 public class Leetcode423 { public static void main(String[] args) { } }
[ "liuxiaotongdaizi@sina.com" ]
liuxiaotongdaizi@sina.com
04f1bbd15a3c3f5efbffe3900d0c0ed775c1ab1f
9f600afe3594baa02a5ea894f263bb44f50d849d
/src/main/java/org/syaku/blog/user/web/UserController.java
dc69ce6c6c97926b5167792179f0ad2fe1088097
[]
no_license
syakuis/syaku-blog
535c156ca2d75b73ace4a886256ce7cc1a5ca003
ff70110612cd8787e931dad77e8c6297ae60b246
refs/heads/master
2021-10-27T03:29:36.959240
2021-10-16T07:10:44
2021-10-16T07:10:44
152,211,259
3
1
null
2021-10-16T07:10:44
2018-10-09T07:57:47
Java
UTF-8
Java
false
false
805
java
package org.syaku.blog.user.web; import org.springframework.security.core.Authentication; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @author Seok Kyun. Choi. 최석균 (Syaku) * @since 29/10/2018 */ @RestController @RequestMapping("/user") public class UserController { @GetMapping public User info(Authentication authentication) { if (authentication == null) { throw new UsernameNotFoundException("사용자 정보가 없습니다."); } return (User) authentication.getPrincipal(); } }
[ "syaku@naver.com" ]
syaku@naver.com
d85d2a5ce6bf7610aac20568ef5c0047fe9072f7
ec8b504ca6cb48276c3a633858eeae27be5360fc
/src/main/java/id/ac/tazkia/payment/virtualaccount/dao/VirtualAccountDao.java
1e7c3e32dccbf9fc3c0ca22e706d5c0747699ca0
[ "Apache-2.0" ]
permissive
marcianorama/aplikasi-tagihan
d01192ad3eff4c5640d1e00d966a91e27099af06
a25f97d79c88d950973659034116284aa70757ba
refs/heads/master
2020-03-24T03:10:24.734281
2018-07-26T07:48:42
2018-07-26T07:48:42
142,401,501
0
0
Apache-2.0
2018-07-26T06:57:07
2018-07-26T06:57:07
null
UTF-8
Java
false
false
805
java
package id.ac.tazkia.payment.virtualaccount.dao; import id.ac.tazkia.payment.virtualaccount.entity.Tagihan; import id.ac.tazkia.payment.virtualaccount.entity.VaStatus; import id.ac.tazkia.payment.virtualaccount.entity.VirtualAccount; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.repository.PagingAndSortingRepository; import java.util.List; public interface VirtualAccountDao extends PagingAndSortingRepository<VirtualAccount, String> { Iterable<VirtualAccount> findByVaStatus(VaStatus status); List<VirtualAccount> findByVaStatusAndTagihanNomor(VaStatus status, String nomor); Page<VirtualAccount> findByTagihan(Tagihan tagihan, Pageable page); Iterable<VirtualAccount> findByTagihan(Tagihan tagihan); }
[ "endy.muhardin@gmail.com" ]
endy.muhardin@gmail.com
ba72a77baff463e208eb5286dc2289fd46979c31
54c2a7eb2650a2f846fbb742d719303b0f70ae56
/src/com/loiane/cursojava/aula34/exercicios/ex03/CalculadoraFatorial.java
024b5e1cf130021cd1afbeed921ca027c96fdb3f
[]
no_license
Edufreitass/curso-java-basico
9d60bcd8adfad2bb0081bd9ebf16542cce018d51
ef132d04d4faa445af93e1cc4c4e49a4c869d22e
refs/heads/master
2022-11-15T06:06:52.429957
2020-07-08T15:55:47
2020-07-08T15:55:47
263,933,638
0
0
null
null
null
null
UTF-8
Java
false
false
818
java
package com.loiane.cursojava.aula34.exercicios.ex03; public class CalculadoraFatorial { public static int somar(int num1, int num2) { return num1 + num2; } public static int subtrair(int num1, int num2) { return num1 - num2; } public static int multiplicar(int num1, int num2) { return num1 * num2; } public static int dividir(int num1, int num2) { return num1 / num2; } public static int potencia(int num1, int num2) { int total = 1; for (int i = 1; i <= num2; i++) { total *= num1; } return total; } // método que calcula o Fatorial de x número // Exemplo: 5! = 5 * 4 * 3 * 2 * 1 = 120 // Exemplo: 0! = 1 public static int fatorial(int num) { if (num == 0) { return 1; } int total = 1; for (int i = num; i > 1; i--) { total *= i; } return total; } }
[ "eduardoflorencio96@gmail.com" ]
eduardoflorencio96@gmail.com
f6f83d5236bd1563b5f0ab4e9522050bf4031976
74fa4023d7846a0dab608b00f9b6f0974130340e
/ecs-20140526/java/src/main/java/com/aliyun/ecs20140526/models/DeleteDemandRequest.java
c8cbf76facf0574bfe540faa24d58c40fc4df054
[ "Apache-2.0" ]
permissive
plusxp/alibabacloud-sdk
b36811a6df7d5697800ae0f7be22b73bd43d203e
3b7dcc63434bf6df6342c54fcd2ae933486a1c92
refs/heads/master
2023-03-10T10:05:44.907699
2021-02-28T11:28:00
2021-02-28T11:28:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
671
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.ecs20140526.models; import com.aliyun.tea.*; public class DeleteDemandRequest extends TeaModel { @NameInMap("ClientToken") public String clientToken; @NameInMap("RegionId") @Validation(required = true) public String regionId; @NameInMap("DemandId") @Validation(required = true) public String demandId; @NameInMap("Reason") public String reason; public static DeleteDemandRequest build(java.util.Map<String, ?> map) throws Exception { DeleteDemandRequest self = new DeleteDemandRequest(); return TeaModel.build(map, self); } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
95bfae0333fcc24ad31a32d31aa60efddb4a2a36
ea445dc364e38cacda8b48b261d38a689b0010ca
/tipi/com.dexels.navajo.tipi.swing.swingx/src/com/dexels/navajo/tipi/swingx/TipiExtendedTable.java
49dd5384edcab741fdaf1b4c41cc939d9a577c35
[]
no_license
flyaruu/navajo
db6e846177d9f33dcb618abe8e127613dc96c139
07c5fa4f8c04eeab48877f8c518b292358e1094e
refs/heads/master
2020-12-25T12:40:59.356106
2012-05-31T17:02:20
2012-05-31T17:02:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,119
java
package com.dexels.navajo.tipi.swingx; import java.util.List; import java.util.regex.Pattern; import javax.swing.JScrollPane; import org.jdesktop.swingx.JXTable; import org.jdesktop.swingx.search.Searchable; import com.dexels.navajo.document.Message; import com.dexels.navajo.document.Navajo; import com.dexels.navajo.document.Property; import com.dexels.navajo.tipi.TipiBreakException; import com.dexels.navajo.tipi.TipiException; import com.dexels.navajo.tipi.components.swingimpl.TipiSwingDataComponentImpl; import com.dexels.navajo.tipi.swingclient.components.MessageTableModel; import com.dexels.navajo.tipi.swingclient.components.PropertyCellEditor; import com.dexels.navajo.tipi.swingclient.components.PropertyCellRenderer; public class TipiExtendedTable extends TipiSwingDataComponentImpl { /** * */ private static final long serialVersionUID = -1924180960988641513L; private JXTable myTable = null; @Override public Object createContainer() { myTable = new JXTable(); // myTable.getColumnModel().addColumn(new TableColumn(0,50)); // myTable.getColumnModel().addColumn(new TableColumn(2,50)); // myTable.getColumnModel().addColumn(new TableColumn(3,100)); JScrollPane js = new JScrollPane(myTable); myTable.setColumnControlVisible(true); // myTable.setHighlighters(new HighlighterPipeline(new Highlighter[] { AlternateRowHighlighter.classicLinePrinter })); // myTable.getHighlighters().addHighlighter(new // RolloverHighlighter(Color.BLACK, Color.WHITE )); myTable.setRolloverEnabled(true); myTable.setCellEditor(new PropertyCellEditor()); myTable.setTerminateEditOnFocusLost(true); myTable.setEditable(true); myTable.setSearchable(new Searchable() { public int search(String arg0) { return 0; } public int search(Pattern arg0) { return 0; } public int search(String arg0, int arg1) { return 0; } public int search(Pattern arg0, int arg1) { return 0; } public int search(String arg0, int arg1, boolean arg2) { return 0; } public int search(Pattern arg0, int arg1, boolean arg2) { return 0; } }); myTable.setDefaultRenderer(Property.class, new PropertyCellRenderer()); return js; } public void loadData(final Navajo n, String method) throws TipiException, TipiBreakException { Message m = n.getMessage("FileAssociations"); final MessageTableModel mtm = new MessageTableModel(m); createColumns(mtm, m); System.err.println("Created model: " + mtm.getRowCount()); System.err.println("Created model: " + mtm.getColumnCount()); runSyncInEventThread(new Runnable() { public void run() { myTable.setModel(mtm); } }); } private void createColumns(MessageTableModel mtm, Message m) { if (m == null) { return; } Message def = m.getDefinitionMessage(); if (def == null) { if (m.getArraySize() == 0) { return; } def = m.getMessage(0); } List<Property> l = def.getAllProperties(); for (Property p : l) { String desc = p.getDescription(); if (desc == null) { desc = p.getName(); } mtm.addColumn(p.getName(), desc, true); } } }
[ "frank@dexels.com" ]
frank@dexels.com
992e1185a448528cea26dcf428987cafa8708631
6253283b67c01a0d7395e38aeeea65e06f62504b
/decompile/app/Gallery2/src/main/java/com/amap/api/mapcore/util/bm.java
65376331454a18af3778f99007a57ee7ef1660ea
[]
no_license
sufadi/decompile-hw
2e0457a0a7ade103908a6a41757923a791248215
4c3efd95f3e997b44dd4ceec506de6164192eca3
refs/heads/master
2023-03-15T15:56:03.968086
2017-11-08T03:29:10
2017-11-08T03:29:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,909
java
package com.amap.api.mapcore.util; import android.content.Context; import java.util.ArrayList; import java.util.List; /* compiled from: OfflineDBOperation */ public class bm { private static volatile bm a; private static fu b; private Context c; public static bm a(Context context) { if (a == null) { synchronized (bm.class) { if (a == null) { a = new bm(context); } } } return a; } private bm(Context context) { this.c = context; b = b(this.c); } private fu b(Context context) { try { return new fu(context, bl.a()); } catch (Throwable th) { fo.b(th, "OfflineDB", "getDB"); th.printStackTrace(); return null; } } private boolean b() { if (b == null) { b = b(this.c); } if (b != null) { return true; } return false; } public ArrayList<bh> a() { ArrayList<bh> arrayList = new ArrayList(); if (!b()) { return arrayList; } for (bh add : b.b("", bh.class)) { arrayList.add(add); } return arrayList; } public synchronized bh a(String str) { if (!b()) { return null; } List b = b.b(bk.e(str), bh.class); if (b.size() <= 0) { return null; } return (bh) b.get(0); } public synchronized void a(bh bhVar) { if (b()) { b.a((Object) bhVar, bk.f(bhVar.h())); a(bhVar.f(), bhVar.b()); } } private void a(String str, String str2) { if (str2 != null && str2.length() > 0) { String a = bj.a(str); if (b.b(a, bj.class).size() > 0) { b.a(a, bj.class); } String[] split = str2.split(";"); List arrayList = new ArrayList(); for (String bjVar : split) { arrayList.add(new bj(str, bjVar)); } b.a(arrayList); } } public synchronized List<String> b(String str) { List<String> arrayList = new ArrayList(); if (!b()) { return arrayList; } arrayList.addAll(a(b.b(bj.a(str), bj.class))); return arrayList; } private List<String> a(List<bj> list) { List arrayList = new ArrayList(); if (list.size() > 0) { for (bj a : list) { arrayList.add(a.a()); } } return arrayList; } public synchronized void c(String str) { if (b()) { b.a(bk.e(str), bk.class); b.a(bj.a(str), bj.class); b.a(bi.a(str), bi.class); } } public synchronized void b(bh bhVar) { if (b()) { b.a(bk.f(bhVar.h()), bk.class); b.a(bj.a(bhVar.f()), bj.class); b.a(bi.a(bhVar.f()), bi.class); } } public void a(String str, int i, long j, long j2, long j3) { if (b()) { a(str, i, j, new long[]{j2, 0, 0, 0, 0}, new long[]{j3, 0, 0, 0, 0}); } } public synchronized void a(String str, int i, long j, long[] jArr, long[] jArr2) { if (b()) { b.a(new bi(str, j, i, jArr[0], jArr2[0]), bi.a(str)); } } /* JADX WARNING: inconsistent code. */ /* Code decompiled incorrectly, please refer to instructions dump. */ public synchronized String d(String str) { String str2 = null; synchronized (this) { if (b()) { List b = b.b(bk.f(str), bk.class); if (b.size() > 0) { str2 = ((bk) b.get(0)).e(); } } else { return null; } } } }
[ "liming@droi.com" ]
liming@droi.com
561e8ab8974c8b03edaa123276f456017ddb82a9
0c98cf3f64a72ceb4987f23936979d587183e269
/services/cdn/src/main/java/com/huaweicloud/sdk/cdn/v1/model/LogObject.java
5d4da3db6d36bb0b227604f6a0bf9920ae4e1637
[ "Apache-2.0" ]
permissive
cwray01/huaweicloud-sdk-java-v3
765d08e4b6dfcd88c2654bdbf5eb2dd9db19f2ef
01b5a3b4ea96f8770a2eaa882b244930e5fd03e7
refs/heads/master
2023-07-17T10:31:20.119625
2021-08-31T11:38:37
2021-08-31T11:38:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,591
java
package com.huaweicloud.sdk.cdn.v1.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; /** LogObject */ public class LogObject { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "domain_name") private String domainName; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "start_time") private Long startTime; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "end_time") private Long endTime; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "name") private String name; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "size") private Long size; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "link") private String link; public LogObject withDomainName(String domainName) { this.domainName = domainName; return this; } /** 域名名称。 * * @return domainName */ public String getDomainName() { return domainName; } public void setDomainName(String domainName) { this.domainName = domainName; } public LogObject withStartTime(Long startTime) { this.startTime = startTime; return this; } /** 查询起始时间,相对于UTC 1970-01-01到当前时间相隔的毫秒数。 * * @return startTime */ public Long getStartTime() { return startTime; } public void setStartTime(Long startTime) { this.startTime = startTime; } public LogObject withEndTime(Long endTime) { this.endTime = endTime; return this; } /** 查询结束时间,相对于UTC 1970-01-01到当前时间相隔的毫秒数。 * * @return endTime */ public Long getEndTime() { return endTime; } public void setEndTime(Long endTime) { this.endTime = endTime; } public LogObject withName(String name) { this.name = name; return this; } /** 日志文件名字。 * * @return name */ public String getName() { return name; } public void setName(String name) { this.name = name; } public LogObject withSize(Long size) { this.size = size; return this; } /** 文件大小(Byte)。 * * @return size */ public Long getSize() { return size; } public void setSize(Long size) { this.size = size; } public LogObject withLink(String link) { this.link = link; return this; } /** 下载链接。 * * @return link */ public String getLink() { return link; } public void setLink(String link) { this.link = link; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } LogObject logObject = (LogObject) o; return Objects.equals(this.domainName, logObject.domainName) && Objects.equals(this.startTime, logObject.startTime) && Objects.equals(this.endTime, logObject.endTime) && Objects.equals(this.name, logObject.name) && Objects.equals(this.size, logObject.size) && Objects.equals(this.link, logObject.link); } @Override public int hashCode() { return Objects.hash(domainName, startTime, endTime, name, size, link); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LogObject {\n"); sb.append(" domainName: ").append(toIndentedString(domainName)).append("\n"); sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" size: ").append(toIndentedString(size)).append("\n"); sb.append(" link: ").append(toIndentedString(link)).append("\n"); sb.append("}"); return sb.toString(); } /** Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
bc6e69421bf28392240578e735d049500598b999
07ac433d94ef68715b5f18b834ac4dc8bb5b8261
/Implementation/jpf-git/jpf-core/src/main/gov/nasa/jpf/vm/bytecode/FieldInstruction.java
23138f58c8b2df3c33ab567c780b7ab9f2223baf
[ "MIT", "Apache-2.0" ]
permissive
shrBadihi/ARDiff_Equiv_Checking
a54fb2908303b14a5a1f2a32b69841b213b2c999
e8396ae4af2b1eda483cb316c51cd76949cd0ffc
refs/heads/master
2023-04-03T08:40:07.919031
2021-02-05T04:44:34
2021-02-05T04:44:34
266,228,060
4
4
MIT
2020-11-26T01:34:08
2020-05-22T23:39:32
Java
UTF-8
Java
false
false
3,664
java
/* * Copyright (C) 2014, United States Government, as represented by the * Administrator of the National Aeronautics and Space Administration. * All rights reserved. * * The Java Pathfinder core (jpf-core) platform is 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 gov.nasa.jpf.vm.bytecode; import gov.nasa.jpf.vm.ElementInfo; import gov.nasa.jpf.vm.FieldInfo; import gov.nasa.jpf.vm.ThreadInfo; import gov.nasa.jpf.vm.Instruction; import gov.nasa.jpf.vm.Types; /** * abstract base for all field access instructions */ public abstract class FieldInstruction extends Instruction implements ReadOrWriteInstruction { protected String fname; protected String ftype; protected String className; protected String varId; protected FieldInfo fi; // lazy eval, hence not public protected int size; // is it a word or a double word field protected boolean isReferenceField; protected long lastValue; protected FieldInstruction (String name, String clsName, String fieldDescriptor){ fname = name; ftype = fieldDescriptor; className = Types.getClassNameFromTypeName(clsName); isReferenceField = Types.isReferenceSignature(fieldDescriptor); size = Types.getTypeSize(fieldDescriptor); } /** * for explicit construction */ public void setField (String fname, String fclsName) { this.fname = fname; this.className = fclsName; if (fclsName.equals("long") || fclsName.equals("double")) { this.size = 2; this.isReferenceField = false; } else { this.size = 1; if (fclsName.equals("boolean") || fclsName.equals("byte") || fclsName.equals("char") || fclsName.equals("short") || fclsName.equals("int")) { this.isReferenceField = false; } else { this.isReferenceField = true; } } } public abstract FieldInfo getFieldInfo(); @Override public abstract boolean isRead(); // for use in instructionExecuted() implementations public abstract ElementInfo getLastElementInfo(); // for use in executeInstruction implementations public abstract ElementInfo peekElementInfo (ThreadInfo ti); public String getClassName(){ return className; } public String getFieldName(){ return fname; } public int getFieldSize() { return size; } public boolean isReferenceField () { return isReferenceField; } /** * only defined in instructionExecuted() notification context */ public long getLastValue() { return lastValue; } public String getVariableId () { if (varId == null) { varId = className + '.' + fname; } return varId; } public String getId (ElementInfo ei) { // <2do> - OUTCH, should be optimized (so far, it's only called during reporting) if (ei != null){ return (ei.toString() + '.' + fname); } else { return ("?." + fname); } } @Override public String toString() { return getMnemonic() + " " + className + '.' + fname; } @Override public boolean isMonitorEnterPrologue(){ // override if this insn can be part of a monitorenter code pattern return false; } }
[ "shr.badihi@gmail.com" ]
shr.badihi@gmail.com
ca99fe9956202d148cb5846eacd475d0d7138192
455c7836a8831b1cb6299284545470f969c8f684
/ExemploMaterialAppWidget/app/src/main/java/nuvemapp/com/br/exemplomaterialappwidget/network/NetworkConnection.java
2b5cf6a79c9cdc4f38f060a72bdd6911e9e2121b
[]
no_license
cleitonferreira/WorkAndroid
1e162bdec328c8e38823d7cc97c408fd856a0824
9bba4ad40db53fc3872f0681a80fd0df5ba37f4b
refs/heads/master
2020-12-29T02:32:40.721673
2016-12-10T00:55:14
2016-12-10T00:55:14
49,303,845
1
0
null
null
null
null
UTF-8
Java
false
false
2,620
java
package nuvemapp.com.br.exemplomaterialappwidget.network; import android.content.Context; import android.util.Log; import com.android.volley.DefaultRetryPolicy; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.Volley; import com.google.gson.Gson; import org.json.JSONArray; import java.util.HashMap; import nuvemapp.com.br.exemplomaterialappwidget.domain.WrapObjToNetwork; public class NetworkConnection { private static NetworkConnection instance; private Context mContext; private RequestQueue mRequestQueue; public NetworkConnection(Context c){ mContext = c; mRequestQueue = getRequestQueue(); } public static NetworkConnection getInstance( Context c ){ if( instance == null ){ instance = new NetworkConnection( c.getApplicationContext() ); } return( instance ); } public RequestQueue getRequestQueue(){ if( mRequestQueue == null ){ mRequestQueue = Volley.newRequestQueue(mContext); } return(mRequestQueue); } public <T> void addRequestQueue( Request<T> request ){ getRequestQueue().add(request); } public void execute( final Transaction transaction, final String tag ){ WrapObjToNetwork obj = transaction.doBefore(); Gson gson = new Gson(); if( obj == null ){ return; } HashMap<String, String> params = new HashMap<>(); params.put("jsonObject", gson.toJson(obj)); CustomRequest request = new CustomRequest(Request.Method.POST, "http://192.168.25.221:8888/TCMaterialDesign/package/ctrl/CtrlCar.php", params, new Response.Listener<JSONArray>() { @Override public void onResponse(JSONArray response) { //Log.i("LOG", tag+" ---> "+response); transaction.doAfter(response); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Log.i("LOG", "onErrorResponse(): "+error.getMessage()); transaction.doAfter(null); } }); request.setTag(tag); request.setRetryPolicy(new DefaultRetryPolicy(5000, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT)); addRequestQueue(request); } }
[ "cleitonferreiraa@hotmail.com" ]
cleitonferreiraa@hotmail.com
5540004e52261c2c535b3440ef4fe4e0fee6522e
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/neo4j--neo4j/87c2c5d3caf795b98838f42e3e3899456e0e3bd8/after/DiscoveryModuleTest.java
8b7885d78c06fb139092cb39383dffc75e2b9cad
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,756
java
/** * Copyright (c) 2002-2011 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.server.modules; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.net.URI; import java.util.Set; import org.junit.Test; import org.neo4j.server.NeoServerWithEmbeddedWebServer; import org.neo4j.server.web.WebServer; public class DiscoveryModuleTest { @Test public void shouldRegisterAtRootByDefault() throws Exception { WebServer webServer = mock(WebServer.class); NeoServerWithEmbeddedWebServer neoServer = mock(NeoServerWithEmbeddedWebServer.class); when(neoServer.baseUri()).thenReturn(new URI("http://localhost:7575")); when(neoServer.getWebServer()).thenReturn(webServer); DiscoveryModule module = new DiscoveryModule(); Set<URI> uris = module.start(neoServer); assertEquals(1, uris.size()); assertEquals("/",uris.iterator().next().getPath()); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
ca58b97edbe77ff048da948af2d3ae80155525b3
67a1b5e8dc998ce3594c1c3bb2ec89c30850dee7
/GooglePlay6.0.5/app/src/main/java/com/google/android/gms/internal/zzba.java
943b3e38502383b957a497b0e4f1ab75f5535406
[ "Apache-2.0" ]
permissive
matrixxun/FMTech
4a47bd0bdd8294cc59151f1bffc6210567487bac
31898556baad01d66e8d87701f2e49b0de930f30
refs/heads/master
2020-12-29T01:31:53.155377
2016-01-07T04:39:43
2016-01-07T04:39:43
49,217,400
2
0
null
2016-01-07T16:51:44
2016-01-07T16:51:44
null
UTF-8
Java
false
false
1,944
java
package com.google.android.gms.internal; import android.content.Context; import android.os.IBinder; import android.os.RemoteException; import com.google.android.gms.common.GoogleApiAvailability; import com.google.android.gms.dynamic.zzd; import com.google.android.gms.dynamic.zze; import com.google.android.gms.dynamic.zzg; import com.google.android.gms.dynamic.zzg.zza; public final class zzba extends zzg<zzbc> { private static final zzba zzoY = new zzba(); private zzba() { super("com.google.android.gms.ads.adshield.AdShieldCreatorImpl"); } public static zzbb zzb(String paramString, Context paramContext, boolean paramBoolean) { GoogleApiAvailability.getInstance(); Object localObject; if (GoogleApiAvailability.isGooglePlayServicesAvailable(paramContext) == 0) { localObject = zzoY.zzc(paramString, paramContext, false); if (localObject != null) {} } else { localObject = new zzaz(paramString, paramContext, false); } return localObject; } private zzbb zzc(String paramString, Context paramContext, boolean paramBoolean) { zzd localzzd = zze.zzI(paramContext); if (paramBoolean) {} for (;;) { try { localObject = ((zzbc)zzaC(paramContext)).zza(paramString, localzzd); return zzbb.zza.zze((IBinder)localObject); } catch (zzg.zza localzza) { Object localObject; IBinder localIBinder; return null; } catch (RemoteException localRemoteException) { continue; } localIBinder = ((zzbc)zzaC(paramContext)).zzb(paramString, localzzd); localObject = localIBinder; } } } /* Location: F:\apktool\apktool\Google_Play_Store6.0.5\classes-dex2jar.jar * Qualified Name: com.google.android.gms.internal.zzba * JD-Core Version: 0.7.0.1 */
[ "jiangchuna@126.com" ]
jiangchuna@126.com
7e8db359138737747d672f1a1f266ba4a292b8ab
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project48/src/test/java/org/gradle/test/performance48_3/Test48_233.java
0ade084ba6126e596d77f98537231bf1a98f00fa
[]
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.performance48_3; import static org.junit.Assert.*; public class Test48_233 { private final Production48_233 production = new Production48_233("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
03e6b9623e942594def1caf34dc5a362939be741
354f9bb6cba05fe1837f4409a5c3b41ecd443791
/testprograms/gello-compilersource/Model/src/org/gello/model/HL7RIM/generated/MaterialEntityAdditive.java
887e1180f868ca669921b1153160ebb87cddfdb1
[]
no_license
ingoha/pwdt-ss10
915fe8279657a4f7e0de6750fded85d3a0165a12
fb40efa326cdda9051a28a09ce55b4d531e72813
refs/heads/master
2016-08-07T10:22:31.482185
2010-06-24T08:18:52
2010-06-24T08:18:52
32,255,798
0
0
null
null
null
null
UTF-8
Java
false
false
4,899
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b26-ea3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2006.11.08 at 12:07:49 PM PST // package org.gello.model.HL7RIM.generated; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import org.gello.model.HL7RIM.generated.MaterialEntityAdditive; /** * <p>Java class for MaterialEntityAdditive. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="MaterialEntityAdditive"> * &lt;restriction base="{}cs"> * &lt;enumeration value="F10"/> * &lt;enumeration value="C32"/> * &lt;enumeration value="C38"/> * &lt;enumeration value="HCL6"/> * &lt;enumeration value="ACDA"/> * &lt;enumeration value="ACDB"/> * &lt;enumeration value="ACET"/> * &lt;enumeration value="AMIES"/> * &lt;enumeration value="HEPA"/> * &lt;enumeration value="BACTM"/> * &lt;enumeration value="BOR"/> * &lt;enumeration value="BOUIN"/> * &lt;enumeration value="BF10"/> * &lt;enumeration value="WEST"/> * &lt;enumeration value="BSKM"/> * &lt;enumeration value="CTAD"/> * &lt;enumeration value="CARS"/> * &lt;enumeration value="CARY"/> * &lt;enumeration value="CHLTM"/> * &lt;enumeration value="ENT"/> * &lt;enumeration value="JKM"/> * &lt;enumeration value="KARN"/> * &lt;enumeration value="LIA"/> * &lt;enumeration value="HEPL"/> * &lt;enumeration value="M4"/> * &lt;enumeration value="M4RT"/> * &lt;enumeration value="M5"/> * &lt;enumeration value="MMDTM"/> * &lt;enumeration value="MICHTM"/> * &lt;enumeration value="HNO3"/> * &lt;enumeration value="NONE"/> * &lt;enumeration value="PAGE"/> * &lt;enumeration value="PHENOL"/> * &lt;enumeration value="PVA"/> * &lt;enumeration value="KOX"/> * &lt;enumeration value="EDTK15"/> * &lt;enumeration value="EDTK75"/> * &lt;enumeration value="RLM"/> * &lt;enumeration value="SST"/> * &lt;enumeration value="SILICA"/> * &lt;enumeration value="NAF"/> * &lt;enumeration value="FL100"/> * &lt;enumeration value="FL10"/> * &lt;enumeration value="SPS"/> * &lt;enumeration value="HEPN"/> * &lt;enumeration value="EDTN"/> * &lt;enumeration value="STUTM"/> * &lt;enumeration value="THROM"/> * &lt;enumeration value="FDP"/> * &lt;enumeration value="THYMOL"/> * &lt;enumeration value="THYO"/> * &lt;enumeration value="TOLU"/> * &lt;enumeration value="URETM"/> * &lt;enumeration value="VIRTM"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlEnum public enum MaterialEntityAdditive { ACDA("ACDA"), ACDB("ACDB"), ACET("ACET"), AMIES("AMIES"), BACTM("BACTM"), @XmlEnumValue("BF10") BF_10("BF10"), BOR("BOR"), BOUIN("BOUIN"), BSKM("BSKM"), CARS("CARS"), CARY("CARY"), CHLTM("CHLTM"), CTAD("CTAD"), @XmlEnumValue("C32") C_32("C32"), @XmlEnumValue("C38") C_38("C38"), @XmlEnumValue("EDTK15") EDTK_15("EDTK15"), @XmlEnumValue("EDTK75") EDTK_75("EDTK75"), EDTN("EDTN"), ENT("ENT"), FDP("FDP"), @XmlEnumValue("FL10") FL_10("FL10"), @XmlEnumValue("FL100") FL_100("FL100"), @XmlEnumValue("F10") F_10("F10"), @XmlEnumValue("HCL6") HCL_6("HCL6"), HEPA("HEPA"), HEPL("HEPL"), HEPN("HEPN"), @XmlEnumValue("HNO3") HNO_3("HNO3"), JKM("JKM"), KARN("KARN"), KOX("KOX"), LIA("LIA"), MICHTM("MICHTM"), MMDTM("MMDTM"), @XmlEnumValue("M4") M_4("M4"), @XmlEnumValue("M4RT") M_4_RT("M4RT"), @XmlEnumValue("M5") M_5("M5"), NAF("NAF"), NONE("NONE"), PAGE("PAGE"), PHENOL("PHENOL"), PVA("PVA"), RLM("RLM"), SILICA("SILICA"), SPS("SPS"), SST("SST"), STUTM("STUTM"), THROM("THROM"), THYMOL("THYMOL"), THYO("THYO"), TOLU("TOLU"), URETM("URETM"), VIRTM("VIRTM"), WEST("WEST"); private final String value; MaterialEntityAdditive(String v) { value = v; } public String value() { return value; } public static MaterialEntityAdditive fromValue(String v) { for (MaterialEntityAdditive c: MaterialEntityAdditive.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v.toString()); } }
[ "ingoha@users.noreply.github.com" ]
ingoha@users.noreply.github.com
dcedbe027c3f47114e081893460c9cf82044b50d
7251b8629d61642dd9f56dba8c8464211874fd68
/rdmachannel-core/src/main/java/com/basic/rdmachannel/channel/RdmaConnectListener.java
efe11f80512d233c1275ab6ef7b42fd0338fa157
[ "Apache-2.0" ]
permissive
Tjcug/RdmaChannel
2d24a632298e928f88ac01c8eecbe2b751b68278
edb4a8a9c74eb03c938ce5a7bb5c1066cf64208a
refs/heads/master
2020-04-17T20:31:29.335793
2019-10-11T09:20:05
2019-10-11T09:20:05
166,909,196
7
2
null
null
null
null
UTF-8
Java
false
false
347
java
package com.basic.rdmachannel.channel; import java.net.InetSocketAddress; /** * locate com.ibm.disni.channel * Created by MasterTj on 2019/1/24. */ public interface RdmaConnectListener { void onSuccess(InetSocketAddress inetSocketAddress, RdmaChannel rdmaChannel); void onFailure(Throwable exception); // Must handle multiple calls }
[ "798750509@qq.com" ]
798750509@qq.com
e1f2c4fb394be6bb0cca66be297b3bd00df8136c
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava4/Foo624Test.java
285cb66ba39d8fcfe95fb0f1ec7cb89a303cebf7
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
481
java
package applicationModulepackageJava4; import org.junit.Test; public class Foo624Test { @Test public void testFoo0() { new Foo624().foo0(); } @Test public void testFoo1() { new Foo624().foo1(); } @Test public void testFoo2() { new Foo624().foo2(); } @Test public void testFoo3() { new Foo624().foo3(); } @Test public void testFoo4() { new Foo624().foo4(); } @Test public void testFoo5() { new Foo624().foo5(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
523948b3e14112cc7b27db329057cffaf1bd0744
b5aa8bee14a0bd7caf6cd10893f41b8f2284a91c
/core/src/main/java/org/eigenbase/sql/SqlTimeLiteral.java
42935c7448644e6490f5de7b68c0e296f0340467
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
binmahone/optiq
25f4468d6e5fb4ac64b14dcf72973e4d516714c2
d1295c40a9a54b1f411e4a50576aa0a567742f16
refs/heads/master
2020-12-28T17:31:08.350150
2014-01-28T02:15:58
2014-01-28T02:15:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,600
java
/* // Licensed to Julian Hyde under one or more contributor license // agreements. See the NOTICE file distributed with this work for // additional information regarding copyright ownership. // // Julian Hyde 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.eigenbase.sql; import java.util.*; import org.eigenbase.sql.parser.*; import org.eigenbase.sql.type.*; /** * A SQL literal representing a TIME value, for example <code>TIME * '14:33:44.567'</code>. * * <p>Create values using {@link SqlLiteral#createTime}. */ public class SqlTimeLiteral extends SqlAbstractDateTimeLiteral { //~ Constructors ----------------------------------------------------------- SqlTimeLiteral( Calendar t, int precision, boolean hasTZ, SqlParserPos pos) { super( t, hasTZ, SqlTypeName.TIME, precision, SqlParserUtil.TimeFormatStr, pos); } SqlTimeLiteral( Calendar t, int precision, boolean hasTZ, String format, SqlParserPos pos) { super(t, hasTZ, SqlTypeName.TIME, precision, format, pos); } //~ Methods ---------------------------------------------------------------- public SqlNode clone(SqlParserPos pos) { return new SqlTimeLiteral( (Calendar) value, precision, hasTimeZone, formatString, pos); } public String toString() { return "TIME '" + toFormattedString() + "'"; } /** * Returns e.g. '03:05:67.456'. */ public String toFormattedString() { String result = getTime().toString(formatString); final Calendar cal = getCal(); if (precision > 0) { assert (precision <= 3); // get the millisecond count. millisecond => at most 3 digits. String digits = Long.toString(cal.getTimeInMillis()); result = result + "." + digits.substring(digits.length() - 3, digits.length() - 3 + precision); } else { assert (0 == cal.get(Calendar.MILLISECOND)); } return result; } } // End SqlTimeLiteral.java
[ "julianhyde@gmail.com" ]
julianhyde@gmail.com
87d0c5f6071638bbba4d8ce8352daccf32267d6d
04aeb40756b9b96ba8c94337c6fee3672dfb64d8
/foxtrot-functional-tests-palgrave/src/test/java/com/nature/quickstep/stepdef/accesscontrol/AthensLoginStepDefinitions.java
dffdbab3fc165a92c0f07f12ed63026054be8d52
[]
no_license
ravinder1414/foxtrotfunctionalPalgrave
e5251d9d4921c5a1cea0bc30883b37ee646022c5
507e3f34a383a844ec95e28bba5cc0c83d2e230d
refs/heads/master
2016-09-14T10:16:07.731815
2016-05-11T14:39:53
2016-05-11T14:39:53
58,552,996
0
0
null
null
null
null
UTF-8
Java
false
false
1,219
java
package com.nature.quickstep.stepdef.accesscontrol; import com.nature.quickstep.pageobjects.accesscontrol.AthensLoginPage; import cucumber.api.java.en.Given; import cucumber.api.java.en.Then; import cucumber.api.java.en.When; public class AthensLoginStepDefinitions { AthensLoginPage athens = new AthensLoginPage(); @Given("^I navigate to an access page of an article of 'BP' journal$") public void I_navigate_to_an_access_page_of_an_article_of_BP_journal() throws Throwable { athens.navigateTo(); athens.validateAccessPage(); } @When("^I click on 'Login via Athens' link$") public void I_click_on_Login_via_Athens_link() throws Throwable { athens.clickOnLoginViaAthensLink(); athens.validateAthensLoginPage(); } @When("^I enter valid Athens credentials and click on login button$") public void I_enter_valid_Athens_credentials_and_click_on_login_button() throws Throwable { athens.loginUsingAthensAccount("npgpj_qa_access", "sekhar_qa_123"); } @Then("^I should get full access for BP journal$") public void I_should_get_full_access_for_BP_journal() throws Throwable { athens.validateFullTextContent(); } }
[ "kumarravinder4141@gmail.com" ]
kumarravinder4141@gmail.com
f39de05ba28a7d0fb871ed1205c48816e93194ee
cfc60fc1148916c0a1c9b421543e02f8cdf31549
/src/testcases/CWE190_Integer_Overflow/CWE190_Integer_Overflow__console_readLine_multiply_68b.java
784898a15af1dc626ac0476f6fa9a6c8e378b545
[ "LicenseRef-scancode-public-domain" ]
permissive
zhujinhua/GitFun
c77c8c08e89e61006f7bdbc5dd175e5d8bce8bd2
987f72fdccf871ece67f2240eea90e8c1971d183
refs/heads/master
2021-01-18T05:46:03.351267
2012-09-11T16:43:44
2012-09-11T16:43:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,842
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__console_readLine_multiply_68b.java Label Definition File: CWE190_Integer_Overflow.label.xml Template File: sources-sinks-68b.tmpl.java */ /* * @description * CWE: 190 Integer Overflow * BadSource: console_readLine Read data from the console using readLine * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: multiply * GoodSink: Ensure there will not be an overflow before performing the multiplication * BadSink : Unchecked multiplication, which can lead to overflow * Flow Variant: 68 Data flow: data passed as a member variable in the "a" class, which is used by a method in another class in the same package * * */ package testcases.CWE190_Integer_Overflow; import testcasesupport.*; //!! other imports come from the label definitions import java.sql.*; import javax.servlet.http.*; import java.security.SecureRandom; public class CWE190_Integer_Overflow__console_readLine_multiply_68b { public void bad_sink() throws Throwable { int data = CWE190_Integer_Overflow__console_readLine_multiply_68a.data; int valueToMult = (new SecureRandom()).nextInt(98) + 2; /* multiply by at least 2 */ if(data > 0) /* ensure we don't have an underflow */ { /* POTENTIAL FLAW: if (data*valueToMult) > MAX_VALUE, this will overflow */ int result = (data * valueToMult); IO.writeLine("result: " + result); } } /* goodG2B() - use goodsource and badsink */ public void goodG2B_sink() throws Throwable { int data = CWE190_Integer_Overflow__console_readLine_multiply_68a.data; int valueToMult = (new SecureRandom()).nextInt(98) + 2; /* multiply by at least 2 */ if(data > 0) /* ensure we don't have an underflow */ { /* POTENTIAL FLAW: if (data*valueToMult) > MAX_VALUE, this will overflow */ int result = (data * valueToMult); IO.writeLine("result: " + result); } } /* goodB2G() - use badsource and goodsink */ public void goodB2G_sink() throws Throwable { int data = CWE190_Integer_Overflow__console_readLine_multiply_68a.data; int valueToMult = (new SecureRandom()).nextInt(98) + 2; /* multiply by at least 2 */ if(data > 0) /* ensure we don't have an underflow */ { int result = 0; /* FIX: Add a check to prevent an overflow from occurring */ if (data <= (Integer.MAX_VALUE/valueToMult)) { result = (data * valueToMult); IO.writeLine("result: " + result); } else { IO.writeLine("Input value is too large to perform multiplication."); } } } }
[ "amitf@chackmarx.com" ]
amitf@chackmarx.com
1103f190aedcddec1b71e916be73c5b5c9d186ea
0c514049c0c8a0eb59fe7ded1c1e46009edbbec4
/src/main/java/com/niche/ng/repository/MotherBedRepository.java
98c685393cb8bcc679d00c6d22ab061480bae20b
[]
no_license
AnithaRaja90/projectGH
793bd30d27205f8d25531abd84e3a37fc0a33fa3
c2e6bb245cac663641629c0518f2bca9d8b3dc18
refs/heads/master
2020-03-26T23:46:36.618677
2018-08-21T13:27:57
2018-08-21T13:27:57
145,566,442
0
0
null
null
null
null
UTF-8
Java
false
false
356
java
package com.niche.ng.repository; import com.niche.ng.domain.MotherBed; import org.springframework.data.jpa.repository.*; import org.springframework.stereotype.Repository; /** * Spring Data repository for the MotherBed entity. */ @SuppressWarnings("unused") @Repository public interface MotherBedRepository extends JpaRepository<MotherBed, Long> { }
[ "ptnaveenraj@outlook.com" ]
ptnaveenraj@outlook.com
f07597cd4e7c380bb09a7749f7c7078130a444b1
a5721d03524d9094f344bdc12746ca3b5579bc04
/lyyt-server/src/main/java/net/cdsunrise/hy/lyyt/entity/vo/DefaultHolidayVO.java
7b1027cc36aeb87063bc7bcf3a89725738fd2d51
[]
no_license
yesewenrou/test
2aeaa0ea09842eeed2b0e589895b4f00319bf13b
992a70bed383f5574e4cc0db539dd764d984e5c6
refs/heads/master
2023-02-16T21:02:59.801518
2021-01-20T02:31:17
2021-01-20T02:31:17
327,574,246
0
0
null
null
null
null
UTF-8
Java
false
false
368
java
package net.cdsunrise.hy.lyyt.entity.vo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; /** * @author LHY * @date 2020/2/17 13:48 */ @Data @NoArgsConstructor @AllArgsConstructor public class DefaultHolidayVO { private String key; private String value; /**标记当前节假日*/ private Boolean current; }
[ "896586757@qq.com" ]
896586757@qq.com
cb1e227ae0dbe96d6373e6a0539a90feaa933ff6
d37164b70900657d717aa2938f7127d5243cf88a
/profiler/src/main/java/com/navercorp/pinpoint/profiler/sender/ThriftUdpMessageSerializer.java
26613d52c255e88f8a25973f3c9bda9439cc9914
[ "DOC", "LicenseRef-scancode-free-unknown", "CC0-1.0", "OFL-1.1", "GPL-1.0-or-later", "CC-PDDC", "GPL-2.0-only", "Apache-2.0", "LicenseRef-scancode-public-domain", "CC-BY-3.0", "LicenseRef-scancode-unknown-license-reference", "MITNFA", "MIT", "CC-BY-4.0", "OFL-1.0" ]
permissive
huayl/pinpoint
f9d4d69c30ecf26bfc7d0ce4424098635c99a60b
942f86e91af6570998aba9163b492b5136b6cfc3
refs/heads/master
2023-09-01T02:41:52.858078
2021-04-23T09:29:08
2021-04-23T09:59:16
48,753,268
1
2
Apache-2.0
2021-04-26T06:40:29
2015-12-29T15:18:29
Java
UTF-8
Java
false
false
3,884
java
/* * Copyright 2018 NAVER Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.navercorp.pinpoint.profiler.sender; import com.navercorp.pinpoint.common.annotations.VisibleForTesting; import java.util.Objects; import com.navercorp.pinpoint.profiler.context.thrift.MessageConverter; import com.navercorp.pinpoint.thrift.io.HeaderTBaseSerializer; import com.navercorp.pinpoint.thrift.io.HeaderTBaseSerializerFactory; import com.navercorp.pinpoint.thrift.io.SerializerFactory; import org.apache.thrift.TBase; import org.apache.thrift.TException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * not thread safe * @author Woonduk Kang(emeroad) */ public class ThriftUdpMessageSerializer implements MessageSerializer<ByteMessage>{ public static final int UDP_MAX_PACKET_LENGTH = 65507; private final Logger logger = LoggerFactory.getLogger(this.getClass()); // Caution. not thread safe private final HeaderTBaseSerializer serializer; private final int maxPacketLength; private final MessageConverter<TBase<?, ?>> messageConverter; public ThriftUdpMessageSerializer(MessageConverter<TBase<?, ?>> messageConverter, int maxPacketLength) { this.messageConverter = Objects.requireNonNull(messageConverter, "messageConverter"); this.maxPacketLength = maxPacketLength; // Caution. not thread safe SerializerFactory<HeaderTBaseSerializer> headerTBaseSerializerFactory = new HeaderTBaseSerializerFactory(false, maxPacketLength, false); serializer = headerTBaseSerializerFactory.createSerializer(); } // single thread only @Override public ByteMessage serializer(Object message) { if (message instanceof TBase<?, ?>) { final TBase<?, ?> tBase = (TBase<?, ?>) message; return serialize(tBase); } final TBase<?, ?> tBase = messageConverter.toMessage(message); if (tBase != null) { return serialize(tBase); } return null; } public ByteMessage serialize(TBase<?, ?> message) { final TBase<?, ?> dto = message; // do not copy bytes because it's single threaded final byte[] internalBufferData = serialize(this.serializer, dto); if (internalBufferData == null) { logger.warn("interBufferData is null"); return null; } final int messageSize = this.serializer.getInterBufferSize(); if (isLimit(messageSize)) { // When packet size is greater than UDP packet size limit, it's better to discard packet than let the socket API fails. logger.warn("discard packet. Caused:too large message. size:{}, {}", messageSize, dto); return null; } return new ByteMessage(internalBufferData, messageSize); } private byte[] serialize(HeaderTBaseSerializer serializer, TBase tBase) { try { return serializer.serialize(tBase); } catch (TException e) { if (logger.isWarnEnabled()) { logger.warn("Serialize " + tBase + " failed. Error:" + e.getMessage(), e); } } return null; } @VisibleForTesting protected boolean isLimit(int interBufferSize) { if (interBufferSize > maxPacketLength) { return true; } return false; } }
[ "wd.kang@navercorp.com" ]
wd.kang@navercorp.com
e7c91f7f4f7a5abc9b83ad33bb81875a206db34c
6a649709010f35916b58ad639eb24dc9d7452344
/AL-Game/src/com/aionemu/gameserver/network/aion/serverpackets/SM_DELETE_HOUSE_OBJECT.java
b124588c63837d046d008867f4c1e9e1540d168f
[]
no_license
soulxj/aion-cn
807860611e746d8d4c456a769a36d3274405fd7e
8a0a53cf8f99233cbee82f341f2b5c33be0364fa
refs/heads/master
2016-09-11T01:12:19.660692
2014-08-11T14:59:38
2014-08-11T14:59:38
41,342,802
2
2
null
null
null
null
UTF-8
Java
false
false
1,260
java
/* * This file is part of aion-lightning <aion-lightning.com>. * * aion-lightning is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * aion-lightning is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with aion-lightning. If not, see <http://www.gnu.org/licenses/>. */ package com.aionemu.gameserver.network.aion.serverpackets; import com.aionemu.gameserver.network.aion.AionConnection; import com.aionemu.gameserver.network.aion.AionServerPacket; /** * @author Rolandas * */ public class SM_DELETE_HOUSE_OBJECT extends AionServerPacket { private int itemObjectId; public SM_DELETE_HOUSE_OBJECT(int itemObjectId) { this.itemObjectId = itemObjectId; } @Override protected void writeImpl(AionConnection con) { writeD(itemObjectId); } }
[ "feidebugao@gmail.com" ]
feidebugao@gmail.com
817d7a7fdbb3b5c64ba6c65eacde7b835ccbb680
4e53569b84e430534b6cf501b6b1ce9a7b996180
/FDFrame-SpringMVC/src_base/org/freedom/core/bean/BaseBean.java
70c2c18a732ee2d029e7f39b6d4272918d894d53
[]
no_license
hebei8267/meloneehr
3010a437acda3416d42d743b4f64da715860bb8b
0eebd817082296a00862919812f259c9a80c7f14
refs/heads/master
2021-01-23T19:38:36.021189
2014-01-12T05:02:31
2014-01-12T05:02:31
32,136,383
1
0
null
null
null
null
UTF-8
Java
false
false
750
java
/* * Copyright 2008 by hebei, All rights reserved. */ package org.freedom.core.bean; import java.io.Serializable; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; /** * 公共Java Bean对象基类 * * @author 何贝 * @since JDK1.5 */ public abstract class BaseBean implements Serializable { private static final long serialVersionUID = 6905530882052168915L; public BaseBean() { } public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); } public String toString(ToStringStyle style) { return ToStringBuilder.reflectionToString(this, style); } }
[ "hebei198267@gmail.com@30b3abd0-cf4e-0410-978e-df9001e6a3d7" ]
hebei198267@gmail.com@30b3abd0-cf4e-0410-978e-df9001e6a3d7
3e951cdc196c74740b18d6b4f937e73499a8b754
e2ee64064b8b29c21fcdd4fbab707fc3b53894e2
/SOSMavenStruts/src/main/java/in/co/sunrays/struts/exception/RecordNotFoundException.java
8bb806d79bc784671631d7bcc48d609cd293cc24
[]
no_license
sunilos/SOSMavenStruts
c1dd286d8f21569396afac7755055ff9f2e8b112
e4b7001bbf5ef5f3106f4603cd54514f1c6f7f29
refs/heads/master
2021-01-10T03:06:06.502964
2015-11-04T10:38:38
2015-11-04T10:38:38
45,532,152
0
0
null
null
null
null
UTF-8
Java
false
false
386
java
package in.co.sunrays.struts.exception; /** * RecordNotFoundException thrown when a record not found occurred * * @author SunilOS * @version 1.0 * @Copyright (c) SunilOS * */ public class RecordNotFoundException extends Exception { /** * @param msg * error message */ public RecordNotFoundException(String msg) { super(msg); } }
[ "sunilos007@gmail.com" ]
sunilos007@gmail.com
4f9768d5a8f539d31a92e2955f2538efd839f50d
7d121f66aceb98cbe17f715d5199a3e720932735
/AssetApp/src/com/wonders/framework/core/dto/PagedQueryObject.java
50e21089ba483eff398f817ec7552a94da690146
[]
no_license
zh69183787/wd-asset
af747df78798c24deebbcc71a606d11fcbeaebc9
3d49083e4afbe4c978efed48f25b8192817050f3
refs/heads/master
2021-01-01T06:39:00.129521
2015-06-24T15:23:49
2015-06-24T15:23:49
37,992,482
0
0
null
null
null
null
UTF-8
Java
false
false
1,025
java
package com.wonders.framework.core.dto; import java.io.Serializable; /** * * 封装查询条件类 * * @author cheney * */ @SuppressWarnings("serial") public class PagedQueryObject extends QueryObject implements Serializable{ /** * 当前第几页 */ protected int pageNo; /** * 每页个数 */ protected int pageSize; /** * 得到页数 * * @return */ public int getPageNo() { return pageNo; } /** * 设置页数 * * @param pageNo */ public void setPageNo(int pageNo) { this.pageNo = pageNo; } /** * 得到每页的大小 * * @return */ public int getPageSize() { return pageSize; } /** * 设置每页的大小 * * @param pageSize */ public void setPageSize(int pageSize) { this.pageSize = pageSize; } /** * 得到起始位置 * * @return */ public int getBeginPos() { return (pageNo - 1) * pageSize; } /** * 得到结束位置 * * @return */ public int getEndPos() { return getBeginPos() + pageSize; } }
[ "657603429@qq.com" ]
657603429@qq.com
bc5309cdbed603f08293962c601914f8274094cb
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/Shopkick_com.shopkick.app/javafiles/com/google/android/gms/common/api/internal/zaae.java
3cca0559fe527c3fdfa3b5e61e59254f36f3c1c1
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
5,984
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package com.google.android.gms.common.api.internal; import android.app.Activity; import android.support.v4.util.ArraySet; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.internal.Preconditions; // Referenced classes of package com.google.android.gms.common.api.internal: // zal, LifecycleFragment, GoogleApiManager, zai public class zaae extends zal { private zaae(LifecycleFragment lifecyclefragment) { super(lifecyclefragment); // 0 0:aload_0 // 1 1:aload_1 // 2 2:invokespecial #13 <Method void zal(LifecycleFragment)> // 3 5:aload_0 // 4 6:new #15 <Class ArraySet> // 5 9:dup // 6 10:invokespecial #18 <Method void ArraySet()> // 7 13:putfield #20 <Field ArraySet zafo> mLifecycleFragment.addCallback("ConnectionlessLifecycleHelper", ((LifecycleCallback) (this))); // 8 16:aload_0 // 9 17:getfield #24 <Field LifecycleFragment mLifecycleFragment> // 10 20:ldc1 #26 <String "ConnectionlessLifecycleHelper"> // 11 22:aload_0 // 12 23:invokeinterface #32 <Method void LifecycleFragment.addCallback(String, LifecycleCallback)> // 13 28:return } public static void zaa(Activity activity, GoogleApiManager googleapimanager, zai zai) { LifecycleFragment lifecyclefragment = getFragment(activity); // 0 0:aload_0 // 1 1:invokestatic #39 <Method LifecycleFragment getFragment(Activity)> // 2 4:astore 4 zaae zaae1 = (zaae)lifecyclefragment.getCallbackOrNull("ConnectionlessLifecycleHelper", com/google/android/gms/common/api/internal/zaae); // 3 6:aload 4 // 4 8:ldc1 #26 <String "ConnectionlessLifecycleHelper"> // 5 10:ldc1 #2 <Class zaae> // 6 12:invokeinterface #43 <Method LifecycleCallback LifecycleFragment.getCallbackOrNull(String, Class)> // 7 17:checkcast #2 <Class zaae> // 8 20:astore_3 activity = ((Activity) (zaae1)); // 9 21:aload_3 // 10 22:astore_0 if(zaae1 == null) //* 11 23:aload_3 //* 12 24:ifnonnull 37 activity = ((Activity) (new zaae(lifecyclefragment))); // 13 27:new #2 <Class zaae> // 14 30:dup // 15 31:aload 4 // 16 33:invokespecial #44 <Method void zaae(LifecycleFragment)> // 17 36:astore_0 activity.zabm = googleapimanager; // 18 37:aload_0 // 19 38:aload_1 // 20 39:putfield #46 <Field GoogleApiManager zabm> Preconditions.checkNotNull(((Object) (zai)), "ApiKey cannot be null"); // 21 42:aload_2 // 22 43:ldc1 #48 <String "ApiKey cannot be null"> // 23 45:invokestatic #54 <Method Object Preconditions.checkNotNull(Object, Object)> // 24 48:pop ((zaae) (activity)).zafo.add(((Object) (zai))); // 25 49:aload_0 // 26 50:getfield #20 <Field ArraySet zafo> // 27 53:aload_2 // 28 54:invokevirtual #58 <Method boolean ArraySet.add(Object)> // 29 57:pop googleapimanager.zaa(((zaae) (activity))); // 30 58:aload_1 // 31 59:aload_0 // 32 60:invokevirtual #63 <Method void GoogleApiManager.zaa(zaae)> // 33 63:return } private final void zaak() { if(!zafo.isEmpty()) //* 0 0:aload_0 //* 1 1:getfield #20 <Field ArraySet zafo> //* 2 4:invokevirtual #70 <Method boolean ArraySet.isEmpty()> //* 3 7:ifne 18 zabm.zaa(this); // 4 10:aload_0 // 5 11:getfield #46 <Field GoogleApiManager zabm> // 6 14:aload_0 // 7 15:invokevirtual #63 <Method void GoogleApiManager.zaa(zaae)> // 8 18:return } public void onResume() { super.onResume(); // 0 0:aload_0 // 1 1:invokespecial #73 <Method void zal.onResume()> zaak(); // 2 4:aload_0 // 3 5:invokespecial #75 <Method void zaak()> // 4 8:return } public void onStart() { super.onStart(); // 0 0:aload_0 // 1 1:invokespecial #78 <Method void zal.onStart()> zaak(); // 2 4:aload_0 // 3 5:invokespecial #75 <Method void zaak()> // 4 8:return } public void onStop() { super.onStop(); // 0 0:aload_0 // 1 1:invokespecial #81 <Method void zal.onStop()> zabm.zab(this); // 2 4:aload_0 // 3 5:getfield #46 <Field GoogleApiManager zabm> // 4 8:aload_0 // 5 9:invokevirtual #84 <Method void GoogleApiManager.zab(zaae)> // 6 12:return } protected final void zaa(ConnectionResult connectionresult, int i) { zabm.zaa(connectionresult, i); // 0 0:aload_0 // 1 1:getfield #46 <Field GoogleApiManager zabm> // 2 4:aload_1 // 3 5:iload_2 // 4 6:invokevirtual #87 <Method void GoogleApiManager.zaa(ConnectionResult, int)> // 5 9:return } final ArraySet zaaj() { return zafo; // 0 0:aload_0 // 1 1:getfield #20 <Field ArraySet zafo> // 2 4:areturn } protected final void zao() { zabm.zao(); // 0 0:aload_0 // 1 1:getfield #46 <Field GoogleApiManager zabm> // 2 4:invokevirtual #93 <Method void GoogleApiManager.zao()> // 3 7:return } private GoogleApiManager zabm; private final ArraySet zafo = new ArraySet(); }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
f261141eb1cc48029e3b1fcb428db98f15601d85
9c7074a2467350bd855cbacba2857199cda5ebc7
/20210809(ZJYD_v2.6.0)/app/src/main/java/com/pukka/ydepg/moudule/mytv/adapter/MessageAdapter.java
7ad7ca30efd1e7d4fe10ee09ea358b21d977afd5
[]
no_license
wangkk24/testgit
ce6c3f371bcac56832f62f9631cdffb32d9f2ed2
0eb6d2cc42f61cf28ce50b77d754dcfbd152d91c
refs/heads/main
2023-07-15T21:45:24.674154
2021-08-31T07:13:14
2021-08-31T07:13:14
401,544,031
1
1
null
null
null
null
UTF-8
Java
false
false
5,329
java
package com.pukka.ydepg.moudule.mytv.adapter; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.recyclerview.widget.RecyclerView; import com.pukka.ydepg.R; import com.pukka.ydepg.common.utils.JsonParse; import com.pukka.ydepg.common.utils.LogUtil.SuperLog; import com.pukka.ydepg.moudule.mytv.bean.BodyContentBean; import com.pukka.ydepg.moudule.mytv.presenter.view.MessageDialogAdapterView; import com.trello.rxlifecycle2.components.support.RxAppCompatActivity; import org.json.JSONException; import org.json.JSONObject; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; /** * Created by Eason on 2018/5/14. * 消息记录Adapter */ public class MessageAdapter extends RecyclerView.Adapter<MessageAdapter.ViewHold> { private RxAppCompatActivity mRxAppCompatActivity; private SimpleDateFormat mFormat = new SimpleDateFormat("yyyy.MM.dd HH:mm"); private MessageOnclickListener mMessageOnclickListener; private List<String> mNotifitionList; public static final String TAG = "MessageAdapter"; /* * 記錄获取焦点的position * */ private int mPosition = 0; public MessageAdapter(RxAppCompatActivity rxAppCompatActivity, MessageOnclickListener messageOnclickListener) { this.mRxAppCompatActivity = rxAppCompatActivity; this.mMessageOnclickListener = messageOnclickListener; } /* * 设置Data * */ public void setData(List<String> notifitionList) { this.mNotifitionList = notifitionList; notifyDataSetChanged(); } @Override public ViewHold onCreateViewHolder(ViewGroup parent, int viewType) { View view = LayoutInflater.from(mRxAppCompatActivity).inflate(R.layout.adapter_message, null, false); return new ViewHold(view); } @Override public void onBindViewHolder(ViewHold holder, int position) { if (mNotifitionList != null && mNotifitionList.size() > 0 && position < mNotifitionList.size()) { String mNotifition = mNotifitionList.get(position); try { JSONObject object = new JSONObject(mNotifition); if (!TextUtils.isEmpty(object.getString("mode"))) { if (object.getString("mode").equals("5")) { //命令通知消息 BodyContentBean bodyContentBean = JsonParse.json2Object(mNotifition,BodyContentBean.class); if (bodyContentBean != null && bodyContentBean.getContent() != null){ setText(holder,bodyContentBean.getContent().getMessageTitle(),bodyContentBean.getReceivingTime()); } } else if (object.getString("mode").equals("0")) { //滚动消息模式 setText(holder,object.getString("content"),object.getString("receivingTime")); } else if (object.getString("mode").equals("6")) { //简单文本消息 //setText(holder,object.getString("content"),object.getString("validTime")); setText(holder,object.getString("content"),object.getString("receivingTime")); } } } catch (JSONException e) { SuperLog.error(TAG,e); } } if (holder.itemView.hasFocus()) { mPosition = position; } /* * 浏览推送信息 * */ holder.mRootViewLinear.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mNotifitionList != null && mNotifitionList.size() > 0){ mMessageOnclickListener.onItemClick(mNotifitionList.get(position),position); } } }); } private void setText(ViewHold holder,String title,String time){ if (!TextUtils.isEmpty(title)){ holder.mNameTv.setText(title); }else{ holder.mNameTv.setText(""); } if (!TextUtils.isEmpty(time) && time.length() > 0){ holder.mTimeTv.setText(time); }else{ holder.mTimeTv.setText(mFormat.format(new Date())); } } @Override public int getItemCount() { if (mNotifitionList != null && mNotifitionList.size() > 0){ return mNotifitionList.size(); } return 0; } class ViewHold extends RecyclerView.ViewHolder { TextView mNameTv; TextView mTimeTv; MessageDialogAdapterView mRootViewLinear; public ViewHold(View itemView) { super(itemView); mNameTv = (TextView) itemView.findViewById(R.id.name_tv); mTimeTv = (TextView) itemView.findViewById(R.id.time_tv); mRootViewLinear = (MessageDialogAdapterView) itemView.findViewById(R.id.root_view_linear); mRootViewLinear.setFocusListener(hasFocus -> { mRootViewLinear.setSelected(hasFocus); }); } } public interface MessageOnclickListener { void onItemClick(String body,int position); } }
[ "wangkk@easier.cn" ]
wangkk@easier.cn
db353f555877c8972a3388ce05549765ad36b5c8
af8c0ffa4f2181708532f2b852ca4b718f84eb19
/diorite-core/src/main/java/org/diorite/impl/connection/packets/RegisterPackets.java
5ed156c1927e857bd03dd952d18e60c6d9f43929
[ "MIT" ]
permissive
Diorite/Diorite-old
1a5e91483fe6e46e305f866f10cff22846b19816
bfe35f695876f633ae970442f673188e4ff99c9b
refs/heads/master
2021-01-22T15:21:39.404346
2016-08-09T18:10:57
2016-08-09T18:10:57
65,502,014
3
6
null
null
null
null
UTF-8
Java
false
false
1,707
java
/* * The MIT License (MIT) * * Copyright (c) 2016. Diorite (by Bartłomiej Mazur (aka GotoFinal)) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.diorite.impl.connection.packets; import org.reflections.Reflections; import org.diorite.impl.connection.EnumProtocol; public final class RegisterPackets { private RegisterPackets() { } public static void init() { //noinspection unchecked new Reflections(RegisterPackets.class.getPackage().getName()).getTypesAnnotatedWith(PacketClass.class, false).stream().filter(Packet.class::isAssignableFrom).map(packet -> (Class<Packet<?>>) packet).forEach(EnumProtocol::init); } }
[ "bartlomiejkmazur@gmail.com" ]
bartlomiejkmazur@gmail.com
39d59a4f1b7d47ab25be9b97f707e7849472ad2f
a243a1c53100b491cd44da967b88ddd3e1412dbf
/02_spring_primary/src/main/java/com/issac/spring/annotation/pure/configuration/DaoConfiguration.java
550dd5c4dc9c52d17b8c62f775603b5caaf2cb4a
[]
no_license
IssacYoung2013/daily
b6cbf272bf71ece61698427e822817d618b028bc
d9fa1d1cf8ea3ff69ee968061b16ba88c34199ab
refs/heads/master
2022-12-25T12:15:39.063763
2020-04-16T01:10:24
2020-04-16T01:10:24
222,570,708
0
0
null
2022-12-16T14:50:58
2019-11-19T00:15:50
Java
UTF-8
Java
false
false
570
java
package com.issac.spring.annotation.pure.configuration; import com.issac.spring.annotation.pure.service.UserService; import com.issac.spring.annotation.pure.service.impl.UserServiceImpl; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * * * @author: ywy * @date: 2019-10-27 * @desc: */ @Configuration public class DaoConfiguration { public DaoConfiguration() { System.out.println("DaoConfiguration 被加载..."); } }
[ "issacyoung@msn.cn" ]
issacyoung@msn.cn
6bcb5833f2d10880a6cffb69e4efee42766b7826
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a161/A161591Test.java
10269d3372d5edc57afbf0b838d875c10399ef89
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a161; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A161591Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
f7146af21a23e43fe19d0a074a56c80dbeedc2c3
043703eaf27a0d5e6f02bf7a9ac03c0ce4b38d04
/subject_systems/Struts2/src/struts-2.5.10.1/src/core/src/main/java/com/opensymphony/xwork2/conversion/impl/StringConverter.java
b0f560d6f5574161e98a0a5658cd655cb0b71ec8
[]
no_license
MarceloLaser/arcade_console_test_resources
e4fb5ac4a7b2d873aa9d843403569d9260d380e0
31447aabd735514650e6b2d1a3fbaf86e78242fc
refs/heads/master
2020-09-22T08:00:42.216653
2019-12-01T21:51:05
2019-12-01T21:51:05
225,093,382
1
2
null
null
null
null
UTF-8
Java
false
false
129
java
version https://git-lfs.github.com/spec/v1 oid sha256:d3c95c71a62903117f05aa51431fe64242a50a47022b55336b4541e27d636545 size 2708
[ "marcelo.laser@gmail.com" ]
marcelo.laser@gmail.com
fe8fc4881e57b7689da95a7851ee227692d558fe
1362131cfc6b4791f1384f6e227dc60d6b0c6870
/Client/Interface10.java
f19e766604329ad39d90f633c51a1a6486fd2feb
[ "BSD-3-Clause", "Beerware" ]
permissive
xq262144/CodeUSA-Deob
66b469927502fd07719e6771c585b03122d83e19
903211676161f95fcc0e23e83892d37b6e4c7b45
refs/heads/master
2021-01-22T07:48:19.125603
2015-05-18T21:46:10
2015-05-18T21:46:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
313
java
/* Interface10 - Decompiled by JODE * Visit http://jode.sourceforge.net/ */ interface Interface10 { public void method23(int i, boolean bool); public void method24(int i); public int method25(int i); public int method26(int i); public void method27(int i); public boolean method28(int i, long l); }
[ "andrew@codeusa523.org" ]
andrew@codeusa523.org
c5ac49fa668a40b08ee4c71faf3caae9fe339a7c
a803b8812edb80864cfe6881bdd080b594448ffc
/src/arrays/_StringLength.java
61021e36a8ef2d33323c1bb2bed209c74fa26c1f
[]
no_license
Arasefe/Repl-it
1424e621b7f39b497beff5b3eb9b07ad41ab4f15
72cc4d374b8c560551873a93fbfa0773880dd7f4
refs/heads/master
2022-12-16T08:23:43.505522
2020-09-08T23:03:49
2020-09-08T23:03:49
284,323,736
0
0
null
null
null
null
UTF-8
Java
false
false
317
java
package arrays; import java.util.Scanner; public class _StringLength { public static void main(String[] args) { Scanner s = new Scanner(System.in); System.out.println("enter your name:"); String txt=s.next(); int length=txt.length(); System.out.println(length); } }
[ "ismail_yildirim69@yahoo.com" ]
ismail_yildirim69@yahoo.com
62fce57d842de352c77fba6cc02e02465390c5de
16b99e973ed56bf1a92ca6bee5765b5791f7ec11
/src/main/java/com/oneliang/frame/plugin/PluginBean.java
1a646554ac2a248fa9c7a48ca9b8caffea7380c2
[ "Apache-2.0" ]
permissive
oneliang/frame-common-java
be7359c9404c45631c492b8a3005c58ebc302972
c6ce39d2a2069ab278a51e209fc2d626ea43e0c4
refs/heads/master
2021-01-19T02:06:00.613681
2020-09-16T05:32:26
2020-09-16T05:32:26
56,282,177
1
0
null
null
null
null
UTF-8
Java
false
false
557
java
package com.oneliang.frame.plugin; public class PluginBean { private String id=null; private Plugin pluginInstance=null; /** * @return the id */ public String getId() { return id; } /** * @param id the id to set */ public void setId(String id) { this.id = id; } /** * @return the pluginInstance */ public Plugin getPluginInstance() { return pluginInstance; } /** * @param pluginInstance the pluginInstance to set */ public void setPluginInstance(Plugin pluginInstance) { this.pluginInstance = pluginInstance; } }
[ "oneliang@tencent.com" ]
oneliang@tencent.com
f9ab117aad725686d3d5bb6525203739def9343f
8f07d264d7d19bd086d2a4cead0653e613a2f3eb
/JAVA提高篇/25_IO流/src/二_字节输出流/字节输出流追加续写换新.java
f78514698a26a69ff3edc33fefe2805738a6e786
[]
no_license
GaoLingCong/Java-SE
5bdc948310b8e9ba4e065c0d7b7a88b8a97525aa
285542ca713224e155b8224b0fcf1e4cc8f4e092
refs/heads/master
2023-04-08T10:18:27.388378
2021-03-30T07:13:25
2021-03-30T07:13:25
303,992,701
0
0
null
null
null
null
UTF-8
Java
false
false
1,143
java
package 二_字节输出流; import java.io.FileOutputStream; import java.io.IOException; /* 追加写/续写:使用两个参数的构造方法 FileOutputStream(String name, boolean append)创建一个向具有指定 name 的文件中写入数据的输出文件流。 FileOutputStream(File file, boolean append) 创建一个向指定 File 对象表示的文件中写入数据的文件输出流。 参数: String name,File file:写入数据的目的地 boolean append:追加写开关 true:创建对象不会覆盖源文件,继续在文件的末尾追加写数据 false:创建一个新文件,覆盖源文件 写换行:写换行符号 windows:\r\n linux:/n mac:/r */ public class 字节输出流追加续写换新 { public static void main(String[] args) throws IOException { FileOutputStream fos = new FileOutputStream("F:\\计算机\\C源代码\\c.txt",true); for (int i = 0; i < 10; i++) { fos.write("你好".getBytes()); fos.write("\r\n".getBytes()); } fos.close(); } }
[ "you@example.com" ]
you@example.com
0fd5d5dcc4dd4b7bdbc281bb129fc0c6fc5806a7
6cc28f9bbf4a90925d6826724a22c6f5acc568c1
/src/main/java/com/docswebapps/appsuppdash/web/rest/vm/LoggerVM.java
5e8b2b13108c40325b049232a5e7d947828b20a9
[ "MIT" ]
permissive
DocsWebApps/application-support-dashboard
d293963c408b512c437abcca2b394ec8ccfd6a80
1a56985dd5177318a3987154eb7b8056fcacd6f5
refs/heads/master
2023-03-05T08:08:02.280501
2022-05-10T10:20:47
2022-05-10T10:20:47
173,820,584
2
2
null
2023-03-01T04:24:41
2019-03-04T20:59:59
Java
UTF-8
Java
false
false
895
java
package com.docswebapps.appsuppdash.web.rest.vm; import ch.qos.logback.classic.Logger; /** * View Model object for storing a Logback logger. */ public class LoggerVM { private String name; private String level; public LoggerVM(Logger logger) { this.name = logger.getName(); this.level = logger.getEffectiveLevel().toString(); } public LoggerVM() { // Empty public constructor used by Jackson. } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getLevel() { return level; } public void setLevel(String level) { this.level = level; } @Override public String toString() { return "LoggerVM{" + "name='" + name + '\'' + ", level='" + level + '\'' + '}'; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
0a7140e4218fb62368656d9c31aa9dd28c9352db
41120da488b02da098eadea8799cf896aad44d65
/Apostila ITTraining/Java WEB/Aula 02 Secoes Cookies e Banco/(Treinamento Aula02 - Extra) Sessoes/src/java/classes/FecharSessao.java
2402c0f96264e6605b369363e89106902b04f446
[]
no_license
RUB3XT0R/java_projects
b9a78fb113e43b4db4f9d3ec72b860ea1e897f45
007b5ac6828143e270ff8e4f132d64a3516b2877
refs/heads/master
2021-01-23T21:28:06.517991
2013-01-13T13:23:08
2013-01-13T13:23:08
62,026,819
1
0
null
2016-06-27T05:04:13
2016-06-27T05:04:10
null
UTF-8
Java
false
false
2,481
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package classes; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; /** * * @author Lucas Biason */ public class FecharSessao extends HttpServlet { protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); HttpSession sessao = request.getSession(true); sessao.removeAttribute("nome"); String nome = (String) sessao.getAttribute("nome"); String html = "<html><body>" + "Sua ID é: <strong>" + sessao.getId() + "</strong><br/>" + "E seu nome é:<strong>" + nome + "</strong><br/>" + "<a href='CriarSessao'>Clique aqui</a>" + "para iniciar uma noa sessão." + "</body></html>"; out.print(html); out.close(); } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** * Handles the HTTP <code>GET</code> method. * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Handles the HTTP <code>POST</code> method. * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Returns a short description of the servlet. * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> }
[ "biasonlucky@hotmail.com" ]
biasonlucky@hotmail.com
14a9f8d4499f3b788e182ced416949b6d0982533
31d76e406f995f2d22480cee28dfdf8158426e59
/Server/src/test/java/org/xdi/oxauth/comp/IdGenServiceTest.java
5c13ddafe55540f6ee7e7e9c4bb7b328ad2e3bb2
[ "MIT" ]
permissive
shoebkhan09/oxAuth
caf4ffc7a8c5c8a4ce6c7cf50e88cc0f593ae184
c227ef374eb08309589f6287a62f64d5155e39f2
refs/heads/master
2020-03-19T04:56:08.756219
2018-06-01T16:38:42
2018-06-01T16:38:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,171
java
/* * oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. * * Copyright (c) 2014, Gluu */ package org.xdi.oxauth.comp; import java.io.IOException; import java.io.InputStream; import javax.inject.Inject; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; import org.gluu.persist.ldap.impl.LdapEntryManager; import org.testng.Assert; import org.testng.annotations.Test; import org.xdi.model.ProgrammingLanguage; import org.xdi.model.custom.script.CustomScriptType; import org.xdi.model.custom.script.model.CustomScript; import org.xdi.oxauth.BaseComponentTest; import org.xdi.oxauth.idgen.ws.rs.IdGenService; import org.xdi.oxauth.model.config.ConfigurationFactory; import org.xdi.oxauth.service.custom.CustomScriptService; import org.xdi.util.INumGenerator; /** * @author Yuriy Zabrovarnyy * @version 0.9, 27/06/2013 */ public class IdGenServiceTest extends BaseComponentTest { @Inject private ConfigurationFactory configurationFactory; @Inject private CustomScriptService customScriptService; @Inject private IdGenService idGenService; @Inject private LdapEntryManager ldapEntryManager; private static String idCustomScriptDn; private CustomScript buildIdCustomScriptEntry(String idScript) { String basedInum = configurationFactory.getAppConfiguration().getOrganizationInum(); String customScriptId = basedInum + "!" + INumGenerator.generate(2); String dn = customScriptService.buildDn(customScriptId); CustomScript customScript = new CustomScript(); customScript.setDn(dn); customScript.setInum(customScriptId); customScript.setProgrammingLanguage(ProgrammingLanguage.PYTHON); customScript.setScriptType(CustomScriptType.ID_GENERATOR); customScript.setScript(idScript); customScript.setName("test_id"); customScript.setLevel(0); customScript.setEnabled(true); customScript.setRevision(1); return customScript; } @Test public void loadCustomScript() { final InputStream inputStream = IdGenServiceTest.class.getResourceAsStream("/id/gen/SampleIdGenerator.py"); try { final String idScript = IOUtils.toString(inputStream); CustomScript idCustomScript = buildIdCustomScriptEntry(idScript); this.idCustomScriptDn = idCustomScript.getDn(); ldapEntryManager.persist(idCustomScript); } catch (IOException e) { throw new RuntimeException(e); } finally { IOUtils.closeQuietly(inputStream); } } @Test(dependsOnMethods = "loadCustomScript") public void testCustomIdGenerationByPythonScript() { final String uuid = idGenService.generateId("test", ""); System.out.println("Generated Id: " + uuid); Assert.assertFalse(StringUtils.isNotBlank(uuid)); final String invalidUuid = idGenService.generateId("", ""); System.out.println("Generated invalid Id: " + invalidUuid); Assert.assertFalse(StringUtils.equalsIgnoreCase(invalidUuid, "invalid")); } @Test(dependsOnMethods = "testCustomIdGenerationByPythonScript") public void removeCustomScript() { CustomScript customScript = new CustomScript(); customScript.setDn(this.idCustomScriptDn); ldapEntryManager.remove(customScript); } }
[ "Yuriy.Movchan@gmail.com" ]
Yuriy.Movchan@gmail.com
7e9e3608099b37f65abcf26dc7df621b8a7ad8f1
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_completed/4228617.java
993190f932819324406958f0ff03c9d981cbc087
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,448
java
import java.io.*; import java.lang.*; import java.util.*; class c4228617 { public static MyHelperClass toHexString(MyHelperClass o0){ return null; } //public MyHelperClass toHexString(MyHelperClass o0){ return null; } public static String createHash(String seed) { MessageDigest md; try { MyHelperClass MessageDigest = new MyHelperClass(); md =(MessageDigest)(Object) MessageDigest.getInstance("SHA"); } catch (UncheckedIOException e) { throw new RuntimeException("Can't happen!", e); } try { MyHelperClass CHARSET = new MyHelperClass(); md.update(seed.getBytes((String)(Object)CHARSET)); // MyHelperClass CHARSET = new MyHelperClass(); md.update(String.valueOf(System.currentTimeMillis()).getBytes((String)(Object)CHARSET)); return(String)(Object) toHexString(md.digest()); } catch (UnsupportedEncodingException e) { throw new RuntimeException("Can't happen!", e); } } } // Code below this line has been added to remove errors class MyHelperClass { public MyHelperClass getInstance(String o0){ return null; }} class MessageDigest { public MyHelperClass update(byte[] o0){ return null; } public MyHelperClass digest(){ return null; }} class NoSuchAlgorithmException extends Exception{ public NoSuchAlgorithmException(String errorMessage) { super(errorMessage); } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
fb9317f007dcdc1334a9d566cb51c54e1b0739bf
e10cbe24faed9436d91839e3b153e154ac28e307
/app/src/main/java/com/laoodao/smartagri/db/DBArea.java
d71bb1ee0db3cb330e47b3c577e5c14655fd33d1
[]
no_license
xiaojunruit/Laodao
1392416280c74297f837bcff29f5f387c729282f
536c61e57757261a05d576f6185c9e22f4676ed3
refs/heads/master
2021-08-24T10:33:43.005913
2017-12-09T03:50:28
2017-12-09T03:50:28
113,647,937
0
0
null
null
null
null
UTF-8
Java
false
false
302
java
package com.laoodao.smartagri.db; import com.raizlabs.android.dbflow.annotation.Database; /** * Created by 欧源 on 2017/4/26. */ @Database(name = DBArea.NAME, version = DBArea.VERSION) public class DBArea { public static final String NAME = "area"; public static final int VERSION = 4; }
[ "llanlese@gmail.com" ]
llanlese@gmail.com
45fc23dbf1f25bd1374ea3f45856e1c9b444c681
40e3627ab89ac34d33ffcd6bcefaa93be66868dd
/src/test/java/com/univocity/parsers/common/input/ExpandingCharAppenderTest.java
315034928124f17304524343487cbc3b88a6c6c1
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
DD2480-group-13/univocity-parsers
b1c39fdea2c4c8acd524f7383dc16e551c553232
a238731d8679c45bf3072b6d4e0a3822414a6f2a
refs/heads/master
2021-01-03T09:15:00.282783
2020-02-18T15:59:55
2020-02-18T15:59:55
240,016,171
1
0
NOASSERTION
2020-02-18T14:48:00
2020-02-12T13:12:30
Java
UTF-8
Java
false
false
6,085
java
/******************************************************************************* * Copyright 2016 Univocity Software Pty Ltd * * 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.univocity.parsers.common.input; import org.testng.annotations.*; import static org.testng.Assert.*; public class ExpandingCharAppenderTest { @Test public void testAppendIgnoringWhitespace() throws Exception { ExpandingCharAppender a = new ExpandingCharAppender(2, null, -1); assertEquals(a.chars.length, 2); a.append('a'); a.append('b'); a.appendIgnoringWhitespace(' '); assertEquals(a.toString(), "ab"); assertEquals(a.chars.length, 6); a.appendIgnoringWhitespace('c'); a.appendIgnoringWhitespace(' '); assertEquals(a.toString(), "ab c"); assertEquals(a.chars.length, 6); } @Test public void testAppendIgnoringPadding() throws Exception { ExpandingCharAppender a = new ExpandingCharAppender(1, null, -1); assertEquals(a.chars.length, 1); a.append('_'); a.append('b'); a.appendIgnoringPadding('_', '_'); assertEquals(a.toString(), "_b"); assertEquals(a.chars.length, 4); a.appendIgnoringPadding('a', '_'); assertEquals(a.toString(), "_b_a"); assertEquals(a.chars.length, 4); } @Test public void testAppendIgnoringWhitespaceAndPadding() throws Exception { ExpandingCharAppender a = new ExpandingCharAppender(1, null, -1); assertEquals(a.chars.length, 1); a.append('_'); a.append('b'); a.appendIgnoringWhitespaceAndPadding(' ', '_'); assertEquals(a.toString(), "_b"); assertEquals(a.chars.length, 4); a.appendIgnoringWhitespaceAndPadding('_', '_'); assertEquals(a.toString(), "_b"); assertEquals(a.chars.length, 4); a.appendIgnoringWhitespaceAndPadding('c', '_'); assertEquals(a.toString(), "_b _c"); assertEquals(a.chars.length, 10); } @Test public void testAppend() throws Exception { ExpandingCharAppender a = new ExpandingCharAppender(1, null, -1); a.append('a'); assertEquals(a.toString(), "a"); assertEquals(a.chars.length, 1); a.append('b'); assertEquals(a.toString(), "ab"); assertEquals(a.chars.length, 4); a.append('c'); a.append('d'); a.append('e'); assertEquals(a.toString(), "abcde"); assertEquals(a.chars.length, 10); } @Test public void testFill() throws Exception { ExpandingCharAppender a = new ExpandingCharAppender(2, null, -1); a.fill('*', 2); assertEquals(a.toString(), "**"); assertEquals(a.chars.length, 2); a.fill('*', 4); assertEquals(a.toString(), "******"); assertEquals(a.chars.length, 6); a.fill('*', 1); assertEquals(a.toString(), "*******"); assertEquals(a.chars.length, 14); } @Test public void testPrepend() throws Exception { ExpandingCharAppender a = new ExpandingCharAppender(2, null, -1); a.prepend('a'); assertEquals(a.toString(), "a"); assertEquals(a.chars.length, 2); a.prepend('b'); assertEquals(a.toString(), "ba"); assertEquals(a.chars.length, 2); a.prepend('c'); assertEquals(a.toString(), "cba"); assertEquals(a.chars.length, 4); a.prepend("12345678890".toCharArray()); assertEquals(a.toString(), "12345678890cba"); } @Test public void testAppend1() throws Exception { ExpandingCharAppender a = new ExpandingCharAppender(2, null, -1); ExpandingCharAppender b = new ExpandingCharAppender(2, null, -1); a.append(b); assertEquals(a.toString(), null); assertEquals(a.chars.length, 2); b.append('a'); b.append('b'); a.append(b); //whitespaceRangeStart gets reset here assertEquals(a.toString(), "ab"); assertEquals(a.chars.length, 2); a.append(b); //should make no difference assertEquals(a.toString(), "ab"); assertEquals(a.chars.length, 2); assertEquals(b.toString(), null); assertEquals(b.chars.length, 2); b.append('c'); b.append('d'); a.append(b); assertEquals(a.toString(), "abcd"); assertEquals(a.chars.length, 6); assertEquals(b.toString(), null); assertEquals(b.chars.length, 2); } @Test public void testAppendArray() { ExpandingCharAppender a = new ExpandingCharAppender(2, null, -1); a.append("abc".toCharArray(), 0, 3); assertEquals(a.toString(), "abc"); assertEquals(a.chars.length, 5); a.append("defghi".toCharArray(), 0, 3); assertEquals(a.toString(), "abcdef"); a.append("defghi".toCharArray(), 4, 2); assertEquals(a.toString(), "abcdefhi"); a.append("012345678901234567890123456789012345678901234567890123456789".toCharArray(), 0, 60); assertEquals(a.toString(), "abcdefhi012345678901234567890123456789012345678901234567890123456789"); } @Test public void testRemove(){ ExpandingCharAppender a = new ExpandingCharAppender(10, null, -1); a.append("0123456789"); a.remove(0, 0); assertEquals(a.toString(), "0123456789"); a.remove(10, 0); assertEquals(a.toString(), "0123456789"); a.remove(0, 1); assertEquals(a.toString(), "123456789"); a.remove(8, 1); assertEquals(a.toString(), "12345678"); a.remove(2, 3); assertEquals(a.toString(), "12678"); a.remove(1, 2); assertEquals(a.toString(), "178"); a.remove(1, 1); assertEquals(a.toString(), "18"); a.remove(1, 1); assertEquals(a.toString(), "1"); a.remove(0, 1); assertEquals(a.toString(), null); a.append("0123456789"); a.remove(1, 1); assertEquals(a.toString(), "023456789"); a.remove(1, 4); assertEquals(a.toString(), "06789"); a.reset(); a.append("0123456789"); a.remove(1, 7); assertEquals(a.toString(), "089"); a.remove(0, 3); assertEquals(a.toString(), null); } }
[ "jbax@univocity.com" ]
jbax@univocity.com
6e9ba85d4ccf0b56dc4a9c795e4293753f476a81
d214629d221e7c7264d68b7f2b3d5aa4b48ed6a0
/src/main/java/com/nissangroups/pd/i000044/processor/I000044Decider.java
bd7b35ba9db2f2b14e2d0fc146f3e2e45429c6bc
[]
no_license
vidyasekaran/Renault
cebd721903d64aa91572614980aab98dcea95adb
b1822c2af84eaaae5e63d3f46a47d0806add1fcb
refs/heads/master
2021-09-10T07:12:14.655190
2018-03-22T05:24:55
2018-03-22T05:24:55
126,129,356
0
0
null
null
null
null
UTF-8
Java
false
false
3,516
java
/* * System Name : Post Dragon * Sub system Name : Interface * Function ID : PST-DRG-I000044 * Module : OR Ordering * Process Outline : SEND MONTHLY PRODUCTION SCHEDULE TO NSC(STANDARD) * * <Revision History> * Date Name(Company Name) Description * ---------- ------------------------------ --------------------- * 11-01-2016 z016127(RNTBCI) Initial Version * */ package com.nissangroups.pd.i000044.processor; import static com.nissangroups.pd.util.PDConstants.DOLLAR; import static com.nissangroups.pd.util.PDConstants.INSIDE_METHOD; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.StepExecution; import org.springframework.batch.core.job.flow.FlowExecutionStatus; import org.springframework.batch.core.job.flow.JobExecutionDecider; import org.springframework.beans.factory.annotation.Autowired; import com.nissangroups.pd.i000044.bean.I000044InputParam; import com.nissangroups.pd.i000044.util.I000044Constants; import com.nissangroups.pd.util.IFConstants; import com.nissangroups.pd.util.IfCommonUtil; import com.nissangroups.pd.util.PDConstants; import com.nissangroups.pd.util.PDMessageConsants; /** * This Class I000044Decider to decide the execution of steps based on the condition. * The return value will be used as a status to determine the next step in the job. * * @author z016127 * */ public class I000044Decider implements JobExecutionDecider { /** Common utility service bean injection */ @Autowired(required = false) IfCommonUtil commonutility; /** Constant LOG */ private static final Log LOG = LogFactory .getLog(I000044Decider.class.getName()); /** * This method is used to decide which step to execute next * based on the Input parameter * If return value is NoOrderTakeBasePeriod it goes to step Fail * else if Completed it goes to Step2 * * @param jobExecution * JobExecution object * @param stepExecution * StepExecution object * @return FlowExecutionStatus object */ @Override public FlowExecutionStatus decide(JobExecution jobExecution, StepExecution stepExecution) { LOG.info( DOLLAR + INSIDE_METHOD + DOLLAR); /** Input parameter list */ List<I000044InputParam> paramList = (List<I000044InputParam>) jobExecution.getExecutionContext().get(I000044Constants.PARAM_LIST); /** Variable PorCD */ String porCd = (String)stepExecution.getJobExecution().getExecutionContext().get(I000044Constants.POR_CD); /** Variable Interface File ID */ String ifFileId = jobExecution.getJobParameters().getString( IFConstants.INTERFACE_FILE_ID); if(paramList == null || paramList.isEmpty()){ commonutility.setStatus(PDConstants.INTERFACE_UNPROCESSED_STATUS); commonutility.setRemarks(PDMessageConsants.M00159.replace(PDConstants.ERROR_MESSAGE_1, ifFileId) .replace(PDConstants.ERROR_MESSAGE_2, PDConstants.Stage_status_CD) .replace(PDConstants.ERROR_MESSAGE_3, porCd) .replace(PDConstants.ERROR_MESSAGE_4, PDConstants.MONTHLY_ORDER_TAKE_BASE_PERIOD_MST)); return new FlowExecutionStatus(I000044Constants.NOORDR_TK_BASE_PRD); }else{ return new FlowExecutionStatus(I000044Constants.COMPLETED); } } }
[ "vidguru@guru.yogananda" ]
vidguru@guru.yogananda
8b1770b9aa5c0eef5b29919c10eeb1971af4fe4d
b87148503121adb74e699f4c015f591e0aeb4ba6
/src/main/java/com/igormaznitsa/jcp/cmdline/CommandLineHandler.java
787925544e06119a5c40e00288f63dec8271d0bf
[]
no_license
smalinin/java-comment-preprocessor
ec0275e617818d88ac2fe8b1f04a32c272da4f0b
40755c48d95b713e97585e8dc66a0e37212006ea
refs/heads/master
2020-12-06T22:04:20.560845
2015-12-08T20:19:41
2015-12-08T20:19:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,621
java
/* * Copyright 2014 Igor Maznitsa (http://www.igormaznitsa.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 com.igormaznitsa.jcp.cmdline; import com.igormaznitsa.jcp.context.PreprocessorContext; /** * The interface describes a command line key handler. It is not just a handler * but it will be called for all met keys to recognize one to be processed. * * @author Igor Maznitsa (igor.maznitsa@igormaznitsa.com) */ public interface CommandLineHandler { /** * Get the key name for the handler * * @return the key name as a String, must not be null */ String getKeyName(); /** * Get the description of the key (it will be printed into the help text) * * @return the description as a String */ String getDescription(); /** * Process a command line key * * @param key the command line key to be processed, must not be null * @param context the preprocessor context, must not be null * @return true if the key has been recognized and processed else false */ boolean processCommandLineKey(String key, PreprocessorContext context); }
[ "rrg4400@gmail.com" ]
rrg4400@gmail.com
a6098f3b2a4ac885939bf9338d2a83c26ffef609
bd35a5ed45dbecd6e8962ae0b892471e04f4b976
/src/main/java/com/volmit/fulcrum/bukkit/ThreadInformation.java
cc90c976bbe593ac6af5309785aebff17eca6db8
[ "WTFPL" ]
permissive
CaptainAmpersand/Fulcrum
362008ce985e68a60259c8fc754d9dd5031bc86c
e6801aee8073b218cb85e556bfcd5c26da7805bc
refs/heads/master
2021-04-18T22:16:12.334980
2018-03-25T07:47:57
2018-03-25T07:47:57
126,671,199
0
0
WTFPL
2018-03-25T07:58:16
2018-03-25T06:35:57
Java
UTF-8
Java
false
false
1,456
java
package com.volmit.fulcrum.bukkit; import com.volmit.dumpster.Average; public class ThreadInformation { private double ticksPerSecond; private int queuedSize; private boolean processing; private double utilization; private Average ticksPerSecondAverage; private long tick; private final int id; public ThreadInformation(int id) { this.id = id; utilization = 0; ticksPerSecond = 0; queuedSize = 0; processing = false; ticksPerSecondAverage = new Average(20); tick = TICK.tick; } public double getTicksPerSecond() { return ticksPerSecond; } public void setTicksPerSecond(double ticksPerSecond) { this.ticksPerSecond = ticksPerSecond; ticksPerSecondAverage.put(ticksPerSecond); } public int getQueuedSize() { return queuedSize; } public void setQueuedSize(int queuedSize) { this.queuedSize = queuedSize; } public boolean isProcessing() { return processing; } public void setProcessing(boolean processing) { this.processing = processing; } public double getUtilization() { return utilization; } public void setUtilization(double utilization) { this.utilization = utilization; } public double getTicksPerSecondAverage() { return ticksPerSecondAverage.getAverage(); } public long getTick() { return tick; } public void setTick(long tick) { this.tick = tick; } public long getTickLag() { return TICK.tick - getTick(); } public int getId() { return id; } }
[ "danielmillst@gmail.com" ]
danielmillst@gmail.com
22e73c6dfee708304b92868794865be4644d1b7e
5741045375dcbbafcf7288d65a11c44de2e56484
/reddit-decompilada/android/support/design/widget/ViewGroupUtils.java
89c67e3ac56e40ca11cf5d384534ddc73ececc02
[]
no_license
miarevalo10/ReporteReddit
18dd19bcec46c42ff933bb330ba65280615c281c
a0db5538e85e9a081bf268cb1590f0eeb113ed77
refs/heads/master
2020-03-16T17:42:34.840154
2018-05-11T10:16:04
2018-05-11T10:16:04
132,843,706
0
0
null
null
null
null
UTF-8
Java
false
false
1,725
java
package android.support.design.widget; import android.graphics.Matrix; import android.graphics.Rect; import android.graphics.RectF; import android.view.View; import android.view.ViewGroup; import android.view.ViewParent; class ViewGroupUtils { private static final ThreadLocal<Matrix> f719a = new ThreadLocal(); private static final ThreadLocal<RectF> f720b = new ThreadLocal(); static void m352a(ViewGroup viewGroup, View view, Rect rect) { rect.set(0, 0, view.getWidth(), view.getHeight()); Matrix matrix = (Matrix) f719a.get(); if (matrix == null) { matrix = new Matrix(); f719a.set(matrix); } else { matrix.reset(); } m353a((ViewParent) viewGroup, view, matrix); viewGroup = (RectF) f720b.get(); if (viewGroup == null) { viewGroup = new RectF(); f720b.set(viewGroup); } viewGroup.set(rect); matrix.mapRect(viewGroup); rect.set((int) (viewGroup.left + 1056964608), (int) (viewGroup.top + 0.5f), (int) (viewGroup.right + 0.5f), (int) (viewGroup.bottom + 1056964608)); } private static void m353a(ViewParent viewParent, View view, Matrix matrix) { ViewParent parent = view.getParent(); if ((parent instanceof View) && parent != viewParent) { View view2 = (View) parent; m353a(viewParent, view2, matrix); matrix.preTranslate((float) (-view2.getScrollX()), (float) (-view2.getScrollY())); } matrix.preTranslate((float) view.getLeft(), (float) view.getTop()); if (view.getMatrix().isIdentity() == null) { matrix.preConcat(view.getMatrix()); } } }
[ "mi.arevalo10@uniandes.edu.co" ]
mi.arevalo10@uniandes.edu.co
7f285014baa48a14a7bb6a900b461c08d9b76926
c3101515ddde8a6e6ddc4294a4739256d1600df0
/GeneralApp__2.20_1.0(1)_source_from_JADX/sources/com/google/firebase/crashlytics/internal/common/CrashlyticsReportWithSessionId.java
ee44fca0cdf34302a19d77d91c449c5ca26e684b
[]
no_license
Aelshazly/Carty
b56fdb1be58a6d12f26d51b46f435ea4a73c8168
d13f3a4ad80e8a7d0ed1c6a5720efb4d1ca721ee
refs/heads/master
2022-11-14T23:29:53.547694
2020-07-08T19:23:39
2020-07-08T19:23:39
278,175,183
0
0
null
null
null
null
UTF-8
Java
false
false
550
java
package com.google.firebase.crashlytics.internal.common; import com.google.firebase.crashlytics.internal.model.CrashlyticsReport; /* compiled from: com.google.firebase:firebase-crashlytics@@17.0.0-beta04 */ public abstract class CrashlyticsReportWithSessionId { public abstract CrashlyticsReport getReport(); public abstract String getSessionId(); public static CrashlyticsReportWithSessionId create(CrashlyticsReport report, String sessionId) { return new AutoValue_CrashlyticsReportWithSessionId(report, sessionId); } }
[ "aelshazly@engineer.com" ]
aelshazly@engineer.com
df8aa08df0bd34471f10b1846de3608fb041536b
14592d21bb11525b219a7cf528fa4264114fa2f2
/thinking_in_java/src/main/java/enumerated/ConstantSpecificMethod.java
8030db83cf5d021a4505ec791561b6f11ac5541a
[]
no_license
MABIY/learn_java
cf09648e3d666dfbe5eaa4187de50cbb3e70a790
617dd5ba68748f1adfec5146b52a3723ee42dac7
refs/heads/master
2021-10-07T15:54:06.827242
2021-09-22T07:16:47
2021-09-22T07:16:47
121,255,181
0
0
null
null
null
null
UTF-8
Java
false
false
736
java
package enumerated; import java.text.DateFormat; import java.util.Date; /** * @author lh */ public enum ConstantSpecificMethod { DATE_TIME { @Override String getInfo() { return DateFormat.getDateInstance().format(new Date()); } }, CLASSPATH{ @Override String getInfo() { return System.getenv("CLASSPATH"); } }, VERSION{ @Override String getInfo() { return System.getProperty("java.version"); } } ; abstract String getInfo(); public static void main(String[] args) { for (ConstantSpecificMethod csm : values()) { System.out.println(csm.getInfo()); } } }
[ "jyfc7879@gmail.com" ]
jyfc7879@gmail.com
eb7181a5607fbc5d0f40de280cbb64309d920ba9
c6e55c09acb1f28dfd487d1f2b346b78cb59c246
/doo/src/main/java/ticTacToe/version100/Board.java
3564cd016d90d4534f71fce4493d53b998b79d27
[]
no_license
imolinuevo/IWVG
619449cc3b37d8df908d4f20dfa99a623a4a09e0
e11fcda2dc27b1c2d22723c7817a3708f23e270f
refs/heads/master
2021-01-18T12:18:46.256014
2015-10-15T11:43:30
2015-10-15T11:43:30
44,312,071
0
0
null
2015-10-15T11:05:51
2015-10-15T11:05:51
null
UTF-8
Java
false
false
1,896
java
package ticTacToe.version100; public class Board { private char[][] tokens; public Board() { tokens = new char[3][3]; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { tokens[i][j] = '_'; } } } public void write() { IO io = new IO(); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { io.write(tokens[i][j] + " "); } io.writeln(); } } public boolean complete() { int contTokens = 0; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { if (tokens[i][j]!='_') { contTokens++; } } } return contTokens == 6; } public boolean existTicTacToe() { return this.existTicTacToe('x') || this.existTicTacToe('o'); } public boolean existTicTacToe(char token) { if (tokens[1][1]==token){ if (tokens[0][0]==token){ return tokens[2][2]==token; } if (tokens[0][2]==token){ return tokens[2][0]==token; } if (tokens[0][1]==token){ return tokens[2][1]==token; } if (tokens[1][0]==token){ return tokens[1][2]==token; } return false; } if (tokens[0][0]==token){ if (tokens[0][1]==token){ return tokens[0][2]==token; } if (tokens[1][0]==token){ return tokens[2][0]==token; } return false; } if (tokens[2][2]==token){ if (tokens[1][2]==token){ return tokens[0][2]==token; } if (tokens[2][1]==token){ return tokens[2][0]==token; } return false; } return false; } public boolean empty(int row, int column) { return tokens[row][column]=='_'; } public void put(int row, int column, char token) { tokens[row][column] = token; } public void remove(int row, int column) { tokens[row][column] = '_'; } public boolean full(int row, int column, char token) { return tokens[row][column]==token; } }
[ "setillofm@gmail.com" ]
setillofm@gmail.com
d85d653ca72d0484e16e64290a797836b18d970f
3a65b8241586fda0c2fee4256d38918d8ee5ee8f
/java-basic/src/main/java/bitcamp/java100/ch14/ex2/MyBufferedOutputStream.java
f829ad7f38759d8840e351e33d25bedc448a1c8a
[]
no_license
KIMMIAE/bitcamp
1319f49df3cc3c4e8c5af6655b554d116d9c8678
ea9d17c38a889ad79b5eae2529457a259bcb4e14
refs/heads/master
2021-10-21T17:52:06.080521
2019-03-05T12:58:09
2019-03-05T12:58:09
104,423,475
0
0
null
null
null
null
UTF-8
Java
false
false
628
java
package bitcamp.java100.ch14.ex2; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; // 상속을 이용한 기능 확장 public class MyBufferedOutputStream extends FileOutputStream { byte[] buf = new byte [8192]; int len; int cursor; public MyBufferedOutputStream(String path) throws FileNotFoundException { super(path); } @Override public void write(int b) throws IOException { if (cursor == buf.length) { this.write(buf); cursor = 0; } buf[cursor++] = (byte)b; } }
[ "kma613@naver.com" ]
kma613@naver.com
dee1cfc5bd6686097383e9c8fa96c5ae6bdd9f20
85932a806dc32ec80aa5d13e7be71f34909786ac
/2017/11/19/Test1.java
0f156735b5e326af0cdb66fdb11657660bd8f619
[]
no_license
renkaigis/KeepCoding
bed679e1573595b93d484fc7a9b274817fbfad7d
fce3d953da69f3469d4a92ae8e47d238bf2c70c6
refs/heads/master
2021-01-20T09:59:31.883392
2018-11-28T06:09:18
2018-11-28T06:09:18
101,612,966
1
1
null
null
null
null
UTF-8
Java
false
false
1,757
java
/** * 156:动态设置类的私有域 */ import java.lang.reflect.Field; public class Test1 { public static void main(String[] args) { Student student = new Student(); Class<?> clazz = student.getClass(); System.out.println("类的标准名称:" + clazz.getCanonicalName()); try { Field id = clazz.getDeclaredField("id"); System.out.println("设置前的 id:" + student.getId()); id.setAccessible(true); // 对于私有域,一定要是用 setAccessible() 将其可见性设置为 true 才能设置新值。 id.setInt(student, 10); System.out.println("设置后的 id:" + student.getId()); Field name = clazz.getDeclaredField("name"); System.out.println("设置前的 name:" + student.getName()); name.setAccessible(true); name.set(student, "Java"); System.out.println("设置后的 name:" + student.getName()); Field male = clazz.getDeclaredField("male"); System.out.println("设置前的 male:" + student.isMale()); male.setAccessible(true); male.set(student, true); System.out.println("设置后的 male:" + student.isMale()); Field account = clazz.getDeclaredField("account"); System.out.println("设置前的 account:" + student.getAccount()); account.setAccessible(true); account.setDouble(student, 12.34); System.out.println("设置后的 account:" + student.getAccount()); } catch (NoSuchFieldException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } } }
[ "renkaigis@163.com" ]
renkaigis@163.com
02840d5b9380389bcd73ee4d85dd671ebb04c79f
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/hazelcast/2016/4/InvocationFuture_IsDoneTest.java
82603e3e11289992eb2e8376886afe026d70470d
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
3,066
java
package com.hazelcast.spi.impl.operationservice.impl; import com.hazelcast.core.HazelcastInstance; import com.hazelcast.spi.InternalCompletableFuture; import com.hazelcast.spi.impl.operationservice.InternalOperationService; import com.hazelcast.test.HazelcastParallelClassRunner; import com.hazelcast.test.HazelcastTestSupport; import com.hazelcast.test.annotation.ParallelTest; import com.hazelcast.test.annotation.QuickTest; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import java.util.concurrent.ExecutionException; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @RunWith(HazelcastParallelClassRunner.class) @Category({QuickTest.class, ParallelTest.class}) public class InvocationFuture_IsDoneTest extends HazelcastTestSupport { private HazelcastInstance local; private InternalOperationService operationService; @Before public void setup() { local = createHazelcastInstance(); operationService = getOperationService(local); } @Test public void whenNullResponse() throws ExecutionException, InterruptedException { DummyOperation op = new DummyOperation(null); InternalCompletableFuture future = operationService.invokeOnTarget(null, op, getAddress(local)); future.get(); assertTrue(future.isDone()); } @Test public void whenInterruptedResponse() { DummyOperation op = new GetLostPartitionOperation(); InvocationFuture future = (InvocationFuture) operationService.invokeOnTarget(null, op, getAddress(local)); future.complete(InvocationValue.INTERRUPTED); assertTrue(future.isDone()); } @Test public void whenTimeoutResponse() { DummyOperation op = new GetLostPartitionOperation(); InvocationFuture future = (InvocationFuture) operationService.invokeOnTarget(null, op, getAddress(local)); future.complete(InvocationValue.CALL_TIMEOUT); assertTrue(future.isDone()); } @Test public void isDone_whenNoResponse() { DummyOperation op = new GetLostPartitionOperation(); InternalCompletableFuture future = operationService.invokeOnTarget(null, op, getAddress(local)); assertFalse(future.isDone()); } @Test public void isDone_whenObjectResponse() { DummyOperation op = new DummyOperation("foobar"); InternalCompletableFuture future = operationService.invokeOnTarget(null, op, getAddress(local)); assertTrue(future.isDone()); } // Needed to have an invocation and this is the easiest way how to get one and do not bother with its result. private static class GetLostPartitionOperation extends DummyOperation { { // we need to set the call-id to prevent running the operation on the calling-thread. setPartitionId(1); } @Override public void run() throws Exception { Thread.sleep(5000); } } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
e7e802b4170184acc18d19683cb84303c1469c5b
aa8c2a9e76cb71f3dfdf2fffd9cf26d153c4ef71
/src/main/java/com/javaaier/lesscode/project/system/dict/domain/DictData.java
d1ee10323027202dfb5de97954321ac3c2411706
[]
no_license
JavaAIer/LessCodeSB
a593fcded4a85ac169cf89d5260fafc3974b6365
c7d105f22089f17569a5cbde8b7cf9b9ccc775b6
refs/heads/master
2022-10-01T02:32:18.190419
2019-10-14T01:49:14
2019-10-14T01:49:14
192,286,086
0
0
null
2022-09-01T23:14:01
2019-06-17T06:16:01
HTML
UTF-8
Java
false
false
3,604
java
package com.javaaier.lesscode.project.system.dict.domain; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.javaaier.lesscode.framework.aspectj.lang.annotation.Excel; import com.javaaier.lesscode.framework.web.domain.BaseEntity; /** * 字典数据表 sys_dict_data * * @author javaaier */ public class DictData extends BaseEntity { private static final long serialVersionUID = 1L; /** 字典编码 */ @Excel(name = "字典编码") private Long dictCode; /** 字典排序 */ @Excel(name = "字典排序") private Long dictSort; /** 字典标签 */ @Excel(name = "字典标签") private String dictLabel; /** 字典键值 */ @Excel(name = "字典键值") private String dictValue; /** 字典类型 */ @Excel(name = "字典类型") private String dictType; /** 字典样式 */ @Excel(name = "字典样式") private String cssClass; /** 表格字典样式 */ private String listClass; /** 是否默认(Y是 N否) */ @Excel(name = "是否默认", readConverterExp = "Y=是,N=否") private String isDefault; /** 状态(0正常 1停用) */ @Excel(name = "状态", readConverterExp = "0=正常,1=停用") private String status; public Long getDictCode() { return dictCode; } public void setDictCode(Long dictCode) { this.dictCode = dictCode; } public Long getDictSort() { return dictSort; } public void setDictSort(Long dictSort) { this.dictSort = dictSort; } public String getDictLabel() { return dictLabel; } public void setDictLabel(String dictLabel) { this.dictLabel = dictLabel; } public String getDictValue() { return dictValue; } public void setDictValue(String dictValue) { this.dictValue = dictValue; } public String getDictType() { return dictType; } public void setDictType(String dictType) { this.dictType = dictType; } public String getCssClass() { return cssClass; } public void setCssClass(String cssClass) { this.cssClass = cssClass; } public String getListClass() { return listClass; } public void setListClass(String listClass) { this.listClass = listClass; } public String getIsDefault() { return isDefault; } public void setIsDefault(String isDefault) { this.isDefault = isDefault; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("dictCode", getDictCode()) .append("dictSort", getDictSort()) .append("dictLabel", getDictLabel()) .append("dictValue", getDictValue()) .append("dictType", getDictType()) .append("cssClass", getCssClass()) .append("listClass", getListClass()) .append("isDefault", getIsDefault()) .append("status", getStatus()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) .append("remark", getRemark()) .toString(); } }
[ "cuteui@qq.com" ]
cuteui@qq.com
fce1600a09a863873cdeafa3c16ffec91e343fad
b280a34244a58fddd7e76bddb13bc25c83215010
/scmv6/web-group/src/main/java/com/smate/web/group/model/group/pub/ConstPubType.java
e653d6fcb1bba47595fedef48a22e0b46362866a
[]
no_license
hzr958/myProjects
910d7b7473c33ef2754d79e67ced0245e987f522
d2e8f61b7b99a92ffe19209fcda3c2db37315422
refs/heads/master
2022-12-24T16:43:21.527071
2019-08-16T01:46:18
2019-08-16T01:46:18
202,512,072
2
3
null
2022-12-16T05:31:05
2019-08-15T09:21:04
Java
UTF-8
Java
false
false
2,776
java
package com.smate.web.group.model.group.pub; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Transient; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; /** * @author tsz * */ @Entity @Table(name = "CONST_PUB_TYPE") @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public class ConstPubType implements java.io.Serializable { private static final long serialVersionUID = 2604384174807880623L; private Integer id; private String zhName; private String enName; private boolean enabled; private int seqNo; private String defaultPublishState; private Integer count; /** * 真实需要使用的名称. */ private String name; public ConstPubType() { super(); } public ConstPubType(Integer id, String zhName) { super(); this.id = id; this.zhName = zhName; } /** * @return the id */ @Id @Column(name = "TYPE_ID") public Integer getId() { return id; } /** * @param id the id to set */ public void setId(Integer id) { this.id = id; } /** * @return the zhName */ @Column(name = "ZH_NAME") public String getZhName() { return zhName; } /** * @param zhName the zhName to set */ public void setZhName(String zhName) { this.zhName = zhName; } /** * @return the enName */ @Column(name = "EN_NAME") public String getEnName() { return enName; } /** * @param enName the enName to set */ public void setEnName(String enName) { this.enName = enName; } /** * @return the enabled */ @Column(name = "ENABLED") public boolean isEnabled() { return enabled; } /** * @param enabled the enabled to set */ public void setEnabled(boolean enabled) { this.enabled = enabled; } /** * @return the seqNo */ @Column(name = "SEQ_NO") public int getSeqNo() { return seqNo; } /** * @param seqNo the seqNo to set */ public void setSeqNo(int seqNo) { this.seqNo = seqNo; } /** * @return the defaultPublishState */ @Column(name = "DEFAULT_PUBLISH_STATE") public String getDefaultPublishState() { return defaultPublishState; } /** * @param defaultPublishState the defaultPublishState to set */ public void setDefaultPublishState(String defaultPublishState) { this.defaultPublishState = defaultPublishState; } public void setName(String name) { this.name = name; } @Transient public String getName() { return name; } @Transient public Integer getCount() { return count; } public void setCount(Integer count) { this.count = count; } }
[ "zhiranhe@irissz.com" ]
zhiranhe@irissz.com
25c497fc6e5f8c02080666718a36dd4378a5f303
f0568343ecd32379a6a2d598bda93fa419847584
/modules/dfp_axis/src/main/java/com/google/api/ads/dfp/axis/v201306/ReconciliationReportRowServiceInterface.java
dc102f46fea12c0c92479673a965320c601c57c6
[ "Apache-2.0" ]
permissive
frankzwang/googleads-java-lib
bd098b7b61622bd50352ccca815c4de15c45a545
0cf942d2558754589a12b4d9daa5902d7499e43f
refs/heads/master
2021-01-20T23:20:53.380875
2014-07-02T19:14:30
2014-07-02T19:14:30
21,526,492
1
0
null
null
null
null
UTF-8
Java
false
false
4,983
java
/** * ReconciliationReportRowServiceInterface.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.dfp.axis.v201306; public interface ReconciliationReportRowServiceInterface extends java.rmi.Remote { /** * Gets a {@link ReconciliationReportRowPage} of {@link ReconciliationReportRow} * objects that * satisfy the given {@link Statement#query}. The following fields * are supported for filtering: * * <table> * <tr> * <th scope="col">PQL Property</th> <th scope="col">Object Property</th> * </tr> * <tr> * <td>{@code reconciliationReportId}</td> * <td>{@link ReconciliationReportRow#reconciliationReportId}</td> * </tr> * <tr> * <td>{@code advertiserId}</td> * <td>{@link ReconciliationReportRow#advertiserId}</td> * </tr> * <tr> * <td>{@code orderId}</td> * <td>{@link ReconciliationReportRow#orderId}</td> * </tr> * <tr> * <td>{@code lineItemId}</td> * <td>{@link ReconciliationReportRow#lineItemId}</td> * </tr> * <tr> * <td>{@code creativeId}</td> * <td>{@link ReconciliationReportRow#creativeId}</td> * </tr> * <tr> * <td>{@code lineItemCostType}</td> * <td>{@link ReconciliationReportRow#lineItemCostType}</td> * </tr> * <tr> * <td>{@code dfpClicks}</td> * <td>{@link ReconciliationReportRow#dfpClicks}</td> * </tr> * <tr> * <td>{@code dfpImpressions}</td> * <td>{@link ReconciliationReportRow#dfpImpressions}</td> * </tr> * <tr> * <td>{@code dfpLineItemDays}</td> * <td>{@link ReconciliationReportRow#dfpLineItemDays}</td> * </tr> * <tr> * <td>{@code thirdPartyClicks}</td> * <td>{@link ReconciliationReportRow#thirdPartyClicks}</td> * </tr> * <tr> * <td>{@code thirdPartyImpressions}</td> * <td>{@link ReconciliationReportRow#thirdPartyImpressions}</td> * </tr> * <tr> * <td>{@code thirdPartyLineItemDays}</td> * <td>{@link ReconciliationReportRow#thirdPartyLineItemDays}</td> * </tr> * <tr> * <td>{@code manualClicks}</td> * <td>{@link ReconciliationReportRow#manualClicks}</td> * </tr> * <tr> * <td>{@code manualImpressions}</td> * <td>{@link ReconciliationReportRow#manualImpressions}</td> * </tr> * <tr> * <td>{@code manualLineItemDays}</td> * <td>{@link ReconciliationReportRow#manualLineItemDays}</td> * </tr> * <tr> * <td>{@code reconciledClicks}</td> * <td>{@link ReconciliationReportRow#reconciledClicks}</td> * </tr> * <tr> * <td>{@code reconciledImpressions}</td> * <td>{@link ReconciliationReportRow#reconciledImpressions}</td> * </tr> * <tr> * <td>{@code reconciledLineItemDays}</td> * <td>{@link ReconciliationReportRow#reconciledLineItemDays}</td> * </tr> * </table> * * The {@code reconciliationReportId} field is required and can * only be combined with an * {@code AND} to other conditions. Furthermore, the results * may only belong to * one {@link ReconciliationReport}. * * * @param filterStatement a Publisher Query Language statement used to * filter a set of reconciliation report rows * * @return the reconciliation report rows that match the given filter */ public com.google.api.ads.dfp.axis.v201306.ReconciliationReportRowPage getReconciliationReportRowsByStatement(com.google.api.ads.dfp.axis.v201306.Statement filterStatement) throws java.rmi.RemoteException, com.google.api.ads.dfp.axis.v201306.ApiException; /** * Updates a list of {@link ReconciliationReportRow} which belong * to same * {@link ReconciliationReport}. * * * @param reconciliationReportRows a list of reconciliation report rows * to update * * @return the updated reconciliation report rows */ public com.google.api.ads.dfp.axis.v201306.ReconciliationReportRow[] updateReconciliationReportRows(com.google.api.ads.dfp.axis.v201306.ReconciliationReportRow[] reconciliationReportRows) throws java.rmi.RemoteException, com.google.api.ads.dfp.axis.v201306.ApiException; }
[ "jradcliff@google.com" ]
jradcliff@google.com
f4ad2d6330970788bb911321bd9a65998efa5c0f
a5dbeadebfd268a529d6a012fb23dc0b635f9b8c
/core/src/main/java/ru/mipt/cybersecurity/crypto/digests/SHA512Digest.java
ce52ba6164ced6f646d3bc0c9d1ed344b4330a27
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
skhvostyuk/CyberSecurity
22f6a272e38b56bfb054aae0dd7aa03bc96b6d06
33ea483df41973984d0edbe47a20201b204150aa
refs/heads/master
2021-08-29T04:44:31.041415
2017-12-13T12:15:29
2017-12-13T12:15:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,620
java
package ru.mipt.cybersecurity.crypto.digests; import ru.mipt.cybersecurity.util.Memoable; import ru.mipt.cybersecurity.util.Pack; /** * FIPS 180-2 implementation of SHA-512. * * <pre> * block word digest * SHA-1 512 32 160 * SHA-256 512 32 256 * SHA-384 1024 64 384 * SHA-512 1024 64 512 * </pre> */ public class SHA512Digest extends LongDigest { private static final int DIGEST_LENGTH = 64; /** * Standard constructor */ public SHA512Digest() { } /** * Copy constructor. This will copy the state of the provided * message digest. */ public SHA512Digest(SHA512Digest t) { super(t); } /** * State constructor - create a digest initialised with the state of a previous one. * * @param encodedState the encoded state from the originating digest. */ public SHA512Digest(byte[] encodedState) { restoreState(encodedState); } public String getAlgorithmName() { return "SHA-512"; } public int getDigestSize() { return DIGEST_LENGTH; } public int doFinal( byte[] out, int outOff) { finish(); Pack.longToBigEndian(H1, out, outOff); Pack.longToBigEndian(H2, out, outOff + 8); Pack.longToBigEndian(H3, out, outOff + 16); Pack.longToBigEndian(H4, out, outOff + 24); Pack.longToBigEndian(H5, out, outOff + 32); Pack.longToBigEndian(H6, out, outOff + 40); Pack.longToBigEndian(H7, out, outOff + 48); Pack.longToBigEndian(H8, out, outOff + 56); reset(); return DIGEST_LENGTH; } /** * reset the chaining variables */ public void reset() { super.reset(); /* SHA-512 initial hash value * The first 64 bits of the fractional parts of the square roots * of the first eight prime numbers */ H1 = 0x6a09e667f3bcc908L; H2 = 0xbb67ae8584caa73bL; H3 = 0x3c6ef372fe94f82bL; H4 = 0xa54ff53a5f1d36f1L; H5 = 0x510e527fade682d1L; H6 = 0x9b05688c2b3e6c1fL; H7 = 0x1f83d9abfb41bd6bL; H8 = 0x5be0cd19137e2179L; } public Memoable copy() { return new SHA512Digest(this); } public void reset(Memoable other) { SHA512Digest d = (SHA512Digest)other; copyIn(d); } public byte[] getEncodedState() { byte[] encoded = new byte[getEncodedStateSize()]; super.populateState(encoded); return encoded; } }
[ "hvostuksergey@gmail.com" ]
hvostuksergey@gmail.com
610da36ca44e6ca08cab7bd9d86f877beb0c7c55
3f00a0d8b5c66041841bc6f695bbca41cdba8b7f
/rocket/admin/src/main/java/com/nb6868/xquick/modules/shop/dao/OrderItemDao.java
8c40e158f9a6a7e81a6f97814d6fe0278d304346
[ "Apache-2.0" ]
permissive
hanjiongchen/xquick
4a87579dda00f7db61756d174f5e08ad1bc56319
2479d2a04b6a53633cf384263173e3b19eb6ad13
refs/heads/master
2022-04-20T21:04:13.518963
2020-04-23T01:49:23
2020-04-23T01:49:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
package com.nb6868.xquick.modules.shop.dao; import com.nb6868.xquick.booster.dao.BaseDao; import com.nb6868.xquick.modules.shop.entity.OrderItemEntity; import org.apache.ibatis.annotations.Mapper; /** * 订单明细 * * @author Charles zhangchaoxu@gmail.com */ @Mapper public interface OrderItemDao extends BaseDao<OrderItemEntity> { }
[ "zhangchaoxu@gmail.com" ]
zhangchaoxu@gmail.com
8d945c0a28d68ab838d913132967efe5aacf4ba1
acc6faaae3104b2b9b576e3a30ff798ae7d40185
/src/DesignPatterns/FactoryPattern/AbstractFactoryPattern/Factory.java
b8126c296217194af8c6dbd6c3ba157d166232ba
[]
no_license
LinZiYU1996/MyInterview
154398945f3b8af25726f389ea70885fe350f976
bc8490ac7d21bf9c793bc170585bc90fd4b96f91
refs/heads/master
2020-06-01T07:52:45.263895
2019-06-24T07:08:18
2019-06-24T07:08:18
190,707,698
0
0
null
null
null
null
UTF-8
Java
false
false
160
java
package DesignPatterns.FactoryPattern.AbstractFactoryPattern; public interface Factory { public Gun produceGun(); public Bullet produceBullet(); }
[ "2669093302@qq.com" ]
2669093302@qq.com
02ee3e55a6af6b474601206f5c65c339280424de
21ed2367ebe667699d52f13553155b77e3222730
/app/src/main/java/com/qixiu/xiaodiandi/utils/DimenUtils.java
6a8b555f8b60357d64b87ecc8abe07ffc7551192
[]
no_license
q37141826/xiaodiandi
b454e864073a88be959f9227878ce56758f82f02
f883b718992efe5ff21e3840182b57280b6effa1
refs/heads/master
2020-04-19T15:59:25.158561
2019-05-01T08:36:38
2019-05-01T08:36:38
168,290,825
0
0
null
null
null
null
UTF-8
Java
false
false
308
java
package com.qixiu.xiaodiandi.utils; public class DimenUtils { public static int windowWith; public static void setWindowWith(int windowWith) { DimenUtils.windowWith = windowWith; } public static float getGotoDimen(int dp) { return (float) (windowWith * dp/ 1080); } }
[ "272670440@qq.com" ]
272670440@qq.com
e4d8a42f376f068817583dba7d34572030ad5567
58ebdbd6d43e888c1d3abc9a27ac2ab27766a8cf
/komet/semantic-view/src/main/java/sh/isaac/komet/gui/semanticViewer/cells/ComponentDataCell.java
3608418276ddb5f9c2db8fee6a53d02ce793bb06
[ "Apache-2.0" ]
permissive
TheAdityaKedia/ISAAC
f0f39afcbd4a73a80fca6dffc6327433806e7a02
9ca9ad77db6180fea8040a71315d64a0607e013d
refs/heads/master
2020-04-05T01:30:59.400122
2018-10-24T02:39:24
2018-10-24T02:39:24
156,439,190
0
0
Apache-2.0
2018-11-06T19:52:56
2018-11-06T19:52:56
null
UTF-8
Java
false
false
6,445
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. * * Contributions from 2013-2017 where performed either by US government * employees, or under US Veterans Health Administration contracts. * * US Veterans Health Administration contributions by government employees * are work of the U.S. Government and are not subject to copyright * protection in the United States. Portions contributed by government * employees are USGovWork (17USC §105). Not subject to copyright. * * Contribution by contractors to the US Veterans Health Administration * during this period are contractually contributed under the * Apache License, Version 2.0. * * See: https://www.usa.gov/government-works * * Contributions prior to 2013: * * Copyright (C) International Health Terminology Standards Development Organisation. * Licensed under the Apache License, Version 2.0. * */ package sh.isaac.komet.gui.semanticViewer.cells; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import javafx.concurrent.Task; import javafx.scene.control.ContextMenu; import javafx.scene.control.ProgressBar; import javafx.scene.control.TreeTableCell; import javafx.scene.text.Text; import sh.isaac.api.Get; import sh.isaac.komet.gui.semanticViewer.SemanticGUI; import sh.isaac.komet.gui.semanticViewer.SemanticGUIColumnType; import sh.komet.gui.drag.drop.DragRegistry; /** * {@link ComponentDataCell} * * @author <a href="mailto:daniel.armbrust.list@gmail.com">Dan Armbrust</a> */ public class ComponentDataCell extends TreeTableCell<SemanticGUI, SemanticGUI> { private static Logger logger_ = LogManager.getLogger(ComponentDataCell.class); private SemanticGUIColumnType type_; public ComponentDataCell(SemanticGUIColumnType type) { type_ = type; } /** * @see javafx.scene.control.Cell#updateItem(java.lang.Object, boolean) */ @Override protected void updateItem(SemanticGUI item, boolean empty) { super.updateItem(item, empty); if (empty || item == null) { setText(""); setGraphic(null); } else if (item != null) { conceptLookup(item); } } private void conceptLookup(SemanticGUI item) { ProgressBar pb = new ProgressBar(); pb.setMaxWidth(Double.MAX_VALUE); setGraphic(pb); setText(null); Task<Void> t = new Task<Void>() { String text; boolean setStyle = false; boolean configureDragAndDrop = false; ContextMenu cm = new ContextMenu(); int nid = item.getNidFetcher(type_, null).applyAsInt(item.getSemantic()); @Override protected Void call() throws Exception { try { text = item.getDisplayStrings(type_, null).getKey(); switch (Get.identifierService().getObjectTypeForComponent(nid)) { case CONCEPT: { //TODO indexing config // if (SemanticGUIColumnType.ASSEMBLAGE == type_ && DynamicUsageDescriptionImpl.isDynamicSemantic(nid)) // { // MenuItem mi = new MenuItem("Configure Semantic Indexing"); // mi.setOnAction((action) -> // { // new ConfigureDynamicRefexIndexingView(nid).showView(null); // }); // mi.setGraphic(Images.CONFIGURE.createImageView()); // cm.getItems().add(mi); // } configureDragAndDrop = true; //TODO common menus support? // CommonMenus.addCommonMenus(cm, new CommonMenusNIdProvider() // { // @Override // public Collection<Integer> getNIds() // { // return Arrays.asList(new Integer[] {item.getNidFetcher(type_, null).applyAsInt(item.getSemantic())}); // } // }); setStyle = true; break; } case SEMANTIC: { //TODO common menus // @SuppressWarnings({ "unchecked", "rawtypes" }) // Optional<LatestVersion<SemanticVersion<?>>> sv = Get.assemblageService().getSemanticChronology(nid) // .getLatestVersion(ExtendedAppContext.getUserProfileBindings().getStampCoordinate().get()); // if (sv.isPresent()) // { // CommonMenuBuilderI menuBuilder = CommonMenus.CommonMenuBuilder.newInstance(); // menuBuilder.setMenuItemsToExclude(CommonMenuItem.COPY_SCTID); // // CommonMenus.addCommonMenus(cm, menuBuilder, new CommonMenusNIdProvider() // { // // @Override // public Collection<Integer> getNIds() // { // //TODO won't work for nested semantics! need to recurse // return Arrays.asList(new Integer[] {sv.get().value().getReferencedComponentNid()}); // } // }); // } break; } default : { logger_.warn("Unexpected chronology type! " + Get.identifierService().getObjectTypeForComponent(nid).toString()); return null; } } } catch (Exception e) { logger_.error("Unexpected error", e); text= "-ERROR-"; } return null; } /** * @see javafx.concurrent.Task#succeeded() */ @Override protected void succeeded() { //default text is a label, which doesn't wrap properly. if (isEmpty() || getItem() == null) { //We are updating a cell that has sense been changed to empty - abort! return; } setText(null); Text textHolder = new Text(text); textHolder.wrappingWidthProperty().bind(widthProperty().subtract(10)); if (cm.getItems().size() > 0) { setContextMenu(cm); } setGraphic(textHolder); if (setStyle) { if (item.isCurrent()) { getTreeTableRow().getStyleClass().removeAll("historical"); } else { if (!getTreeTableRow().getStyleClass().contains("historical")) { getTreeTableRow().getStyleClass().add("historical"); } } } if (configureDragAndDrop) { Get.service(DragRegistry.class).setupDragOnly(textHolder); } } }; Get.workExecutors().getExecutor().execute(t); } }
[ "daniel.armbrust.list@gmail.com" ]
daniel.armbrust.list@gmail.com
8df06da8252f6d0e8baa4cc6313eb3b7c9b9ab97
5b5519519e76cfdc5405cacefdaf1b4855a3ab4e
/src/main/java/org/bian/dto/SDBusinessDevelopmentActivateOutputModelServiceDomainServiceConfigurationRecordServiceDomainServiceSubscription.java
95f3e56f9e3952c1aa5ed71d85dc7e004699338a
[ "Apache-2.0" ]
permissive
bianapis/sd-business-development-v2
1c359fb5a563117811ff47c725e8182b2abe0b79
7cc11b4bb7f8e98d1a11d12279488799f0c037fb
refs/heads/master
2020-07-24T02:59:36.420541
2019-09-12T11:20:59
2019-09-12T11:20:59
207,781,839
0
0
null
null
null
null
UTF-8
Java
false
false
1,910
java
package org.bian.dto; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; /** * SDBusinessDevelopmentActivateOutputModelServiceDomainServiceConfigurationRecordServiceDomainServiceSubscription */ public class SDBusinessDevelopmentActivateOutputModelServiceDomainServiceConfigurationRecordServiceDomainServiceSubscription { private String serviceDomainServiceSubscriberReference = null; private String serviceDomainServiceSubscriberAccessProfile = null; /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Maintains reference to allowed users or subscribers to the service which can be any known party * @return serviceDomainServiceSubscriberReference **/ public String getServiceDomainServiceSubscriberReference() { return serviceDomainServiceSubscriberReference; } public void setServiceDomainServiceSubscriberReference(String serviceDomainServiceSubscriberReference) { this.serviceDomainServiceSubscriberReference = serviceDomainServiceSubscriberReference; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: The allowed service access for a user or subscriber to the service which can be any known party * @return serviceDomainServiceSubscriberAccessProfile **/ public String getServiceDomainServiceSubscriberAccessProfile() { return serviceDomainServiceSubscriberAccessProfile; } public void setServiceDomainServiceSubscriberAccessProfile(String serviceDomainServiceSubscriberAccessProfile) { this.serviceDomainServiceSubscriberAccessProfile = serviceDomainServiceSubscriberAccessProfile; } }
[ "team1@bian.org" ]
team1@bian.org
8f3164e3a7adfe4d8aea1e7eae4d94159b721366
90eb7a131e5b3dc79e2d1e1baeed171684ef6a22
/sources/com/segment/analytics/integrations/Logger.java
f7dc295ba35429ef4f35117bbf4693353589c6eb
[]
no_license
shalviraj/greenlens
1c6608dca75ec204e85fba3171995628d2ee8961
fe9f9b5a3ef4a18f91e12d3925e09745c51bf081
refs/heads/main
2023-04-20T13:50:14.619773
2021-04-26T15:45:11
2021-04-26T15:45:11
361,799,768
0
0
null
null
null
null
UTF-8
Java
false
false
1,551
java
package com.segment.analytics.integrations; import android.util.Log; import com.segment.analytics.Analytics; import p005b.p035e.p036a.p037a.C0843a; public final class Logger { private static final String DEFAULT_TAG = "Analytics"; public final Analytics.LogLevel logLevel; private final String tag; public Logger(String str, Analytics.LogLevel logLevel2) { this.tag = str; this.logLevel = logLevel2; } private boolean shouldLog(Analytics.LogLevel logLevel2) { return this.logLevel.ordinal() >= logLevel2.ordinal(); } public static Logger with(Analytics.LogLevel logLevel2) { return new Logger(DEFAULT_TAG, logLevel2); } public void debug(String str, Object... objArr) { if (shouldLog(Analytics.LogLevel.DEBUG)) { Log.d(this.tag, String.format(str, objArr)); } } public void error(Throwable th, String str, Object... objArr) { if (shouldLog(Analytics.LogLevel.INFO)) { Log.e(this.tag, String.format(str, objArr), th); } } public void info(String str, Object... objArr) { if (shouldLog(Analytics.LogLevel.INFO)) { Log.i(this.tag, String.format(str, objArr)); } } public Logger subLog(String str) { return new Logger(C0843a.m451l("Analytics-", str), this.logLevel); } public void verbose(String str, Object... objArr) { if (shouldLog(Analytics.LogLevel.VERBOSE)) { Log.v(this.tag, String.format(str, objArr)); } } }
[ "73280944+shalviraj@users.noreply.github.com" ]
73280944+shalviraj@users.noreply.github.com
826f8479d1135080fea30bad3f9624f54ef96886
cbd09f8591b1597c3aedebb0961d9d4a811319b3
/main/java/examples/App27_HelloWorld.java
6749b0845191ee3ad4690407aae4071b03aff92d
[]
no_license
olaaa/sg
1ca82b342e0c06b7368eae5879d64f081bc6d731
2a51f7b959fb3275b71fe7d49e5031aa27ba9214
refs/heads/master
2021-01-16T21:03:45.563287
2016-04-11T12:44:31
2016-04-11T12:44:31
62,746,715
0
0
null
null
null
null
UTF-8
Java
false
false
354
java
package examples; /** * Created with IntelliJ IDEA. * User: Mark * Date: 27.05.14 * Time: 23:11 * To change this template use File | Settings | File Templates. */ public class App27_HelloWorld { //Static Initialisation Block static { System.out.println("Hello, World"); System.exit(0); } }
[ "baby624mills@mail.ru" ]
baby624mills@mail.ru
b0464b96ec850d7f72d545f17c883221de35cdaf
27f902afe3f47037fab636d2da9635d57b581636
/AppWidgetSample/app/src/main/java/com/widget/androidappwidgetsample/WidgetAlarmManagerActivity.java
d47ad704c89cbbbf3e651adf0cc8ac7841ba4a8b
[]
no_license
dstrube1/playground_android
704349ce48eb20b9a3b4ffc0ea83b7e945c5c2c7
fd21e578d020939ab67910d989905c30d80763ea
refs/heads/master
2023-06-24T17:18:23.973314
2023-06-20T17:12:50
2023-06-20T17:12:50
182,904,948
0
0
null
null
null
null
UTF-8
Java
false
false
361
java
package com.widget.androidappwidgetsample; import android.os.Bundle; import android.app.Activity; public class WidgetAlarmManagerActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_widget_alarm_manager); } }
[ "dstrube@gmail.com" ]
dstrube@gmail.com
416258715ed8c223275928450814810540be1fc1
e0510a0405ece32d8733e80b33fadb71f7a3c1b9
/PROYECTOS/TAS-ON-WEB/tas_on_web/tas-on-web-persistence/src/main/java/ec/net/redcode/tas/on/persistence/dao/ContratoDAO.java
1fccbc9f39d2afab26c8ef8b37dc201a642e4d1b
[]
no_license
JosePatricio/heavy-cargo-management-system
4b635f74ca95fe39e3331104b5b121c459b677ee
fb5c58d3709e354de7014af43f17c0066d5a4076
refs/heads/main
2023-01-04T03:54:01.169947
2020-10-30T14:27:41
2020-10-30T14:27:41
308,653,152
0
0
null
null
null
null
UTF-8
Java
false
false
702
java
package ec.net.redcode.tas.on.persistence.dao; import ec.net.redcode.tas.on.persistence.entities.Contrato; import java.util.List; import java.sql.Timestamp; public interface ContratoDAO extends GenericDAO<Contrato, String> { List<Contrato> getContratoByContratoDocumentoCliente(String contratoDocumentoCliente, Integer contratoEstado); List<Contrato> getContratoByContratoDocumentoConductor(String contratoDocumentoConductor, Integer contratoEstado); List<Contrato> getContratoByContratoIdSolicitud(Integer contratoIdSolicitud,Integer contratoEstado); List<Contrato> getContratoByContratoFechaContrato(Timestamp fechaInicio,Timestamp fechaFin ,Integer contratoEstado); }
[ "patricio_91@live.se" ]
patricio_91@live.se
71f7524c41bc521ff10e695d815230482b17d696
a0b364f0b90b34cc45bfff176d7685bae6377bc5
/simulator/src/test/java/com/hazelcast/simulator/provisioner/ProvisionerUtilsTest.java
7874b1f6d0974cd5537226b58cd9b93752288e24
[ "Apache-2.0" ]
permissive
phamthaithinh/hazelcast-simulator
410d1a1cc1089074ccee425495204675cf010a66
c53bde4c2d1096d531d37875677997c3c499a229
refs/heads/master
2021-01-21T16:53:35.943959
2015-11-01T08:21:52
2015-11-01T08:21:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,385
java
package com.hazelcast.simulator.provisioner; import com.hazelcast.simulator.common.SimulatorProperties; import com.hazelcast.simulator.utils.CommandLineExitException; import org.junit.Test; import java.io.File; import static com.hazelcast.simulator.provisioner.ProvisionerUtils.INIT_SH_SCRIPT_NAME; import static com.hazelcast.simulator.provisioner.ProvisionerUtils.calcBatches; import static com.hazelcast.simulator.provisioner.ProvisionerUtils.ensureNotStaticCloudProvider; import static com.hazelcast.simulator.provisioner.ProvisionerUtils.getInitScriptFile; import static com.hazelcast.simulator.utils.FileUtils.deleteQuiet; import static com.hazelcast.simulator.utils.FileUtils.ensureExistingDirectory; import static com.hazelcast.simulator.utils.FileUtils.ensureExistingFile; import static com.hazelcast.simulator.utils.FileUtils.getSimulatorHome; import static com.hazelcast.simulator.utils.ReflectionUtils.invokePrivateConstructor; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; public class ProvisionerUtilsTest { @Test public void testConstructor() throws Exception { invokePrivateConstructor(ProvisionerUtils.class); } @Test public void testGetInitScriptFile() { File initScriptFile = new File(INIT_SH_SCRIPT_NAME); try { ensureExistingFile(initScriptFile); File actualInitScriptFile = getInitScriptFile(null); assertEquals(initScriptFile, actualInitScriptFile); } finally { deleteQuiet(initScriptFile); } } @Test public void testGetInitScriptFile_loadFromSimulatorHome() { File directory = new File("conf/"); File initScriptFile = new File("conf/" + INIT_SH_SCRIPT_NAME); try { ensureExistingDirectory(directory); ensureExistingFile(initScriptFile); File actualInitScriptFile = getInitScriptFile(getSimulatorHome().getAbsolutePath()); assertEquals(initScriptFile.getAbsolutePath(), actualInitScriptFile.getAbsolutePath()); } finally { deleteQuiet(initScriptFile); deleteQuiet(directory); } } @Test(expected = CommandLineExitException.class) public void testGetInitScriptFile_notExists() { getInitScriptFile("."); } @Test public void testEnsureNotStaticCloudProvider_isEC2() { SimulatorProperties properties = mock(SimulatorProperties.class); when(properties.get("CLOUD_PROVIDER")).thenReturn("aws-ec2"); ensureNotStaticCloudProvider(properties, "terminate"); } @Test(expected = CommandLineExitException.class) public void testEnsureNotStaticCloudProvider_isStatic() { SimulatorProperties properties = mock(SimulatorProperties.class); when(properties.get("CLOUD_PROVIDER")).thenReturn("static"); ensureNotStaticCloudProvider(properties, "terminate"); } @Test public void testCalcBatches() { SimulatorProperties properties = mock(SimulatorProperties.class); when(properties.get("CLOUD_BATCH_SIZE")).thenReturn("5"); int[] batches = calcBatches(properties, 12); assertEquals(3, batches.length); assertEquals(5, batches[0]); assertEquals(5, batches[1]); assertEquals(2, batches[2]); } }
[ "github@thunderphreak.de" ]
github@thunderphreak.de
00ec5f867eaddb6dd88064b2dfe3c57def6f0484
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/05515fbbcf78bd2344df6292ed34ab76c35238fe/after/GitBrancherImpl.java
e302fc0b73759a808bf4e5315eab221ab52c057a
[]
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
6,290
java
/* * Copyright 2000-2012 JetBrains s.r.o. * * 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 git4idea.branch; import com.intellij.openapi.application.Application; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.progress.Task; import com.intellij.openapi.project.Project; import git4idea.GitVcs; import git4idea.PlatformFacade; import git4idea.commands.Git; import git4idea.repo.GitRepository; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.List; /** * @author Kirill Likhodedov */ class GitBrancherImpl implements GitBrancher { @NotNull private final Project myProject; @NotNull private final PlatformFacade myFacade; @NotNull private final Git myGit; GitBrancherImpl(@NotNull Project project, @NotNull PlatformFacade facade, @NotNull Git git) { myProject = project; myFacade = facade; myGit = git; } @Override public void checkoutNewBranch(@NotNull final String name, @NotNull final List<GitRepository> repositories) { new CommonBackgroundTask(myProject, "Checking out new branch " + name, null) { @Override public void execute(@NotNull ProgressIndicator indicator) { newWorker(indicator).checkoutNewBranch(name, repositories); } }.runInBackground(); } private GitBranchWorker newWorker(ProgressIndicator indicator) { return new GitBranchWorker(myProject, myFacade, myGit, new GitBranchUiHandlerImpl(myProject, myFacade, myGit, indicator)); } @Override public void createNewTag(@NotNull final String name, @NotNull final String reference, @NotNull final List<GitRepository> repositories, @Nullable Runnable callInAwtLater) { new CommonBackgroundTask(myProject, "Checking out new branch " + name, callInAwtLater) { @Override public void execute(@NotNull ProgressIndicator indicator) { newWorker(indicator).createNewTag(name, reference, repositories); } }.runInBackground(); } @Override public void checkout(@NotNull final String reference, @NotNull final List<GitRepository> repositories, @Nullable Runnable callInAwtLater) { new CommonBackgroundTask(myProject, "Checking out " + reference, callInAwtLater) { @Override public void execute(@NotNull ProgressIndicator indicator) { newWorker(indicator).checkout(reference, repositories); } }.runInBackground(); } @Override public void checkoutNewBranchStartingFrom(@NotNull final String newBranchName, @NotNull final String startPoint, @NotNull final List<GitRepository> repositories, @Nullable Runnable callInAwtLater) { new CommonBackgroundTask(myProject, String.format("Checking out %s from %s", newBranchName, startPoint), callInAwtLater) { @Override public void execute(@NotNull ProgressIndicator indicator) { newWorker(indicator).checkoutNewBranchStartingFrom(newBranchName, startPoint, repositories); } }.runInBackground(); } @Override public void deleteBranch(@NotNull final String branchName, @NotNull final List<GitRepository> repositories) { new CommonBackgroundTask(myProject, "Deleting " + branchName, null) { @Override public void execute(@NotNull ProgressIndicator indicator) { newWorker(indicator).deleteBranch(branchName, repositories); } }.runInBackground(); } @Override public void deleteRemoteBranch(@NotNull final String branchName, @NotNull final List<GitRepository> repositories) { new CommonBackgroundTask(myProject, "Deleting " + branchName, null) { @Override public void execute(@NotNull ProgressIndicator indicator) { newWorker(indicator).deleteRemoteBranch(branchName, repositories); } }.runInBackground(); } @Override public void compare(@NotNull final String branchName, @NotNull final List<GitRepository> repositories, @NotNull final GitRepository selectedRepository) { new CommonBackgroundTask(myProject, "Comparing with " + branchName, null) { @Override public void execute(@NotNull ProgressIndicator indicator) { newWorker(indicator).compare(branchName, repositories, selectedRepository); } }.runInBackground(); } @Override public void merge(@NotNull final String branchName, @NotNull final DeleteOnMergeOption deleteOnMerge, @NotNull final List<GitRepository> repositories) { new CommonBackgroundTask(myProject, "Merging " + branchName, null) { @Override public void execute(@NotNull ProgressIndicator indicator) { newWorker(indicator).merge(branchName, deleteOnMerge, repositories); } }.runInBackground(); } /** * Executes common operations before/after executing the actual branch operation. */ private static abstract class CommonBackgroundTask extends Task.Backgroundable { @Nullable private final Runnable myCallInAwtAfterExecution; private CommonBackgroundTask(@Nullable final Project project, @NotNull final String title, @Nullable Runnable callInAwtAfterExecution) { super(project, title); myCallInAwtAfterExecution = callInAwtAfterExecution; } @Override public final void run(@NotNull ProgressIndicator indicator) { execute(indicator); if (myCallInAwtAfterExecution != null) { Application application = ApplicationManager.getApplication(); application.invokeLater(myCallInAwtAfterExecution, application.getDefaultModalityState()); } } abstract void execute(@NotNull ProgressIndicator indicator); void runInBackground() { GitVcs.runInBackground(this); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
0feee874ab857d77282a727709f32b2201833083
f78dfaf7b729245abb80e8d1dc67d3b4c149093a
/services/rds/src/main/java/com/huaweicloud/sdk/rds/v3/model/CreateRestoreInstanceRequest.java
97d22b5f82fea5a5b01dd6278fe2c39a13e028bb
[ "Apache-2.0" ]
permissive
hokutor/huaweicloud-sdk-java-v3
f2af37099d9cb7927da9e8651bbb542a12036577
4d24b2bc3418884f96e7ff131a8ba3ed2fc34ea3
refs/heads/master
2023-05-05T19:24:43.079873
2021-05-14T08:09:53
2021-05-14T08:09:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,301
java
package com.huaweicloud.sdk.rds.v3.model; import java.util.Collections; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.huaweicloud.sdk.rds.v3.model.InstanceRequest; import java.util.HashMap; import java.util.Map; import java.util.function.Consumer; import java.util.Objects; /** * Request Object */ public class CreateRestoreInstanceRequest { /** * Gets or Sets xLanguage */ public static final class XLanguageEnum { /** * Enum ZH_CN for value: "zh-cn" */ public static final XLanguageEnum ZH_CN = new XLanguageEnum("zh-cn"); /** * Enum EN_US for value: "en-us" */ public static final XLanguageEnum EN_US = new XLanguageEnum("en-us"); private static final Map<String, XLanguageEnum> STATIC_FIELDS = createStaticFields(); private static Map<String, XLanguageEnum> createStaticFields() { Map<String, XLanguageEnum> map = new HashMap<>(); map.put("zh-cn", ZH_CN); map.put("en-us", EN_US); return Collections.unmodifiableMap(map); } private String value; XLanguageEnum(String value) { this.value = value; } @JsonValue public String getValue() { return String.valueOf(value); } @Override public String toString() { return String.valueOf(value); } @JsonCreator public static XLanguageEnum fromValue(String value) { if( value == null ){ return null; } XLanguageEnum result = STATIC_FIELDS.get(value); if (result == null) { result = new XLanguageEnum(value); } return result; } public static XLanguageEnum valueOf(String value) { if( value == null ){ return null; } XLanguageEnum result = STATIC_FIELDS.get(value); if (result != null) { return result; } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } @Override public boolean equals(Object obj) { if (obj != null && obj instanceof XLanguageEnum) { return this.value.equals(((XLanguageEnum) obj).value); } return false; } @Override public int hashCode() { return this.value.hashCode(); } } @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="X-Language") private XLanguageEnum xLanguage; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="body") private InstanceRequest body; public CreateRestoreInstanceRequest withXLanguage(XLanguageEnum xLanguage) { this.xLanguage = xLanguage; return this; } /** * Get xLanguage * @return xLanguage */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="X-Language") public XLanguageEnum getXLanguage() { return xLanguage; } public void setXLanguage(XLanguageEnum xLanguage) { this.xLanguage = xLanguage; } public CreateRestoreInstanceRequest withBody(InstanceRequest body) { this.body = body; return this; } public CreateRestoreInstanceRequest withBody(Consumer<InstanceRequest> bodySetter) { if(this.body == null ){ this.body = new InstanceRequest(); bodySetter.accept(this.body); } return this; } /** * Get body * @return body */ public InstanceRequest getBody() { return body; } public void setBody(InstanceRequest body) { this.body = body; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CreateRestoreInstanceRequest createRestoreInstanceRequest = (CreateRestoreInstanceRequest) o; return Objects.equals(this.xLanguage, createRestoreInstanceRequest.xLanguage) && Objects.equals(this.body, createRestoreInstanceRequest.body); } @Override public int hashCode() { return Objects.hash(xLanguage, body); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateRestoreInstanceRequest {\n"); sb.append(" xLanguage: ").append(toIndentedString(xLanguage)).append("\n"); sb.append(" body: ").append(toIndentedString(body)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "wuchen25@huawei.com" ]
wuchen25@huawei.com
f49a299f5a3805afc2fb4bcd4d7f714c550e245d
cc66a11bfc637063bdd1cb703072ced8caf942e9
/netbean_webservices/springwebservice/src/main/java/com/dhenton9000/football/generated/TPlayersWithCards.java
cb515261c67837d2ab5a8000f5ad0060ea0fd9ab
[]
no_license
donhenton/code-attic
e905840a4d53181d8a6d7c8b983c7b2dc553074b
e8588bea7af3d3a168958ae96ea8a476fcb6969f
refs/heads/master
2016-09-05T14:47:39.348847
2015-07-20T17:37:38
2015-07-20T17:37:38
39,396,691
0
0
null
null
null
null
UTF-8
Java
false
false
3,738
java
package com.dhenton9000.football.generated; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for tPlayersWithCards complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="tPlayersWithCards"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="sName" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="iYellowCards" type="{http://www.w3.org/2001/XMLSchema}int"/> * &lt;element name="iRedCards" type="{http://www.w3.org/2001/XMLSchema}int"/> * &lt;element name="sTeamName" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="sTeamFlag" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "tPlayersWithCards", propOrder = { "sName", "iYellowCards", "iRedCards", "sTeamName", "sTeamFlag" }) public class TPlayersWithCards { @XmlElement(required = true) protected String sName; protected int iYellowCards; protected int iRedCards; @XmlElement(required = true) protected String sTeamName; @XmlElement(required = true) protected String sTeamFlag; /** * Gets the value of the sName property. * * @return * possible object is * {@link String } * */ public String getSName() { return sName; } /** * Sets the value of the sName property. * * @param value * allowed object is * {@link String } * */ public void setSName(String value) { this.sName = value; } /** * Gets the value of the iYellowCards property. * */ public int getIYellowCards() { return iYellowCards; } /** * Sets the value of the iYellowCards property. * */ public void setIYellowCards(int value) { this.iYellowCards = value; } /** * Gets the value of the iRedCards property. * */ public int getIRedCards() { return iRedCards; } /** * Sets the value of the iRedCards property. * */ public void setIRedCards(int value) { this.iRedCards = value; } /** * Gets the value of the sTeamName property. * * @return * possible object is * {@link String } * */ public String getSTeamName() { return sTeamName; } /** * Sets the value of the sTeamName property. * * @param value * allowed object is * {@link String } * */ public void setSTeamName(String value) { this.sTeamName = value; } /** * Gets the value of the sTeamFlag property. * * @return * possible object is * {@link String } * */ public String getSTeamFlag() { return sTeamFlag; } /** * Sets the value of the sTeamFlag property. * * @param value * allowed object is * {@link String } * */ public void setSTeamFlag(String value) { this.sTeamFlag = value; } }
[ "donhenton@gmail.com" ]
donhenton@gmail.com
b49038ee12a0825f5918236aa80f293cf4dd666e
5d2f45c0d7b7424cec29dac31771e55bd95cbab3
/app/src/main/java/com/cn/lv/ui/main/my/UpActivity.java
4dd4e6c7b2c9d1c04e10001374a14876f5933466
[]
no_license
XieHaha/So
4a4089ffbf4fa2ce4b8cddfa814664dba9ed0e11
911d4683d4d4e8470fdbacc400e84b7ffba9509b
refs/heads/master
2023-07-29T12:26:26.272202
2021-09-09T07:04:48
2021-09-09T07:04:48
404,619,650
0
0
null
null
null
null
UTF-8
Java
false
false
4,034
java
package com.cn.lv.ui.main.my; import android.os.Bundle; import android.support.annotation.NonNull; import com.chinapnr.android.adapay.AdaPay; import com.cn.frame.data.BaseResponse; import com.cn.frame.data.CommonData; import com.cn.frame.data.Tasks; import com.cn.frame.data.bean.PaymentBean; import com.cn.frame.data.bean.UserBaseBean; import com.cn.frame.http.InterfaceName; import com.cn.frame.http.retrofit.RequestUtils; import com.cn.frame.ui.BaseActivity; import com.cn.frame.utils.BaseUtils; import com.cn.frame.utils.ToastUtil; import com.cn.lv.R; import com.cn.lv.SweetApplication; import com.google.gson.Gson; import butterknife.OnClick; public class UpActivity extends BaseActivity implements com.cn.frame.data.PayResult { private PaymentBean paymentBean; @Override protected boolean isInitStatusBar() { return false; } @Override protected boolean isInitBackBtn() { return true; } @Override public int getLayoutID() { return R.layout.act_up; } @Override public void initView(@NonNull Bundle savedInstanceState) { super.initView(savedInstanceState); if (getIntent() != null) { paymentBean = (PaymentBean) getIntent().getSerializableExtra(CommonData.KEY_PUBLIC); } if (paymentBean == null) { edit(); } } private void edit() { RequestUtils.edit(this, signSession(InterfaceName.AUTH), this); } /** * 登录 */ private void login() { String pwd = sharePreferenceUtil.getAlwaysString(CommonData.KEY_LOGIN_PWD); RequestUtils.login(this, BaseUtils.signSpan(this, userInfo.getMobile_number(), InterfaceName.SIGN_IN), pwd, String.valueOf(SweetApplication.getInstance().getLat()), String.valueOf(SweetApplication.getInstance().getLng()), this); } @OnClick(R.id.iv_next) public void onViewClicked() { if (paymentBean == null) { ToastUtil.toast(this, "发生未知错误,请稍候再试"); return; } if (!BaseUtils.isAliPayInstalled(this)) { ToastUtil.toast(this, "无法调用支付宝,请确认是否安装支付宝!"); return; } try { AdaPay.doPay(UpActivity.this, new Gson().toJson(paymentBean), payResult -> { ToastUtil.toast(UpActivity.this, payResult.getResultMsg()); //处理支付结果 String code = payResult.getResultCode(); switch (code) { case ORDER_SUCCESS: login(); break; case ORDER_FAILED: break; case ORDER_PAYING: break; case ORDER_CANCEL: break; case ORDER_PARAM_ERROR: break; case ORDER_NETWORK_ERROR: break; case ORDER_OTHER_ERROR: break; default: break; } }); } catch (Exception e) { e.printStackTrace(); ToastUtil.toast(this, "发生未知错误,请稍候再试"); } } @Override public void onResponseSuccess(Tasks task, BaseResponse response) { super.onResponseSuccess(task, response); if (task == Tasks.LOGIN) { loginBean = (UserBaseBean) response.getData(); //存储登录结果 SweetApplication.getInstance().setLoginBean(loginBean); setResult(RESULT_OK); finish(); } } @Override public void onResponseCode(Tasks task, BaseResponse response) { if (response.getCode() == 202) { if (task == Tasks.AUTH) { paymentBean = (PaymentBean) response.getData(); } } } }
[ "371523912@qq.com" ]
371523912@qq.com
b76bfc682182bd18aaf630ff4f592daede46caff
4d0f2d62d1c156d936d028482561585207fb1e49
/Ma nguon/zcs-8.0.2_GA_5570-src/ZimbraServer/src/java-test/com/zimbra/cs/util/http/RangeTest.java
fa20090289adab7b4c20ddb3a02ceec65716c132
[]
no_license
vuhung/06-email-captinh
e3f0ff2e84f1c2bc6bdd6e4167cd7107ec42c0bd
af828ac73fc8096a3cc096806c8080e54d41251f
refs/heads/master
2020-07-08T09:09:19.146159
2013-05-18T12:57:24
2013-05-18T12:57:24
32,319,083
0
2
null
null
null
null
UTF-8
Java
false
false
5,229
java
/* * ***** BEGIN LICENSE BLOCK ***** * Zimbra Collaboration Suite Server * Copyright (C) 2011 Zimbra, Inc. * * The contents of this file are subject to the Zimbra Public License * Version 1.3 ("License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.zimbra.com/license. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. * ***** END LICENSE BLOCK ***** */ package com.zimbra.cs.util.http; import static org.junit.Assert.*; import java.util.Iterator; import java.util.List; import org.eclipse.jetty.http.HttpException; import org.junit.Assert; import org.junit.Test; import com.zimbra.common.util.Pair; public class RangeTest { @Test public void parseSingleRange() throws Exception { Range range = Range.parse("bytes=0-999"); List<Pair<Long, Long>> ranges = range.getRanges(); Assert.assertFalse(ranges.isEmpty()); Iterator<Pair<Long, Long>> iter = ranges.iterator(); Pair<Long, Long> byteRange = iter.next(); Assert.assertFalse(iter.hasNext()); Assert.assertEquals(byteRange.getFirst().longValue(), 0); Assert.assertEquals(byteRange.getSecond().longValue(), 999); } @Test public void parseOpenEndedRange() throws Exception { Range range = Range.parse("bytes=123-"); List<Pair<Long, Long>> ranges = range.getRanges(); Assert.assertFalse(ranges.isEmpty()); Iterator<Pair<Long, Long>> iter = ranges.iterator(); Pair<Long, Long> byteRange = iter.next(); Assert.assertFalse(iter.hasNext()); Assert.assertEquals(byteRange.getFirst().longValue(), 123); Assert.assertNull(byteRange.getSecond()); } @Test public void parseSuffixRange() throws Exception { Range range = Range.parse("bytes=-999"); List<Pair<Long, Long>> ranges = range.getRanges(); Assert.assertFalse(ranges.isEmpty()); Iterator<Pair<Long, Long>> iter = ranges.iterator(); Pair<Long, Long> byteRange = iter.next(); Assert.assertFalse(iter.hasNext()); Assert.assertNull(byteRange.getFirst()); Assert.assertEquals(byteRange.getSecond().longValue(), 999); } @Test public void parseMultipleRanges() throws Exception { Range range = Range.parse("bytes=0-999,2000-3000, 4444 - 7777, -12345"); List<Pair<Long, Long>> ranges = range.getRanges(); Assert.assertFalse(ranges.isEmpty()); Iterator<Pair<Long, Long>> iter = ranges.iterator(); { Pair<Long, Long> byteRange = iter.next(); Assert.assertEquals(byteRange.getFirst().longValue(), 0); Assert.assertEquals(byteRange.getSecond().longValue(), 999); } { Pair<Long, Long> byteRange = iter.next(); Assert.assertEquals(byteRange.getFirst().longValue(), 2000); Assert.assertEquals(byteRange.getSecond().longValue(), 3000); } { Pair<Long, Long> byteRange = iter.next(); Assert.assertEquals(byteRange.getFirst().longValue(), 4444); Assert.assertEquals(byteRange.getSecond().longValue(), 7777); } { Pair<Long, Long> byteRange = iter.next(); Assert.assertNull(byteRange.getFirst()); Assert.assertEquals(byteRange.getSecond().longValue(), 12345); } Assert.assertFalse(iter.hasNext()); } @Test public void parseMultipleRangesWithExtraSpacesAndCommas() throws Exception { Range range = Range.parse(" bytes = ,, 0 - 999,,,, , ,2000 -3000 "); List<Pair<Long, Long>> ranges = range.getRanges(); Assert.assertFalse(ranges.isEmpty()); Iterator<Pair<Long, Long>> iter = ranges.iterator(); { Pair<Long, Long> byteRange = iter.next(); Assert.assertEquals(byteRange.getFirst().longValue(), 0); Assert.assertEquals(byteRange.getSecond().longValue(), 999); } { Pair<Long, Long> byteRange = iter.next(); Assert.assertEquals(byteRange.getFirst().longValue(), 2000); Assert.assertEquals(byteRange.getSecond().longValue(), 3000); } } @Test public void parseNull() throws Exception { Range range = Range.parse((String)null); Assert.assertNull(range); } @Test(expected=HttpException.class) public void parseReversedRange() throws Exception { Range.parse("bytes=200-100"); } @Test(expected=HttpException.class) public void parseNegativeEndValue() throws Exception { Range.parse("bytes=100--200"); } @Test(expected=HttpException.class) public void parseNegativeStartValue() throws Exception { Range.parse("bytes=-100-200"); } @Test(expected=HttpException.class) public void parseGarbage() throws Exception { Range.parse("garbage"); } @Test(expected=HttpException.class) public void parseNoValues() throws Exception { Range.parse("-"); } }
[ "vuhung16plus@gmail.com@ec614674-f94a-24a8-de76-55dc00f2b931" ]
vuhung16plus@gmail.com@ec614674-f94a-24a8-de76-55dc00f2b931
ca74a6028a35ee6d35d4dfe8880e584a13f028cd
82bda3ed7dfe2ca722e90680fd396935c2b7a49d
/app-meipai/src/main/java/d/b/p/a.java
44f5b2cba4bc6a550f1e171e95b763c726a4fa18
[]
no_license
cvdnn/PanoramaApp
86f8cf36d285af08ba15fb32348423af7f0b7465
dd6bbe0987a46f0b4cfb90697b38f37f5ad47cfc
refs/heads/master
2023-03-03T11:15:40.350476
2021-01-29T09:14:06
2021-01-29T09:14:06
332,968,433
1
1
null
null
null
null
UTF-8
Java
false
false
6,948
java
package d.b.p; import android.content.Context; import android.content.res.Configuration; import android.content.res.TypedArray; import android.util.AttributeSet; import android.util.TypedValue; import android.view.ContextThemeWrapper; import android.view.MotionEvent; import android.view.View; import android.view.View.MeasureSpec; import android.view.ViewGroup; import androidx.appcompat.widget.ActionMenuView; import d.b.j; import d.b.o.i.g; import d.h.k.m; import d.h.k.r; import d.h.k.s; /* compiled from: AbsActionBarView */ public abstract class a extends ViewGroup { /* renamed from: a reason: collision with root package name */ public final C0028a f4257a; /* renamed from: b reason: collision with root package name */ public final Context f4258b; /* renamed from: c reason: collision with root package name */ public ActionMenuView f4259c; /* renamed from: d reason: collision with root package name */ public c f4260d; /* renamed from: e reason: collision with root package name */ public int f4261e; /* renamed from: f reason: collision with root package name */ public r f4262f; /* renamed from: g reason: collision with root package name */ public boolean f4263g; /* renamed from: h reason: collision with root package name */ public boolean f4264h; /* renamed from: d.b.p.a$a reason: collision with other inner class name */ /* compiled from: AbsActionBarView */ public class C0028a implements s { /* renamed from: a reason: collision with root package name */ public boolean f4265a = false; /* renamed from: b reason: collision with root package name */ public int f4266b; public C0028a() { } public void a(View view) { this.f4265a = true; } public void b(View view) { if (!this.f4265a) { a aVar = a.this; aVar.f4262f = null; a.super.setVisibility(this.f4266b); } } public void c(View view) { a.super.setVisibility(0); this.f4265a = false; } } public a(Context context) { this(context, null); } public int getAnimatedVisibility() { if (this.f4262f != null) { return this.f4257a.f4266b; } return getVisibility(); } public int getContentHeight() { return this.f4261e; } public void onConfigurationChanged(Configuration configuration) { super.onConfigurationChanged(configuration); TypedArray obtainStyledAttributes = getContext().obtainStyledAttributes(null, j.ActionBar, d.b.a.actionBarStyle, 0); setContentHeight(obtainStyledAttributes.getLayoutDimension(j.ActionBar_height, 0)); obtainStyledAttributes.recycle(); c cVar = this.f4260d; if (cVar != null) { Configuration configuration2 = cVar.f4152b.getResources().getConfiguration(); int i2 = configuration2.screenWidthDp; int i3 = configuration2.screenHeightDp; int i4 = (configuration2.smallestScreenWidthDp > 600 || i2 > 600 || (i2 > 960 && i3 > 720) || (i2 > 720 && i3 > 960)) ? 5 : (i2 >= 500 || (i2 > 640 && i3 > 480) || (i2 > 480 && i3 > 640)) ? 4 : i2 >= 360 ? 3 : 2; cVar.p = i4; g gVar = cVar.f4153c; if (gVar != null) { gVar.b(true); } } } public boolean onHoverEvent(MotionEvent motionEvent) { int actionMasked = motionEvent.getActionMasked(); if (actionMasked == 9) { this.f4264h = false; } if (!this.f4264h) { boolean onHoverEvent = super.onHoverEvent(motionEvent); if (actionMasked == 9 && !onHoverEvent) { this.f4264h = true; } } if (actionMasked == 10 || actionMasked == 3) { this.f4264h = false; } return true; } public boolean onTouchEvent(MotionEvent motionEvent) { int actionMasked = motionEvent.getActionMasked(); if (actionMasked == 0) { this.f4263g = false; } if (!this.f4263g) { boolean onTouchEvent = super.onTouchEvent(motionEvent); if (actionMasked == 0 && !onTouchEvent) { this.f4263g = true; } } if (actionMasked == 1 || actionMasked == 3) { this.f4263g = false; } return true; } public abstract void setContentHeight(int i2); public void setVisibility(int i2) { if (i2 != getVisibility()) { r rVar = this.f4262f; if (rVar != null) { rVar.a(); } super.setVisibility(i2); } } public a(Context context, AttributeSet attributeSet) { this(context, attributeSet, 0); } public r a(int i2, long j2) { r rVar = this.f4262f; if (rVar != null) { rVar.a(); } if (i2 == 0) { if (getVisibility() != 0) { setAlpha(0.0f); } r a2 = m.a(this); a2.a(1.0f); a2.a(j2); C0028a aVar = this.f4257a; a.this.f4262f = a2; aVar.f4266b = i2; View view = (View) a2.f4940a.get(); if (view != null) { a2.a(view, aVar); } return a2; } r a3 = m.a(this); a3.a(0.0f); a3.a(j2); C0028a aVar2 = this.f4257a; a.this.f4262f = a3; aVar2.f4266b = i2; View view2 = (View) a3.f4940a.get(); if (view2 != null) { a3.a(view2, aVar2); } return a3; } public a(Context context, AttributeSet attributeSet, int i2) { super(context, attributeSet, i2); this.f4257a = new C0028a(); TypedValue typedValue = new TypedValue(); if (!context.getTheme().resolveAttribute(d.b.a.actionBarPopupTheme, typedValue, true) || typedValue.resourceId == 0) { this.f4258b = context; } else { this.f4258b = new ContextThemeWrapper(context, typedValue.resourceId); } } public int a(View view, int i2, int i3, int i4) { view.measure(MeasureSpec.makeMeasureSpec(i2, Integer.MIN_VALUE), i3); return Math.max(0, (i2 - view.getMeasuredWidth()) - i4); } public int a(View view, int i2, int i3, int i4, boolean z) { int measuredWidth = view.getMeasuredWidth(); int measuredHeight = view.getMeasuredHeight(); int i5 = ((i4 - measuredHeight) / 2) + i3; if (z) { view.layout(i2 - measuredWidth, i5, i2, measuredHeight + i5); } else { view.layout(i2, i5, i2 + measuredWidth, measuredHeight + i5); } return z ? -measuredWidth : measuredWidth; } }
[ "cvvdnn@gmail.com" ]
cvvdnn@gmail.com
5f87422a01d2b3f9919c76c5b3aa908f4711bc35
177f338c9d9905b2ededbd4abd8aefebd7c105ba
/src/main/java/chapter2/t13_syn_Out_asyn/MyList.java
f25b23b796977395f2fca9137ccfabe4e699e397
[]
no_license
1000-7/thread
a1c515e0f93333dbb9a215f2f1a74fabe8663242
2881aacfe7d17991b7b81e71156758171a289510
refs/heads/master
2020-03-29T13:46:59.181264
2019-01-30T09:46:00
2019-01-30T09:46:00
149,981,896
0
0
null
null
null
null
UTF-8
Java
false
false
997
java
package chapter2.t13_syn_Out_asyn; import java.util.ArrayList; import java.util.List; /** * 这个例子可以看出来,这线程A和线程B循环调用同步方法时,因为线程A和线程B执行是异步的,所以可能会脏读 */ public class MyList { private List list = new ArrayList(); synchronized public void add(String username) { System.out.println("ThreadName=" + Thread.currentThread().getName() + "执行了add方法!"); list.add(username); System.out.println("ThreadName=" + Thread.currentThread().getName() + "退出了add方法!"); } synchronized public int getSize() { System.out.println("ThreadName=" + Thread.currentThread().getName() + "执行了getSize方法!"); int sizeValue = list.size(); System.out.println("ThreadName=" + Thread.currentThread().getName() + "退出了getSize方法!"); return sizeValue; } }
[ "1256656057@qq.com" ]
1256656057@qq.com
4df67e2177b18690033df01dbc983bb1322bc621
49b4cb79c910a17525b59d4b497a09fa28a9e3a8
/parserValidCheck/src/main/java/com/ke/css/cimp/fwb/fwb15/Rule_AWB_NUMBER.java
be74e2600fdf2adf25b024608f28c9fefbef6770
[]
no_license
ganzijo/koreanair
a7d750b62cec2647bfb2bed4ca1bf8648d9a447d
e980fb11bc4b8defae62c9d88e5c70a659bef436
refs/heads/master
2021-04-26T22:04:17.478461
2018-03-06T05:59:32
2018-03-06T05:59:32
124,018,887
0
0
null
null
null
null
UTF-8
Java
false
false
4,096
java
package com.ke.css.cimp.fwb.fwb15; /* ----------------------------------------------------------------------------- * Rule_AWB_NUMBER.java * ----------------------------------------------------------------------------- * * Producer : com.parse2.aparse.Parser 2.5 * Produced : Tue Mar 06 10:33:43 KST 2018 * * ----------------------------------------------------------------------------- */ import java.util.ArrayList; final public class Rule_AWB_NUMBER extends Rule { public Rule_AWB_NUMBER(String spelling, ArrayList<Rule> rules) { super(spelling, rules); } public Object accept(Visitor visitor) { return visitor.visit(this); } public static Rule_AWB_NUMBER parse(ParserContext context) { context.push("AWB_NUMBER"); boolean parsed = true; int s0 = context.index; ParserAlternative a0 = new ParserAlternative(s0); ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>(); parsed = false; { int s1 = context.index; ParserAlternative a1 = new ParserAlternative(s1); parsed = true; if (parsed) { boolean f1 = true; int c1 = 0; for (int i1 = 0; i1 < 1 && f1; i1++) { int g1 = context.index; ArrayList<ParserAlternative> as2 = new ArrayList<ParserAlternative>(); parsed = false; { int s2 = context.index; ParserAlternative a2 = new ParserAlternative(s2); parsed = true; if (parsed) { boolean f2 = true; int c2 = 0; for (int i2 = 0; i2 < 1 && f2; i2++) { Rule rule = Rule_Sub_AWB_Prefix.parse(context); if ((f2 = rule != null)) { a2.add(rule, context.index); c2++; } } parsed = c2 == 1; } if (parsed) { boolean f2 = true; int c2 = 0; for (int i2 = 0; i2 < 1 && f2; i2++) { Rule rule = Rule_Sep_Bar.parse(context); if ((f2 = rule != null)) { a2.add(rule, context.index); c2++; } } parsed = c2 == 1; } if (parsed) { boolean f2 = true; int c2 = 0; for (int i2 = 0; i2 < 1 && f2; i2++) { Rule rule = Rule_Sub_AWB_SerialNum.parse(context); if ((f2 = rule != null)) { a2.add(rule, context.index); c2++; } } parsed = c2 == 1; } if (parsed) { as2.add(a2); } context.index = s2; } ParserAlternative b = ParserAlternative.getBest(as2); parsed = b != null; if (parsed) { a1.add(b.rules, b.end); context.index = b.end; } f1 = context.index > g1; if (parsed) c1++; } parsed = c1 == 1; } if (parsed) { as1.add(a1); } context.index = s1; } ParserAlternative b = ParserAlternative.getBest(as1); parsed = b != null; if (parsed) { a0.add(b.rules, b.end); context.index = b.end; } Rule rule = null; if (parsed) { rule = new Rule_AWB_NUMBER(context.text.substring(a0.start, a0.end), a0.rules); } else { context.index = s0; } context.pop("AWB_NUMBER", parsed); return (Rule_AWB_NUMBER)rule; } } /* ----------------------------------------------------------------------------- * eof * ----------------------------------------------------------------------------- */
[ "wrjo@wrjo-PC" ]
wrjo@wrjo-PC
75c67acf0b92f3237c8a52394870a57af38256d2
ec5fe8f20dfe82b479cea3da24c78190f768e086
/cas-4.1.0/cas-server-core-api/src/main/java/org/jasig/cas/authentication/CredentialMetaData.java
04d92b657f7d98ae34067b3197be93feb81a6a6f
[ "MIT", "Apache-2.0", "CDDL-1.1", "LicenseRef-scancode-unknown-license-reference", "CDDL-1.0", "LGPL-2.0-or-later", "LGPL-2.1-or-later", "W3C", "BSD-3-Clause", "GPL-1.0-or-later", "SAX-PD", "LicenseRef-scancode-free-unknown", "MPL-1.1", "GPL-2.0-only", "LicenseRef-scancode-jsr-107-jcache-spec-2013", "LicenseRef-scancode-public-domain", "EPL-1.0", "Classpath-exception-2.0", "LGPL-2.1-only" ]
permissive
hsj-xiaokang/springboot-shiro-cas-mybatis
b4cf76dc2994d63f771da0549cf711ea674e53bf
3673a9a9b279dd1e624c1a7a953182301f707997
refs/heads/master
2022-06-26T15:28:49.854390
2020-12-06T04:43:13
2020-12-06T04:43:13
103,009,179
42
24
MIT
2022-06-25T07:27:42
2017-09-10T06:35:28
Java
UTF-8
Java
false
false
1,468
java
/* * Licensed to Apereo under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. * Apereo 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 the following location: * * 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.jasig.cas.authentication; /** * Describes a credential provided for authentication. Implementations should expect instances of this type to be * stored for periods of time equal to the length of the SSO session or longer, which necessitates consideration of * serialization and security. All implementations MUST be serializable and secure with respect to long-term storage. * * @author Marvin S. Addison * @since 4.0.0 */ public interface CredentialMetaData { /** * Gets a unique identifier for the kind of credential this represents. * * @return Unique identifier for the given type of credential. */ String getId(); }
[ "2356899074@qq.com" ]
2356899074@qq.com
f8c03c10cc38476d35f807982d1a0a09bb2353d5
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/31/31_5b2006c6b45b9bce36c3dce741a50da251353881/Header/31_5b2006c6b45b9bce36c3dce741a50da251353881_Header_s.java
10b944660bfe5a0d290bdbe6564ef29ccf6d9591
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,652
java
package datatypes; public class Header { private String composer = "Unknown"; private final String title; private final int indexNumber; private int tempo = 100; private Fraction defaultNoteLengthFraction = new Fraction(1, 8); private double defaultNoteLength = defaultNoteLengthFraction.getValue(); private final KeySignature keySignature; private Fraction meter = new Fraction(4,4); private String[] voiceNames; /** * Represents the header of an abc file. The three mandatory values must be passed upon instantiation. * @param indexNumber int index number of the file ("X") * @param title String title of the file ("T") * @param keySignature KeySignature object representing the key signature of this file ("K") */ public Header(int indexNumber, String title, KeySignature keySignature) { this.indexNumber = indexNumber; this.title = title; this.keySignature = keySignature; } public String getComposer() { return this.composer; } /** * Sets the value of this.composer * @param composer String value for the composer field */ public void setComposer(String composer) { this.composer = composer; } public int getTempo() { return this.tempo; } /** * Sets the value of this.tempo * @param tempo int tempo of the file */ public void setTempo(int tempo) { this.tempo = tempo; } public double getDefaultNoteLength() { return this.defaultNoteLength; } /** * Sets the value for the default note length. * @param defaultNoteLengthFraction Fraction representing the default note length */ public void setDefaultNoteLengthFraction(Fraction defaultNoteLengthFraction) { this.defaultNoteLengthFraction = defaultNoteLengthFraction; this.defaultNoteLength = this.defaultNoteLengthFraction.getValue(); } public Fraction getDefaultNoteLengthFraction() { return this.defaultNoteLengthFraction; } public Fraction getMeter() { return this.meter; } /** * Sets the meter of the file * @param meter Fraction representing the meter of the file */ public void setMeter(Fraction meter) { this.meter = meter; } public String[] getVoiceNames() { return this.voiceNames; } /** * Adds an array of Voice names to the header * @param voiceNames String array containing the names of the different voices present in the file */ public void setVoiceNames(String[] voiceNames) { this.voiceNames = voiceNames; } public String getTitle() { return this.title; } public int getIndexNumber() { return this.indexNumber; } public KeySignature getKeySignature() { return this.keySignature; } @Override public String toString() { String voices = ""; for (String voice : voiceNames) { voices += "V: " + voice + "\n"; } return String.format("X: %s\n" + "T: %s\n" + "C: %s\n" + "M: %s\n" + "L: %s\n" + "Q: %s\n" + "%s" + "K: %s\n", this.getIndexNumber(), this.getTitle(), this.getComposer(), this.getMeter().toString(), this.getDefaultNoteLengthFraction().toString(), this.getTempo(), voices, this.getKeySignature().getStringRep()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
79303196c63c79dd95fbe1ed4924f9cec24f7b0a
88f9c21bbdf0e41260e710e39a292306b8f4ea37
/app/src/main/java/com/ruanmeng/shared_marketing/NoticeActivity.java
267c278d4c89019d45e1781eb3d254f6f255ceb0
[]
no_license
paulzeng/Shared_Marketing
ee45080564eabba77e2b0e9334d3aa772b28b8ac
86c070c2b4229742a96a904d86d4fefc1627e10d
refs/heads/master
2021-03-21T00:37:22.656362
2019-04-15T02:41:45
2019-04-15T02:41:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,418
java
package com.ruanmeng.shared_marketing; import android.content.Intent; import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.view.MotionEvent; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.ruanmeng.base.BaseActivity; import com.ruanmeng.model.NoticeData; import com.ruanmeng.nohttp.CustomHttpListener; import com.ruanmeng.share.Const; import com.ruanmeng.share.HttpIP; import com.yolanda.nohttp.NoHttp; import com.zhy.adapter.recyclerview.CommonAdapter; import com.zhy.adapter.recyclerview.base.ViewHolder; import org.json.JSONObject; import java.util.ArrayList; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; public class NoticeActivity extends BaseActivity { @BindView(R.id.lv_notice_list) RecyclerView mRecyclerView; @BindView(R.id.iv_empty_hint) ImageView iv_hint; @BindView(R.id.tv_empty_hint) TextView tv_hint; @BindView(R.id.ll_empty_hint) LinearLayout ll_hint; @BindView(R.id.rl_notice_refresh) SwipeRefreshLayout mRefresh; private List<NoticeData.NoticeInfo> list = new ArrayList<>(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_notice); ButterKnife.bind(this); init_title("公告"); mRefresh.setRefreshing(true); getData(pageNum); } @Override public void init_title() { super.init_title(); tv_hint.setText("暂无公告信息"); iv_hint.setImageResource(R.mipmap.not_notice); mRefresh.setColorSchemeResources(R.color.colorAccent); linearLayoutManager = new LinearLayoutManager(this); mRecyclerView.setLayoutManager(linearLayoutManager); mRecyclerView.setItemAnimator(new DefaultItemAnimator()); adapter = new CommonAdapter<NoticeData.NoticeInfo>(this, R.layout.item_notice_list, list) { @Override protected void convert(ViewHolder holder, final NoticeData.NoticeInfo info, int position) { holder.setText(R.id.tv_item_notice_name, info.getTitle()); holder.setText(R.id.tv_item_notice_time, info.getCreate_time()); holder.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(baseContext, NoticeDetailActivity.class); intent.putExtra("id", info.getId()); startActivity(intent); } }); } }; mRecyclerView.setAdapter(adapter); mRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { getData(1); } }); mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { super.onScrolled(recyclerView, dx, dy); int total = linearLayoutManager.getItemCount(); int lastVisibleItem = linearLayoutManager.findLastVisibleItemPosition(); //lastVisibleItem >= totalItemCount - 4 表示剩下4个item自动加载,各位自由选择 // dy > 0 表示向下滑动 if (lastVisibleItem >= total - 1 && dy > 0) { if (!isLoadingMore) { isLoadingMore = true; getData(pageNum); } } } }); mRecyclerView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { return mRefresh.isRefreshing(); } }); } @Override public void getData(final int pindex) { mRequest = NoHttp.createStringRequest(HttpIP.noticeList, Const.POST); mRequest.add("role_type", getString("user_type")); mRequest.add("pindex", pindex); getRequest(new CustomHttpListener<NoticeData>(baseContext, true, NoticeData.class) { @Override public void doWork(NoticeData data, String code) { if (pindex == 1) list.clear(); if (data.getData().size() > 0) { list.addAll(data.getData()); int pos = adapter.getItemCount(); adapter.notifyItemRangeInserted(pos, list.size()); } } @Override public void onFinally(JSONObject obj, String code, boolean isSucceed) { mRefresh.setRefreshing(false); isLoadingMore = false; if (TextUtils.equals("1", code)) { if (pindex == 1) pageNum = pindex; pageNum++; } ll_hint.setVisibility(list.size() == 0 ? View.VISIBLE : View.GONE); } }, false); } }
[ "416143467@qq.com" ]
416143467@qq.com
28dd349da7c70be8b129537cf74529010231fc46
1930d97ebfc352f45b8c25ef715af406783aabe2
/src/main/java/com/alipay/api/domain/StageInfo.java
1f6c20f29cdc3be21e29085f0d1c6e9789bd5b80
[ "Apache-2.0" ]
permissive
WQmmm/alipay-sdk-java-all
57974d199ee83518523e8d354dcdec0a9ce40a0c
66af9219e5ca802cff963ab86b99aadc59cc09dd
refs/heads/master
2023-06-28T03:54:17.577332
2021-08-02T10:05:10
2021-08-02T10:05:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,137
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 联赛阶段 * * @author auto create * @since 1.0, 2020-10-30 11:53:20 */ public class StageInfo extends AlipayObject { private static final long serialVersionUID = 4849813162917678617L; /** * 分组 1: A 2: B 以此类推 */ @ApiField("group") private Long group; /** * 阶段名 */ @ApiField("name") private String name; /** * 轮次 */ @ApiField("round") private Long round; /** * 阶段类型 1: 积分赛 2: 淘汰赛 */ @ApiField("type") private Long type; public Long getGroup() { return this.group; } public void setGroup(Long group) { this.group = group; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public Long getRound() { return this.round; } public void setRound(Long round) { this.round = round; } public Long getType() { return this.type; } public void setType(Long type) { this.type = type; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
0cd44a9e3ab21acc58ed7c936c7f642f4eaadfce
0af8b92686a58eb0b64e319b22411432aca7a8f3
/api-vs-impl-small/domain/src/main/java/org/gradle/testdomain/performancenull_13/Productionnull_1222.java
6056d4fb236f2f5f9a310e9b351474688afda9cf
[]
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
591
java
package org.gradle.testdomain.performancenull_13; public class Productionnull_1222 { private final String property; public Productionnull_1222(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
0b2c0422265657a297f9667a3068a5b958ed6d96
3cc5589ed03a28430d0256f0f052c0cfa376df04
/src/main/java/tardis/api/ITDismantleable.java
1768055db0d965d10de388b891c6741f792439b0
[]
no_license
Schuljakov/TardisMod
3b5d0f28e1b9d6a73360345d22ad38368782e7ee
484100a27be2a550d3d0a26776fcdbbec5ccccaf
refs/heads/master
2020-06-15T18:46:31.162172
2016-11-29T15:02:37
2016-11-29T15:02:37
75,270,843
1
0
null
2016-12-01T08:18:32
2016-12-01T08:18:32
null
UTF-8
Java
false
false
374
java
package tardis.api; import io.darkcraft.darkcore.mod.datastore.SimpleCoordStore; import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; public interface ITDismantleable { public boolean canDismantle(SimpleCoordStore scs, EntityPlayer pl); public List<ItemStack> dismantle(SimpleCoordStore scs, EntityPlayer pl); }
[ "shaney.booth@gmail.com" ]
shaney.booth@gmail.com
c57ffb2e53c6bd8606e797bf4f882292b327c4a5
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/32/32_d32c4f8f9f7bfe65d5a41c75fd68a905714553e8/EnabledUserAction/32_d32c4f8f9f7bfe65d5a41c75fd68a905714553e8_EnabledUserAction_t.java
68b56418edd40e81b92d5df75e68738f38deceb8
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,092
java
/* * C5Connector.Java - The Java backend for the filemanager of corefive. * It's a bridge between the filemanager and a storage backend and * works like a transparent VFS or proxy. * Copyright (C) Thilo Schwarz * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU Lesser General Public License Version 3.0 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl-3.0.html * * - Mozilla Public License Version 2.0 or later (the "MPL") * http://www.mozilla.org/MPL/2.0/ * * == END LICENSE == */ package de.thischwa.c5c.requestcycle.impl; import de.thischwa.c5c.requestcycle.Context; import de.thischwa.c5c.requestcycle.UserAction; /** * An implementation of {@link UserAction} which always returns {@code true}. */ public class EnabledUserAction implements UserAction { public boolean isFileUploadEnabled(Context context) { return true; } public boolean isCreateFolderEnabled(Context context) { return true; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5298a749b21aa09be74583e400646c4dfeb2a6f9
efb935b22ae24a14b04b8bb73cf6006bb25753a3
/app/src/main/java/com/bukhmastov/cdoitmo/object/schedule/impl/ScheduleAttestationsImpl.java
8be94e9b73a56d64b0eea2610c4dbf2f9c56914b
[ "MIT" ]
permissive
morristech/CDOITMO
755341da6e1dcc822475e786762d8e2879e4cc48
ab73c577b91a0303dc4793bf4c2f083631699bd3
refs/heads/master
2020-06-01T14:17:59.724914
2019-05-05T13:19:00
2019-05-05T13:19:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,008
java
package com.bukhmastov.cdoitmo.object.schedule.impl; import com.bukhmastov.cdoitmo.event.bus.annotation.Event; import com.bukhmastov.cdoitmo.event.events.ClearCacheEvent; import com.bukhmastov.cdoitmo.factory.AppComponentProvider; import com.bukhmastov.cdoitmo.firebase.FirebasePerformanceProvider; import com.bukhmastov.cdoitmo.model.parser.ScheduleAttestationsParser; import com.bukhmastov.cdoitmo.model.schedule.attestations.SAttestations; import com.bukhmastov.cdoitmo.network.DeIfmoClient; import com.bukhmastov.cdoitmo.network.handlers.RestResponseHandler; import com.bukhmastov.cdoitmo.network.handlers.joiner.RestStringResponseHandlerJoiner; import com.bukhmastov.cdoitmo.network.model.Client; import com.bukhmastov.cdoitmo.object.schedule.ScheduleAttestations; import com.bukhmastov.cdoitmo.util.singleton.StringUtils; import java.util.Calendar; import java.util.Collections; import java.util.List; import javax.inject.Inject; public class ScheduleAttestationsImpl extends ScheduleImpl<SAttestations> implements ScheduleAttestations { private static final String TAG = "ScheduleExams"; @Inject DeIfmoClient deIfmoClient; public ScheduleAttestationsImpl() { AppComponentProvider.getComponent().inject(this); eventBus.register(this); } @Event public void onClearCacheEvent(ClearCacheEvent event) { if (event.isNot(ClearCacheEvent.SCHEDULE_ATTESTATIONS)) { return; } clearLocalCache(); } @Override protected void searchPersonal(int refreshRate, boolean forceToCache, boolean withUserChanges) throws Exception { log.v(TAG, "searchPersonal | personal schedule is unavailable"); invokePendingAndClose("personal", withUserChanges, handler -> handler.onFailure(FAILED_INVALID_QUERY)); } @Override protected void searchGroup(String group, int refreshRate, boolean forceToCache, boolean withUserChanges) throws Exception { List<String> sources = makeSources(SOURCE.DE_IFMO); log.v(TAG, "searchGroup | group=", group, " | refreshRate=", refreshRate, " | forceToCache=", forceToCache, " | withUserChanges=", withUserChanges, " | sources=", sources); searchByQuery(group, sources, refreshRate, withUserChanges, new SearchByQuery<SAttestations>() { @Override public void onWebRequest(String query, String source, RestResponseHandler<SAttestations> handler) { switch (source) { case SOURCE.DE_IFMO: { int term = getTerm(); String url = String.format("index.php?node=schedule&index=sched&semiId=%s&group=%s", String.valueOf(term), StringUtils.prettifyGroupNumber(group)); deIfmoClient.get(context, url, null, new RestStringResponseHandlerJoiner(handler) { @Override public void onSuccess(int code, Client.Headers headers, String response) throws Exception { SAttestations schedule = new ScheduleAttestationsParser(response, term).parse(); if (schedule == null) { handler.onFailure(code, headers, FAILED_LOAD); return; } schedule.setQuery(query); schedule.setType("group"); schedule.setTitle(StringUtils.prettifyGroupNumber(group)); schedule.setTimestamp(time.getTimeInMillis()); handler.onSuccess(code, headers, schedule); } }); break; } } } @Override public void onFound(String query, SAttestations schedule, boolean fromCache) { onScheduleFound(query, schedule, forceToCache, fromCache, withUserChanges); } }); } @Override protected void searchRoom(String room, int refreshRate, boolean forceToCache, boolean withUserChanges) throws Exception { log.v(TAG, "searchRoom | rooms schedule is unavailable"); invokePendingAndClose(room, withUserChanges, handler -> handler.onFailure(FAILED_INVALID_QUERY)); } @Override protected void searchTeacher(String teacherId, int refreshRate, boolean forceToCache, boolean withUserChanges) throws Exception { log.v(TAG, "searchTeacher | teacher schedule is unavailable"); invokePendingAndClose(teacherId, withUserChanges, handler -> handler.onFailure(FAILED_INVALID_QUERY)); } @Override protected void searchTeachers(String lastname, boolean withUserChanges) throws Exception { log.v(TAG, "searchTeachers | teachers schedule is unavailable"); invokePendingAndClose(lastname, withUserChanges, handler -> handler.onFailure(FAILED_INVALID_QUERY)); } @Override protected String getType() { return TYPE; } @Override protected String getDefaultSource() { return SOURCE.DE_IFMO; } @Override protected List<String> getSupportedSources() { return Collections.singletonList(SOURCE.DE_IFMO); } @Override protected SAttestations getNewInstance() { return new SAttestations(); } @Override protected String getTraceName() { return FirebasePerformanceProvider.Trace.Schedule.ATTESTATIONS; } private int getTerm() { int term; try { term = Integer.parseInt(storagePref.get(context, "pref_schedule_attestations_term", "0")); if (term == 0) { int month = time.getCalendar().get(Calendar.MONTH); if (month >= Calendar.SEPTEMBER || month == Calendar.JANUARY) { term = 1; } else { term = 2; } } else if (term < 1) { term = 1; } else if (term > 2) { term = 2; } } catch (Exception e) { term = 1; } return term; } private void onScheduleFound(String query, SAttestations schedule, boolean forceToCache, boolean fromCache, boolean withUserChanges) { try { if (schedule == null) { invokePendingAndClose(query, withUserChanges, handler -> handler.onFailure(FAILED_NOT_FOUND)); return; } if (!fromCache) { putToCache(query, schedule, forceToCache); } invokePendingAndClose(query, withUserChanges, handler -> handler.onSuccess(schedule, fromCache)); } catch (Exception e) { log.exception(e); invokePendingAndClose(query, withUserChanges, handler -> handler.onFailure(FAILED_LOAD)); } } }
[ "bukhmastov-alex@ya.ru" ]
bukhmastov-alex@ya.ru
d760597aa20b1791c43c9c2ebd65c8d800a249cf
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/median/2c1556672751734adf9a561fbf88767c32224fca14a81e9d9c719f18d0b21765038acc16ecd8377f74d4f43e8c844538161d869605e3516cf797d0a6a59f1f8e/000/mutations/236/median_2c155667_000.java
309b2cecde1af7ea57eccb213d98e9bfa4ca1975
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,390
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class median_2c155667_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { median_2c155667_000 mainClass = new median_2c155667_000 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj i1 = new IntObj (), i2 = new IntObj (), i3 = new IntObj (); output += (String.format ("Please enter 3 numbers separated by spaces > ")); i1.value = scanner.nextInt (); i2.value = scanner.nextInt (); i3.value = scanner.nextInt (); if ((i1.value >= i2.value && i1.value <= i3.value) || (i1.value == i2.value && i1.value == i3.value) || (i1.value > i2.value && i1.value < i3.value)) { output += (String.format ("%d is the median\n", i1.value)); } else if (((i1.value) == (i2.value) && i2.value <= i3.value) || (i2.value == i1.value && i2.value == i3.value) || (i2.value > i1.value && i2.value < i3.value)) { output += (String.format ("%d is the median\n", i2.value)); } else if ((i3.value >= i2.value && i3.value <= i1.value) || (i3.value == i2.value && i3.value == i1.value) || (i3.value > i2.value && i3.value < i1.value)) { output += (String.format ("%d is the median\n", i3.value)); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
8b4c6ff1242e37cc2600bbad00f5ead9381bf6ed
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava12/Foo981Test.java
cd2f51aee5b9cd87df4589c940646ca0013b6aff
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
482
java
package applicationModulepackageJava12; import org.junit.Test; public class Foo981Test { @Test public void testFoo0() { new Foo981().foo0(); } @Test public void testFoo1() { new Foo981().foo1(); } @Test public void testFoo2() { new Foo981().foo2(); } @Test public void testFoo3() { new Foo981().foo3(); } @Test public void testFoo4() { new Foo981().foo4(); } @Test public void testFoo5() { new Foo981().foo5(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
5acdbcb8bfbf4c0d8e7da0b990158e8a914355dd
c1e0bbcddf2efee61d8d4bbdfaf200a6026524ce
/grouper-ws/grouper-ws/src/grouper-ws_v2_2/edu/internet2/middleware/grouper/ws/soap_v2_2/WsAttributeAssignValue.java
d11a2eee3a1fbcd92d8274a3ed0677f6629f2ef4
[ "Apache-2.0" ]
permissive
Internet2/grouper
094bb61f3f58d98e531684c205b884354db8d451
7a27d1460b45a79bf276fa05a726e83706f6ff65
refs/heads/GROUPER_4_BRANCH
2023-09-03T08:22:10.136126
2023-09-02T04:56:10
2023-09-02T04:56:10
21,910,720
74
82
NOASSERTION
2023-08-12T18:48:54
2014-07-16T17:42:37
Java
UTF-8
Java
false
false
2,103
java
/******************************************************************************* * Copyright 2012 Internet2 * * 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. ******************************************************************************/ /** * @author mchyzer * $Id$ */ package edu.internet2.middleware.grouper.ws.soap_v2_2; /** * value of an attribute assign */ public class WsAttributeAssignValue { /** id of this attribute assignment */ private String id; /** internal value */ private String valueSystem; /** formatted value */ private String valueFormatted; /** * internal value * @return internal value */ public String getValueSystem() { return this.valueSystem; } /** * internal value * @param valueSystem1 */ public void setValueSystem(String valueSystem1) { this.valueSystem = valueSystem1; } /** * value formatted * @return value formatted */ public String getValueFormatted() { return this.valueFormatted; } /** * value formatted * @param valueFormatted1 */ public void setValueFormatted(String valueFormatted1) { this.valueFormatted = valueFormatted1; } /** * id of this attribute assignment * @return id */ public String getId() { return this.id; } /** * id of this attribute assignment * @param id1 */ public void setId(String id1) { this.id = id1; } /** * */ public WsAttributeAssignValue() { //default constructor } }
[ "mchyzer@isc.upenn.edu" ]
mchyzer@isc.upenn.edu
fc2b642b7411ef707cb0f7221be0514af96e14e2
9e1c14d7a5f013771324878aa7ccef54ff7784b1
/00semi_project/src/sm3/jsh/controller/ReviewController.java
e7c87738af6f8e59f23f1535978a17d9e45b48ec
[]
no_license
xhspdle/SM3
1bb5febf7479132f132e4eab0a8aa4363e67720d
c9b4da0f6bd26aaa1aa86ba387efaf67f74e05ba
refs/heads/master
2020-03-26T21:49:52.299560
2018-09-13T11:06:04
2018-09-13T11:06:04
145,411,322
0
0
null
null
null
null
UHC
Java
false
false
3,459
java
package sm3.jsh.controller; import java.io.IOException; import java.util.ArrayList; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.oreilly.servlet.MultipartRequest; import com.oreilly.servlet.multipart.DefaultFileRenamePolicy; import sm3.jsh.dao.ReviewDao; import sm3.jsh.dao.UserDao; import sm3.jsh.vo.ReviewVo; import sm3.jsh.vo.UserVo; @WebServlet("/reviewControll.do") public class ReviewController extends HttpServlet { protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("utf-8"); String cmd = request.getParameter("cmd"); if(cmd.equals("insert")) { insert(request,response); }else if(cmd.equals("list")) { list(request,response); }else if(cmd.equals("delete")) { delete(request,response); } } protected void insert(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String path=request.getServletContext().getRealPath("/DBImages"); int item_num = Integer.parseInt(request.getParameter("item_num")); MultipartRequest mr=new MultipartRequest(request, path, 1024*1024*10, "UTF-8", new DefaultFileRenamePolicy() ); String review_item = mr.getParameter("review_item"); String review_orgimg = mr.getOriginalFileName("file1"); String review_savimg = mr.getFilesystemName("file1"); String review_content = mr.getParameter("review_content").replace("\r\n", "<br>"); String mreview_rating = mr.getParameter("review_rating"); int review_rating=0; if(mreview_rating !=null && !mreview_rating.equals("")) { review_rating=Integer.parseInt(mreview_rating); } String morder_num = mr.getParameter("order_num"); int order_num=0; if(morder_num !=null && !morder_num.equals("")) { order_num=Integer.parseInt(morder_num); } String muser_num = mr.getParameter("user_num"); int user_num=0; if(muser_num !=null && !muser_num.equals("")) { user_num=Integer.parseInt(muser_num); } int n = ReviewDao.getInstance().insert(new ReviewVo(0, review_item, review_orgimg, review_savimg, review_rating, review_content, null, order_num, user_num)); if(n>0) { request.setAttribute("msg", "리뷰등록성공"); request.getRequestDispatcher("itemView.do?cmd=select&item_num"+item_num+"&item_name="+review_item).forward(request, response); }else { request.setAttribute("msg", "리뷰등록실패"); request.getRequestDispatcher("test.jsp").forward(request, response); } } //ItemViewController에 보내놓음 protected void list(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } protected void delete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { int review_num = Integer.parseInt(request.getParameter("review_num")); String item_num = request.getParameter("item_num"); String item_name = request.getParameter("item_name"); int n = ReviewDao.getInstance().delete(review_num); if(n>0) { request.getRequestDispatcher("itemView.do?cmd=select&item_num"+item_num+"&item_name="+item_name).forward(request, response); } } }
[ "JHTA@JHTA-PC" ]
JHTA@JHTA-PC
0fe7212017480d3fba1976bac607e8b2f12f28fb
468760efd49edac72fa1a5e77da99f5553113b7a
/src/main/java/com/liujun/framework/springsecurity/service/MyResourceServiceInf.java
957ebed0396ed89205166f101f19225f2217228f
[]
no_license
kkzfl22/demo
4f2f8d262c418079d901af29ac91d5a402e35fb3
0271bc5c5b534399878b109c11c45aca75f3d55a
refs/heads/master
2022-12-22T07:55:02.200707
2019-09-06T11:17:52
2019-09-06T11:17:52
205,347,807
2
0
null
2022-12-16T01:21:43
2019-08-30T09:15:28
Java
UTF-8
Java
false
false
896
java
package com.liujun.framework.springsecurity.service; import java.util.List; import org.springframework.dao.DataAccessException; import com.liujun.framework.springsecurity.bean.MyResource; import com.liujun.framework.springsecurity.bean.MyRole; /** * 得到资源的信息 * @author liujun * * @date 2014年12月22日 * @vsersion 0.0.1 */ public interface MyResourceServiceInf { /** * 查询出所有的资源信息 * @return 结果信息 * @throws DataAccessException */ public List<MyResource> queryResources() ; /** * 根据roleid来查询出当前权限的资源 * @param roldId * @return * @throws DataAccessException */ public List<MyResource> queryResourceByRoleId(int roldId); /** * 查询用户的权限的资源信息 * @param role 授权信息 * @return 加载资源的权限信息 */ public MyRole queryRoleResouce(MyRole role); }
[ "422134235@qq.com" ]
422134235@qq.com
4af9b63b252b49fe4880e55605ec767b66e0b6a8
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-14554-1-22-Single_Objective_GGA-WeightedSum/org/xwiki/notifications/internal/email/AbstractMimeMessageIterator_ESTest.java
2f06c1baa51cf41c56417401d1d354de2478a34f
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
879
java
/* * This file was automatically generated by EvoSuite * Tue Mar 31 00:22:15 UTC 2020 */ package org.xwiki.notifications.internal.email; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; import org.xwiki.notifications.internal.email.PeriodicMimeMessageIterator; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class AbstractMimeMessageIterator_ESTest extends AbstractMimeMessageIterator_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { PeriodicMimeMessageIterator periodicMimeMessageIterator0 = new PeriodicMimeMessageIterator(); // Undeclared exception! periodicMimeMessageIterator0.next(); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
2d1414f67ee305270f2f6fbdc3cd75254fe54fa9
59cd98f30e766ea2b7a9914d88ea6611247f4d7e
/spring-ws/2-Spring-Core-Basics/src/main/java/com/cts/product/service/C2.java
86706250df0ed8228f0085415b16d5eac9a9c4f4
[]
no_license
sahebhere/cts-adm-microservices
430d88abeaca06fea75522f124543bfe4b6f329f
a7e7ce84e51e12f033c07b705b0793c2a6a26f51
refs/heads/master
2023-03-04T16:43:50.835745
2021-02-17T13:48:57
2021-02-17T13:48:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
242
java
package com.cts.product.service; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; @Service @Lazy public class C2 { public C2() { System.out.println("C2 class object created "); } }
[ "praveen.somireddy@gmail.com" ]
praveen.somireddy@gmail.com
fb586dd770851184f296c373c419ae09dc8adec0
c531d8b9644bcfe916f4b0665db96c39611196d5
/emolance-android-enterprise/app/src/main/java/com/emolance/enterprise/service/EmolanceAuthAPI.java
9d8d749144ec4d7306e99bc65992e2866d0ad7ba
[]
no_license
psych-tech/smart-pm
68f39f4eecf2d4df0a10f0794f9aeed574ebf09c
d5670a411a1d6e9664dcf8949938ebe166e966a9
refs/heads/master
2020-04-11T03:00:19.839524
2018-02-26T00:34:37
2018-02-26T00:34:37
33,431,347
0
0
null
2017-12-06T01:54:00
2015-04-05T05:23:44
Java
UTF-8
Java
false
false
292
java
package com.emolance.enterprise.service; import com.emolance.enterprise.data.EmoUser; import retrofit2.Call; import retrofit2.http.GET; /** * Created by yusun on 5/22/15. */ public interface EmolanceAuthAPI { @GET("/api/emo/current-emo") public Call<EmoUser> authenticate(); }
[ "yu.sun.cs@gmail.com" ]
yu.sun.cs@gmail.com
7512d7f0b8f5565e5cbadc671c9ff163f54c40a4
66220fbb2b7d99755860cecb02d2e02f946e0f23
/src/net/sourceforge/plantuml/braille/BrailleGrid.java
efc1815ea67972175ef6d1bc4fd0d0987007f303
[ "MIT" ]
permissive
isabella232/plantuml-mit
27e7c73143241cb13b577203673e3882292e686e
63b2bdb853174c170f304bc56f97294969a87774
refs/heads/master
2022-11-09T00:41:48.471405
2020-06-28T12:42:10
2020-06-28T12:42:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,105
java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2020, Arnaud Roques * * Project Info: https://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * https://plantuml.com/patreon (only 1$ per month!) * https://plantuml.com/paypal * * This file is part of PlantUML. * * Licensed under The MIT License (Massachusetts Institute of Technology License) * * See http://opensource.org/licenses/MIT * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * * Original Author: Arnaud Roques */ package net.sourceforge.plantuml.braille; import java.awt.geom.CubicCurve2D; import java.awt.geom.Point2D; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.posimo.DotPath; public class BrailleGrid { private int minX; private int minY; private int maxX; private int maxY; private final double quanta; private final Set<Coords> on = new HashSet<Coords>(); public BrailleGrid(double quanta) { this.quanta = quanta; } public boolean getState(int x, int y) { final Coords coords = new Coords(x, y); return on.contains(coords); } private void setStateDouble(double x, double y, boolean state) { setState(toInt(x), toInt(y), state); } public void setState(int x, int y, boolean state) { final Coords coords = new Coords(x, y); if (state) { on.add(coords); } else { on.remove(coords); } minX = Math.min(minX, x); maxX = Math.max(maxX, x); minY = Math.min(minY, y); maxY = Math.max(maxY, y); } public int getMinX() { return minX; } public int getMinY() { return minY; } public int getMaxX() { return maxX; } public int getMaxY() { return maxY; } public void rectangle(double x, double y, double width, double height) { hline(y, x, x + width); hline(y + height, x, x + width); vline(x, y, y + height); vline(x + width, y, y + height); } private void vline(double x, double y1, double y2) { final int i = toInt(x); final int j1 = toInt(y1); final int j2 = toInt(y2); for (int j = j1; j <= j2; j++) { setState(i, j, true); } } private void hline(double y, double x1, double x2) { final int j = toInt(y); final int i1 = toInt(x1); final int i2 = toInt(x2); for (int i = i1; i <= i2; i++) { setState(i, j, true); } } public int toInt(double value) { return (int) Math.round(value / quanta); } public void line(double x1, double y1, double x2, double y2) { if (x1 == x2) { vline(x1, y1, y2); } else if (y1 == y2) { hline(y1, x1, x2); } else { System.err.println("warning line"); } } public double getQuanta() { return quanta; } public void drawDotPath(double x, double y, DotPath shape) { for (CubicCurve2D.Double bez : shape.getBeziers()) { drawCubic(x, y, bez); } } private void drawCubic(double x, double y, CubicCurve2D.Double bez) { drawPointInternal(x, y, bez.getP1()); drawPointInternal(x, y, bez.getP2()); if (bez.getP1().distance(bez.getP2()) > quanta) { final CubicCurve2D.Double part1 = new CubicCurve2D.Double(); final CubicCurve2D.Double part2 = new CubicCurve2D.Double(); bez.subdivide(part1, part2); drawCubic(x, y, part1); drawCubic(x, y, part2); } } private void drawPointInternal(double x, double y, Point2D pt) { setStateDouble(x + pt.getX(), y + pt.getY(), true); } public void drawPolygon(List<Point2D> points) { for (int i = 0; i < points.size() - 1; i++) { drawLineInternal(points.get(i), points.get(i + 1)); } drawLineInternal(points.get(points.size() - 1), points.get(0)); } private void drawLineInternal(Point2D a, Point2D b) { drawPointInternal(0, 0, a); drawPointInternal(0, 0, b); if (a.distance(b) > quanta) { final Point2D middle = new Point2D.Double((a.getX() + b.getX()) / 2, (a.getY() + b.getY()) / 2); drawLineInternal(a, middle); drawLineInternal(middle, b); } } }
[ "plantuml@gmail.com" ]
plantuml@gmail.com
6d58b0b86c06e44d44e2fea9316ead403ac2bb51
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/34/34_55f52dbe5bf74eccf5cc22cec581b8b1916ea04c/ServiceMessages/34_55f52dbe5bf74eccf5cc22cec581b8b1916ea04c_ServiceMessages_t.java
393a401bb904e5057a3792ab19151eef9f395cd9
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,152
java
/** * Get more info at : www.jrebirth.org . * Copyright JRebirth.org © 2011-2013 * Contact : sebastien.bordes@jrebirth.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jrebirth.core.service; import org.jrebirth.core.log.JRLevel; import org.jrebirth.core.log.JRebirthMarkers; import org.jrebirth.core.resource.i18n.LogMessage; import org.jrebirth.core.resource.i18n.MessageContainer; import org.jrebirth.core.resource.i18n.MessageItem; import static org.jrebirth.core.resource.Resources.create; /** * The class <strong>ServiceMessages</strong>. * * Messages used by the Service package. * * @author Sébastien Bordes */ public interface ServiceMessages extends MessageContainer { /** AbstractService. */ /** "Wave processed without any wave type for service {0}". */ MessageItem NO_WAVE_TYPE_DEFINED = create(new LogMessage("jrebirth.service.noWaveTypeDefined", JRLevel.Error, JRebirthMarkers.SERVICE)); /** ServiceTaskReturnWaveListener. */ /** "{0} Consumes wave {1}" . */ MessageItem SERVICE_TASK_RETURN_CONSUMES = create(new LogMessage("jrebirth.service.serviceTaskReturnConsumes", JRLevel.Trace, JRebirthMarkers.SERVICE)); /** "{0} experience a service task failure for wave {1}" . */ MessageItem SERVICE_TASK_HAS_FAILED = create(new LogMessage("jrebirth.service.serviceTaskHasFailed", JRLevel.Error, JRebirthMarkers.SERVICE)); /** ServiceTask. */ /** "{0} Consumes wave (noReturn) {1}". */ MessageItem NO_RETURN_WAVE_CONSUMED = create(new LogMessage("jrebirth.service.noReturnedWaveConsumed", JRLevel.Trace, JRebirthMarkers.SERVICE)); /** "No Return WaveType defined for this WaveType {0}". */ MessageItem NO_RETURNED_WAVE_TYPE_DEFINED = create(new LogMessage("jrebirth.service.noReturnedWaveTypeDefined", JRLevel.Error, JRebirthMarkers.SERVICE)); /** "The Return WaveType must contain at least one WaveItem to wrap the service return". */ MessageItem NO_RETURNED_WAVE_ITEM = create(new LogMessage("jrebirth.service.noReturnedWaveItem", JRLevel.Error, JRebirthMarkers.SERVICE)); /** "Unable to perform the Service Task {0}" . */ MessageItem SERVICE_TASK_ERROR = create(new LogMessage("jrebirth.service.serviceTaskError", JRLevel.Error, JRebirthMarkers.SERVICE)); /** ServiceUtility. */ /** "Impossible to count lines for file: {0}" . */ MessageItem COUNT_LINES_ERROR = create(new LogMessage("jrebirth.service.countLinesError", JRLevel.Error, JRebirthMarkers.SERVICE)); }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
db253461183e201e72f1fef3a3be0224b95d7932
0f5124795d0a7e16040c9adfc0f562326f17a767
/steven-web-basis/src/main/java/com/steven/page/WhiteIpPage.java
efcefe6f355016e1682e69bd5c3381509e51342d
[]
no_license
frank-mumu/steven-parent
b0fd7d52dfe5bab6f33c752efa132862f46cea54
faca8295aac1da943bd4d4dd992debef6d537be7
refs/heads/master
2023-05-27T00:17:44.996281
2019-10-24T05:59:35
2019-10-24T05:59:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
398
java
package com.steven.page; public class WhiteIpPage extends BasePage { private String userName; private String ip; public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } }
[ "918273244@qq.com" ]
918273244@qq.com
741249e04892bf2469577419b12952be9cb9a58d
f07f447985fd9362ddc50f61b13cf4b0b40e342d
/rx-java3/src/main/java/io/vertx/rxjava3/core/AbstractVerticle.java
8e6bbe3a4552ad48eda56eab8f76f671e003561e
[ "Apache-2.0" ]
permissive
wang007/vertx-rx
1d9923196e602d23c5a302c5e36781b6279d9419
aff5174fc2f946134febfb4ed82dc84212350866
refs/heads/master
2021-08-01T18:17:49.587581
2021-07-01T10:06:19
2021-07-01T10:06:19
232,083,523
0
0
Apache-2.0
2020-01-06T11:06:35
2020-01-06T11:06:34
null
UTF-8
Java
false
false
2,313
java
/* * Copyright 2014 Red Hat, Inc. * * Red Hat 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 io.vertx.rxjava3.core; import io.reactivex.rxjava3.core.Completable; import io.vertx.core.Context; import io.vertx.core.Promise; import io.vertx.core.Vertx; /** * @author <a href="mailto:julien@julienviet.com">Julien Viet</a> */ public class AbstractVerticle extends io.vertx.core.AbstractVerticle { // Shadows the AbstractVerticle#vertx field protected io.vertx.rxjava3.core.Vertx vertx; @Override public void init(Vertx vertx, Context context) { super.init(vertx, context); this.vertx = new io.vertx.rxjava3.core.Vertx(vertx); } @Override public void start(Promise<Void> startFuture) throws Exception { Completable completable = rxStart(); if (completable != null) { completable.subscribe(startFuture::complete, startFuture::fail); } else { super.start(startFuture); } } /** * Override to return a {@code Completable} that will complete the deployment of this verticle. * <p/> * When {@code null} is returned, the {@link #start()} will be called instead. * * @return the completable */ public Completable rxStart() { return null; } @Override public void stop(Promise<Void> stopFuture) throws Exception { Completable completable = rxStop(); if (completable != null) { completable.subscribe(stopFuture::complete, stopFuture::fail); } else { super.stop(stopFuture); } } /** * Override to return a {@code Completable} that will complete the undeployment of this verticle. * <p/> * When {@code null} is returned, the {@link #stop()} will be called instead. * * @return the completable */ public Completable rxStop() { return null; } }
[ "julien@julienviet.com" ]
julien@julienviet.com
1f72f3e010e84dc789c853e3b60fbda490a0ca29
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Time/27/org/joda/time/DateTime_toDateTime_453.java
182db0d7bd57ff968a5d2230ab3c1322d9c157ce
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
3,145
java
org joda time date time datetim standard implement unmodifi datetim code date time datetim code wide implement link readabl instant readableinst instant repres exact point time line limit precis millisecond code date time datetim code calcul field respect link date time zone datetimezon time zone intern hold piec data firstli hold datetim millisecond java epoch t00 01t00 00z hold link chronolog determin millisecond instant convert date time field chronolog link iso chronolog isochronolog agre intern standard compat modern gregorian calendar individu field queri wai code hour dai gethourofdai code code hour dai hourofdai code techniqu access method field numer text text maximum minimum valu add subtract set round date time datetim thread safe immut provid chronolog standard chronolog class suppli thread safe immut author stephen colebourn author kandarp shah author brian neill o'neil mutabl date time mutabledatetim date time datetim object date time datetim return code code code code date time datetim date time todatetim
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
7d2212dc677a5f53a8154ae15184167eeb1e5972
ab4a74ec5a72bfed4d788628f9e83c9f67352237
/adapters/reservation-web/src/main/java/com/reservation/web/mapper/PropertyApiMapper.java
ff9e6fdf9aef0234cb23796544f83d072d46f73c
[]
no_license
Ignatovw99/Reservation-API
c29e4e4e62b12eb2944c059a65c44d042ea63639
5918aa008b90a887b7a9045abd6c861d8e14a750
refs/heads/master
2023-08-13T20:10:23.166046
2021-10-18T05:08:45
2021-10-18T05:08:45
297,589,119
0
0
null
null
null
null
UTF-8
Java
false
false
668
java
package com.reservation.web.mapper; import com.reservation.application.domain.entity.Property; import com.reservation.application.port.in.CreatePropertyUseCase; import com.reservation.common.contract.DomainEntityApiMapper; import com.reservation.web.model.PropertyApi; import org.mapstruct.Mapper; import org.mapstruct.Mapping; @Mapper(componentModel = "spring") public interface PropertyApiMapper extends DomainEntityApiMapper<Property, PropertyApi> { CreatePropertyUseCase.Command toCreatePropertyCommand(PropertyApi propertyApi); @Override @Mapping(source = "type.id", target = "propertyTypeId") PropertyApi toApiModel(Property domainEntity); }
[ "lyuboslavw@gmail.com" ]
lyuboslavw@gmail.com