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
a1727055e51993de1317609b36870763ddca3a9d
b2bfac7b91b2542228931c10c668ca2f67e86b51
/LostNetNoRootFirewall-Decompiled code/com/lostnet/fw/ui/ee.java
e80c5de071017e60767deb2f5e7c58c9d086b7df
[]
no_license
abozanona/fbaAndroid
b58be90fc94ceec5170d84133c1e8c4e2be8806f
f058eb0317df3e76fd283e285c4dd3dbc354aef5
refs/heads/master
2021-09-26T22:05:31.517265
2018-11-03T07:21:17
2018-11-03T07:21:17
108,681,428
1
0
null
null
null
null
UTF-8
Java
false
false
1,359
java
package com.lostnet.fw.ui; import android.content.Context; import android.view.View; import android.view.ViewGroup; import com.lostnet.fw.p008c.C0298c; import com.lostnet.fw.p009d.C0309f; import java.util.ArrayList; import java.util.HashMap; class ee extends eg { final /* synthetic */ SectionGeoListFragment f1802a; private final ArrayList f1803c; private final HashMap f1804d; public ee(SectionGeoListFragment sectionGeoListFragment, Context context, ArrayList arrayList, HashMap hashMap, boolean z) { this.f1802a = sectionGeoListFragment; super(sectionGeoListFragment, z); this.f1803c = arrayList; this.f1804d = hashMap; } public View mo765a(int i, View view, ViewGroup viewGroup, boolean z) { String str = (String) this.f1803c.get(i); String c = C0309f.m1980c(str); ArrayList arrayList = new ArrayList(); arrayList.add(str); return m2133a(C0309f.m1984e(str), c, (C0298c) this.f1804d.get(str), arrayList, i, view, viewGroup, z); } public int getCount() { return this.f1803c.size(); } public Object getItem(int i) { ArrayList arrayList = new ArrayList(); arrayList.add(C0309f.m1980c((String) this.f1803c.get(i))); return arrayList; } public long getItemId(int i) { return (long) i; } }
[ "abozanona@gmail.com" ]
abozanona@gmail.com
172db8784b994e7b8ba9e6b39829028cef835e5c
5200949b65dac0de76ee717f85257b8687eef3d4
/app/src/main/java/com/demo/yetote/cubegame/adapter/recyclerview/GameInfoThemeAdapter.java
9ae38a69e5a008910621074208d04ef9d6ab904a
[]
no_license
yetote/CubeGame
034c3d86646a64620bdb6fcb1e4437422fc99bfe
f546fc38bcc2813f6c491c21de0d0cbf8b5232c6
refs/heads/master
2021-05-11T12:12:37.674654
2018-08-15T09:37:33
2018-08-15T09:37:33
117,653,549
1
0
null
null
null
null
UTF-8
Java
false
false
2,723
java
package com.demo.yetote.cubegame.adapter.recyclerview; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.demo.yetote.cubegame.R; import com.demo.yetote.cubegame.model.GameInfoThemeModel; import com.demo.yetote.cubegame.utils.OnClick; import java.util.ArrayList; /** * com.demo.yetote.cubegame.adapter * * @author Swg * @date 2018/2/8 14:05 */ public class GameInfoThemeAdapter extends RecyclerView.Adapter { private Context context; private ArrayList<GameInfoThemeModel> list; private OnClick listener; public OnClick getListener() { return listener; } public void setListener(OnClick listener) { this.listener = listener; } public GameInfoThemeAdapter(Context context, ArrayList<GameInfoThemeModel> list) { this.context = context; this.list = list; } private class MyViewHolder extends RecyclerView.ViewHolder { private TextView title, content, time, discussNum; private TextView getTitle() { return title; } private TextView getContent() { return content; } private TextView getTime() { return time; } private TextView getDiscussNum() { return discussNum; } private MyViewHolder(View itemView) { super(itemView); title = itemView.findViewById(R.id.item_game_info_theme_title); content = itemView.findViewById(R.id.item_game_info_theme_content); time = itemView.findViewById(R.id.item_game_info_theme_time); discussNum = itemView.findViewById(R.id.item_game_info_theme_discussNum); } } @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View v = LayoutInflater.from(context).inflate(R.layout.item_game_info_theme, parent, false); v.setOnClickListener(v1 -> listener.onClickListener(v,(Integer) v.getTag())); return new MyViewHolder(v); } @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { MyViewHolder vh = (MyViewHolder) holder; vh.getContent().setText(list.get(position).getContent()); vh.getTitle().setText(list.get(position).getTitle()); vh.getTime().setText(list.get(position).getTime()); vh.getDiscussNum().setText(list.get(position).getDiscussNum()); vh.itemView.setTag(list.get(position).getId()); } @Override public int getItemCount() { return list.size(); } }
[ "503779938@qq.com" ]
503779938@qq.com
3975872f5ca7f007a7d33fe1c4756b873f1294ba
1fc6412873e6b7f6df6c9333276cd4aa729c259f
/CoreJava/src/com/corejava7/javabean/InverseEditorPanel.java
b493d0183408c57026f1fcdcac69ceef9e3e4e5a
[]
no_license
youzhibicheng/ThinkingJava
dbe9bec5b17e46c5c781a98f90e883078ebbd996
5390a57100ae210dc57bea445750c50b0bfa8fc4
refs/heads/master
2021-01-01T05:29:01.183768
2016-05-10T01:07:58
2016-05-10T01:07:58
58,379,014
1
2
null
null
null
null
GB18030
Java
false
false
1,412
java
/** @version 1.22 2004-08-30 @author Cay Horstmann */ package com.corejava7.javabean; import java.awt.*; import java.awt.event.*; import java.text.*; import java.lang.reflect.*; import java.beans.*; import javax.swing.*; /** The panel for setting the inverse property. It contains radio buttons to toggle between normal and inverse coloring. */ public class InverseEditorPanel extends JPanel { public InverseEditorPanel(PropertyEditorSupport ed) { editor = ed; ButtonGroup g = new ButtonGroup(); boolean isInverse = (Boolean) editor.getValue(); normal = new JRadioButton("Normal", !isInverse); inverse = new JRadioButton("Inverse", isInverse); g.add(normal); g.add(inverse); add(normal); add(inverse); ActionListener buttonListener = new ActionListener() { public void actionPerformed(ActionEvent event) { editor.setValue( new Boolean(inverse.isSelected()));//对应的在类InverseEditor中用getValue得到值 editor.firePropertyChange(); } }; normal.addActionListener(buttonListener); inverse.addActionListener(buttonListener); } private JRadioButton normal; private JRadioButton inverse; private PropertyEditorSupport editor; }
[ "youzhibicheng@163.com" ]
youzhibicheng@163.com
293f0750d4c52693a576af67a023c38b2c1cfe97
26e47d5bd61e685dd7b71c3ea03894937849e722
/leetcode_0226/java/leetcode_0226.java
53d85f92591e28c83964177c2efb9bd66e563f89
[]
no_license
wangzy0327/Leetcode-Practice
05196ed7a812b60cb6c8fbc94fb764871824f2d3
983998e7998e31395d2e19bd112462c6526bdf3e
refs/heads/master
2022-08-27T23:20:44.517716
2022-08-18T08:16:25
2022-08-18T08:16:25
253,664,306
0
0
null
null
null
null
UTF-8
Java
false
false
2,154
java
public class leetcode_0226 { public class TreeNode{ int val; TreeNode left; TreeNode right; TreeNode() {} TreeNode(int val) {this.val = val;} TreeNode(int val,TreeNode left,TreeNode right){ this.val = val; this.left = left; this.right = right; } } class Solution { public TreeNode invertTree(TreeNode root) { if(root != null){ TreeNode left = root.left; TreeNode right = root.right; root.left = invertTree(right); root.right = invertTree(left); } return root; } public void traversePreTree(StringBuilder sb,TreeNode root){ if(root != null){ sb.append(root.val+","); traversePreTree(sb,root.left); traversePreTree(sb,root.right); } } public void printTree(TreeNode root){ StringBuilder res = new StringBuilder(); traversePreTree(res,root); System.out.printf("["); String substring = res.substring(0, res.length() - 1); System.out.printf(substring); System.out.println("]"); } } public static void main(String[] args) { Solution solution = new leetcode_0226().new Solution(); TreeNode root = new leetcode_0226().new TreeNode(4); TreeNode left = new leetcode_0226().new TreeNode(2); TreeNode right = new leetcode_0226().new TreeNode(7); TreeNode ll = new leetcode_0226().new TreeNode(1); TreeNode lr = new leetcode_0226().new TreeNode(3); TreeNode rl = new leetcode_0226().new TreeNode(6); TreeNode rr = new leetcode_0226().new TreeNode(9); left.left = ll; left.right = lr; right.left = rl; right.right = rr; root.left = left; root.right = right; solution.printTree(root); //root = [4,2,7,1,3,6,9] root = solution.invertTree(root); solution.printTree(root); //result //[4,7,2,9,6,3,1] } }
[ "wangzy0327@qq.com" ]
wangzy0327@qq.com
cdc98e20e007245c805a1e23e7e6e23ad5a6aa5d
1ec73a5c02e356b83a7b867580a02b0803316f0a
/java/bj/crazy/ch15/u08/WriteObject.java
4766c077ae29591982b7354f98b34192cead7472
[]
no_license
jxsd0084/JavaTrick
f2ee8ae77638b5b7654c3fcf9bceea0db4626a90
0bb835fdac3c2f6d1a29d1e6e479b553099ece35
refs/heads/master
2021-01-20T18:54:37.322832
2016-06-09T03:22:51
2016-06-09T03:22:51
60,308,161
0
1
null
null
null
null
UTF-8
Java
false
false
866
java
package bj.crazy.ch15.u08; import java.io.*; /** * Description: * <br/>Copyright (C), 2005-2008, Yeeku.H.Lee * <br/>This program is protected by copyright laws. * <br/>Program Name: * <br/>Date: * * @author Yeeku.H.Lee kongyeeku@163.com * @version 1.0 */ public class WriteObject { /** * 测试 * * @param args */ public static void main( String[] args ) { ObjectOutputStream oos = null; try { // 创建一个ObjectOutputStream输出流 oos = new ObjectOutputStream( new FileOutputStream( "object.txt" ) ); Person per = new Person( "孙悟空", 500 ); // 将per对象写入输出流 oos.writeObject( per ); } catch ( IOException ex ) { ex.printStackTrace(); } finally { try { if ( oos != null ) { oos.close(); } } catch ( IOException ex ) { ex.printStackTrace(); } } } }
[ "chenlong88882001@163.com" ]
chenlong88882001@163.com
ad9e730d021ba2d29e5e6fdb9acae18fdfc9d441
600e8b97cdb0bceef24424c0e0a04a82c7a10c28
/src/main/java/com/hiya/se/oop/Dog.java
52fc9832d1606852138c8e2b1a8c4698ecf9cc54
[]
no_license
13802706376/HIYA_BASIC_CODES_4ZEE_HiyaOopPro
868ae37db68a21856ae5914fb70bac92ac9f5ac5
ae454a70b59a2d86261360ebdbef091ab64131ca
refs/heads/master
2020-04-08T08:23:55.434962
2018-11-27T12:29:35
2018-11-27T12:29:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
147
java
package com.hiya.se.oop; public class Dog extends Animal { public void speak() { System.out.println("汪汪..."); } }
[ "caozhijun@caozhijun-book" ]
caozhijun@caozhijun-book
fc6e69bdfa41fe5e80e057b6e3bfa391c320281f
27511a2f9b0abe76e3fcef6d70e66647dd15da96
/src/com/instagram/creation/capture/quickcapture/j.java
0ea02846fa23605de4eb8962f6dba2f66ec5245b
[]
no_license
biaolv/com.instagram.android
7edde43d5a909ae2563cf104acfc6891f2a39ebe
3fcd3db2c3823a6d29a31ec0f6abcf5ceca995de
refs/heads/master
2022-05-09T15:05:05.412227
2016-07-21T03:48:36
2016-07-21T03:48:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
635
java
package com.instagram.creation.capture.quickcapture; import android.view.View; import android.view.View.OnClickListener; import com.instagram.creation.capture.IgCameraPreviewView; final class j implements View.OnClickListener { j(q paramq) {} public final void onClick(View paramView) { if ("off".equals(q.e(a).getFlashMode())) { q.e(a); IgCameraPreviewView.a("on", q.l(a)); return; } q.e(a); IgCameraPreviewView.a("off", q.l(a)); } } /* Location: * Qualified Name: com.instagram.creation.capture.quickcapture.j * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
c7baf830481da693b5435e18d76822c7bb4e0d58
a197515f887b9a59c9120c3e2f8cbf595903266c
/baselib/src/main/java/com/cn/smart/baselib/share/core/error/UnSupportedException.java
2b56c40a0c5f16be2c0a572ef386d0967e290ce2
[]
no_license
LeoCheung0221/CarSmart
ab930f1678158d98fe8bb483ee51ff7690419bec
6dbffa2236dd38ef0e1f05280eee2a382c26e694
refs/heads/master
2020-05-23T22:46:40.441703
2017-11-18T12:46:27
2017-11-18T12:46:27
84,797,289
20
1
null
null
null
null
UTF-8
Java
false
false
284
java
package com.cn.smart.baselib.share.core.error; public class UnSupportedException extends ShareException { public UnSupportedException(String detailMessage) { super(detailMessage); setCode(CarSmartShareStatusCode.ST_CODE_SHARE_ERROR_PARAM_UNSUPPORTED); } }
[ "zhanglin@chexingzhihui.com" ]
zhanglin@chexingzhihui.com
9049077609ffe2bf9e17cacad76b1170abdc1310
187b211464d5a30a6865fcc4a00986ec02243d49
/luckwine-goods/luckwine-goods-web/src/main/java/com/luckwine/goods/utils/GoodsIdUtils.java
5ef940f24ad7b42b71428c543f8c948c4a0d2d8d
[]
no_license
guangtong-information/luckwine-mall
3b7fa3d809d9b1e9575e2643ea6915aedcb781e8
a564126d8a9b63e6650f72590f63af834822bf2e
refs/heads/master
2022-06-27T07:12:17.243240
2020-09-04T09:35:54
2020-09-04T09:35:54
171,574,799
10
10
null
2022-06-21T00:56:34
2019-02-20T00:53:24
TSQL
UTF-8
Java
false
false
266
java
package com.luckwine.goods.utils; import org.springframework.stereotype.Component; @Component public class GoodsIdUtils { private Sequence sequence = new Sequence(); public String generateId() { return String.valueOf(sequence.nextId()); } }
[ "th15817161961@gmail.com" ]
th15817161961@gmail.com
e08b1016720fa34837f99d473a531bbb03b903f0
2ff57c61ed824b86d37a56dd10858efe11e2a5e1
/src/main/java/com/assess/modules/sys/entity/SysUser.java
899db5af4221823185fa85930e6ef823e6bc840a
[]
no_license
luomor-web/assess_system
bd1765609f727efabafa8dedb33b606bf3627b64
43b9acb3d7fbcb53e76c5e19fd219e9dc75c8680
refs/heads/master
2023-06-19T04:56:26.665544
2021-07-09T07:49:10
2021-07-09T07:49:10
384,362,318
0
0
null
null
null
null
UTF-8
Java
false
false
3,258
java
/** * * * * * */ package com.assess.modules.sys.entity; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonProperty; import com.assess.common.validator.group.AddGroup; import com.assess.common.validator.group.UpdateGroup; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.Date; import java.util.List; /** * 系统员工 * * @author */ @TableName("sys_user") public class SysUser implements Serializable { private static final long serialVersionUID = 1L; /** * 员工ID */ @TableId private Long userId; /** * 员工名 */ @NotBlank(message="员工登录名不能为空", groups = {AddGroup.class, UpdateGroup.class}) private String username; /** * 员工名 */ @NotBlank(message="员工姓名不能为空", groups = {AddGroup.class, UpdateGroup.class}) private String name; /** * 密码 */ @NotBlank(message="密码不能为空", groups = AddGroup.class) @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private String password; /** * 盐 */ private String salt; /** * 邮箱 */ private String email; /** * 手机号 */ private String mobile; /** * 状态 0:禁用 1:正常 */ private Integer status; /** * 角色ID列表 */ @TableField(exist=false) private List<Long> roleIdList; /** * 创建时间 */ private Date createTime; /** * 部门ID */ @NotNull(message="部门不能为空", groups = {AddGroup.class, UpdateGroup.class}) private Long deptId; /** * 部门名称 */ @TableField(exist=false) private String deptName; public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getSalt() { return salt; } public void setSalt(String salt) { this.salt = salt; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getMobile() { return mobile; } public void setMobile(String mobile) { this.mobile = mobile; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } public List<Long> getRoleIdList() { return roleIdList; } public void setRoleIdList(List<Long> roleIdList) { this.roleIdList = roleIdList; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Long getDeptId() { return deptId; } public void setDeptId(Long deptId) { this.deptId = deptId; } public String getDeptName() { return deptName; } public void setDeptName(String deptName) { this.deptName = deptName; } }
[ "zhangchunsheng423@gmail.com" ]
zhangchunsheng423@gmail.com
36cda4cdc374d5931f7a3a40c916b64f8527b237
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project409/src/test/java/org/gradle/test/performance/largejavamultiproject/project409/p2045/Test40912.java
940cc5de82924c51c46fa027f8a97ade450c055d
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
2,182
java
package org.gradle.test.performance.largejavamultiproject.project409.p2045; import org.junit.Test; import static org.junit.Assert.*; public class Test40912 { Production40912 objectUnderTest = new Production40912(); @Test public void testProperty0() { Production40903 value = new Production40903(); objectUnderTest.setProperty0(value); assertEquals(value, objectUnderTest.getProperty0()); } @Test public void testProperty1() { Production40907 value = new Production40907(); objectUnderTest.setProperty1(value); assertEquals(value, objectUnderTest.getProperty1()); } @Test public void testProperty2() { Production40911 value = new Production40911(); objectUnderTest.setProperty2(value); assertEquals(value, objectUnderTest.getProperty2()); } @Test public void testProperty3() { String value = "value"; objectUnderTest.setProperty3(value); assertEquals(value, objectUnderTest.getProperty3()); } @Test public void testProperty4() { String value = "value"; objectUnderTest.setProperty4(value); assertEquals(value, objectUnderTest.getProperty4()); } @Test public void testProperty5() { String value = "value"; objectUnderTest.setProperty5(value); assertEquals(value, objectUnderTest.getProperty5()); } @Test public void testProperty6() { String value = "value"; objectUnderTest.setProperty6(value); assertEquals(value, objectUnderTest.getProperty6()); } @Test public void testProperty7() { String value = "value"; objectUnderTest.setProperty7(value); assertEquals(value, objectUnderTest.getProperty7()); } @Test public void testProperty8() { String value = "value"; objectUnderTest.setProperty8(value); assertEquals(value, objectUnderTest.getProperty8()); } @Test public void testProperty9() { String value = "value"; objectUnderTest.setProperty9(value); assertEquals(value, objectUnderTest.getProperty9()); } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
ec60a4f25923e4163080889a4fd5d00d41f0ab6b
1646441d091844cd8e58659ab13f113bffe9f6ce
/Thinking Java 2/src/innerclasses/MultiImplementation.java
9d3af8043200afdfd2733cda2d6e7667d32d6638
[]
no_license
PhilDolganov/kantora
b51fca7c0be4227328c662a787ecb9dcb4f9e332
b4b09538ce89f72715f167d6c9c0a70e0e87977c
refs/heads/master
2021-10-02T21:46:07.658179
2018-12-01T04:49:49
2018-12-01T04:49:49
104,503,272
0
0
null
null
null
null
UTF-8
Java
false
false
470
java
package innerclasses; // With concrete or abstract classes, inner // classes are the only way to produce the effect // of "multiple implementation inheritance." class D {} abstract class E {} class Z extends D { E makeE() {return new E() {}; } } public class MultiImplementation { static void takesD(D d) {} static void takesE(E e) {} public static void main(String[] args) { Z z = new Z(); takesD(z); takesE(z.makeE()); } }
[ "phildolganov@yahoo.com" ]
phildolganov@yahoo.com
88d838ce55dee9c3375e9bb735b6d45c013c11fa
947fc9eef832e937f09f04f1abd82819cd4f97d3
/src/apk/com/google/android/gms/internal/measurement/C0458wb.java
200d3b411c0f9793f84052f9141969e39c89404d
[]
no_license
thistehneisen/cifra
04f4ac1b230289f8262a0b9cf7448a1172d8f979
d46c6f4764c9d4f64e45c56fa42fddee9b44ff5a
refs/heads/master
2020-09-22T09:35:57.739040
2019-12-01T19:39:59
2019-12-01T19:39:59
225,136,583
1
0
null
null
null
null
UTF-8
Java
false
false
469
java
package com.google.android.gms.internal.measurement; import com.google.android.gms.internal.measurement.C0458wb; /* renamed from: com.google.android.gms.internal.measurement.wb reason: case insensitive filesystem */ public interface C0458wb<T extends C0458wb<T>> extends Comparable<T> { C0394lc a(C0394lc lcVar, C0400mc mcVar); C0424qc a(C0424qc qcVar, C0424qc qcVar2); int o(); boolean q(); C0401md r(); C0383jd s(); boolean t(); }
[ "putnins@nils.digital" ]
putnins@nils.digital
903b319481a949a9f90672b8ec239840b79bcaf6
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/digits/0cdfa335eea3c612e6fa3ad261276b0c3ebbc6ff0ff13c20bdc249bad29a8037ca6dc887dd28558964e1e1a24f47c4cffc05adba525285dc8b93660cdf9b8b7c/006/mutations/87/digits_0cdfa335_006.java
79a7d5a2d36c2b3758ce1d97eea11caaaf9f3503
[]
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,194
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 digits_0cdfa335_006 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { digits_0cdfa335_006 mainClass = new digits_0cdfa335_006 (); 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 n = new IntObj (), temp = new IntObj (), digit = new IntObj (); DoubleObj i = new DoubleObj (); output += (String.format ("\nEnter an integer > ")); n.value = scanner.nextInt (); output += (String.format ("\n")); temp.value = Math.abs (n.value); i.value = Math.log10 (temp.value); i.value = (int) Math.ceil (i.value); if (true) return ; if (i.value / i.value == 1) { i.value++; } while (n.value != 0) { digit.value = n.value % 10; n.value = n.value / 10; if (i.value != 1) { output += (String.format ("%d\n", Math.abs (digit.value))); } if (i.value == 1) { output += (String.format ("%d\n", digit.value)); } i.value--; } output += (String.format ("That's all, have a nice day!\n")); if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
645cbdb7ef835ce107642118b6a4ea2b5802a307
30297ad4190eeae14b987f2fb3368e3987bb72fb
/src/tools/DateConverter.java
bd5f9cff12b876be917810d05b79a86b457cb394
[]
no_license
XuBigRich/appd
c50efe9bd92c0f4f7eaae1c924aab6fea5e31324
adab9194d9c349fa29e355cf5cbb3382a07bea6e
refs/heads/master
2021-08-08T02:53:08.411433
2020-06-02T06:56:42
2020-06-02T06:56:42
185,723,025
0
0
null
null
null
null
GB18030
Java
false
false
800
java
package tools; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Map; import org.apache.struts2.util.StrutsTypeConverter; public class DateConverter extends StrutsTypeConverter { private SimpleDateFormat sdf1=new SimpleDateFormat("yyyy-MM-dd"); private SimpleDateFormat sdf2=new SimpleDateFormat("yyyy年MM月dd日"); @Override public Object convertFromString(Map arg0, String[] arg1, Class arg2) { Date tim=null; try { tim=sdf1.parse(arg1[0]); } catch (Exception e) { try { tim=sdf2.parse(arg1[0]); } catch (Exception e2) { System.out.println("日期为null"); } } return tim; } @Override public String convertToString(Map arg0, Object arg1) { Date tim=(Date)arg1; return sdf2.format(tim); } }
[ "847118663@qq.com" ]
847118663@qq.com
935638030648d4ef6b9cdbdb226cfffedfe4a93f
4a9618d3506c869a27fff61174e7bcd13c7ce47e
/org.eclipse.e4.xwt/tests/org.eclipse.e4.xwt.tests/src/org/eclipse/e4/xwt/tests/jface/tableviewer/TableViewerColumn_text.java
9d1153be93945369416575621379d47e404f1b01
[]
no_license
renaudpawlak/tura
ce4d2ca9c21fa096081ca4d4fb9f5acb27bee1f7
bbcfbaeb9a0286912712004b67966cb639b9cb5f
refs/heads/master
2021-05-08T08:20:14.259297
2013-08-07T21:57:43
2013-08-07T21:57:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,031
java
/******************************************************************************* * Copyright (c) 2006, 2010 Soyatec (http://www.soyatec.com) and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Soyatec - initial API and implementation *******************************************************************************/ package org.eclipse.e4.xwt.tests.jface.tableviewer; import java.net.URL; import org.eclipse.e4.xwt.IConstants; import org.eclipse.e4.xwt.XWT; /** * @author jliu */ public class TableViewerColumn_text { public static void main(String[] args) { URL url = TableViewerColumn_text.class .getResource(TableViewerColumn_text.class.getSimpleName() + IConstants.XWT_EXTENSION_SUFFIX); try { XWT.open(url); } catch (Exception e) { e.printStackTrace(); } } }
[ "isakovarseniy@gmail.com" ]
isakovarseniy@gmail.com
adc1ecbbd5dc84afdb62af92a25bc9fdfe523a5d
0c5dd2a1beba01fceac54e3496a1c08d19457350
/app/src/main/java/com/agenthun/eseal/connectivity/service/FreightTrackWebService.java
b81c4ffe9722bc9ab60161e217b36dcdfd45ce13
[ "Apache-2.0" ]
permissive
zhuozuozhang/ESeal
c48aa8e2f86392eeb3914ea766c867f5af0d35af
1de203ea1167a0c057df6b5860877aac6094287d
refs/heads/master
2020-08-06T09:41:23.219267
2017-03-24T23:44:50
2017-03-24T23:44:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,091
java
package com.agenthun.eseal.connectivity.service; import android.support.annotation.Nullable; import com.agenthun.eseal.bean.BeidouMasterDeviceInfos; import com.agenthun.eseal.bean.BleAndBeidouNfcDeviceInfos; import com.agenthun.eseal.bean.DeviceLocationInfos; import com.agenthun.eseal.bean.User; import com.agenthun.eseal.bean.base.Result; import com.agenthun.eseal.bean.updateByRetrofit.UpdateResponse; import okhttp3.ResponseBody; import retrofit2.Response; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.Query; import retrofit2.http.Streaming; import retrofit2.http.Url; import rx.Observable; /** * @project ESeal * @authors agenthun * @date 16/3/2 上午11:02. */ public interface FreightTrackWebService { //登陆,获取Token @GET("GetTokenByUserNameAndPassword") Observable<User> getToken( @Query("userName") String userName, @Query("password") String password, @Query("language") String language); /** * @description 蓝牙锁、北斗终端NFC 配置设备 */ //配置终端货物信息参数 @GET("ConfigureCargo") Observable<Result> configureDevice( @Query("token") String token, @Nullable @Query("DeviceType") String deviceType, @Nullable @Query("implementID") String implementID, @Nullable @Query("containerNo") String containerNo, @Nullable @Query("freightOwner") String freightOwner, @Nullable @Query("freightName") String freightName, @Nullable @Query("origin") String origin, @Nullable @Query("destination") String destination, @Nullable @Query("VesselName") String VesselName, @Nullable @Query("voyage") String voyage, @Nullable @Query("frequency") String frequency, @Query("RFID") String RFID, @Nullable @Query("images") String images, @Nullable @Query("coordinate") String coordinate, @Query("operateTime") String operateTime, @Query("language") String language); /** * @description 蓝牙锁、北斗终端NFC设备的上封/解封操作 */ //解封、开箱操作 - 获取MAC @GET("OpenContainer") Observable<Result> openDevice( @Query("token") String token, @Query("implementID") String implementID, @Query("RFID") String RFID, @Nullable @Query("images") String images, @Nullable @Query("coordinate") String coordinate, @Query("operateTime") String operateTime, @Query("language") String language); //上封、关箱操作(海关 / 普通用户) - 获取MAC @GET("CloseContainer") Observable<Result> closeDevice( @Query("token") String token, @Query("implementID") String implementID, @Query("RFID") String RFID, @Nullable @Query("images") String images, @Nullable @Query("coordinate") String coordinate, @Query("operateTime") String operateTime, @Query("language") String language); /** * @description 蓝牙锁、北斗终端NFC设备访问链路 */ //根据Token获取蓝牙锁和BeidouNfc设备的所有在途中的货物信息 @GET("GetFreightInfoByToken") Observable<BleAndBeidouNfcDeviceInfos> getBleAndBeidouNfcDeviceFreightList( @Query("token") String token, @Query("language") String language); //根据containerId获取蓝牙锁和BeidouNfc设备的该货物状态列表 @GET("GetAllBaiduCoordinateByContainerId") Observable<DeviceLocationInfos> getBleAndBeidouNfcDeviceLocation( @Query("token") String token, @Query("containerId") String containerId, @Query("language") String language); /** * @description 北斗终端帽访问链路 */ //根据Token获取北斗终端帽的所有在途中的货物信息 @GET("GetAllImplement") Observable<BeidouMasterDeviceInfos> getBeidouMasterDeviceFreightList( @Query("token") String token, @Query("language") String language); //根据implementID获取该货物状态列表 @GET("GetImplementPositionInfoByID") Observable<DeviceLocationInfos> getBeidouMasterDeviceLocation( @Query("token") String token, @Query("implementID") String implementID, @Query("language") String language); //根据implementID获取北斗终端帽的该货物所选时间段的状态列表 @GET("GetImplementPositionInfoByIDAndTime") Observable<DeviceLocationInfos> getBeidouMasterDeviceLocation( @Query("token") String token, @Query("implementID") String implementID, @Query("startTime") String startTime, @Query("endTime") String endTime, @Query("language") String language); //根据implementID获取北斗终端帽的该设备的最新货物状态 @GET("GetLastImplementData") Observable<DeviceLocationInfos> getBeidouMasterDeviceLastLocation( @Query("token") String token, @Query("implementID") String implementID, @Query("language") String language); /** * @description 版本检测更新 */ //APP 版本检测更新 @Headers({ "Accept: application/json", "Content-Type: application/json" }) @GET(Api.ESeal_UPDATE_SERVICE_URL) Observable<UpdateResponse> checkAppUpdate(); //APP Lite 版本检测更新 @Headers({ "Accept: application/json", "Content-Type: application/json" }) @GET(Api.ESeal_LITE_UPDATE_SERVICE_URL) Observable<UpdateResponse> checkAppLiteUpdate(); /** * @description 下载文件 */ //下载APK文件 @Streaming @GET Observable<ResponseBody> downloadFile(@Url String fileUrl); @Streaming @GET Observable<Response<ResponseBody>> downloadFile(@Header("Range") String range, @Url String fileUrl); }
[ "hun333@126.com" ]
hun333@126.com
3768ee96701333b74958010da705e1a83b957173
750bb6c6fa115fde1bfe646bb3359f886373d24e
/src/test/java/Authoring/Authoring55.java
abeb760c4a9523ea8651fe9c6304a56e904fd726
[]
no_license
Basha692/BashaSelenium
d21e2c7abd5f9a5d7c3be43578863186f2f7322f
37fb79f85e6c973610b14b53d3e14b6183219a41
refs/heads/master
2022-07-13T11:05:59.156297
2019-12-06T06:08:37
2019-12-06T06:08:37
226,252,795
0
0
null
2022-06-29T17:49:37
2019-12-06T05:30:40
Java
UTF-8
Java
false
false
3,945
java
package Authoring; import java.io.PrintWriter; import java.io.StringWriter; import org.apache.commons.lang3.RandomStringUtils; import org.testng.SkipException; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Parameters; import org.testng.annotations.Test; import com.relevantcodes.extentreports.LogStatus; import base.TestBase; import pages.PageFactory; import util.ErrorUtil; import util.ExtentManager; public class Authoring55 extends TestBase { static int status = 1; PageFactory pf = new PageFactory(); // Following is the list of status: // 1--->PASS // 2--->FAIL // 3--->SKIP // Checking whether this test case should be skipped or not @BeforeTest public void beforeTest() throws Exception { extent = ExtentManager.getReporter(filePath); rowData = testcase.get(this.getClass().getSimpleName()); test = extent.startTest(rowData.getTestcaseId(), rowData.getTestcaseDescription()).assignCategory("Authoring"); } @Test @Parameters({"fbusername", "fbpassword"}) public void testPostComments(String fbusername, String fbpassword) throws Exception { boolean testRunmode = getTestRunMode(rowData.getTestcaseRunmode()); boolean master_condition = suiteRunmode && testRunmode; if (!master_condition) { status = 3;// excel test.log(LogStatus.SKIP, "Skipping test case " + this.getClass().getSimpleName() + " as the run mode is set to NO"); throw new SkipException("Skipping Test Case" + this.getClass().getSimpleName() + " as runmode set to NO");// reports } test.log(LogStatus.INFO, this.getClass().getSimpleName() + " execution starts--->"); try { openBrowser(); maximizeWindow(); clearCookies(); // Navigate to TR login page and login with valid TR credentials ob.navigate().to(host); // ob.get(CONFIG.getProperty("testSiteName")); loginAs("LOGINUSERNAME1", "LOGINPASSWORD1"); test.log(LogStatus.INFO, "Logged in to NEON"); pf.getHFPageInstance(ob).clickOnProfileLink(); test.log(LogStatus.INFO, "Navigated to Profile Page"); if (pf.getProfilePageInstance(ob).getPostsCount() == 0) { String tilte = "PostAppreciationTest" + RandomStringUtils.randomNumeric(10); pf.getProfilePageInstance(ob).clickOnPublishPostButton(); pf.getProfilePageInstance(ob).enterPostTitle(tilte); pf.getProfilePageInstance(ob).enterPostContent(tilte); pf.getProfilePageInstance(ob).clickOnPostPublishButton(); } pf.getProfilePageInstance(ob).clickOnFirstPost(); pf.getpostRVPageInstance(ob).shareRecordOnFB(fbusername, fbpassword); pf.getLoginTRInstance(ob).logOutApp(); closeBrowser(); } catch (Throwable t) { t.printStackTrace(); test.log(LogStatus.FAIL, "Something unexpected happened");// extent // reports // next 3 lines to print whole testng error in report status = 2;// excel StringWriter errors = new StringWriter(); t.printStackTrace(new PrintWriter(errors)); test.log(LogStatus.INFO, errors.toString());// extent reports ErrorUtil.addVerificationFailure(t);// testng test.log(LogStatus.INFO, "Snapshot below: " + test.addScreenCapture( captureScreenshot(this.getClass().getSimpleName() + "_something_unexpected_happened")));// screenshot closeBrowser(); } test.log(LogStatus.INFO, this.getClass().getSimpleName() + " execution ends--->"); } @AfterTest public void reportTestResult() { extent.endTest(test); /* * if (status == 1) TestUtil.reportDataSetResult(authoringxls, "Test Cases", TestUtil.getRowNum(authoringxls, * this.getClass().getSimpleName()), "PASS"); else if (status == 2) TestUtil.reportDataSetResult(authoringxls, * "Test Cases", TestUtil.getRowNum(authoringxls, this.getClass().getSimpleName()), "FAIL"); else * TestUtil.reportDataSetResult(authoringxls, "Test Cases" , TestUtil.getRowNum(authoringxls, * this.getClass().getSimpleName()), "SKIP"); */ } }
[ "syed2208b@gmail.com" ]
syed2208b@gmail.com
4cc7a020c26ec7e73f20794e54b3a27f3e0a1d52
7774c3f37fe58c39e502f60b829e33dc98fc0857
/app/build/generated/source/apt/debug/com/cvnavi/app/ui/fragment/BusDetectionFragment$$ViewBinder.java
625bb9fdf93e85abe8e6536bc37e699ab553e6c8
[]
no_license
ChenJun1/VehicleTerminalSystem1
3b092f443044faf64bb306499b91d60c776467ab
2a780080be922f27a97a3e85f3562ed831e753d3
refs/heads/master
2021-05-08T00:18:48.276023
2017-10-20T01:39:46
2017-10-20T01:39:46
107,619,362
0
0
null
null
null
null
UTF-8
Java
false
false
3,981
java
// Generated code from Butter Knife. Do not modify! package com.cvnavi.app.ui.fragment; import android.view.View; import butterknife.Unbinder; import butterknife.internal.Finder; import butterknife.internal.ViewBinder; import java.lang.IllegalStateException; import java.lang.Object; import java.lang.Override; public class BusDetectionFragment$$ViewBinder<T extends BusDetectionFragment> implements ViewBinder<T> { @Override public Unbinder bind(final Finder finder, final T target, Object source) { InnerUnbinder unbinder = createUnbinder(target); View view; view = finder.findRequiredView(source, 2131558693, "field 'mSensorOilTv'"); target.mSensorOilTv = finder.castView(view, 2131558693, "field 'mSensorOilTv'"); view = finder.findRequiredView(source, 2131558694, "field 'mEngineSpeedTv'"); target.mEngineSpeedTv = finder.castView(view, 2131558694, "field 'mEngineSpeedTv'"); view = finder.findRequiredView(source, 2131558695, "field 'mOilConsumptionTv'"); target.mOilConsumptionTv = finder.castView(view, 2131558695, "field 'mOilConsumptionTv'"); view = finder.findRequiredView(source, 2131558696, "field 'mEngineTorqueTv'"); target.mEngineTorqueTv = finder.castView(view, 2131558696, "field 'mEngineTorqueTv'"); view = finder.findRequiredView(source, 2131558697, "field 'mPedalPositionTv'"); target.mPedalPositionTv = finder.castView(view, 2131558697, "field 'mPedalPositionTv'"); view = finder.findRequiredView(source, 2131558698, "field 'mAllConsumptionTv'"); target.mAllConsumptionTv = finder.castView(view, 2131558698, "field 'mAllConsumptionTv'"); view = finder.findRequiredView(source, 2131558699, "field 'mMeterOilConsumptionTv'"); target.mMeterOilConsumptionTv = finder.castView(view, 2131558699, "field 'mMeterOilConsumptionTv'"); view = finder.findRequiredView(source, 2131558700, "field 'mTotalTimeTv'"); target.mTotalTimeTv = finder.castView(view, 2131558700, "field 'mTotalTimeTv'"); view = finder.findRequiredView(source, 2131558701, "field 'mWaterTemperatureTv'"); target.mWaterTemperatureTv = finder.castView(view, 2131558701, "field 'mWaterTemperatureTv'"); view = finder.findRequiredView(source, 2131558702, "field 'mEngineOilTemperatureTv'"); target.mEngineOilTemperatureTv = finder.castView(view, 2131558702, "field 'mEngineOilTemperatureTv'"); view = finder.findRequiredView(source, 2131558703, "field 'mIntakeTemperatureTv'"); target.mIntakeTemperatureTv = finder.castView(view, 2131558703, "field 'mIntakeTemperatureTv'"); view = finder.findRequiredView(source, 2131558704, "field 'mOilPressureTv'"); target.mOilPressureTv = finder.castView(view, 2131558704, "field 'mOilPressureTv'"); view = finder.findRequiredView(source, 2131558705, "field 'mAtmosphericPressureTv'"); target.mAtmosphericPressureTv = finder.castView(view, 2131558705, "field 'mAtmosphericPressureTv'"); return unbinder; } protected InnerUnbinder<T> createUnbinder(T target) { return new InnerUnbinder(target); } protected static class InnerUnbinder<T extends BusDetectionFragment> implements Unbinder { private T target; protected InnerUnbinder(T target) { this.target = target; } @Override public final void unbind() { if (target == null) throw new IllegalStateException("Bindings already cleared."); unbind(target); target = null; } protected void unbind(T target) { target.mSensorOilTv = null; target.mEngineSpeedTv = null; target.mOilConsumptionTv = null; target.mEngineTorqueTv = null; target.mPedalPositionTv = null; target.mAllConsumptionTv = null; target.mMeterOilConsumptionTv = null; target.mTotalTimeTv = null; target.mWaterTemperatureTv = null; target.mEngineOilTemperatureTv = null; target.mIntakeTemperatureTv = null; target.mOilPressureTv = null; target.mAtmosphericPressureTv = null; } } }
[ "791954958@qq.com" ]
791954958@qq.com
a6ee50d96db93a1c03a8e8864806a63bdb819b28
1dd20afdd05359d7a97ef4c976b7600e8bf42edc
/src/main/java/net/covers1624/classloader/api/logging/ILoggerFactory.java
c8ced152c9cd01a5809f749e335849851b461241
[ "MIT" ]
permissive
covers1624/ModularClassLoader
108d5aead19bf881fddf9ee64a8604ef6d1f286a
40d4569b96796b452d45418f58cedde69cdf47f8
refs/heads/master
2020-04-05T12:20:32.341422
2019-10-27T05:23:41
2019-10-27T05:23:41
156,865,818
0
0
null
null
null
null
UTF-8
Java
false
false
648
java
package net.covers1624.classloader.api.logging; import net.covers1624.classloader.internal.logging.LogHelper; /** * Simple logger factory. * See {@link LogHelper}. * Created by covers1624 on 13/11/18. */ public interface ILoggerFactory { public static final String NOOP_FACTORY = "net.covers1624.classloader.internal.logging.impl.NoopFactory"; public static final String LOG4J_FACTORY = "net.covers1624.classloader.internal.logging.impl.Log4jFactory"; /** * Get or create a new ILogger with the specified name. * * @param name The name. * @return The instance. */ ILogger getLogger(String name); }
[ "laughlan.cov@internode.on.net" ]
laughlan.cov@internode.on.net
7dfdfbd39e4bc9dd19047e05b45c92e4224f007e
91a7af66bf4ba0c587af1761ac322cc9c43d85f0
/lib/src/main/java/com/d/lib/album/model/MimeType.java
6f589037cab276b7e3a3dc88ee152688811e177f
[ "Apache-2.0" ]
permissive
Dsiner/Album
fc956b65385ec956deadfd7c5c2a182254dbc1be
93c207fc5e535088c403afac590e75072a6c34b7
refs/heads/master
2023-02-16T15:13:30.202303
2021-01-10T15:28:05
2021-01-10T15:52:22
318,145,790
7
0
null
null
null
null
UTF-8
Java
false
false
3,021
java
package com.d.lib.album.model; import androidx.collection.ArraySet; import java.util.Arrays; import java.util.EnumSet; import java.util.Set; /** * MIME Type enumeration to restrict selectable media on the selection activity. * <p> * Good example of mime types Android supports: * https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/media/java/android/media/MediaFile.java */ public enum MimeType { // ============== images ============== JPEG("image/jpeg", arraySetOf( "jpg", "jpeg" )), PNG("image/png", arraySetOf( "png" )), GIF("image/gif", arraySetOf( "gif" )), BMP("image/x-ms-bmp", arraySetOf( "bmp" )), WEBP("image/webp", arraySetOf( "webp" )), // ============== videos ============== MPEG("video/mpeg", arraySetOf( "mpeg", "mpg" )), MP4("video/mp4", arraySetOf( "mp4", "m4v" )), QUICKTIME("video/quicktime", arraySetOf( "mov" )), THREEGPP("video/3gpp", arraySetOf( "3gp", "3gpp" )), THREEGPP2("video/3gpp2", arraySetOf( "3g2", "3gpp2" )), MKV("video/x-matroska", arraySetOf( "mkv" )), WEBM("video/webm", arraySetOf( "webm" )), TS("video/mp2ts", arraySetOf( "ts" )), AVI("video/avi", arraySetOf( "avi" )); private final String mMimeTypeName; private final Set<String> mExtensions; MimeType(String mimeTypeName, Set<String> extensions) { mMimeTypeName = mimeTypeName; mExtensions = extensions; } public static Set<MimeType> ofAll() { return EnumSet.allOf(MimeType.class); } public static Set<MimeType> of(MimeType type, MimeType... rest) { return EnumSet.of(type, rest); } public static Set<MimeType> ofImage() { return EnumSet.of(JPEG, PNG, GIF, BMP, WEBP); } public static Set<MimeType> ofImage(boolean onlyGif) { return EnumSet.of(GIF); } public static Set<MimeType> ofGif() { return ofImage(true); } public static Set<MimeType> ofVideo() { return EnumSet.of(MPEG, MP4, QUICKTIME, THREEGPP, THREEGPP2, MKV, WEBM, TS, AVI); } public static boolean isImage(String mimeType) { if (mimeType == null) return false; return mimeType.startsWith("image"); } public static boolean isVideo(String mimeType) { if (mimeType == null) return false; return mimeType.startsWith("video"); } public static boolean isGif(String mimeType) { if (mimeType == null) return false; return mimeType.equals(MimeType.GIF.toString()); } private static Set<String> arraySetOf(String... suffixes) { return new ArraySet<>(Arrays.asList(suffixes)); } @Override public String toString() { return mMimeTypeName; } }
[ "s90789@outlook.com" ]
s90789@outlook.com
3a6a544c5bf32230b37b9da687469798ed8c319d
cfa9d3ed69bf73172c3b1d6a0f2cb6660c976b93
/j2se/LGame-j2se-0.2.6/org/loon/framework/game/simple/extend/command/Conversion.java
f1f0905a593589b67165c34d69fe5e67badcacb5
[]
no_license
jackyglony/loon-simple
7f3c6fd49a05de28daff0495a202d281a18706ce
cbf9c70e41ef5421bc1a5bb55939aa527aac675d
refs/heads/master
2020-12-25T12:18:22.710566
2013-06-30T03:11:06
2013-06-30T03:11:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,513
java
package org.loon.framework.game.simple.extend.command; import java.util.Arrays; import java.util.List; import java.util.Stack; import java.util.StringTokenizer; /** * Copyright 2008 - 2009 * * 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. * * @project loonframework * @author chenpeng * @email:ceponline@yahoo.com.cn * @version 0.1 */ public abstract class Conversion implements Expression { final static private String ops[] = { "\\+", "\\-", "\\*", "\\/", "\\(", "\\)" }; /** * 检查是否为字母与数字混合 * * @param value * @return */ public static boolean isEnglishAndNumeric(String value) { if (value == null || value.trim().length() == 0) return true; for (int i = 0; i < value.length(); i++) { char letter = value.charAt(i); if ((97 > letter || letter > 122) && (65 > letter || letter > 90) && (48 > letter || letter > 57)) return false; } return true; } /** * 分解字符串 * * @param string * @param tag * @return */ public static String[] split(final String string, final String tag) { StringTokenizer str = new StringTokenizer(string, tag); String[] result = new String[str.countTokens()]; int index = 0; for (; str.hasMoreTokens();) { result[index++] = str.nextToken(); } return result; } /** * 分解字符串,并返回为list * * @param string * @param tag * @return */ public static List splitToList(final String string, final String tag) { return Arrays.asList(split(string, tag)); } /** * 检查是否数字 * * @param value * @return */ public static boolean isNumber(Object value) { try { Integer.parseInt((String) value); } catch (NumberFormatException ne) { return false; } return true; } /** * 检查是否汉字 * * @param str * @return */ public static boolean isChinese(Object value) { boolean result = false; try { char[] chars = ((String) value).toCharArray(); for (int i = 0; i < chars.length; i++) { byte[] bytes = ("" + chars[i]).getBytes(); if (bytes.length == 2) { int[] ints = new int[2]; ints[0] = bytes[0] & 0xff; ints[1] = bytes[1] & 0xff; if (ints[0] >= 0x81 && ints[0] <= 0xFE && ints[1] >= 0x40 && ints[1] <= 0xFE) { result = true; break; } } } } catch (Exception e) { } return result; } /** * 四则运算 * * @param flag * @param v1 * @param v2 * @return */ public static Integer operate(String flag, String v1, String v2) { return operate(flag.toCharArray()[0], new Integer(v1).intValue(), new Integer(v2).intValue()); } /** * 四则运算 * * @param flag * @param v1 * @param v2 * @return */ public static Integer operate(char flag, int v1, int v2) { switch (flag) { case '+': return new Integer(v1 + v2); case '-': return new Integer(v1 + (v2 > 0 ? -v2 : +v2)); case '*': return new Integer(v1 * v2); case '/': return new Integer(v1 / v2); } return new Integer(0); } /** * 替换指定字符串 * * @param line * @param oldString * @param newString * @return */ protected static String replaceMatch(String line, String oldString, String newString) { int i = 0; int j = 0; if ((i = line.indexOf(oldString, i)) >= 0) { char line2[] = line.toCharArray(); char newString2[] = newString.toCharArray(); int oLength = oldString.length(); StringBuffer buffer = new StringBuffer(line2.length); buffer.append(line2, 0, i).append(newString2); i += oLength; for (j = i; (i = line.indexOf(oldString, i)) > 0; j = i) { buffer.append(line2, j, i - j).append(newString2); i += oLength; } buffer.append(line2, j, line2.length - j); return buffer.toString(); } else { return line; } } // 数学表达式运算类 protected Compute compute = new Compute(); /** * 简单的四则表达式运算 */ class Compute { private int sort(String flag) { return sort(flag.toCharArray()[0]); } /** * 排序优先级 * * @param flag * @return */ private int sort(char flag) { int result = 0; switch (flag) { case '+': result = 0; break; case '-': result = 0; break; case '*': result = 1; break; case '/': result = 1; break; default: result = -1; } return result; } /** * 验证是否为四则运算 * * @param exp * @return */ private boolean exp(String exp) { return exp.indexOf("+") != -1 || exp.indexOf("-") != -1 || exp.indexOf("*") != -1 || exp.indexOf("/") != -1; } /** * 解析表达式 * * @param exp * @return */ public Integer parse(Object exp) { return parse(exp.toString()); } /** * 解析表达式 * * @param exp * @return */ public Integer parse(String exp) { int endIndex = 0; int startIndex = exp.indexOf("(", endIndex); for (; startIndex != -1;) { endIndex = exp.indexOf(")", startIndex) + 1; String segment = exp.substring(startIndex, endIndex); Integer tResult = match(segment.replaceAll("(", "").replaceAll(")", "")); exp = exp.replaceAll(segment, String.valueOf(tResult)); startIndex = exp.indexOf("(", 0); } return match(exp); } /** * 自动匹配四则运算表达式,并返回计算结果 * * @param exp * @return */ private Integer match(String exp) { if (!isNumber(exp.substring(0, 1))) { exp = ("0" + exp).intern(); } for (int i = 0; i < ops.length; i++) { String operator = ops[i]; exp = exp.replaceAll(operator, (FLAG + operator + FLAG) .intern()); } String v1 = null; String v2 = null; Stack stack = new Stack(); String exps[] = Conversion.split(exp, FLAG); String type = null; int sort1 = -1; int sort2 = -1; for (int i = 0; i < exps.length; i++) { if (exp(exps[i])) { if (type == null) { type = exps[i]; } else { sort1 = sort(type); sort2 = sort(exps[i]); if (sort1 >= sort2) { v2 = String.valueOf(((type.indexOf("+") != -1) || (type.indexOf("/") != -1) || (type.indexOf("*") != -1) ? "" : type) + stack.pop()); v1 = String.valueOf(stack.pop()); stack.push(Conversion.operate(type, v1, v2)); type = exps[i]; } else if (sort1 < sort2) { v1 = String.valueOf((stack.pop())); v2 = String.valueOf(exps[i + 1]); stack.push(operate(exps[i], v1, v2)); i++; } } } else { stack.push(exps[i]); } } v1 = String.valueOf(stack.pop()); v2 = String.valueOf(stack.pop()); return operate(type, v2, v1); } } }
[ "loontest@282ca0c4-f913-11dd-a8e2-f7cb3c35fcff" ]
loontest@282ca0c4-f913-11dd-a8e2-f7cb3c35fcff
2aa4aa6c78e60f4a774191ae87baff04959ff757
0205c7a1e9d64cea74b8d9308a42a73bff30d9d2
/COCOON-2217/cocoon-2.2.0/sitemap-impl/src/org/apache/cocoon/components/treeprocessor/sitemap/ScriptNode.java
e34c1e3b7ba7645205d578197d2d1375ba7e42c1
[ "Apache-2.0" ]
permissive
ZhuofuChen/Apache_Contribution
329de187c3a9ed0b158f7b06da0b2b4174aaabb2
cedf844b4df218cbf0519972ab2d2902f3945f4a
refs/heads/master
2021-08-26T06:40:45.363568
2017-11-21T23:25:16
2017-11-21T23:25:16
110,313,367
0
0
null
null
null
null
UTF-8
Java
false
false
2,144
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cocoon.components.treeprocessor.sitemap; import org.apache.cocoon.components.flow.Interpreter; import org.apache.cocoon.components.treeprocessor.AbstractProcessingNode; import org.apache.cocoon.components.treeprocessor.InvokeContext; import org.apache.cocoon.environment.Environment; /** * Handler for &lt;map:script&gt; elements in the sitemap. It registers the * * @since March 13, 2002 * @version $Id: ScriptNode.java 587751 2007-10-24 02:41:36Z vgritsenko $ */ public class ScriptNode extends AbstractProcessingNode { protected final String source; public ScriptNode(String source) { this.source = source; } /** * This method should never be called by the TreeProcessor, since a * <map:script> element should not be in an "executable" sitemap * node. * * @param env an <code>Environment</code> value * @param context an <code>InvokeContext</code> value * @return a <code>boolean</code> value * @exception Exception if an error occurs */ public boolean invoke(Environment env, InvokeContext context) throws Exception { return true; } public void registerScriptWithInterpreter(Interpreter interpreter) { interpreter.register(this.source); } }
[ "chenzhuofusean@gmail.com" ]
chenzhuofusean@gmail.com
0ddc2636f4e98f9cb9067dafd3cbe4821030d6ad
4ad0b050ac420d9ead693820def81368092b1cd1
/frame-kafka-support/src/main/java/com/lvmoney/kafka/constant/KafkaConstant.java
b0fea44fec2e7a4635bda521d60ab33378843eae
[]
no_license
iweisi/frame
091814eafd652ba82fab661c2f2544e9606706f9
c9a655e8f5d4e1c8609c57800b11d0bf0e79e035
refs/heads/master
2020-07-23T08:50:26.355556
2019-09-05T07:17:10
2019-09-05T07:17:10
207,504,785
1
0
null
2019-09-10T08:27:24
2019-09-10T08:27:24
null
UTF-8
Java
false
false
681
java
package com.lvmoney.kafka.constant;/** * 描述: * 包名:com.lvmoney.jwt.annotations * 版本信息: 版本1.0 * 日期:2019/1/22 * Copyright xxxx科技有限公司 */ /** * @describe: * @author: lvmoney /xxxx科技有限公司 * @version:v1.0 2018年10月30日 下午3:29:38 */ public class KafkaConstant { public final static String SIMPLE_QUEUE_NAME = "simple"; public final static String SYN_QUEUE_NAME = "synchronous"; public final static String SIMPLE_QUEUE_GROUP_ID = "simple_group"; public final static String SYN_QUEUE_GROUP_ID = "synchronous_group"; public final static String REDIS_KAFKA_ERROR_RECORD_NAME = "kafka_error_record"; }
[ "xmangl1990728" ]
xmangl1990728
74afba48a8514cb2b783e95746de1b73d9fedbc7
61602d4b976db2084059453edeafe63865f96ec5
/com/xunlei/downloadprovider/vod/floatwindow/d.java
92dee93fb3d772a34fc37bf6384934a5681ca3bf
[]
no_license
ZoranLi/thunder
9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0
0778679ef03ba1103b1d9d9a626c8449b19be14b
refs/heads/master
2020-03-20T23:29:27.131636
2018-06-19T06:43:26
2018-06-19T06:43:26
137,848,886
12
1
null
null
null
null
UTF-8
Java
false
false
1,106
java
package com.xunlei.downloadprovider.vod.floatwindow; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import com.igexin.sdk.PushConsts; /* compiled from: VodPlayerFloatWindow */ final class d extends BroadcastReceiver { final /* synthetic */ a a; d(a aVar) { this.a = aVar; } public final void onReceive(Context context, Intent intent) { context = intent.getAction(); if ("android.intent.action.SCREEN_ON".equals(context) != null) { a.v; } else if ("android.intent.action.SCREEN_OFF".equals(context) != null) { a.v; if (this.a.g == null || this.a.g.t() == null) { this.a.A = null; return; } this.a.A = true; this.a.c(); this.a.f.a(true); } else { if (PushConsts.ACTION_BROADCAST_USER_PRESENT.equals(context) != null) { a.v; if (this.a.A != null) { this.a.b(); } } } } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
91033b61fa8eee2ee4a0e6ee50c10a7c1efe8edb
39fdbaa47bc18dd76ccc40bccf18a21e3543ab9f
/modules/activiti-engine/src/main/java/org/activiti/engine/impl/event/logger/handler/ActivityStartedEventHandler.java
c89abec12269e9fb8c1f7ec82c66c16376407be8
[]
no_license
jpjyxy/Activiti-activiti-5.16.4
b022494b8f40b817a54bb1cc9c7f6fa41dadb353
ff22517464d8f9d5cfb09551ad6c6cbecff93f69
refs/heads/master
2022-12-24T14:51:08.868694
2017-04-14T14:05:00
2017-04-14T14:05:00
191,682,921
0
0
null
2022-12-16T04:24:04
2019-06-13T03:15:47
Java
UTF-8
Java
false
false
1,552
java
package org.activiti.engine.impl.event.logger.handler; import java.util.HashMap; import java.util.Map; import org.activiti.engine.delegate.event.ActivitiActivityEvent; import org.activiti.engine.impl.interceptor.CommandContext; import org.activiti.engine.impl.persistence.entity.EventLogEntryEntity; /** * @author Joram Barrez */ public class ActivityStartedEventHandler extends AbstractDatabaseEventLoggerEventHandler { @Override public EventLogEntryEntity generateEventLogEntry(CommandContext commandContext) { ActivitiActivityEvent activityEvent = (ActivitiActivityEvent)event; Map<String, Object> data = new HashMap<String, Object>(); putInMapIfNotNull(data, Fields.ACTIVITY_ID, activityEvent.getActivityId()); putInMapIfNotNull(data, Fields.ACTIVITY_NAME, activityEvent.getActivityName()); putInMapIfNotNull(data, Fields.PROCESS_DEFINITION_ID, activityEvent.getProcessDefinitionId()); putInMapIfNotNull(data, Fields.PROCESS_INSTANCE_ID, activityEvent.getProcessInstanceId()); putInMapIfNotNull(data, Fields.EXECUTION_ID, activityEvent.getExecutionId()); putInMapIfNotNull(data, Fields.ACTIVITY_TYPE, activityEvent.getActivityType()); putInMapIfNotNull(data, Fields.BEHAVIOR_CLASS, activityEvent.getBehaviorClass()); return createEventLogEntry(activityEvent.getProcessDefinitionId(), activityEvent.getProcessInstanceId(), activityEvent.getExecutionId(), null, data); } }
[ "905280842@qq.com" ]
905280842@qq.com
7e953ca00cd37f3a0d076f8f41335305bf6bea78
ed49254b278b48473c9bdf1c3e70ef8010e83cf7
/BayesBaseNew/src/edu/cmu/tetrad/search/PopulationTetradTest.java
3a6b8c288cd09ba596e4bbfdbf6fa540cc0d9707
[]
no_license
sfu-cl-lab/exception-mining
5ac1e70a9a527d4129d77df66e536c287e5b4e25
7b80481f7d906a49db99901adb4059b273ac6af6
refs/heads/master
2021-05-31T22:36:21.973306
2016-05-15T22:05:14
2016-05-15T22:05:14
58,755,606
1
0
null
null
null
null
UTF-8
Java
false
false
6,382
java
/////////////////////////////////////////////////////////////////////////////// // For information as to what this class does, see the Javadoc, below. // // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, // // 2007, 2008, 2009, 2010 by Peter Spirtes, Richard Scheines, Joseph Ramsey, // // and Clark Glymour. // // // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // /////////////////////////////////////////////////////////////////////////////// package edu.cmu.tetrad.search; import edu.cmu.tetrad.data.CorrelationMatrix; import edu.cmu.tetrad.data.DataSet; import edu.cmu.tetrad.data.ICovarianceMatrix; import edu.cmu.tetrad.graph.Node; import java.util.List; /** * Implements a test of tetrad constraints in a known correlation matrix. It might be useful for debugging * BuildPureClusters/Purify-like algorithms. * * @author Ricardo Silva */ public class PopulationTetradTest implements TetradTest { private CorrelationMatrix CorrelationMatrix; private boolean bvalues[]; private final double epsilon = 0.001; public PopulationTetradTest(CorrelationMatrix CorrelationMatrix) { this.CorrelationMatrix = CorrelationMatrix; bvalues = new boolean[3]; } public String[] getVarNames() { return CorrelationMatrix.getVariableNames().toArray(new String[0]); } public List<Node> getVariables() { return CorrelationMatrix.getVariables(); } public DataSet getDataSet() { return null; } /** * Population scores: assumes CorrelationMatrix is the population covariance CorrelationMatrix. Due to numerical * rounding problems, we need a parameter epsilon to control it. Nothing here is implemented for discrete data * (yet). */ public int tetradScore(int v1, int v2, int v3, int v4) { int count = 0; double p_12 = CorrelationMatrix.getValue(v1, v2); double p_13 = CorrelationMatrix.getValue(v1, v3); double p_14 = CorrelationMatrix.getValue(v1, v4); double p_23 = CorrelationMatrix.getValue(v2, v3); double p_24 = CorrelationMatrix.getValue(v2, v4); double p_34 = CorrelationMatrix.getValue(v3, v4); for (int i = 0; i < 3; i++) { bvalues[i] = false; } if (Math.abs(p_12 * p_34 - p_13 * p_24) < epsilon) { count++; bvalues[0] = true; } if (Math.abs(p_12 * p_34 - p_14 * p_23) < epsilon) { count++; bvalues[1] = true; } if (Math.abs(p_13 * p_24 - p_14 * p_23) < epsilon) { count++; bvalues[2] = true; } return count; } public boolean tetradScore3(int v1, int v2, int v3, int v4) { return tetradScore(v1, v2, v3, v4) == 3; } public boolean tetradScore1(int v1, int v2, int v3, int v4) { if (tetradScore(v1, v2, v3, v4) != 1) { return false; } return bvalues[2]; } public boolean tetradHolds(int v1, int v2, int v3, int v4) { double p_12 = CorrelationMatrix.getValue(v1, v2); double p_13 = CorrelationMatrix.getValue(v1, v3); double p_24 = CorrelationMatrix.getValue(v2, v4); double p_34 = CorrelationMatrix.getValue(v3, v4); bvalues[0] = Math.abs(p_12 * p_34 - p_13 * p_24) < epsilon; return bvalues[0]; } public boolean oneFactorTest(int a, int b, int c, int d) { return tetradScore3(a, b, c, d); } public boolean oneFactorTest(int a, int b, int c, int d, int e) { return tetradScore3(a, b, c, d) && tetradScore3(a, b, c, e) && tetradScore3(b, c, d, e); } public boolean oneFactorTest(int a, int b, int c, int d, int e, int f) { return tetradScore3(a, b, c, d) && tetradScore3(b, c, d, e) && tetradScore3(c, d, e, f); } public boolean twoFactorTest(int a, int b, int c, int d) { tetradScore(a, b, c, d); return bvalues[2]; } public boolean twoFactorTest(int a, int b, int c, int d, int e) { tetradScore(a, b, d, e); if (!bvalues[2]) { return false; } tetradScore(a, c, d, e); if (!bvalues[2]) { return false; } tetradScore(b, c, d, e); return bvalues[2]; } public boolean twoFactorTest(int a, int b, int c, int d, int e, int f) { if (!twoFactorTest(a, b, c, d, e)) { return false; } if (!twoFactorTest(a, b, c, d, f)) { return false; } return twoFactorTest(a, b, c, e, f); } public double tetradPValue(int v1, int v2, int v3, int v4) { //TODO: evalTetradDifference(v1, v2, v3, v4); //return prob[0]; return -1; } public double tetradPValue(int i1, int j1, int k1, int l1, int i2, int j2, int k2, int l2) { return 0; //To change body of implemented methods use File | Settings | File Templates. } public double getSignificance() { return 0; } public void setSignificance(double sig) { throw new UnsupportedOperationException(); } public ICovarianceMatrix getCovMatrix() { return null; } }
[ "sriahi@sfu.ca" ]
sriahi@sfu.ca
54f96e83ab10b07c893ca482b4b9fc670b0a9622
bbfa56cfc81b7145553de55829ca92f3a97fce87
/plugins/org.ifc4emf.metamodel.ifc/src/IFC2X3/IfcDuctSilencerType.java
0d1a465e613f85dd38caf1b4800f9e9c35b95bad
[]
no_license
patins1/raas4emf
9e24517d786a1225344a97344777f717a568fdbe
33395d018bc7ad17a0576033779dbdf70fa8f090
refs/heads/master
2021-08-16T00:27:12.859374
2021-07-30T13:01:48
2021-07-30T13:01:48
87,889,951
1
0
null
null
null
null
UTF-8
Java
false
false
2,840
java
/** * <copyright> * </copyright> * * $Id$ */ package IFC2X3; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import IFC2X3.jaxb.IfcDuctSilencerTypeImplAdapter; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Ifc Duct Silencer Type</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link IFC2X3.IfcDuctSilencerType#getPredefinedType <em>Predefined Type</em>}</li> * </ul> * </p> * * @see IFC2X3.IFC2X3Package#getIfcDuctSilencerType() * @model * @generated */ @XmlJavaTypeAdapter(IfcDuctSilencerTypeImplAdapter.class) public interface IfcDuctSilencerType extends IfcFlowTreatmentDeviceType { /** * Returns the value of the '<em><b>Predefined Type</b></em>' attribute. * The literals are from the enumeration {@link IFC2X3.IfcDuctSilencerTypeEnum}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Predefined Type</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Predefined Type</em>' attribute. * @see IFC2X3.IfcDuctSilencerTypeEnum * @see #isSetPredefinedType() * @see #unsetPredefinedType() * @see #setPredefinedType(IfcDuctSilencerTypeEnum) * @see IFC2X3.IFC2X3Package#getIfcDuctSilencerType_PredefinedType() * @model unsettable="true" required="true" * @generated */ IfcDuctSilencerTypeEnum getPredefinedType(); /** * Sets the value of the '{@link IFC2X3.IfcDuctSilencerType#getPredefinedType <em>Predefined Type</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Predefined Type</em>' attribute. * @see IFC2X3.IfcDuctSilencerTypeEnum * @see #isSetPredefinedType() * @see #unsetPredefinedType() * @see #getPredefinedType() * @generated */ void setPredefinedType(IfcDuctSilencerTypeEnum value); /** * Unsets the value of the '{@link IFC2X3.IfcDuctSilencerType#getPredefinedType <em>Predefined Type</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isSetPredefinedType() * @see #getPredefinedType() * @see #setPredefinedType(IfcDuctSilencerTypeEnum) * @generated */ void unsetPredefinedType(); /** * Returns whether the value of the '{@link IFC2X3.IfcDuctSilencerType#getPredefinedType <em>Predefined Type</em>}' attribute is set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return whether the value of the '<em>Predefined Type</em>' attribute is set. * @see #unsetPredefinedType() * @see #getPredefinedType() * @see #setPredefinedType(IfcDuctSilencerTypeEnum) * @generated */ boolean isSetPredefinedType(); } // IfcDuctSilencerType
[ "patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e" ]
patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e
8eb0e32cb6eaff25b0174f284971cd9b029df004
204d80af21c91be323fd607feb334bb76c72cecc
/spark-gwt-application/src/lt/jmsys/spark/gwt/application/client/common/v2/presenter/BaseFormPresenter.java
26249a87b04f8a5b9f8cfc6c63dcd5fa9363ea72
[]
no_license
lukasonokoleg/evector
3cb708f93de05b5e1944339ffed472f50ad89ca9
942855db30b3210485beebb84789b7043f407af2
refs/heads/master
2021-01-10T19:41:00.324499
2015-01-07T09:17:09
2015-01-07T09:17:09
25,296,524
1
0
null
null
null
null
UTF-8
Java
false
false
7,743
java
package lt.jmsys.spark.gwt.application.client.common.v2.presenter; import lt.jmsys.spark.gwt.application.client.common.presenter.PlaceWithId; import lt.jmsys.spark.gwt.application.client.common.resource.CommonConstants; import lt.jmsys.spark.gwt.application.client.common.v2.privileges.HasPrivilegedValue; import lt.jmsys.spark.gwt.application.client.common.v2.view.FormDisplay; import lt.jmsys.spark.gwt.client.callback.FailureHandler; import lt.jmsys.spark.gwt.client.messages.MessagesByCode; import lt.jmsys.spark.gwt.client.ui.message.MessageContainer; import com.google.gwt.core.client.GWT; import com.google.gwt.event.shared.EventBus; import com.google.gwt.place.shared.Place; import com.google.gwt.user.client.rpc.AsyncCallback; import eu.itreegroup.spark.gwt.application.client.security.FormPrivileges; public abstract class BaseFormPresenter<T, P> implements FormPresenter<T, P> { protected static final CommonConstants CC = GWT.create(CommonConstants.class); private P parameters; private T value; private EventBus eventBus; private FormPresenterCallback callback; private FormDisplay<T> view; private boolean started; // TODO: private EntityEventSource public BaseFormPresenter(FormDisplay<T> view) { this.view = view; } public P getParameters() { return parameters; } public T getValue() { return value; } public EventBus getEventBus() { return eventBus; } protected Object toProtectedObject(T value) { return value; } @Override final public void loadByValue(T value, EventBus eventBus, AsyncCallback<T> callback) { getView().setNotModified(); P p = getParameters(value); if (null == p) { throw new IllegalStateException("Cannot load form by value, getParameters(value) is not implemented"); } loadPrivileges(p, value, eventBus, callback); } @Override final public void loadByParameters(final P parameters, final EventBus eventBus, final AsyncCallback<T> callback) { getView().setNotModified(); final AsyncCallback<T> valueCallback = new AsyncCallback<T>() { @Override public void onFailure(Throwable caught) { callback.onFailure(caught); } @Override public void onSuccess(final T value) { loadPrivileges(parameters, value, eventBus, callback); } }; findValue(parameters, valueCallback); } final protected void loadPrivileges(final P parameters, final T value, final EventBus eventBus, final AsyncCallback<T> callback) { this.eventBus = eventBus; this.parameters = parameters; this.value = value; final AsyncCallback<FormPrivileges> privilegesCallback = new AsyncCallback<FormPrivileges>() { @Override public void onFailure(Throwable caught) { callback.onFailure(caught); } @Override public void onSuccess(FormPrivileges privileges) { load(parameters, value, privileges, eventBus, callback); } }; FormPrivileges.getPrivileges(toProtectedObject(value), privilegesCallback); } protected void load(P parameters, T value, FormPrivileges privileges, EventBus eventBus, AsyncCallback<T> callback) { if (!started){// event handleriai prikabinami tik startuojant, jų nebereikia papildomai kabinti kai vyksta formos atnaujinimas (reload()) attachHandlers(eventBus); } getView().setPrivileges(privileges); // FIXME: ALCS_V2 išimti privilegijas iš setValue(); if (null == callback) { callback = new AsyncCallback<T>() { @Override public void onFailure(Throwable caught) { } public void onSuccess(T result) { }; }; } setValue(value, parameters, privileges, callback); } protected boolean isFindPrivilegedSupported() { return false; } protected void findPrivilegedValue(P parameters, AsyncCallback<HasPrivilegedValue<T>> callback) { throw new IllegalStateException("findPrivilegedValue is not supported by this presenter"); } @Override public void reload() { reload(null); } @Override public void reload(AsyncCallback<T> callback) { if (null == callback) { callback = new AsyncCallback<T>() { @Override public void onFailure(Throwable caught) { } public void onSuccess(T result) { } }; } loadByParameters(getParameters(), getEventBus(), callback); } @Override public void cancelLoad() { } @Override public final void onStart() { started = true; onFormStart(); } /** * Override this method in case you need to do something after form was opened */ protected void onFormStart(){ } @Override public final void onClose() { started = false; onFormClose(); } /** * Override this method in case you need something special after form was closed */ protected void onFormClose(){ } @Override public String mayClose() { if (getView().isModified()) { return CC.warnUnsavedChanges(); } else { return null; } } @Override public FormDisplay<T> getView() { return view; } @Override public boolean validate() { return validate(getView()); } protected boolean validate(Validator validator) { MessageContainer container = getView().getMessageContainer(); if (null != container) { container.clear(); } boolean valid = validator.validate(container); if (valid) { valid = validate(container, getView().getValue()); } container.show(); return valid; } @Override public void setCallback(FormPresenterCallback callback) { this.callback = callback; } public FormPresenterCallback getCallback() { return callback; } protected void requestFormClose() { getCallback().closeForm(false); } @Override public FailureHandler customFailureHandler() { return null; } @Override public MessagesByCode[] customMessages() { return null; } /** * showSaveFeedback() * showDeleteFeedback() * showFeedback(type, message) */ protected abstract void findValue(P parameters, AsyncCallback<T> callback); /** * @param value * @param parameters * @param privileges * @param callback - do not forget to call callback.onSucess/onFailure method at the end. */ protected abstract void setValue(T value, P parameters, FormPrivileges privileges, AsyncCallback<T> callback); /** * Attach required event handlers to event bus to receive events from active activities (childs or parents) * @param eventBus */ protected abstract void attachHandlers(EventBus eventBus); public abstract boolean validate(MessageContainer container, T value); protected Double getId(Place place) { return place instanceof PlaceWithId ? ((PlaceWithId) place).getId() : null; } public MessageContainer getMessageContainer() { return getView().getMessageContainer(); } public FormPrivileges getPrivileges() { return getView().getPrivileges(); } }
[ "lukasonokoleg@gmail.com" ]
lukasonokoleg@gmail.com
2eb72ed54a693f8b37e67400d190a5f73e496f95
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/21/21_2805c471040aae543ebb24b1a3da98a18b8090cb/ScriptFilterTest/21_2805c471040aae543ebb24b1a3da98a18b8090cb_ScriptFilterTest_s.java
d20774323919e88ba8f4500fdea41f01883f5d21
[]
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,550
java
/* * Copyright (c) 2002, 2005 Gargoyle Software Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. The end-user documentation included with the redistribution, if any, must * include the following acknowledgment: * * "This product includes software developed by Gargoyle Software Inc. * (http://www.GargoyleSoftware.com/)." * * Alternately, this acknowledgment may appear in the software itself, if * and wherever such third-party acknowledgments normally appear. * 4. The name "Gargoyle Software" must not be used to endorse or promote * products derived from this software without prior written permission. * For written permission, please contact info@GargoyleSoftware.com. * 5. Products derived from this software may not be called "HtmlUnit", nor may * "HtmlUnit" appear in their name, without prior written permission of * Gargoyle Software Inc. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARGOYLE * SOFTWARE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package com.gargoylesoftware.htmlunit; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * Tests for ScriptFilter * @version $Revision$ * @author <a href="mailto:chen_jun@users.sourceforge.net"> Chen Jun </a> */ public class ScriptFilterTest extends WebTestCase { /** * Create an instance. * @param name The name of the test */ public ScriptFilterTest(final String name) { super(name); } /** * @throws Exception if the test fails */ public void testScriptForEvent() throws Exception { final String content = "<html><head><title>foo</title>" + "<script FOR='window' EVENT='onload' LANGUAGE='javascript'>" + " document.form1.txt.value='hello';" + " alert(document.form1.txt.value);" + "</script></head><body>" + "<form name='form1'><input type=text name='txt'></form></body></html>"; final List collectedAlerts = new ArrayList(); final List expectedAlerts = Arrays.asList( new String[]{ "hello" }); createTestPageForRealBrowserIfNeeded(content, expectedAlerts); loadPage(content, collectedAlerts); assertEquals( expectedAlerts, collectedAlerts ); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
9a785a952eb2de1917e447fea13d507a3687327c
68cb4d647309ac0892d5968a9a3d2156e5c1dabd
/day12_code/src/cn/itcast/demo04/Student.java
9e8c182eacd7d43ce42876e062f8a90621a8870e
[]
no_license
chaiguolong/JavaSE
651c4eb1179d05912cbc8d8a5d1930ca6ce9bad4
bb9629843ebafea221365b43c471ae3aa663b1c5
refs/heads/master
2021-07-25T09:46:34.190516
2018-07-30T08:17:49
2018-07-30T08:17:49
130,962,634
0
0
null
null
null
null
UTF-8
Java
false
false
556
java
package cn.itcast.demo04; /* * 子类中,super()的方式,调用父类的构造方法 * super()调用的是父类的空参数构造 * super(参数) 调用的是父类的有参数构造方法 * * 子类的构造方法, 有一个默认添加的构造方法 * 注意: 子类构造方法的第一行,有一个隐式代码 super() * public Student(){ * super(); * } * 子类的构造方法第一行super语句,调用父类的构造方法 */ public class Student extends Person{ public Student(){ super(); } }
[ "584238433@qq.com" ]
584238433@qq.com
6751ad76b8bf4d34a4abe4eebc86bcecc672d757
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/pluginsdk/ui/tools/j$3.java
757de6400d00e590bd3993e11d9229c1751ce011
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
505
java
package com.tencent.mm.pluginsdk.ui.tools; import com.tencent.matrix.trace.core.AppMethodBeat; final class j$3 implements Runnable { j$3(j.a parama) { } public final void run() { AppMethodBeat.i(68486); this.vvi.ccH(); AppMethodBeat.o(68486); } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes5-dex2jar.jar * Qualified Name: com.tencent.mm.pluginsdk.ui.tools.j.3 * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
e57de0c5f8aba7ecd7bb0e29cec63ff0f9228ed4
06929c3f303ab06bb94c9d4e6170baead646a1f3
/components/core/src/main/java/nl/didactor/events/DidactorEventListener.java
b325fc2f72533124fdea13759609f59c24f25f37
[]
no_license
mmbase/didactor
67a29a73d6e71038df6866fd70961e0bc2726329
ae910b8f4a9d6e73620428b466490cfb22328be2
refs/heads/master
2020-07-02T22:09:40.349018
2011-10-12T14:15:37
2011-10-12T14:15:37
201,682,060
0
0
null
null
null
null
UTF-8
Java
false
false
153
java
package nl.didactor.events; public interface DidactorEventListener extends org.mmbase.core.event.EventListener { public void notify(Event event); }
[ "git@meeuw.org" ]
git@meeuw.org
7c8323742b98721a0b3656af6f071d4ffd81db48
a3ad62bf3b0f3a59bdb3c650ed03404f8703c19f
/src/main/java/com/woniuxy/cq/ssmboot39/dao/TeacherMapper.java
c25353cbeb206dedb0988545a0e78df939296c01
[]
no_license
stickgoal/ssmboot39
4b26f45e235f5a7c486622b52a67053e4c63e8d0
5ff7836f7faf11f6c1b1c968974c3f25180c3947
refs/heads/master
2022-12-13T13:48:21.350209
2020-09-09T01:48:39
2020-09-09T01:48:39
293,409,841
0
0
null
null
null
null
UTF-8
Java
false
false
1,059
java
package com.woniuxy.cq.ssmboot39.dao; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.woniuxy.cq.ssmboot39.entity.Teacher; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; import java.util.Date; import java.util.List; /** * <p> * Mapper 接口 * </p> * * @author Lucas * @since 2020-08-26 */ public interface TeacherMapper extends BaseMapper<Teacher> { long countTeacher(@Param("phrase") String phrase, @Param("entryDateBefore")Date entryDateBefore, @Param("entryDateAfter")Date entryDateAfter); List<Teacher> pageQueryTeacher(@Param("pageStart") int pageStart,@Param("pageSize")int pageSize,@Param("phrase") String phrase, @Param("entryDateBefore")Date entryDateBefore, @Param("entryDateAfter")Date entryDateAfter); IPage<Teacher> pageQueryTeacher2(Page<Teacher> page, @Param("phrase") String phrase, @Param("entryDateBefore")Date entryDateBefore, @Param("entryDateAfter")Date entryDateAfter); }
[ "stick.goal@163.com" ]
stick.goal@163.com
46e676bdba00cd1cd2657f18a6e38c7c060aeda4
883b7801d828a0994cae7367a7097000f2d2e06a
/python/experiments/projects/Angel-ML-angel/real_error_dataset/1/701/UpdaterFunc.java
81832c4df2276061eb8b62e6e479c77cbad01c5b
[]
no_license
pombredanne/styler
9c423917619912789289fe2f8982d9c0b331654b
f3d752d2785c2ab76bacbe5793bd8306ac7961a1
refs/heads/master
2023-07-08T05:55:18.284539
2020-11-06T05:09:47
2020-11-06T05:09:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,117
java
/* * Tencent is pleased to support the open source community by making Angel available. * * Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. * * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * * https://opensource.org/licenses/BSD-3-Clause * * 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.tencent.angel.ml.matrix.udf.updater; /** * The interface updating function,invoke at parameter server actually. */ public interface UpdaterFunc { /** * Gets parameter. * * @return the updating */ UpdaterParam getParam(); /** * Partition update. * * @param partParam the partition parameter */ void partitionUpdate(PartitionUpdaterParam partParam); }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
709216e08a191ba33b02dc03e16d71d161821f4b
3e58503aa6e2191864f4ce94ee5966751da81a9d
/jdkCodeAnalysis/java8/lang/ref/WeakReference.java
5faed579c7cbc0c3534ff34cd065205cc41042dd
[]
no_license
caoyang4/Java
394cb4f6f6a8f9326b809903d9fba3507e13a887
cbddf0f7767f8a5debb1a5275f56509c376928a0
refs/heads/master
2023-07-28T00:22:44.306694
2023-07-06T08:27:01
2023-07-06T08:27:01
99,577,228
2
0
null
null
null
null
UTF-8
Java
false
false
269
java
package java.lang.ref; // 弱引用 public class WeakReference<T> extends Reference<T> { public WeakReference(T referent) { super(referent); } public WeakReference(T referent, ReferenceQueue<? super T> q) { super(referent, q); } }
[ "caoyang42@meituan.com" ]
caoyang42@meituan.com
a79b448ab0fdb1e422f549fdca435b03c46f3093
7cef09b7385b3fd05e771cca9b5f37b55534988d
/bomc-upload/bomc-upload-web/src/main/java/de/bomc/poc/upload/configuration/ConfigKeys.java
357773eea43a8e990c01137fcaeceaccf74c1da8
[]
no_license
bomc/hack
b8967c67f09e00ca950dfb5c2047d80d39791cd2
3d0dc31ed62db2e8890dccca801a755fc56bd8de
refs/heads/master
2022-11-23T21:14:36.088035
2021-01-25T16:14:52
2021-01-25T16:14:52
189,887,104
1
2
null
2022-11-16T05:22:20
2019-06-02T19:35:29
Java
UTF-8
Java
false
false
1,157
java
/** * Project: Poc-Upload * <pre> * * Last change: * * by: $Author: bomc $ * * date: $Date: 2017-01-18 07:45:48 +0100 (Mi, 18 Jan 2017) $ * * revision: $Revision: 9692 $ * * </pre> */ package de.bomc.poc.upload.configuration; /** * Defines keys for configuration properties from configuration.properties file. * * @author <a href="mailto:bomc@bomc.org">Michael B&ouml;rner</a> * @since 21.12.2016 */ public enum ConfigKeys { CONNECTION_TTL("connection.ttl"), CONNECT_TIMEOUT("connect.timeout"), SO_TIMEOUT("so.timeout"), LAGACY_SERVICE_HOST("lagacy.service.host"), LAGACY_SERVICE_PORT("lagacy.service.port"), LAGACY_SERVICE_BASE_PATH("lagacy.service.base.path"), LAGACY_SERVICE_SCHEME("lagacy.service.scheme"), LAGACY_SERVICE_USERNAME("lagacy.service.username"), LAGACY_SERVICE_PASSWORD("lagacy.service.password"), PING_INTERVAL("ping.interval"), PRODUCER("producer"); private final String propertyValue; ConfigKeys(final String propertyValue) { this.propertyValue = propertyValue; } public String getPropertyValue() { return this.propertyValue; } }
[ "michael_boerner@t-online.de" ]
michael_boerner@t-online.de
fb56578e01267d02178fb201d2167693b191dc09
3c45a5f2aaef7951be8769a28fa28e05d6d3fbb4
/subprojects/commons-id/src/java/org/apache/commons/id/serial/NumericGenerator.java
536b6692787656177a5051d713de4c4f98837620
[ "Apache-2.0" ]
permissive
NLCR/NDK-validator-2012-legacy
99c51442655b5a9c872fc9b4cb57d98138d6c8e0
3ddcf34131f2f0e8366297c4ad7738f651d7a340
refs/heads/master
2021-05-28T17:10:32.391360
2014-11-10T10:18:47
2014-11-10T10:18:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,910
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.id.serial; import org.apache.commons.id.AbstractStringIdentifierGenerator; import java.io.Serializable; /** * <p><code>NumericIdentifierGenerator</code> is an Identifier Generator * that generates an incrementing number as a String object.</p> * * <p>If the <code>wrap</code> argument passed to the constructor is set to * <code>true</code>, the sequence will wrap, returning negative values when * {@link Long#MAX_VALUE} reached; otherwise an {@link IllegalStateException} * will be thrown.</p> * * @author Commons-Id team * @version $Id: NumericGenerator.java 480488 2006-11-29 08:57:26Z bayard $ */ public class NumericGenerator extends AbstractStringIdentifierGenerator implements Serializable { /** * <code>serialVersionUID</code> is the serializable UID for the binary version of the class. */ private static final long serialVersionUID = 20060121L; /** Should the counter wrap. */ private boolean wrapping; /** The counter. */ private long count = 0; /** * <p>Constructor.</p> * * @param wrap should the factory wrap when it reaches the maximum * long value (or throw an exception) * @param initialValue the initial long value to start at */ public NumericGenerator(boolean wrap, long initialValue) { super(); this.wrapping = wrap; this.count = initialValue; } /** * Returns the maximum length (number or characters) for an identifier * from this sequence. * * <p>The maximum value is determined from the length of the string * representation of {@link Long#MAX_VALUE}.</p> * * @return the maximum identifier length */ public long maxLength() { return AbstractStringIdentifierGenerator.MAX_LONG_NUMERIC_VALUE_LENGTH; } /** * <p>Returns the minimum length (number of characters) for an identifier * from this sequence.</p> * * @return the minimum identifier length: <code>1</code> */ public long minLength() { return 1; } /** * Getter for property wrap. * * @return <code>true</code> if this generator is set up to wrap. * */ public boolean isWrap() { return wrapping; } /** * Sets the wrap property. * * @param wrap value for the wrap property * */ public void setWrap(boolean wrap) { this.wrapping = wrap; } public String nextStringIdentifier() { long value = 0; if (wrapping) { synchronized (this) { value = count++; } } else { synchronized (this) { if (count == Long.MAX_VALUE) { throw new IllegalStateException ("The maximum number of identifiers has been reached"); } value = count++; } } return Long.toString(value); } }
[ "rudolf@m2117.nkp.cz" ]
rudolf@m2117.nkp.cz
ea8197d2853e69b3723253a4fef34d945d142d56
71e7162d2491abcea99e08418e939c7b3e3fd6fb
/sz0099-parent/sz0099-course-app-product/src/main/java/dml/sz0099/course/app/persist/repository/article/CoeCategArticleRepository.java
b868402fa53c95aa320ef2e29e54f462e8dfe755
[]
no_license
snowflake3721/sz0099
1b7127daf9aba559425f9fb4ac580892c7cb74f9
0d6252db85f54aa7f1ccbc4fbf86ebe98898ce1b
refs/heads/master
2020-04-29T07:46:17.756488
2019-03-16T11:47:33
2019-03-16T11:47:33
175,964,689
0
0
null
null
null
null
UTF-8
Java
false
false
1,377
java
package dml.sz0099.course.app.persist.repository.article; import java.util.List; import org.jit4j.core.persist.repository.BasicJpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; import dml.sz0099.course.app.persist.entity.article.CoeCategArticle; /** * @formatter:off * * description: CoeCategArticleRepository 数据访问接口 * @author bruce yang at 2018-08-24 22:35:13 * * ---------------------------------------------------------------------------------------- * Requirement Author Date Function * init bruceyang 2018-08-24 basic init * * @formatter:on */ @Repository public interface CoeCategArticleRepository extends BasicJpaRepository<CoeCategArticle,Long> { @Query("select e from CoeCategArticle e where e.id=?1") CoeCategArticle findById(Long id); @Query("select e from CoeCategArticle e where e.aid=?1") CoeCategArticle findByAid(Long aid); @Query("select e from CoeCategArticle e where e.id in ?1") public List<CoeCategArticle> findByIdList(List<Long> idList); @Query("select e from CoeCategArticle e where e.mainId in ?1 and e.deleted=false") public List<CoeCategArticle> findByMainIdList(List<Long> mainIdList); @Query("select e from CoeCategArticle e where e.mainId=?1 and e.deleted=false") public List<CoeCategArticle> findByMainId(Long mainId); }
[ "1839604586@qq.com" ]
1839604586@qq.com
0e7368acf4b717b7a65a6ab0e1d5c14dc4ca837b
0c0fa58b42b3ad29284662c0f06b1f5f46283ea0
/src/innerclasses/thisnew/Parcel3.java
864340a8aa363397b27643e84f31cb885598b939
[]
no_license
zhukis/java_edu_ekkel
a976eb0a382a1c9557840714b9aadba4125c271d
670a7a5b950a29c79e2a103b63f49315ebb51678
refs/heads/master
2021-01-01T19:04:48.520095
2017-08-20T21:13:52
2017-08-20T21:13:52
98,501,377
0
0
null
null
null
null
UTF-8
Java
false
false
572
java
package innerclasses.thisnew; public class Parcel3 { class Contents { private int i = 11; public int value() { return i; } } class Destination { private String label; Destination(String whereTo) { label = whereTo; } String readLabel() { return label; } } public static void main(String[] args) { Parcel3 p = new Parcel3(); Parcel3.Contents c = p.new Contents(); Parcel3.Destination d = p.new Destination("Tansania"); } }
[ "izhu@ericpol.com" ]
izhu@ericpol.com
9f5a7bd08fa6237e23bbfc5c8602dda991f111f9
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/23/org/apache/commons/math3/complex/Complex_sin_879.java
01414026f62713a9ececc38c830d3c5d34516a15
[]
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
2,513
java
org apach common math3 complex represent complex number number real imaginari part implement arithmet oper handl code nan infinit valu rule link java lang doubl link equal equival relat instanc code nan real imaginari part consid equal code nani code nan code nan nani note contradict ieee standard float point number test code fail code code nan method link org apach common math3 util precis equal equal primit link org apach common math3 util precis conform ieee conform standard behavior java object type implement serializ version complex field element fieldel complex serializ comput href http mathworld wolfram sine html target top sine complex number implement formula pre code sin sin cosh co sinh code pre real function hand side link java lang math sin link java lang math co link fast math fastmath cosh link fast math fastmath sinh return link complex nan real imaginari part input argument code nan infinit valu real imaginari part input result infinit code nan valu return part result pre exampl code sin plusmn infin plusmn infin sin plusmn infin nan nan sin plusmn infin plusmn infin nan nan code pre sine complex number complex sin isnan nan creat complex createcomplex fast math fastmath sin real fast math fastmath cosh imaginari fast math fastmath co real fast math fastmath sinh imaginari
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
98201065ffb5183f8b3fda1a71ee652733fdac82
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
/services/cce/src/main/java/com/huaweicloud/sdk/cce/v3/model/UpgradeTaskMetadata.java
c669b6f8712290510fcf84974412797c13be8719
[ "Apache-2.0" ]
permissive
huaweicloud/huaweicloud-sdk-java-v3
51b32a451fac321a0affe2176663fed8a9cd8042
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
refs/heads/master
2023-08-29T06:50:15.642693
2023-08-24T08:34:48
2023-08-24T08:34:48
262,207,545
91
57
NOASSERTION
2023-09-08T12:24:55
2020-05-08T02:27:00
Java
UTF-8
Java
false
false
3,160
java
package com.huaweicloud.sdk.cce.v3.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; /** * 升级任务元数据 */ public class UpgradeTaskMetadata { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "uid") private String uid; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "creationTimestamp") private String creationTimestamp; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "updateTimestamp") private String updateTimestamp; public UpgradeTaskMetadata withUid(String uid) { this.uid = uid; return this; } /** * 升级任务ID * @return uid */ public String getUid() { return uid; } public void setUid(String uid) { this.uid = uid; } public UpgradeTaskMetadata withCreationTimestamp(String creationTimestamp) { this.creationTimestamp = creationTimestamp; return this; } /** * 任务创建时间 * @return creationTimestamp */ public String getCreationTimestamp() { return creationTimestamp; } public void setCreationTimestamp(String creationTimestamp) { this.creationTimestamp = creationTimestamp; } public UpgradeTaskMetadata withUpdateTimestamp(String updateTimestamp) { this.updateTimestamp = updateTimestamp; return this; } /** * 任务更新时间 * @return updateTimestamp */ public String getUpdateTimestamp() { return updateTimestamp; } public void setUpdateTimestamp(String updateTimestamp) { this.updateTimestamp = updateTimestamp; } @Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } UpgradeTaskMetadata that = (UpgradeTaskMetadata) obj; return Objects.equals(this.uid, that.uid) && Objects.equals(this.creationTimestamp, that.creationTimestamp) && Objects.equals(this.updateTimestamp, that.updateTimestamp); } @Override public int hashCode() { return Objects.hash(uid, creationTimestamp, updateTimestamp); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpgradeTaskMetadata {\n"); sb.append(" uid: ").append(toIndentedString(uid)).append("\n"); sb.append(" creationTimestamp: ").append(toIndentedString(creationTimestamp)).append("\n"); sb.append(" updateTimestamp: ").append(toIndentedString(updateTimestamp)).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
5f0c891a5cbca6db737f664fd1fcc4dd70495113
f3bf4e9c33098dfc98332775881493d65349810d
/Project/src/main/java/eu/tbelina/spring/security/SecurityLoginController.java
6d24c42e33ae3fcc3a1ab518728151b8d04fa3d1
[]
no_license
tomekb82/JavaProjects
588ffe29e79e0999413ee9fd0d8a9596ecd6ef0b
88ed90da4f3bb930962002da22a46dad9b2ef6ca
refs/heads/master
2021-01-01T18:29:21.055062
2015-11-20T00:21:53
2015-11-20T00:21:53
20,363,504
2
0
null
null
null
null
UTF-8
Java
false
false
1,080
java
package eu.tbelina.spring.security; import java.security.Principal; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @Controller public class SecurityLoginController { @RequestMapping(value="/welcome", method = RequestMethod.GET) public String printWelcome(ModelMap model, Principal principal ) { String name = principal.getName(); model.addAttribute("username", name); model.addAttribute("message", "Spring Security Custom Form example"); return "hello"; } @RequestMapping(value="/login", method = RequestMethod.GET) public String login(ModelMap model) { return "login"; } @RequestMapping(value="/loginfailed", method = RequestMethod.GET) public String loginerror(ModelMap model) { model.addAttribute("error", "true"); return "login"; } @RequestMapping(value="/logout", method = RequestMethod.GET) public String logout(ModelMap model) { return "login"; } }
[ "tomasz.belina@qualent.eu" ]
tomasz.belina@qualent.eu
882cfffeb80bcba3aa09ac9a1c8f16778a07fc01
f2b6d20a53b6c5fb451914188e32ce932bdff831
/src/com/linkedin/android/identity/guidededit/pendingendorsement/PendingEndorsementsEndorserCardFragment$1.java
2f28958779818afd7ede0b8b56e14dd343315a43
[]
no_license
reverseengineeringer/com.linkedin.android
08068c28267335a27a8571d53a706604b151faee
4e7235e12a1984915075f82b102420392223b44d
refs/heads/master
2021-04-09T11:30:00.434542
2016-07-21T03:54:43
2016-07-21T03:54:43
63,835,028
3
0
null
null
null
null
UTF-8
Java
false
false
683
java
package com.linkedin.android.identity.guidededit.pendingendorsement; import android.support.v7.widget.CardView; import android.view.View; final class PendingEndorsementsEndorserCardFragment$1 implements Runnable { PendingEndorsementsEndorserCardFragment$1(PendingEndorsementsEndorserCardFragment paramPendingEndorsementsEndorserCardFragment) {} public final void run() { this$0.pendingEndorsementsEndorserCardView.findViewById(2131757156).setVisibility(0); } } /* Location: * Qualified Name: com.linkedin.android.identity.guidededit.pendingendorsement.PendingEndorsementsEndorserCardFragment.1 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
21c9101a2699f4f98383224ad1774a9571fc99f2
996798b974a225b7f0bcff1eeac64f21c3006e74
/User Mobile App/app/src/main/java/in/techware/lataxicustomer/config/Config.java
73e516cb8f258b4a68e809c56bfcc64c2f95e227
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
hardikamal/On-Demand-Taxi-Booking-Application
39a9da5623b9afacbda2d7b3bf2adac38810eb46
ba28a9ba6129a502a3f5081d9a999d4b2c2da165
refs/heads/master
2022-11-07T09:57:12.989346
2016-06-22T08:13:00
2016-06-22T08:13:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,591
java
package in.techware.lataxicustomer.config; import java.util.Locale; import okhttp3.OkHttpClient; public class Config { private static Config instance; private OkHttpClient okHttpClient; private String authToken; private String currentLatitude; private String currentLongitude; private String userID; private String email; private String name; private String firstName; private String lastName; private String phone; private String gender; private String DOB; private boolean isPhoneVerified; private String currentLocation; private String password; private boolean firstTime; private String profilePhoto; private String mobileNumber; private String carID; private String driverName; private String driverPhoto; private String carNumber; private String carName; private String carsAvailable; private String minTime; private String minFare; private String maxSize; private String totalFare; private String addHome; private String addWork; private String homeLatitude; private String homeLongitude; private String workLatitude; private String workLongitude; private String locale = Locale.getDefault().getLanguage(); public static Config getInstance() { if (instance == null) instance = new Config(); return instance; } public static void clear() { instance = null; instance = new Config(); } private Config() { } public String getLocale() { return locale; } public void setLocale(String locale) { this.locale = locale; } public OkHttpClient getOkHttpClient() { return okHttpClient; } public void setOkHttpClient(OkHttpClient okHttpClient) { this.okHttpClient = okHttpClient; } public String getAuthToken() { return authToken; } public void setAuthToken(String authToken) { this.authToken = authToken; } public String getUserID() { return userID; } public void setUserID(String userID) { this.userID = userID; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getGender() { return gender; } public void setGender(String gender) { this.gender = gender; } public String getDOB() { return DOB; } public void setDOB(String DOB) { this.DOB = DOB; } public boolean isPhoneVerified() { return isPhoneVerified; } public void setPhoneVerified(boolean phoneVerified) { isPhoneVerified = phoneVerified; } public void setPassword(String password) { this.password = password; } public void setFirstTime(boolean firstTime) { this.firstTime = firstTime; } public String getMobileNumber() { return mobileNumber; } public void setMobileNumber(String mobileNumber) { this.mobileNumber = mobileNumber; } public void setProfilePhoto(String profilePhoto) { this.profilePhoto = profilePhoto; } public String getProfilePhoto() { return profilePhoto; } public String getCurrentLocation() { return currentLocation; } public void setCurrentLocation(String currentLocation) { this.currentLocation = currentLocation; } public String getCurrentLatitude() { return currentLatitude; } public void setCurrentLatitude(String currentLatitude) { this.currentLatitude = currentLatitude; } public String getCurrentLongitude() { return currentLongitude; } public void setCurrentLongitude(String currentLongitude) { this.currentLongitude = currentLongitude; } public double getDCurrentLatitude() { try { return Double.parseDouble(currentLatitude); } catch (NumberFormatException e) { return 0.0; } } public double getDCurrentLongitude() { try { return Double.parseDouble(currentLongitude); } catch (NumberFormatException e) { return 0.0; } } public String getPassword() { return password; } public boolean isFirstTime() { return firstTime; } public String getCarID() { return carID; } public void setCarID(String carID) { this.carID = carID; } public String getDriverName() { return driverName; } public void setDriverName(String driverName) { this.driverName = driverName; } public String getDriverPhoto() { return driverPhoto; } public void setDriverPhoto(String driverPhoto) { this.driverPhoto = driverPhoto; } public String getCarNumber() { return carNumber; } public void setCarNumber(String carNumber) { this.carNumber = carNumber; } public String getCarName() { return carName; } public void setCarName(String carName) { this.carName = carName; } public String getCarsAvailable() { return carsAvailable; } public void setCarsAvailable(String carsAvailable) { this.carsAvailable = carsAvailable; } public String getMinTime() { return minTime; } public void setMinTime(String minTime) { this.minTime = minTime; } public String getMinFare() { return minFare; } public void setMinFare(String minFare) { this.minFare = minFare; } public String getMaxSize() { return maxSize; } public void setMaxSize(String maxSize) { this.maxSize = maxSize; } public String getTotalFare() { return totalFare; } public void setTotalFare(String totalFare) { this.totalFare = totalFare; } public String getAddHome() { return addHome; } public void setAddHome(String addHome) { this.addHome = addHome; } public String getAddWork() { return addWork; } public void setAddWork(String addWork) { this.addWork = addWork; } public String getHomeLatitude() { return homeLatitude; } public void setHomeLatitude(String homeLatitude) { this.homeLatitude = homeLatitude; } public String getHomeLongitude() { return homeLongitude; } public void setHomeLongitude(String homeLongitude) { this.homeLongitude = homeLongitude; } public String getWorkLatitude() { return workLatitude; } public void setWorkLatitude(String workLatitude) { this.workLatitude = workLatitude; } public String getWorkLongitude() { return workLongitude; } public void setWorkLongitude(String workLongitude) { this.workLongitude = workLongitude; } }
[ "seumoblondel@gmail.com" ]
seumoblondel@gmail.com
a3832681b4a104b137a9d044c902688a62fe5766
de9149f4b431364fef582db05ff6d23c4a3cdb26
/app/src/main/java/com/jhs/taolibao/entity/Minutehq.java
9930ebfd0014ed54e0ddd80e27844bdf0968bd8e
[]
no_license
hudawei996/Taolibao
0bc0bf3ddb43c8978334ee3c3fe52a295ab34135
e01288220bfeaefbd841f36d45616044c414cdda
refs/heads/master
2022-06-26T11:00:30.752581
2016-11-13T00:55:55
2016-11-13T00:55:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,217
java
package com.jhs.taolibao.entity; import org.json.JSONException; import org.json.JSONObject; import java.io.Serializable; /** * 分时图实体 * * @TODO */ public class Minutehq implements Serializable { private String TimeID;//时间序号 private String HQZJCJ;//成交价格 private String AveragePrice;//成交均价 private String HBCJSL;//成交数量 private String Turnover;//成交金额 private String Min;//分钟 private String Buy;//买的数量 private String Sell;//卖的数量 private String netvalue;//基金净值 private String YesterdayIncome;//昨日收盘 public void SetJSONObject(JSONObject json) throws JSONException { if (!json.isNull("TimeID")) { this.setTimeID(json.getString("TimeID")); } if (!json.isNull("HQZJCJ")) { this.setHQZJCJ(json.getString("HQZJCJ")); } if (!json.isNull("AveragePrice")) { this.setAveragePrice(json.getString("AveragePrice")); } if (!json.isNull("HBCJSL")) { this.setHBCJSL(json.getString("HBCJSL")); } if (!json.isNull("Turnover")) { this.setTurnover(json.getString("Turnover")); } if (!json.isNull("Min")) { this.setMin(json.getString("Min")); } if (!json.isNull("Buy")) { this.setBuy(json.getString("Buy")); } if (!json.isNull("Sell")) { this.setSell(json.getString("Sell")); } if (!json.isNull("netvalue")) { this.setNetvalue(json.getString("netvalue")); } if (!json.isNull("YesterdayIncome")) { this.setYesterdayIncome(json.getString("YesterdayIncome")); } } public String getTimeID() { return TimeID; } public void setTimeID(String timeID) { TimeID = timeID; } public String getHQZJCJ() { return HQZJCJ; } public void setHQZJCJ(String HQZJCJ) { this.HQZJCJ = HQZJCJ; } public String getAveragePrice() { return AveragePrice; } public void setAveragePrice(String averagePrice) { AveragePrice = averagePrice; } public String getHBCJSL() { return HBCJSL; } public void setHBCJSL(String HBCJSL) { this.HBCJSL = HBCJSL; } public String getTurnover() { return Turnover; } public void setTurnover(String turnover) { Turnover = turnover; } public String getMin() { return Min; } public void setMin(String min) { Min = min; } public String getBuy() { return Buy; } public void setBuy(String buy) { Buy = buy; } public String getSell() { return Sell; } public void setSell(String sell) { Sell = sell; } public String getNetvalue() { return netvalue; } public void setNetvalue(String netvalue) { this.netvalue = netvalue; } public String getYesterdayIncome() { return YesterdayIncome; } public void setYesterdayIncome(String yesterdayIncome) { YesterdayIncome = yesterdayIncome; } }
[ "android_shuai@163.com" ]
android_shuai@163.com
95aec2cf58233f41ee3b0d2e48bdf9766a119c03
1d8f58fb690b0aafb824e4b2bd635cda3d53e233
/DroneKit/src/main/java/com/o3dr/services/android/lib/drone/property/Battery.java
93c751b31652188f773a9232e856c596c689fc83
[ "Apache-2.0" ]
permissive
jiusetian/FreeDroneGCS
475edb55cd016c84ca3c787fee5784b5c8e662fd
2076a58ebca36bcd9d17dd99278b88e386c10d2b
refs/heads/master
2021-02-09T01:59:12.301899
2020-03-08T13:09:45
2020-03-08T13:09:45
244,225,832
8
3
null
null
null
null
UTF-8
Java
false
false
2,324
java
package com.o3dr.services.android.lib.drone.property; import android.os.Parcel; /** * Created by fhuya on 10/28/14. */ public class Battery implements DroneAttribute { private double batteryVoltage; private double batteryRemain; private double batteryCurrent; private Double batteryDischarge; public Battery(){} public Battery(double batteryVoltage, double batteryRemain, double batteryCurrent, Double batteryDischarge) { this.batteryVoltage = batteryVoltage; this.batteryRemain = batteryRemain; this.batteryCurrent = batteryCurrent; this.batteryDischarge = batteryDischarge; } public void setBatteryVoltage(double batteryVoltage) { this.batteryVoltage = batteryVoltage; } public void setBatteryRemain(double batteryRemain) { this.batteryRemain = batteryRemain; } public void setBatteryCurrent(double batteryCurrent) { this.batteryCurrent = batteryCurrent; } public void setBatteryDischarge(Double batteryDischarge) { this.batteryDischarge = batteryDischarge; } public double getBatteryVoltage() { return batteryVoltage; } public double getBatteryRemain() { return batteryRemain; } public double getBatteryCurrent() { return batteryCurrent; } public Double getBatteryDischarge() { return batteryDischarge; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeDouble(this.batteryVoltage); dest.writeDouble(this.batteryRemain); dest.writeDouble(this.batteryCurrent); dest.writeValue(this.batteryDischarge); } private Battery(Parcel in) { this.batteryVoltage = in.readDouble(); this.batteryRemain = in.readDouble(); this.batteryCurrent = in.readDouble(); this.batteryDischarge = (Double) in.readValue(Double.class.getClassLoader()); } public static final Creator<Battery> CREATOR = new Creator<Battery>() { public Battery createFromParcel(Parcel source) { return new Battery(source); } public Battery[] newArray(int size) { return new Battery[size]; } }; }
[ "lxrongdke@163.com" ]
lxrongdke@163.com
77435415d2ae27cd83f69d10a7e0b005f8c632a1
c147ba33044ef204fc25d70989e01afe8796ce17
/app/src/main/java/com/apextechies/myapplication/model/Configuration.java
a3854d9ff0ab83495bc8e995dc5575e6634e9fc9
[]
no_license
Shankar1056/chatdemo
b9363d7b4cabe8b626d11a10c29455474ff7f350
9c0ba7cd3d057a85307d2561192db7d6beeccbbf
refs/heads/master
2020-03-13T16:12:44.047024
2018-04-26T17:58:29
2018-04-26T17:58:29
131,192,252
0
0
null
null
null
null
UTF-8
Java
false
false
494
java
package com.apextechies.myapplication.model; public class Configuration { private String label; private String value; private int icon; public Configuration(String label, String value, int icon){ this.label = label; this.value = value; this.icon = icon; } public String getLabel(){ return this.label; } public String getValue(){ return this.value; } public int getIcon(){ return this.icon; } }
[ "shankar@spotsoon.com" ]
shankar@spotsoon.com
0a7e089ef913965f5090a4d2d19308b8adb4ef0c
3bf186002a5d04ee89b6922abe3556e518c6455b
/MyWeex/IM/src/main/java/cn/kwim/mqttcilent/mqttclient/mq/TopicMatcher.java
3b4529d6ad984690dd0b6d6fde263c684027dc51
[]
no_license
63966367/MyProject
cb0bbb53a67137c0c028f0eca3e44e2c0307646a
f2298ff2c866887e0254e308cc37c4c652f51b66
refs/heads/master
2022-01-29T11:17:42.280576
2019-07-03T06:16:33
2019-07-03T06:16:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,363
java
package cn.kwim.mqttcilent.mqttclient.mq; import java.io.UnsupportedEncodingException; import java.util.List; public class TopicMatcher { private static final String SEPARATOR = "/"; private static final String MULTI_LEVEL_WILDCARD = "#"; private static final String SINGLE_LEVEL_WILDCARD = "+"; private static final int MIN_LENGTH = 1; private static final int MAX_LENGTH = 65535; private static final char NULL = '\u0000'; private static final int INDEX_NOT_FOUND = -1; public static final String MULTI_LEVEL_WILDCARD_PATTERN = SEPARATOR + MULTI_LEVEL_WILDCARD; public static final String TOPIC_WILDCARDS = MULTI_LEVEL_WILDCARD + SINGLE_LEVEL_WILDCARD; public static boolean isValid(String topicFilter, boolean allowWildcard) { if (topicFilter == null) { return false; } int length = 0; try { length = topicFilter.getBytes("UTF-8").length; } catch (UnsupportedEncodingException e) { return false; } if (length < MIN_LENGTH || length > MAX_LENGTH) { return false; } if (allowWildcard) { if (topicFilter.equals(MULTI_LEVEL_WILDCARD) || topicFilter.equals(SINGLE_LEVEL_WILDCARD)) { return true; } if (countMatches(topicFilter, MULTI_LEVEL_WILDCARD) > 1 || (topicFilter.contains(MULTI_LEVEL_WILDCARD) && !topicFilter.endsWith(MULTI_LEVEL_WILDCARD_PATTERN))) { return false; } } return isValidSingleLevelWildcard(topicFilter); } private static int countMatches(String str, String sub) { if (str==null ||"".equals(str) || sub==null || "".equals(sub)) { return 0; } int count = 0; int idx = 0; while ((idx = str.indexOf(sub, idx)) != INDEX_NOT_FOUND) { count++; idx += sub.length(); } return count; } private static boolean isValidSingleLevelWildcard(String topicString) { char singleLevelWildcardChar = SINGLE_LEVEL_WILDCARD.charAt(0); char topicLevelSeparatorChar = SEPARATOR.charAt(0); char[] chars = topicString.toCharArray(); int length = chars.length; char prev = NULL; char next = NULL; for (int i = 0; i < length; i++) { prev = (i - 1 >= 0) ? chars[i - 1] : NULL; next = (i + 1 < length) ? chars[i + 1] : NULL; if ((chars[i] == singleLevelWildcardChar) && (prev != topicLevelSeparatorChar && prev != NULL || next != topicLevelSeparatorChar && next != NULL)) { return false; } } return true; } public static boolean match(String topicFilter, String topicName) { if (!TopicMatcher.isValid(topicFilter, true) || !TopicMatcher.isValid(topicName, false)) { return false; } if ((topicFilter.startsWith(MULTI_LEVEL_WILDCARD) || topicFilter.startsWith(SINGLE_LEVEL_WILDCARD)) && topicName.startsWith("$")) { return false; } // [MQTT-4.7.2-1] String[] tfs = topicFilter.split("/"); String[] tns = topicName.split("/"); for (int i = 0; i < tns.length+1; ++i) { if(i==tfs.length && i== tns.length){ return true; } if (i >= tfs.length) { return false; } else if (tfs[i].equals(MULTI_LEVEL_WILDCARD)) { return true; } else if (tfs[i].equals(SINGLE_LEVEL_WILDCARD)) { continue; } if (i >= tns.length) { return false; } if (tfs[i].equals(tns[i])) { continue; } else { return false; } } return true; } }
[ "zhengkang@dbfd10c2-de4d-554c-9009-ce568fefba2b" ]
zhengkang@dbfd10c2-de4d-554c-9009-ce568fefba2b
0667cefaf83909206730f9e843904aface8c0cc6
96c48b375d20ba117b5952eb5ec6c2a24f57cd66
/src/main/java/io/renren/dao/CourseTextbookDao.java
2e306e5358511b231fb9e9877cad605a22968466
[]
no_license
zzzzata/school-admin
1cddfa7df9029e2ea3d34396162005a5f943ba0d
baea150018b085f45135b08957aa8027bb5f24e2
refs/heads/master
2022-12-21T23:45:01.185403
2019-09-20T06:16:31
2019-09-20T06:16:31
209,701,174
0
0
null
2022-12-16T08:07:45
2019-09-20T03:54:18
Java
UTF-8
Java
false
false
503
java
package io.renren.dao; import io.renren.entity.CourseTextbookDetailEntity; import io.renren.entity.CourseTextbookEntity; import java.util.Map; /** * 教材档案 * * @author hq * @email hq@hq.com * @date 2017-05-16 16:09:29 */ public interface CourseTextbookDao extends BaseMDao<CourseTextbookDetailEntity> { /** * 批量更新状态 */ int updateBatch(Map<String, Object> map); void update(CourseTextbookEntity courseTextbook); void save(CourseTextbookEntity courseTextbook); }
[ "ouchujian@hqjy.com" ]
ouchujian@hqjy.com
a034fce6e0bd5eb432303f8f01dbfc5c56621fca
4edf45be74436a95065ac222963b9eebfbc136bf
/server/src/main/java/com/orientechnologies/orient/server/distributed/task/OMultipleRemoteTasks.java
8ba957ee0c1d57e015c00331b623ffef621b20c3
[ "Apache-2.0" ]
permissive
svahn/orientdb
2257ae3116d165dda97b07ac91cc30e3d92ec878
e46f3d926e21ce105a91c611575c8d2bfbc81321
refs/heads/master
2021-01-16T19:32:13.787990
2013-08-07T17:04:35
2013-08-07T17:04:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,643
java
/* * Copyright 2010-2012 Luca Garulli (l.garulli--at--orientechnologies.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.orientechnologies.orient.server.distributed.task; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.util.ArrayList; import java.util.List; import com.orientechnologies.orient.server.OServer; import com.orientechnologies.orient.server.distributed.ODistributedServerManager; import com.orientechnologies.orient.server.distributed.ODistributedServerManager.EXECUTION_MODE; /** * Groups multiples tasks to being replicated in one single call. * * @author Luca Garulli (l.garulli--at--orientechnologies.com) * */ public class OMultipleRemoteTasks extends OAbstractRemoteTask<Object[]> { private static final long serialVersionUID = 1L; private List<OAbstractReplicatedTask<?>> tasks = new ArrayList<OAbstractReplicatedTask<?>>(); public OMultipleRemoteTasks() { } public OMultipleRemoteTasks(final OServer iServer, final ODistributedServerManager iDistributedSrvMgr, final String iDbName, final EXECUTION_MODE iMode) { super(iServer, iDistributedSrvMgr, iDbName, iMode); } @Override public Object[] call() throws Exception { final Object[] result = new Object[tasks.size()]; for (int i = 0; i < tasks.size(); ++i) { final OAbstractRemoteTask<?> task = tasks.get(i); // RESET QUEUE TO AVOID HOLES serverInstance.getDistributedManager().resetOperationQueue(task.getRunId(), task.getOperationSerial() - 1); result[i] = task.call(); } return result; } @Override public void writeExternal(final ObjectOutput out) throws IOException { super.writeExternal(out); out.writeInt(tasks.size()); for (int i = 0; i < tasks.size(); ++i) { out.writeObject(tasks.get(i)); } } @Override public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); final int taskSize = in.readInt(); for (int i = 0; i < taskSize; ++i) tasks.add((OAbstractReplicatedTask<?>) in.readObject()); } @Override public String getName() { return "multiple_requests"; } @Override public void setNodeDestination(final String masterNodeId) { super.setNodeDestination(masterNodeId); if (tasks != null) for (OAbstractReplicatedTask<?> t : tasks) { t.setNodeDestination(masterNodeId); } } @Override public void setNodeSource(final String nodeSource) { super.setNodeSource(nodeSource); if (tasks != null) for (OAbstractReplicatedTask<?> t : tasks) { t.setNodeSource(nodeSource); } } public int getTasks() { return tasks.size(); } public void addTask(final OAbstractReplicatedTask<?> operation) { tasks.add(operation); } public void clearTasks() { tasks.clear(); } public OAbstractReplicatedTask<?> getTask(final int i) { return tasks.get(i); } }
[ "lomakin.andrey@gmail.com" ]
lomakin.andrey@gmail.com
d72e26316b2f65baa98ed0e0d594297b20b998c1
4c50f39f7412125204d2514693dcfb08162d656e
/src/org/prom5/analysis/clusteranalysis/ClusterDecisionAnalyzer.java
30bb38b0226bf445ae1b9a8a54f663ed53ccce7d
[]
no_license
alex-fedorov-012088/SMD
7e956d92701835bbac3f584a2dea05690c201a94
9b2a025b9124639d8262331487ee136d56b9b93b
refs/heads/master
2023-03-15T19:15:15.273499
2015-03-30T01:31:44
2015-03-30T01:31:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,500
java
/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * Copyright (c) 2003-2006 TU/e Eindhoven * by Eindhoven University of Technology * Department of Information Systems * http://is.tm.tue.nl * ************************************************************************/ package org.prom5.analysis.clusteranalysis; import java.awt.BorderLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSplitPane; import javax.swing.JTabbedPane; import org.prom5.analysis.petrinet.cpnexport.CpnUtils; import org.prom5.analysis.traceclustering.model.Cluster; import org.prom5.analysis.traceclustering.model.ClusterSet; import org.prom5.analysis.traceclustering.profile.AggregateProfile; import weka.classifiers.Classifier; import weka.core.Attribute; import weka.core.FastVector; import weka.core.Instance; import weka.core.Instances; /** * Class holding the machine learning settings and performing * the actual data mining tasks (with the help of the weka library). * * @author arozinat (a.rozinat@tm.tue.nl) */ public class ClusterDecisionAnalyzer { // for gui protected JPanel resultPanel = null; protected JSplitPane resultSplitPanel; protected JPanel left = null; protected JTabbedPane tabbedPane = null; protected JPanel treeViewPanel = null; protected JPanel algorithmViewPanel = null; protected JPanel evaluationViewPanel = null; protected JCheckBox[] checks; /** * The data mining classifier to be used for analysis. */ protected DecisionAnalyzer dAnalyzer; protected Classifier myClassifier; protected ClusterSet clusters; protected AggregateProfile agProfiles; private void initPanel() { left = new JPanel(new BorderLayout()); tabbedPane = new JTabbedPane(3); treeViewPanel = new JPanel(new BorderLayout()); algorithmViewPanel = new JPanel(new BorderLayout()); evaluationViewPanel = new JPanel(new BorderLayout()); tabbedPane.add(treeViewPanel,"Result",0); tabbedPane.add(algorithmViewPanel, "Algorithm",1); tabbedPane.add(evaluationViewPanel, "Evaluation",2); resultSplitPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, left, tabbedPane); resultSplitPanel.setDividerLocation(150); resultSplitPanel.setResizeWeight(0.5); resultSplitPanel.setOneTouchExpandable(true); resultPanel = new JPanel(new BorderLayout()); resultPanel.add(resultSplitPanel); // left panel // button JPanel p_top = new JPanel(new BorderLayout()); JButton startButton = new JButton("analyze"); startButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { exec(); } }); p_top.add(startButton); // check box JPanel p = new JPanel(new GridLayout(agProfiles.numberOfItems(), 1)); checks = new JCheckBox[agProfiles.numberOfItems()]; for(int i=0; i<agProfiles.numberOfItems();i++){ String name = CpnUtils.replaceSpecialCharacters(agProfiles.getItemKey(i)); checks[i] = new JCheckBox(name); checks[i].setSelected(true); p.add(checks[i]); } JScrollPane leftScrollPane = new JScrollPane(p); left.add(p_top,BorderLayout.NORTH); left.add(leftScrollPane,BorderLayout.CENTER); } public JCheckBox[] getChecks(){ return checks; } public void exec() { dAnalyzer.analyse(this); } public JPanel analyse(ClusterSet aClusters) { this.clusters = aClusters; agProfiles = clusters.getAGProfiles(); dAnalyzer = new ClusterJ48Analyzer(); // dAnalyzer = new DecisionStumpAnalyzer(); dAnalyzer.initClassifier(); initPanel(); setAlgorithmVisualization(dAnalyzer.getParametersPanel()); return resultPanel; } /** * Creates a decision tree visualization for the current classification problem. * @return the panel to be displayed as analysis result for the current decision point */ protected void setResultVisualization(JPanel result) { treeViewPanel.removeAll(); treeViewPanel.add(result); treeViewPanel.revalidate(); } /** * Creates a decision tree visualization for the current classification problem. * @return the panel to be displayed as analysis result for the current decision point */ protected void setAlgorithmVisualization(JPanel result) { algorithmViewPanel.removeAll(); algorithmViewPanel.add(result); algorithmViewPanel.revalidate(); } /** * Creates a decision tree visualization for the current classification problem. * @return the panel to be displayed as analysis result for the current decision point */ protected void setEvaluationVisualization(JPanel result) { evaluationViewPanel.removeAll(); evaluationViewPanel.add(result); evaluationViewPanel.revalidate(); } public Instances getDataInfo() { // create attribute information FastVector attributeInfo = new FastVector(); // make attribute // clean the relevant attribute list and re-fill based on new selection scope for (int i = 0; i < agProfiles.numberOfItems(); i++) { if (checks[i].isSelected()) { String name = CpnUtils.replaceSpecialCharacters(agProfiles. getItemKey(i)); Attribute wekaAtt = new Attribute(name); attributeInfo.addElement(wekaAtt); } } // for target concept FastVector my_nominal_values = new FastVector(clusters.getClusters().size()); Attribute targetConcept = null; for (Cluster aCluster : clusters.getClusters()) { my_nominal_values.addElement(aCluster.getName()); } targetConcept = new Attribute("Cluster", my_nominal_values); attributeInfo.addElement(targetConcept); attributeInfo.trimToSize(); // learning Instances data = new Instances("Clustering", attributeInfo, 0); data.setClassIndex(data.numAttributes() - 1); for (Cluster aCluster : clusters.getClusters()) { String clusterName = aCluster.getName(); for (Integer i : aCluster.getTraceIndices()) { Instance instance0 = new Instance(attributeInfo.size()); for (int j = 0; j < agProfiles.numberOfItems(); j++) { if (checks[j].isSelected()) { String name = CpnUtils.replaceSpecialCharacters(agProfiles.getItemKey(j)); Attribute wekaAtt = data.attribute(name); if (wekaAtt != null) { double doubleAttValue = (new Double(agProfiles.getValue(i, j))).doubleValue(); instance0.setValue(wekaAtt, doubleAttValue); } else { System.out.println("fail to add"); } } } instance0.setDataset(data); instance0.setClassValue(clusterName); data.add(instance0); } } return data; } }
[ "apromore@gmail.com" ]
apromore@gmail.com
68344135e40cbede4783e2b1f53882b06f998228
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13546-2-26-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/model/reference/EntityReference_ESTest.java
0bbb338b5a411619660cdd758b700fd20b3c2090
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
818
java
/* * This file was automatically generated by EvoSuite * Tue Apr 07 18:23:45 UTC 2020 */ package org.xwiki.model.reference; 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.model.EntityType; import org.xwiki.model.reference.EntityReference; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class EntityReference_ESTest extends EntityReference_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { EntityType entityType0 = EntityType.OBJECT; EntityReference entityReference0 = new EntityReference((String) null, entityType0); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
e45884409324e7667f9b3c9f9afc02f7580526bc
c871059fd202d07644f4fea92dbd3645b213427d
/Projects/Game2DLibraryAndExamples/libgame2d/src/main/java/org/osdg/game2d/Label.java
8891d87d5e15dbd8b0739d2a8f808f6391dd7976
[]
no_license
doncc/android-game2d
5c339afc8dad8444779a35ddc1b067d897830153
b61a1d765f714637f8812705f869dd55c1839122
refs/heads/master
2020-12-25T15:50:48.624118
2015-09-08T03:45:50
2015-09-08T03:45:50
42,088,791
1
0
null
2015-09-08T03:50:14
2015-09-08T03:50:11
null
UTF-8
Java
false
false
335
java
package org.osdg.game2d; /** * Created by plter on 8/30/15. */ public class Label extends Node { @Override native long createNativeObject(); public void setString(String str){ nativeSetString(getNativeObjectPointer(),str); } private native void nativeSetString(long nativeObjectPointer, String str); }
[ "xtiqin@163.com" ]
xtiqin@163.com
6cb67e802ac779ef852d110996af7fb47cd3af44
9e143e940cfb7399eed6ba4a671549898cc378dd
/app/src/main/java/com/koreandrama/newappkorean/network/apis/ProfileApi.java
11098473f8f3752fde211898a3430bcac9614105
[]
no_license
fandofastest/kdramanew
7eba6f913b5f1cdd2d58fc88ffa39b49c9ab3230
34f6b3978b10a0de345f12fb8eea7fb88bb25849
refs/heads/master
2021-05-25T07:55:31.274255
2020-05-08T08:04:03
2020-05-08T08:04:03
253,727,819
0
0
null
null
null
null
UTF-8
Java
false
false
863
java
package com.koreandrama.newappkorean.network.apis; import android.net.Uri; import com.koreandrama.newappkorean.network.model.ResponseStatus; import retrofit2.Call; import retrofit2.http.Field; import retrofit2.http.FormUrlEncoded; import retrofit2.http.Header; import retrofit2.http.POST; public interface ProfileApi { @FormUrlEncoded @POST("update_profile") Call<ResponseStatus> updateProfile(@Header("API-KEY") String apiKey, @Field("id") String id, @Field("name") String name, @Field("email") String email, @Field("password") String password, @Field("photo") Uri imageUri, @Field("gender") String gender); }
[ "fandofast@gmail.com" ]
fandofast@gmail.com
044fbeac8f332b629935562adfb35e5e00ccfa58
3be03930b41ccd9b3b4e1c9e005c65b5e1cf04dd
/basic-example/target/generated-sources/main/java/com/company/sakila/db0/sakila/customer/Customer.java
c13d2bc9909cd5b00027188c7b2975488b69f59c
[]
no_license
speedment/user-guide-code-samples
6bd76aba0bab8b5620c50d7ca42218aa6f6e04a3
cd4880de8d6b589e321f61ab560126d6f44a916c
refs/heads/master
2020-09-09T14:12:49.040838
2019-12-05T15:48:02
2019-12-05T15:48:02
221,468,047
2
3
null
null
null
null
UTF-8
Java
false
false
382
java
package com.company.sakila.db0.sakila.customer; import com.company.sakila.db0.sakila.customer.generated.GeneratedCustomer; /** * The main interface for entities of the {@code customer}-table in the * database. * <p> * This file is safe to edit. It will not be overwritten by the code generator. * * @author company */ public interface Customer extends GeneratedCustomer {}
[ "minborg@speedment.com" ]
minborg@speedment.com
61a92568a1c63635b70fe2faf9a27706b123fe49
cb95fdf9edcbd907794b8c0aaa2316277a2138b8
/src/com/wipro/timetracker/util/CarDemo.java
beedd2033233003d873bc9c2c0f105ac5ddfb128
[]
no_license
ashgit1/timetracker
91182473694c3c0f37cc673864240cafefa2cee2
f06ba2c635cddc417be3e142f13c96e5375059f3
refs/heads/master
2021-01-18T23:37:15.130899
2016-05-31T11:03:10
2016-05-31T11:03:10
46,566,095
0
0
null
null
null
null
UTF-8
Java
false
false
525
java
package com.wipro.timetracker.util; public class CarDemo { public static void main(String[] args) { Car a = new Car(); Car b = new Ferrari(); // Car ref, but a Ferrari object a.start(); // Runs the Car version of start() b.start(); // Runs the Ferrari version of start() } } class Car { public void start() { System.out.println("This is a Generic start to any Car"); } } class Ferrari extends Car { public void start() { System.out .println("Lets start the Ferrari and go out for a cool Party."); } }
[ "adoreashish@gmail.com" ]
adoreashish@gmail.com
9ebfd59d4a22486b76ac411ab76b3b64a2505aa6
394ae5d9dbce6a1e8b63cf74084591879fde98cd
/src/main/java/com/mashibing/service/impl/TblNetdiskUrlServiceImpl.java
23bfd6e38dddb3c5dcebb23620e54603a51da049
[]
no_license
zhaoyayun199087/hejiayun
591a8a19f725c61d51bb900435dad0bc320197da
74e216dab60bb986fd8ed4c0be61ee448c4e39af
refs/heads/master
2023-01-07T23:55:29.477605
2020-11-06T10:30:29
2020-11-06T10:30:29
310,270,973
0
0
null
null
null
null
UTF-8
Java
false
false
535
java
package com.mashibing.service.impl; import com.mashibing.bean.TblNetdiskUrl; import com.mashibing.mapper.TblNetdiskUrlMapper; import com.mashibing.service.TblNetdiskUrlService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; /** * <p> * 网络硬盘路径 服务实现类 * </p> * * @author lian * @since 2020-11-05 */ @Service public class TblNetdiskUrlServiceImpl extends ServiceImpl<TblNetdiskUrlMapper, TblNetdiskUrl> implements TblNetdiskUrlService { }
[ "li.min@intellif.com" ]
li.min@intellif.com
953202a07ca1310c5352f7467638d8549990056e
14d083e172837377a0bc3e9b2b031c058e75a4aa
/src/GameInterfaces/SkillItems/Thief/ILockPick.java
e619b8c20e25033f4abba5f9f981575a6f64ea7a
[]
no_license
wgres101/NECROTEK3Dv2
478b708936b4dcfd9aa7f9b949e23bfa3e61bd43
4f57b5f56fc2fa6406d2ce6ed5fdce21964fd483
refs/heads/master
2020-12-18T18:58:42.660286
2017-08-10T23:23:29
2017-08-10T23:23:29
235,483,578
0
0
null
null
null
null
UTF-8
Java
false
false
149
java
package GameInterfaces.SkillItems.Thief; import GameInterfaces.SkillItems.IBaseSkillItems; public interface ILockPick extends IBaseSkillItems { }
[ "ted_gress@yahoo.com" ]
ted_gress@yahoo.com
52399d7319513dff411a6b46d8c1234b2ba0289e
ffd01501bb53bfaaf180da7719e94a5459a996ee
/Module2/Java/src/ss13_searching_algorithms/practice/BinarySearch.java
c46aeb7e717bd8171c542a08935f1354d88c6735
[]
no_license
huuhan2507/C1020G1-Tranhuuhan
6b01b85e8c7d1bd585fc66365a965c3df5ee80a4
e42f7089c1b5318439c311115ed8d94afe8ae146
refs/heads/main
2023-04-19T15:46:38.638524
2021-05-11T12:14:08
2021-05-11T12:14:08
331,478,784
0
2
null
null
null
null
UTF-8
Java
false
false
929
java
package ss13_searching_algorithms.practice; public class BinarySearch { static int[] list = {2, 4, 7, 10, 11, 45, 50, 59, 60, 66, 69, 70, 79}; static int binarySearch(int[] list, int key) { int low = 0; int high = list.length - 1; while (high >= low) { int mid = (low + high) / 2; if (key < list[mid]) high = mid - 1; else if (key == list[mid]) return mid; else low = mid + 1; } return -1; } public static void main(String[] args) { System.out.println( binarySearch( list, 2 ) ); System.out.println( binarySearch( list, 11 ) ); System.out.println( binarySearch( list, 79 ) ); System.out.println( binarySearch( list, 1 ) ); System.out.println( binarySearch( list, 5 ) ); System.out.println( binarySearch( list, 80 ) ); } }
[ "you@example.com" ]
you@example.com
29e2f9083c9f0bd896298ce1c57d7a792a186596
8e3bac5550f21585d604877cee091c8f72b52d79
/MicroBlog1/src/pj2/RelationOperator.java
c2b4117bf72c7d9b8969e86014268953a8183285
[]
no_license
fanjingdan012/microblog
94be19e84d1692746c97105eeb9cb5de9c673e2b
9743ddae303e3f7d50f270aeef6c573f522dbb2b
refs/heads/master
2021-08-23T14:21:43.320048
2017-12-05T06:54:56
2017-12-05T06:54:56
113,141,057
0
0
null
null
null
null
UTF-8
Java
false
false
7,077
java
package pj2; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.List; public class RelationOperator { //Here defines how to connector the database. private static final String connectionString ="jdbc:mysql://localhost:3306/microblog"; //name for mysql, 'root' by default. private static final String dbUsername = "root"; //user password for mysql, change to yours. private static final String dbPassword = "207710"; //the SQL statement which operates with relation private static final String Focus = "INSERT INTO `microblog`.`relation`(source,target)VALUES(?,?);"; private static final String Unfocus = "DELETE FROM `microblog`.`relation` where source = ? and target = ?"; private static final String GetFocusing = "SELECT * FROM `microblog`.`relation` where source = ?"; private static final String GetFans = "SELECT * FROM `microblog`.`relation` where target = ?"; private static final String GetRelation = "SELECT * FROM `microblog`.`relation` where source = ? and target = ?"; //the SQL statement which operates with user private static final String UpdateFansA = "UPDATE `microblog`.`user` SET fans = fans+1 where iduser = ?"; private static final String UpdateFocusingA = "UPDATE `microblog`.`user` SET focusing = focusing+1 where iduser = ?"; private static final String UpdateFansM = "UPDATE `microblog`.`user` SET fans = fans-1 where iduser = ?"; private static final String UpdateFocusingM = "UPDATE `microblog`.`user` SET focusing = focusing-1 where iduser = ?"; /** * focus:insert to database relation * add fans * add focusing * @param iduserSource * @param focusingSource * @param nicknameTarget * @return * @throws SQLException */ public static boolean focus(int iduserSource,int iduserTarget) throws SQLException{ Connection c = DriverManager.getConnection(connectionString,dbUsername, dbPassword); PreparedStatement ps = null; ResultSet rs = null; try { ps = c.prepareStatement(Focus,Statement.RETURN_GENERATED_KEYS); ps.setInt(1, iduserSource); ps.setInt(2, iduserTarget); ps.executeUpdate(); System.out.println("before rs"); System.out.println("before update"); /*the focusing of source ++*/ ps=c.prepareStatement(UpdateFocusingA,Statement.RETURN_GENERATED_KEYS); ps.setInt(1, iduserSource); ps.executeUpdate(); /*the fans of target ++*/ ps=c.prepareStatement(UpdateFansA,Statement.RETURN_GENERATED_KEYS); ps.setInt(1, iduserTarget); ps.executeUpdate(); System.out.println("before true"); return true; }catch (SQLException e) { e.printStackTrace(); }finally { //Notice!Always close the connection after using. if (ps != null) { ps.close(); } if (c != null) { c.close(); } } return false; } /** * unfocus */ public static boolean unfocus(int iduserSource,int iduserTarget) throws SQLException{ Connection c = DriverManager.getConnection(connectionString,dbUsername, dbPassword); PreparedStatement ps = null; ResultSet rs = null; try { ps = c.prepareStatement(Unfocus,Statement.RETURN_GENERATED_KEYS); ps.setInt(1, iduserSource); ps.setInt(2, iduserTarget); ps.executeUpdate(); /*the focusing of source ++*/ ps=c.prepareStatement(UpdateFocusingM,Statement.RETURN_GENERATED_KEYS); ps.setInt(1, iduserSource); ps.executeUpdate(); /*the fans of target ++*/ ps=c.prepareStatement(UpdateFansM,Statement.RETURN_GENERATED_KEYS); ps.setInt(1, iduserTarget); ps.executeUpdate(); System.out.println("before true"); return true; }catch (SQLException e) { e.printStackTrace(); }finally { //Notice!Always close the connection after using. if (ps != null) { ps.close(); } if (c != null) { c.close(); } } return false; } /** * find all users you are focusing * @param source * @return * @throws SQLException */ /*GetFocusingUserSQL = "SELECT * FROM `microblog`.`relation` where source = ?"; */ public static List<Integer> getAllFocusingIdusers(int source)throws SQLException{ List<Integer> focusingIdusers = new ArrayList<Integer>(); Connection c = DriverManager.getConnection(connectionString,dbUsername, dbPassword); PreparedStatement ps = null; ResultSet rs = null; try { ps = c.prepareStatement(GetFocusing);//prepare the statement according to the SQL statement. ps.setInt(1,source); rs = ps.executeQuery();//Execute the Query //get data line by line. //stops if rs.next() is false, which means no more lines available while (rs.next()) { int target = rs.getInt("target");//get int value focusingIdusers.add(target);//add this User to the list } } catch (SQLException e) { e.printStackTrace(); } finally { //Notice!Always close the connection after using. if (rs != null) { rs.close(); } if (ps != null) { ps.close(); } if (c != null) { c.close(); } } return focusingIdusers; } /** * find all fans of you * @param target * @return * @throws SQLException */ /*GetFansSQL = "SELECT * FROM `microblog`.`relation` where target = ?";*/ public static List getAllFans(int target) throws SQLException { List fans = new ArrayList(); Connection c = DriverManager.getConnection(connectionString,dbUsername, dbPassword); PreparedStatement ps = null; ResultSet rs = null; try { ps = c.prepareStatement(GetFans);//prepare the statement according to the SQL statement. ps.setInt(1, target); rs = ps.executeQuery();//Execute the Query //get data line by line. //stops if rs.next() is false, which means no more lines available while (rs.next()) { int idfans = rs.getInt("source");//get int value fans.add(idfans); } } catch (SQLException e) { e.printStackTrace(); } finally { //Notice!Always close the connection after using. if (rs != null) { rs.close(); } if (ps != null) { ps.close(); } if (c != null) { c.close(); } } return fans; } public static boolean isFocusing(int iduserSource, int iduserTarget) throws SQLException{ Connection c = DriverManager.getConnection(connectionString,dbUsername, dbPassword); PreparedStatement ps = null; ResultSet rs = null; try { ps = c.prepareStatement(GetRelation);//prepare the statement according to the SQL statement. ps.setInt(1, iduserSource); ps.setInt(2, iduserTarget); rs = ps.executeQuery();//Execute the Query //get data line by line. //stops if rs.next() is false, which means no more lines available if (rs.next()) { return true; } } catch (SQLException e) { e.printStackTrace(); } finally { //Notice!Always close the connection after using. if (rs != null) { rs.close(); } if (ps != null) { ps.close(); } if (c != null) { c.close(); } } return false; } }
[ "judy.fan@sap.com" ]
judy.fan@sap.com
73c6155122e93f8e25d3dd02630f49df75a6b611
90601cfdec064b48a7e881e4f6281355e6d8b4a1
/game_server/src/com/gameserver/bazoo/data/HumanInfo.java
3fd5d93c9c891e2ff0f20a45ef663f2ecc785286
[]
no_license
npf888/game
86a6e63e2e055d997af43e7fbb655c892a399dbb
f73eec261e17ec5a09950cf6b5b172e02dc8dde0
refs/heads/master
2020-03-21T22:33:56.413814
2018-06-29T10:57:54
2018-06-29T10:57:54
139,134,346
2
0
null
null
null
null
UTF-8
Java
false
false
501
java
package com.gameserver.bazoo.data; import com.gameserver.human.Human; import com.gameserver.player.Player; public class HumanInfo extends Human{ private long curPassportId; public HumanInfo(Player player) { super(player); } @Override public long getPassportId() { return this.curPassportId; } public long getCurPassportId() { return curPassportId; } public void setCurPassportId(long curPassportId) { this.curPassportId = curPassportId; } }
[ "npf888@126.com" ]
npf888@126.com
ea8299839b7fb2672f135932b5f8abd6ba08957d
f1a85ae8b9d5d9d9a848c4c8d9c2410b9726e194
/driver/app/src/androidTest/java/com/yaoguang/driver/order/LocationHistoryManagerTest.java
45dd20a8b1944b8db6971522cdffcb206da1ad6b
[]
no_license
P79N6A/as
45dc7c76d58cdc62e3e403c9da4a1c16c4234568
a57ee2a3eb2c73cc97c3fb130b8e389899b19d99
refs/heads/master
2020-04-20T05:55:10.175425
2019-02-01T08:49:15
2019-02-01T08:49:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,333
java
package com.yaoguang.driver.order; import android.content.Context; import android.support.multidex.MultiDex; import android.support.test.InstrumentationRegistry; import com.yaoguang.greendao.entity.DriverOrderProgressWrapper; import com.yaoguang.map.location.impl.LocationHistoryManager; import org.junit.After; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; /** * 文件名: * 描 述: * 作 者:韦理英 * 时 间:2017/8/1 0001. * 版 权: */ public class LocationHistoryManagerTest { private LocationHistoryManager locationHistoryManager; private Context appContext; @Before public void setUp() throws Exception { appContext = InstrumentationRegistry.getTargetContext(); MultiDex.install(appContext); locationHistoryManager = new LocationHistoryManager(); DriverOrderProgressWrapper driverOrderProgressWrapper = new DriverOrderProgressWrapper(); driverOrderProgressWrapper.setOrderId("1"); driverOrderProgressWrapper.setOrderSn("2"); driverOrderProgressWrapper.setNodeId("3"); driverOrderProgressWrapper.setNodeName("4"); } @After public void tearDown() throws Exception { locationHistoryManager.destroyLocation(); } @Test public void destroyLocation() throws Exception { locationHistoryManager.destroyLocation(); assertEquals(locationHistoryManager.locationClient, null); } @Test public void getAllCache() throws Exception { locationHistoryManager.getAllCache(); } @Test public void getCache() throws Exception { } @Test public void getMap() throws Exception { } @Test public void getJson() throws Exception { } @Test public void removeCache() throws Exception { } @Test public void saveCacheAndInit() throws Exception { } @Test public void saveCache() throws Exception { } @Test public void addHistory() throws Exception { } @Test public void sendToServer() throws Exception { } @Test public void getObserver() throws Exception { } @Test public void onLocationChanged() throws Exception { } @Test public void getDriverId() throws Exception { } }
[ "254191389@qq.com" ]
254191389@qq.com
a0d6b1ffca20d258069bd82f451fef1a5314c80d
49d713097713ed8b191d3ec4d374c0d089996943
/OpenCalaisAnnotatorGroovy/src/main/java/org/apache/uima/calaisType/relation/CompanyLocation.java
81877a3f0865722dc3e734e47aceeed4f2f6e197
[ "Apache-2.0" ]
permissive
kidaak/uima-sandbox
695a4a1ff2806f6c97ebf7c2f5bb678b00a6ee08
f9946d882cbf0a03d230f557f753aaa86d8ec70f
refs/heads/trunk
2021-01-22T01:33:47.034241
2014-10-27T19:13:52
2014-10-27T19:13:52
47,804,927
0
0
null
2015-12-11T04:22:23
2015-12-11T04:22:22
null
UTF-8
Java
false
false
5,316
java
/* First created by JCasGen Mon May 26 21:43:19 EDT 2008 */ package org.apache.uima.calaisType.relation; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.JCasRegistry; import org.apache.uima.jcas.cas.TOP_Type; import org.apache.uima.calaisType.Relation; import org.apache.uima.calaisType.entity.Country; import org.apache.uima.calaisType.entity.Company; import org.apache.uima.calaisType.entity.ProvinceOrState; import org.apache.uima.calaisType.entity.City; /** * Updated by JCasGen Mon May 26 21:43:19 EDT 2008 * XML source: C:/a/Eclipse/3.3/apache/OpenCalaisAnnotatorGroovy/src/main/descriptors/CalaisTestCollectionReader.xml * @generated */ public class CompanyLocation extends Relation { /** @generated * @ordered */ public final static int typeIndexID = JCasRegistry.register(CompanyLocation.class); /** @generated * @ordered */ public final static int type = typeIndexID; /** @generated */ public int getTypeIndexID() {return typeIndexID;} /** Never called. Disable default constructor * @generated */ protected CompanyLocation() {} /** Internal - constructor used by generator * @generated */ public CompanyLocation(int addr, TOP_Type type) { super(addr, type); readObject(); } /** @generated */ public CompanyLocation(JCas jcas) { super(jcas); readObject(); } /** <!-- begin-user-doc --> * Write your own initialization here * <!-- end-user-doc --> @generated modifiable */ private void readObject() {} //*--------------* //* Feature: company /** getter for company - gets * @generated */ public Company getCompany() { if (CompanyLocation_Type.featOkTst && ((CompanyLocation_Type)jcasType).casFeat_company == null) jcasType.jcas.throwFeatMissing("company", "org.apache.uima.calaisType.relation.CompanyLocation"); return (Company)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((CompanyLocation_Type)jcasType).casFeatCode_company)));} /** setter for company - sets * @generated */ public void setCompany(Company v) { if (CompanyLocation_Type.featOkTst && ((CompanyLocation_Type)jcasType).casFeat_company == null) jcasType.jcas.throwFeatMissing("company", "org.apache.uima.calaisType.relation.CompanyLocation"); jcasType.ll_cas.ll_setRefValue(addr, ((CompanyLocation_Type)jcasType).casFeatCode_company, jcasType.ll_cas.ll_getFSRef(v));} //*--------------* //* Feature: city /** getter for city - gets * @generated */ public City getCity() { if (CompanyLocation_Type.featOkTst && ((CompanyLocation_Type)jcasType).casFeat_city == null) jcasType.jcas.throwFeatMissing("city", "org.apache.uima.calaisType.relation.CompanyLocation"); return (City)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((CompanyLocation_Type)jcasType).casFeatCode_city)));} /** setter for city - sets * @generated */ public void setCity(City v) { if (CompanyLocation_Type.featOkTst && ((CompanyLocation_Type)jcasType).casFeat_city == null) jcasType.jcas.throwFeatMissing("city", "org.apache.uima.calaisType.relation.CompanyLocation"); jcasType.ll_cas.ll_setRefValue(addr, ((CompanyLocation_Type)jcasType).casFeatCode_city, jcasType.ll_cas.ll_getFSRef(v));} //*--------------* //* Feature: provinceorstate /** getter for provinceorstate - gets * @generated */ public ProvinceOrState getProvinceorstate() { if (CompanyLocation_Type.featOkTst && ((CompanyLocation_Type)jcasType).casFeat_provinceorstate == null) jcasType.jcas.throwFeatMissing("provinceorstate", "org.apache.uima.calaisType.relation.CompanyLocation"); return (ProvinceOrState)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((CompanyLocation_Type)jcasType).casFeatCode_provinceorstate)));} /** setter for provinceorstate - sets * @generated */ public void setProvinceorstate(ProvinceOrState v) { if (CompanyLocation_Type.featOkTst && ((CompanyLocation_Type)jcasType).casFeat_provinceorstate == null) jcasType.jcas.throwFeatMissing("provinceorstate", "org.apache.uima.calaisType.relation.CompanyLocation"); jcasType.ll_cas.ll_setRefValue(addr, ((CompanyLocation_Type)jcasType).casFeatCode_provinceorstate, jcasType.ll_cas.ll_getFSRef(v));} //*--------------* //* Feature: country /** getter for country - gets * @generated */ public Country getCountry() { if (CompanyLocation_Type.featOkTst && ((CompanyLocation_Type)jcasType).casFeat_country == null) jcasType.jcas.throwFeatMissing("country", "org.apache.uima.calaisType.relation.CompanyLocation"); return (Country)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((CompanyLocation_Type)jcasType).casFeatCode_country)));} /** setter for country - sets * @generated */ public void setCountry(Country v) { if (CompanyLocation_Type.featOkTst && ((CompanyLocation_Type)jcasType).casFeat_country == null) jcasType.jcas.throwFeatMissing("country", "org.apache.uima.calaisType.relation.CompanyLocation"); jcasType.ll_cas.ll_setRefValue(addr, ((CompanyLocation_Type)jcasType).casFeatCode_country, jcasType.ll_cas.ll_getFSRef(v));} }
[ "schor@apache.org" ]
schor@apache.org
3936a0fde5875ae2cca8d3c0248b732979d466de
c8648d6ecdbc910d46cd92805f20559a298c220a
/PageValidations/src/main/java/org/automation/selenium/validation/components/ValidatePagination.java
6c0b0b75bc3f8a6600f9542bada5f0f5a734b7b1
[]
no_license
sarkershantonu/SeleniumUtilities
161e4c6f5b442bb9659b722b3a5b228ed66abc1d
477abb5de9c79357ccca30840418199e44d9526c
refs/heads/master
2021-04-28T23:36:07.484783
2019-03-21T03:29:10
2019-03-21T03:29:10
77,730,710
1
1
null
null
null
null
UTF-8
Java
false
false
448
java
package org.automation.selenium.validation.components; import org.automation.selenium.validation.ValidateWebElement; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; /** * Created by shantonu on 8/28/16. */ public class ValidatePagination extends ValidateWebElement { public ValidatePagination(WebElement webElement) { super(webElement); } public ValidatePagination(By by) { super(by); } }
[ "shantonu_oxford@yahoo.com" ]
shantonu_oxford@yahoo.com
1ffba457914fe592811506a50e0313a3a502209b
217581cd6867aaf77870603dcdaf7a63bb79cb2c
/ntuzy_springboot_filter/src/main/java/com/ntuzy/demo/filter/LoginFilter.java
732a42d400e6ea26a8d7f4b34f056e52d6ae624a
[]
no_license
IamZY/SpringBoot
783752b33814ab009426360f305f56eca3447df6
0584f3348abd6310a54769860f7cc618b1aac586
refs/heads/master
2020-04-18T12:37:56.361262
2020-02-25T09:04:34
2020-02-25T09:04:34
167,539,460
0
0
null
null
null
null
UTF-8
Java
false
false
1,258
java
package com.ntuzy.demo.filter; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.annotation.WebFilter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; //@WebFilter(urlPatterns="/api/*",filterName="LoginFilter") public class LoginFilter implements Filter{ @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { // TODO Auto-generated method stub HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) res; String username = request.getParameter("username"); if ("admin".equals(username)) { chain.doFilter(req, res); } else { return; } } @Override public void destroy() { // TODO Auto-generated method stub System.out.println("dwstory LoginFilter..."); } @Override public void init(FilterConfig filterConfig) throws ServletException { // TODO Auto-generated method stub System.out.println("init LoginFilter..."); } }
[ "562018301@qq.com" ]
562018301@qq.com
3d6790ec5d6fcc5145d69c3b5d691f320ac7fc55
f2c0313293429a667c31604d0e4cc07ae6e476d2
/src/day43/Starbucks.java
5089755fe3cfbd9f9f9d7473356636c6070c3734
[]
no_license
sezginhmrc/FirstProject
dae3bd11bedb1b48ed993aebbe9ca29f50d3a452
b8f427643097c98570333a2ac5a8420bcfad0c4a
refs/heads/master
2021-01-14T04:20:41.197988
2020-05-14T08:18:15
2020-05-14T08:18:15
242,597,043
0
0
null
null
null
null
UTF-8
Java
false
false
1,381
java
package day43; import java.util.*; public class Starbucks { // we enter our program here in main method public static void main(String[] args) { Coffee c1 = new Coffee(); // We used no arg constructor System.out.println("c1 = " + c1); // we can use setter if we createed in instance field // c1.setType("Turkish"); // c1.setCaffeineLevel(10); // c1.setPrice(-4.99); Coffee latte = new Coffee("blonde",3,3.50); System.out.println("c1 = " + c1); // toString method Coffee c2 = new Coffee("Pike",5,2.85); System.out.println("c2 = " + c2); Coffee c3 = new Coffee("Latte",4,-1); // price turns 1.0 System.out.println("c3 = " + c3); // sum of all coffee prices double sumOfAllCoffees = c1. getPrice() + c2. getPrice() + c3. getPrice(); System.out.println("sumOfAllCoffees = " + sumOfAllCoffees); // any non primitive type can be assigned to null String str = null; Scanner scan = null; Coffee cx = null; // i created 3 object without address(null) // unreferenced List<String> lst = new ArrayList<>(); lst.add("abc"); lst.add(null); lst.add(null); System.out.println("lst.toString() = " + lst.toString()); } }
[ "sezginhamurcu@icloud.com" ]
sezginhamurcu@icloud.com
a956cf9e639e325fcb98ad2151fc994f1f113724
aa8a3972d192dc27805b6c564e6bd5a34eb34636
/examples/adwords_axis/src/main/java/adwords/axis/v201402/basicoperations/DeleteCampaign.java
9e4e274b0578e63daf127b18f06db419bbb6a8ff
[ "Apache-2.0" ]
permissive
nafae/developer
201e76ef6909097b07936dbc7f4ef05660fe2a26
ea3ad63c72009c83c2cdbeebfc3868905a188166
refs/heads/master
2021-01-19T17:48:32.453689
2014-11-11T22:17:32
2014-11-11T22:17:32
26,411,286
0
1
null
null
null
null
UTF-8
Java
false
false
3,458
java
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package adwords.axis.v201402.basicoperations; import com.google.api.ads.adwords.axis.factory.AdWordsServices; import com.google.api.ads.adwords.axis.v201402.cm.Campaign; import com.google.api.ads.adwords.axis.v201402.cm.CampaignOperation; import com.google.api.ads.adwords.axis.v201402.cm.CampaignReturnValue; import com.google.api.ads.adwords.axis.v201402.cm.CampaignServiceInterface; import com.google.api.ads.adwords.axis.v201402.cm.CampaignStatus; import com.google.api.ads.adwords.axis.v201402.cm.Operator; import com.google.api.ads.adwords.lib.client.AdWordsSession; import com.google.api.ads.common.lib.auth.OfflineCredentials; import com.google.api.ads.common.lib.auth.OfflineCredentials.Api; import com.google.api.client.auth.oauth2.Credential; /** * This example deletes a campaign by setting the status to 'DELETED'. To get * campaigns, run GetCampaigns.java. * * Credentials and properties in {@code fromFile()} are pulled from the * "ads.properties" file. See README for more info. * * Tags: CampaignService.mutate * * @author Kevin Winter */ public class DeleteCampaign { public static void main(String[] args) throws Exception { // Generate a refreshable OAuth2 credential similar to a ClientLogin token // and can be used in place of a service account. Credential oAuth2Credential = new OfflineCredentials.Builder() .forApi(Api.ADWORDS) .fromFile() .build() .generateCredential(); // Construct an AdWordsSession. AdWordsSession session = new AdWordsSession.Builder() .fromFile() .withOAuth2Credential(oAuth2Credential) .build(); long campaignId = Long.parseLong("INSERT_CAMPAIGN_ID_HERE"); AdWordsServices adWordsServices = new AdWordsServices(); runExample(adWordsServices, session, campaignId); } public static void runExample( AdWordsServices adWordsServices, AdWordsSession session, long campaignId) throws Exception { // Get the CampaignService. CampaignServiceInterface campaignService = adWordsServices.get(session, CampaignServiceInterface.class); // Create campaign with DELETED status. Campaign campaign = new Campaign(); campaign.setId(campaignId); campaign.setStatus(CampaignStatus.DELETED); // Create operations. CampaignOperation operation = new CampaignOperation(); operation.setOperand(campaign); operation.setOperator(Operator.SET); CampaignOperation[] operations = new CampaignOperation[] {operation}; // Delete campaign. CampaignReturnValue result = campaignService.mutate(operations); // Display campaigns. for (Campaign campaignResult : result.getValue()) { System.out.println("Campaign with name \"" + campaignResult.getName() + "\" and id \"" + campaignResult.getId() + "\" was deleted."); } } }
[ "jradcliff@google.com" ]
jradcliff@google.com
8f75dcf4c09b7217e4ee44cf115ec2a8569f5da1
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_partial/17538992.java
d24b623644696a9d7027b16ac8ab3e00ee0b256e
[]
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
465
java
class c17538992 { public static boolean check(String urlStr) { try { URL url = new URL(urlStr); HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.setConnectTimeout(2000); urlConnection.getContent(); } catch (Exception e) { logger.error("There is no internet connection", e); return false; } return true; } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
ca1451eadb63552ff424f2d15df8217cd6cf27fe
6e221fdfe75008ec333e5378cd8eb29d117c56f9
/services/esoko-payload/src/main/java/com/iexceed/esoko/jaxb/login/resetdtls/package-info.java
8039507bae5fa7b17300f68b79bf7321c6ade627
[]
no_license
siddhartha-Infy01/my-ref-code
3a7b90162681d4e499375567ef0811752d054a20
1b321808a6c8d66a6ccd21dc86b57277d14b1162
refs/heads/master
2021-01-21T12:30:48.304123
2017-05-19T10:41:54
2017-05-19T10:41:54
91,796,009
0
0
null
null
null
null
UTF-8
Java
false
false
553
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // 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: 2014.09.04 at 02:50:59 PM IST // @javax.xml.bind.annotation.XmlSchema(namespace = "http://www.iexceed.com/getUserDetails", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package com.iexceed.esoko.jaxb.login.resetdtls;
[ "spatasha@cisco.com" ]
spatasha@cisco.com
83a1d38bb3928dcfaec5ddd4f0dc9b414d692fd2
6c7e279a45b37d597297f999d5ee0c5adde8a29e
/src/main/java/com/alipay/api/domain/UseRule.java
aea2874daacb58e4c821d71242859e0450c44d83
[]
no_license
tomowork/alipay-sdk-java
a09fffb8a48c41561b36b903c87bdf5e881451f6
387489e4a326c27a7b9fb6d38ee0b33aa1a3568f
refs/heads/master
2021-01-18T03:55:00.944718
2017-03-22T03:52:16
2017-03-22T03:59:16
85,776,800
1
2
null
2017-03-22T03:59:18
2017-03-22T02:37:45
Java
UTF-8
Java
false
false
1,820
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 券的使用规则信息 * * @author auto create * @since 1.0, 2017-03-07 16:10:00 */ public class UseRule extends AlipayObject { private static final long serialVersionUID = 8529799939195938998L; /** * 扩展属性,无需设置 */ @ApiField("ext_info") private String extInfo; /** * 券的不可用时间 */ @ApiField("forbidden_time") private ForbbidenTime forbiddenTime; /** * 券核销的最低消费门槛,单位元 */ @ApiField("min_consume") private String minConsume; /** * 券适用门店列表 仅品牌商发起的招商活动可为空 直发奖类型活动必须与活动适用门店一致 最多支持10w家门店 */ @ApiListField("suit_shops") @ApiField("string") private List<String> suitShops; /** * 券可用时间段 */ @ApiListField("use_time") @ApiField("use_time") private List<UseTime> useTime; public String getExtInfo() { return this.extInfo; } public void setExtInfo(String extInfo) { this.extInfo = extInfo; } public ForbbidenTime getForbiddenTime() { return this.forbiddenTime; } public void setForbiddenTime(ForbbidenTime forbiddenTime) { this.forbiddenTime = forbiddenTime; } public String getMinConsume() { return this.minConsume; } public void setMinConsume(String minConsume) { this.minConsume = minConsume; } public List<String> getSuitShops() { return this.suitShops; } public void setSuitShops(List<String> suitShops) { this.suitShops = suitShops; } public List<UseTime> getUseTime() { return this.useTime; } public void setUseTime(List<UseTime> useTime) { this.useTime = useTime; } }
[ "zlei.huang@tomowork.com" ]
zlei.huang@tomowork.com
de522401f456370f4db0a6f74cdba7d94ec41cf3
19869bc44bb4ee4ddcd415cf3751f850bbf3b39e
/noark-asm/src/main/java/xyz/noark/asm/Handler.java
fc9c2f422c66a57851ac036a743257b39ff1871d
[ "LicenseRef-scancode-mulanpsl-1.0-en", "LicenseRef-scancode-unknown-license-reference", "MulanPSL-1.0" ]
permissive
xiaoe/noark3
30c049f0c96692a430e0a7d4f7802aa071f73bd8
610e44e01a21dfc846be6df415b5e3c06d8341f2
refs/heads/master
2022-12-24T23:48:41.536073
2022-09-16T05:51:50
2022-09-16T05:51:50
148,116,142
19
11
NOASSERTION
2022-10-04T23:54:28
2018-09-10T07:28:00
Java
UTF-8
Java
false
false
8,188
java
// ASM: a very small and fast Java bytecode manipulation framework // Copyright (c) 2000-2011 INRIA, France Telecom // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // 3. Neither the name of the copyright holders nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF // THE POSSIBILITY OF SUCH DAMAGE. package xyz.noark.asm; /** * Information about an exception handler. Corresponds to an element of the * exception_table array of a Code attribute, as defined in the Java Virtual * Machine Specification (JVMS). Handler instances can be chained together, with * their {@link #nextHandler} field, to describe a full JVMS exception_table * array. * * @see <a href= * "https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.3">JVMS * 4.7.3</a> * @author Eric Bruneton */ final class Handler { /** * The start_pc field of this JVMS exception_table entry. Corresponds to the * beginning of the exception handler's scope (inclusive). */ final Label startPc; /** * The end_pc field of this JVMS exception_table entry. Corresponds to the * end of the exception handler's scope (exclusive). */ final Label endPc; /** * The handler_pc field of this JVMS exception_table entry. Corresponding to * the beginning of the exception handler's code. */ final Label handlerPc; /** * The catch_type field of this JVMS exception_table entry. This is the * constant pool index of the internal name of the type of exceptions * handled by this handler, or 0 to catch any exceptions. */ final int catchType; /** * The internal name of the type of exceptions handled by this handler, or * {@literal null} to catch any exceptions. */ final String catchTypeDescriptor; /** The next exception handler. */ Handler nextHandler; /** * Constructs a new Handler. * * @param startPc the start_pc field of this JVMS exception_table entry. * @param endPc the end_pc field of this JVMS exception_table entry. * @param handlerPc the handler_pc field of this JVMS exception_table entry. * @param catchType The catch_type field of this JVMS exception_table entry. * @param catchTypeDescriptor The internal name of the type of exceptions * handled by this handler, or {@literal null} to catch any * exceptions. */ Handler(final Label startPc, final Label endPc, final Label handlerPc, final int catchType, final String catchTypeDescriptor) { this.startPc = startPc; this.endPc = endPc; this.handlerPc = handlerPc; this.catchType = catchType; this.catchTypeDescriptor = catchTypeDescriptor; } /** * Constructs a new Handler from the given one, with a different scope. * * @param handler an existing Handler. * @param startPc the start_pc field of this JVMS exception_table entry. * @param endPc the end_pc field of this JVMS exception_table entry. */ Handler(final Handler handler, final Label startPc, final Label endPc) { this(startPc, endPc, handler.handlerPc, handler.catchType, handler.catchTypeDescriptor); this.nextHandler = handler.nextHandler; } /** * Removes the range between start and end from the Handler list that begins * with the given element. * * @param firstHandler the beginning of a Handler list. May be * {@literal null}. * @param start the start of the range to be removed. * @param end the end of the range to be removed. Maybe {@literal null}. * @return the exception handler list with the start-end range removed. */ static Handler removeRange(final Handler firstHandler, final Label start, final Label end) { if (firstHandler == null) { return null; } else { firstHandler.nextHandler = removeRange(firstHandler.nextHandler, start, end); } int handlerStart = firstHandler.startPc.bytecodeOffset; int handlerEnd = firstHandler.endPc.bytecodeOffset; int rangeStart = start.bytecodeOffset; int rangeEnd = end == null ? Integer.MAX_VALUE : end.bytecodeOffset; // Return early if [handlerStart,handlerEnd[ and [rangeStart,rangeEnd[ // don't intersect. if (rangeStart >= handlerEnd || rangeEnd <= handlerStart) { return firstHandler; } if (rangeStart <= handlerStart) { if (rangeEnd >= handlerEnd) { // If [handlerStart,handlerEnd[ is included in // [rangeStart,rangeEnd[, remove firstHandler. return firstHandler.nextHandler; } else { // [handlerStart,handlerEnd[ - [rangeStart,rangeEnd[ = // [rangeEnd,handlerEnd[ return new Handler(firstHandler, end, firstHandler.endPc); } } else if (rangeEnd >= handlerEnd) { // [handlerStart,handlerEnd[ - [rangeStart,rangeEnd[ = // [handlerStart,rangeStart[ return new Handler(firstHandler, firstHandler.startPc, start); } else { // [handlerStart,handlerEnd[ - [rangeStart,rangeEnd[ = // [handlerStart,rangeStart[ + [rangeEnd,handlerEnd[ firstHandler.nextHandler = new Handler(firstHandler, end, firstHandler.endPc); return new Handler(firstHandler, firstHandler.startPc, start); } } /** * Returns the number of elements of the Handler list that begins with the * given element. * * @param firstHandler the beginning of a Handler list. May be * {@literal null}. * @return the number of elements of the Handler list that begins with * 'handler'. */ static int getExceptionTableLength(final Handler firstHandler) { int length = 0; Handler handler = firstHandler; while (handler != null) { length++; handler = handler.nextHandler; } return length; } /** * Returns the size in bytes of the JVMS exception_table corresponding to * the Handler list that begins with the given element. <i>This includes the * exception_table_length field.</i> * * @param firstHandler the beginning of a Handler list. May be * {@literal null}. * @return the size in bytes of the exception_table_length and * exception_table structures. */ static int getExceptionTableSize(final Handler firstHandler) { return 2 + 8 * getExceptionTableLength(firstHandler); } /** * Puts the JVMS exception_table corresponding to the Handler list that * begins with the given element. <i>This includes the * exception_table_length field.</i> * * @param firstHandler the beginning of a Handler list. May be * {@literal null}. * @param output where the exception_table_length and exception_table * structures must be put. */ static void putExceptionTable(final Handler firstHandler, final ByteVector output) { output.putShort(getExceptionTableLength(firstHandler)); Handler handler = firstHandler; while (handler != null) { output.putShort(handler.startPc.bytecodeOffset).putShort(handler.endPc.bytecodeOffset).putShort(handler.handlerPc.bytecodeOffset).putShort(handler.catchType); handler = handler.nextHandler; } } }
[ "176543888@qq.com" ]
176543888@qq.com
15fed66e62f546827a88a16390cfdb372fcec455
c59d929c13b1ed59cd054206ce903ac83f84e24f
/javaPrograms/java coaching/JULY/28thjulyinterface/28thjulyinterface/Fifteen.java
492ee70ddabf6e23134c20ff76f2722efdaf871e
[]
no_license
ankurjain8448/javaWorkSpace
97e56cbd171a6ad8d221136e2408009007598028
e5cfa34e15ebfb3583e20594b4c50458768d567e
refs/heads/master
2016-09-13T07:00:03.752154
2016-05-14T17:11:51
2016-05-14T17:11:51
58,814,802
0
0
null
null
null
null
UTF-8
Java
false
false
181
java
interface I1 { int m=400; } interface I2 { int m=100; } class Fifteen implements I1,I2 { public static void main(String args[]) { System.out.println(m+m); } }
[ "ankurjain8448@gmail.com" ]
ankurjain8448@gmail.com
1c5903939d61a05cec7e2b06c02123649ef23740
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13288-15-7-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/com/xpn/xwiki/store/XWikiHibernateBaseStore_ESTest.java
5a3af34fbf5ea7736b58eea926ea8d22eb922b82
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
572
java
/* * This file was automatically generated by EvoSuite * Tue Apr 07 07:57:59 UTC 2020 */ package com.xpn.xwiki.store; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class XWikiHibernateBaseStore_ESTest extends XWikiHibernateBaseStore_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
9d939ebdc11c5a52958e6fe496677cf87c861d67
271c922ce795bcabfd2f6dc49e86481418b82927
/legacycode/src/main/java/com/smalaca/repository/SpringDataJpaProductRepository.java
7649faf2975e2cebeaa191627eba317bc21b0029
[]
no_license
smalaca/architecture-tests-archunit
7e812c325f5f6e049a8081adc0313ecd11e2fe30
c908c9c735a99cb075eb56b1c009990b169884b1
refs/heads/master
2023-07-09T21:38:26.556564
2021-08-17T09:57:08
2021-08-17T09:57:08
395,357,090
2
0
null
null
null
null
UTF-8
Java
false
false
659
java
package com.smalaca.repository; import com.smalaca.entity.Product; import com.smalaca.readmodel.ProductReadModel; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; import java.util.List; import java.util.Optional; import java.util.UUID; @Repository interface SpringDataJpaProductRepository extends CrudRepository<Product, UUID> { @Query("SELECT new com.smalaca.readmodel.ProductReadModel(id, name, description, price) FROM Product") List<ProductReadModel> findAllProducts(); Optional<ProductReadModel> findProductById(UUID id); }
[ "ab13.krakow@gmail.com" ]
ab13.krakow@gmail.com
64ab27313d334dda1235e843f4b3848178df76a3
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/org/osmdroid/mtp/TilePackagerTest.java
78ab29b7bb49077bc8c1cc8c9e187c8be5ad6229
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
398
java
package org.osmdroid.mtp; import org.junit.Test; /** * Created by alex on 9/13/16. */ public class TilePackagerTest { @Test public void runBasicTest() { runTest("fr_mapnick_12.zip"); } @Test public void runBasicTestSql() { runTest("fr_mapnick_12.sql"); } @Test public void runBasicTestGemf() { runTest("fr_mapnick_12.gemf"); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
dae8d405ee6db9f44223ee8d83007715ebe7cc14
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Time/27/org/joda/time/MutableDateTime_MutableDateTime_268.java
99ba1cdb4d27d2d91848cdd4f285eebd71a0c613
[]
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
2,794
java
org joda time mutabl date time mutabledatetim standard implement modifi datetim hold datetim millisecond java epoch t00 01t00 00z chronolog intern chronolog determin millisecond instant convert date time field chronolog code iso chronolog isochronolog code agre intern standard compat modern gregorian calendar individu field access wai code hour dai gethourofdai code code hour dai hourofdai code techniqu access method field numer set numer add numer add numer wrap field text vlaue text set text field maximum field minimum mutabl date time mutabledatetim mutabl thread safe concurr thread invok mutat method author gui allard author brian neill o'neil author stephen colebourn author mike schrag date time datetim mutabl date time mutabledatetim construct instanc datetim field valu code iso chronolog isochronolog code time zone time zone zone param year year param month year monthofyear month year param dai month dayofmonth dai month param hour dai hourofdai hour dai param minut hour minuteofhour minut hour param minut secondofminut minut param milli millisofsecond millisecond param zone time zone mean time zone mutabl date time mutabledatetim year month year monthofyear dai month dayofmonth hour dai hourofdai minut hour minuteofhour minut secondofminut milli millisofsecond date time zone datetimezon zone year month year monthofyear dai month dayofmonth hour dai hourofdai minut hour minuteofhour minut secondofminut milli millisofsecond zone
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
251c1c01a2d8d0ea21426c4d2912f47b741c9bd9
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Spring/Spring3442.java
54add4a1b36e3f315ecad92197b50247431b1657
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
433
java
@Test public void invokeListenerRuntimeException() { Method method = ReflectionUtils.findMethod( SampleEvents.class, "generateRuntimeException", GenericTestEvent.class); GenericTestEvent<String> event = createGenericTestEvent("fail"); this.thrown.expect(IllegalStateException.class); this.thrown.expectMessage("Test exception"); this.thrown.expectCause(is((Throwable) isNull())); invokeListener(method, event); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
3781ddd4ed360876361610d877519bcac4671e8a
01d6b951ce24b3d2c89b1ffa18fd79aaa9c4599c
/src/com/millennialmedia/google/gson/stream/JsonReader$1.java
79e7e6a0b8ea47a5088a91ee30203faea5087c1b
[]
no_license
mohsenuss91/KGBANDROID
1a5cc246bf17b85dae4733c10a48cc2c34f978fd
a2906e3de617b66c5927a4d1fd85f6a3c6ed89d0
refs/heads/master
2016-09-03T06:45:38.912322
2015-03-08T12:03:35
2015-03-08T12:03:35
31,847,141
0
0
null
null
null
null
UTF-8
Java
false
false
1,539
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.millennialmedia.google.gson.stream; import com.millennialmedia.google.gson.internal.JsonReaderInternalAccess; import com.millennialmedia.google.gson.internal.bind.JsonTreeReader; // Referenced classes of package com.millennialmedia.google.gson.stream: // JsonReader final class eeReader extends JsonReaderInternalAccess { public final void promoteNameToValue(JsonReader jsonreader) { if (jsonreader instanceof JsonTreeReader) { ((JsonTreeReader)jsonreader).promoteNameToValue(); return; } int i = JsonReader.access$000(jsonreader); if (i == 0) { i = JsonReader.access$100(jsonreader); } if (i == 13) { JsonReader.access$002(jsonreader, 9); return; } if (i == 12) { JsonReader.access$002(jsonreader, 8); return; } if (i == 14) { JsonReader.access$002(jsonreader, 10); return; } else { throw new IllegalStateException((new StringBuilder("Expected a name but was ")).append(jsonreader.peek()).append(" at line ").append(JsonReader.access$200(jsonreader)).append(" column ").append(JsonReader.access$300(jsonreader)).toString()); } } eeReader() { } }
[ "mohsenuss91@hotmail.com" ]
mohsenuss91@hotmail.com
ab779d290f9e78d41cb369c0bf8b6b69064fd681
5c007a23b88f1f2c51843199904da7724ff34bae
/base/mode_ui/src/main/java/com/pds/ui/view/refresh/cb/ICover.java
d32d3ef63db2fa2e087902f01435109c49fc7ec2
[]
no_license
bubian/BlogProject
d8100916fee3ba8505c9601a216a6b9b1147b048
8278836ff8fe62af977b5ca330767a2f425d8792
refs/heads/master
2023-08-10T17:52:46.490579
2021-09-14T06:42:58
2021-09-14T06:42:58
161,014,161
0
0
null
null
null
null
UTF-8
Java
false
false
443
java
package com.pds.ui.view.refresh.cb; import android.view.animation.Transformation; /** * @author: pengdaosong * CreateTime: 2020-01-15 16:16 * Email:pengdaosong@medlinker.com * Description: */ public interface ICover { void applyTransformation(float interpolatedTime, Transformation t); boolean doComplete(float interpolatedTime, Transformation t); boolean doCustomExitAnimation(); boolean doCustomEnterAnimation(); }
[ "pengdaosong@medlinker.com" ]
pengdaosong@medlinker.com
7b4989fffb96d63ca3a42e68b05476244df8cd3c
f401ff11f74aa4f5da6d51805480c90b80a05a4d
/src/main/java/com/w00tmast3r/skquery/elements/expressions/ExprInventorySerials.java
bfcb35e18754ef7f4a40914c6b8f807d02134fae
[ "Apache-2.0" ]
permissive
Minehut/SkQuery
bad75173943cea8d42f5c22de761d9a7e444c8de
94ed0cd896616a3225b46ef90c63bc901f70cbb3
refs/heads/master
2021-06-24T15:13:05.033125
2019-11-06T08:56:46
2019-11-06T08:56:46
171,538,013
1
4
Apache-2.0
2020-09-15T23:22:49
2019-02-19T19:42:43
Java
UTF-8
Java
false
false
1,496
java
package com.w00tmast3r.skquery.elements.expressions; import ch.njol.skript.classes.Changer; import ch.njol.skript.expressions.base.SimplePropertyExpression; import com.w00tmast3r.skquery.api.PropertyFrom; import com.w00tmast3r.skquery.api.PropertyTo; import com.w00tmast3r.skquery.api.UsePropertyPatterns; import com.w00tmast3r.skquery.util.Collect; import com.w00tmast3r.skquery.util.serialization.InventorySerialUtils; import org.bukkit.event.Event; import org.bukkit.inventory.Inventory; @UsePropertyPatterns @PropertyFrom("inventory") @PropertyTo("serialized contents") public class ExprInventorySerials extends SimplePropertyExpression<Inventory, String> { @Override protected String getPropertyName() { return "inventory serial"; } @Override public String convert(Inventory inventory) { return InventorySerialUtils.toBase64(inventory); } @Override public Class<? extends String> getReturnType() { return String.class; } @Override public Class<?>[] acceptChange(Changer.ChangeMode mode) { return mode == Changer.ChangeMode.SET ? Collect.asArray(String.class) : null; } @Override public void change(Event e, Object[] delta, Changer.ChangeMode mode) { String s = delta[0] == null ? "" : (String) delta[0]; Inventory i = getExpr().getSingle(e); try { i.setContents(InventorySerialUtils.fromBase64(s).getContents()); } catch (Exception ignored) {} } }
[ "seantgrover@gmail.com" ]
seantgrover@gmail.com
caeded4e5450469db4a3a28c19f3b984c5297242
3cf15fff605d68cc230bc2522234f89ca140c921
/src/main/java/org/spongepowered/asm/mixin/transformer/throwables/MixinApplicatorException.java
98e5f0ae79eb03e85d7d10b3c58075d7436f8e01
[ "MIT" ]
permissive
Devan-Kerman/Mixin
6a9bd87e4f73fb1a7b6215f1ff48eea3ff337c03
4e8634565f6768b2751d7d9d4ed658ae1100f689
refs/heads/master
2023-06-26T09:53:19.582278
2021-08-02T02:46:09
2021-08-02T02:46:09
278,975,307
0
0
MIT
2020-07-12T02:16:58
2020-07-12T02:16:58
null
UTF-8
Java
false
false
3,560
java
/* * This file is part of Mixin, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * 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.spongepowered.asm.mixin.transformer.throwables; import org.spongepowered.asm.mixin.extensibility.IMixinInfo; import org.spongepowered.asm.mixin.refmap.IMixinContext; import org.spongepowered.asm.mixin.transformer.ActivityStack; /** * Exception thrown for errors during mixin application */ public class MixinApplicatorException extends InvalidMixinException { private static final long serialVersionUID = 1L; public MixinApplicatorException(IMixinInfo context, String message) { super(context, message, (ActivityStack)null); } public MixinApplicatorException(IMixinInfo context, String message, ActivityStack activityContext) { super(context, message, activityContext); } public MixinApplicatorException(IMixinContext context, String message) { super(context, message, (ActivityStack)null); } public MixinApplicatorException(IMixinContext context, String message, ActivityStack activityContext) { super(context, message, activityContext); } public MixinApplicatorException(IMixinInfo mixin, String message, Throwable cause) { super(mixin, message, cause, (ActivityStack)null); } public MixinApplicatorException(IMixinInfo mixin, String message, Throwable cause, ActivityStack activityContext) { super(mixin, message, cause, activityContext); } public MixinApplicatorException(IMixinContext mixin, String message, Throwable cause) { super(mixin, message, cause, (ActivityStack)null); } public MixinApplicatorException(IMixinContext mixin, String message, Throwable cause, ActivityStack activityContext) { super(mixin, message, cause, activityContext); } public MixinApplicatorException(IMixinInfo mixin, Throwable cause) { super(mixin, cause, (ActivityStack)null); } public MixinApplicatorException(IMixinInfo mixin, Throwable cause, ActivityStack activityContext) { super(mixin, cause, activityContext); } public MixinApplicatorException(IMixinContext mixin, Throwable cause) { super(mixin, cause, (ActivityStack)null); } public MixinApplicatorException(IMixinContext mixin, Throwable cause, ActivityStack activityContext) { super(mixin, cause, activityContext); } }
[ "adam@eq2.co.uk" ]
adam@eq2.co.uk
7feb8bddcc1cc4c8c54b852c46c58df67e5546d1
2c5b8aff137117e316f8557bf82e553e55454989
/CrackingCode/MasterAlgorithm/src/main/java/kata/linkedlist/FindKthItemToLastElement.java
88232e1b5955589edd5c6f03f8f9e31a06c22d8d
[]
no_license
lamadipen/Algo
33de4fc1e7049c3d597b5e6090e408460fa2e90e
ef9e5f06214a3387dd4dbe7dd3e979a70617da1d
refs/heads/master
2022-10-07T16:52:26.537618
2022-10-05T21:06:05
2022-10-05T21:06:05
82,363,649
2
0
null
2023-09-12T13:55:45
2017-02-18T05:21:18
Java
UTF-8
Java
false
false
2,513
java
package kata.linkedlist; /** * Find the kth to last element of singly linked list */ public class FindKthItemToLastElement { public Node findKthToLastIterative(CustomLinkedList customLinkedList, int kthItem) { Node tempHead = customLinkedList.getHead(); int lengthOfLinkedList = 0; while (tempHead != null) { tempHead = tempHead.getNext(); lengthOfLinkedList++; } int target = lengthOfLinkedList - kthItem; Node current = customLinkedList.getHead(); for (int i = 0; i < target; i++) { current = current.getNext(); } return current; } public void findKthToLastRecursive(CustomLinkedList customLinkedList, int kthItem) { findKthToLastRecursive(customLinkedList.getHead(), kthItem); } public int findKthToLastRecursive(Node currentHead, int kthItem) { if (currentHead == null) { return 0; } int index = findKthToLastRecursive(currentHead.getNext(), kthItem) + 1; if (index == kthItem) { System.out.println(currentHead.getData()); } return index; } public Node findKthToLastRecursiveObject(CustomLinkedList customLinkedList, int kthItem) { return findKthToLastRecursiveObject(customLinkedList.getHead(), kthItem, new Index()); } public Node findKthToLastRecursiveObject(Node head, int kthItem, Index index) { if (head == null) { return null; } Node returnedNode = findKthToLastRecursiveObject(head.getNext(), kthItem, index); index.value = index.value + 1; if (index.value == kthItem) { return head; } return returnedNode; } public Node findKthToLastRecursiveObjectFailed(CustomLinkedList customLinkedList, int kthItem) { Node node = new Node(0); findKthToLastRecursiveObjectFailed(customLinkedList.getHead(), kthItem, node); return node; } //when call stack is destroyed the newly created reference will not be visible on the method public int findKthToLastRecursiveObjectFailed(Node head, int kthItem, Node node) { if (head == null) { return 0; } int index = findKthToLastRecursiveObjectFailed(head.getNext(), kthItem, node) + 1; if (index == kthItem) { node = new Node(head.getData()); return index; } return index; } } class Index { int value = 0; }
[ "lamadipen@yahoo.com" ]
lamadipen@yahoo.com
4e5a56bcb9140fd3e7c1cf60dd67b25779a7cf80
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_326/Testnull_32513.java
e6fbe3eb17ea4c6a80c883f1d2f34e0ae6855f6a
[]
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
308
java
package org.gradle.test.performancenull_326; import static org.junit.Assert.*; public class Testnull_32513 { private final Productionnull_32513 production = new Productionnull_32513("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
cc8f76ce186c0d90e77ca7768c2f9b4af68f430e
ca208f19cc75fc3ec4da3362e944fb9ad7d5faa1
/rebellion_h5_realm/java/l2r/gameserver/model/entity/olympiad/CompEndTask.java
a48ac2cdaee14dd5cb207b7e44cb468b666f952e
[]
no_license
robertedvin/rebellion_h5_realm
04034e1cfabddef9270b45827c3ce222edc1984f
0c129cf720c0638ba170966225d2e0671699b87d
refs/heads/master
2022-08-20T21:35:26.014365
2020-05-29T14:31:23
2020-05-29T14:31:23
267,627,002
0
0
null
null
null
null
UTF-8
Java
false
false
1,449
java
package l2r.gameserver.model.entity.olympiad; import l2r.commons.threading.RunnableImpl; import l2r.gameserver.Announcements; import l2r.gameserver.ThreadPoolManager; import l2r.gameserver.network.serverpackets.SystemMessage2; import l2r.gameserver.network.serverpackets.components.SystemMsg; import org.slf4j.Logger; import org.slf4j.LoggerFactory; class CompEndTask extends RunnableImpl { private static final Logger _log = LoggerFactory.getLogger(CompEndTask.class); @Override public void runImpl() throws Exception { if(Olympiad.isOlympiadEnd()) return; Olympiad._inCompPeriod = false; try { OlympiadManager manager = Olympiad._manager; // Если остались игры, ждем их завершения еще одну минуту if(manager != null && !manager.getOlympiadGames().isEmpty()) { ThreadPoolManager.getInstance().schedule(new CompEndTask(), 60000); return; } // Every oly end cleanup the list just in case. Olympiad.getOlyHwidList().clear(); Olympiad.getOlyIPList().clear(); Announcements.getInstance().announceToAll(new SystemMessage2(SystemMsg.THE_OLYMPIAD_GAME_HAS_ENDED)); _log.info("Olympiad System: Olympiad Game Ended"); OlympiadDatabase.save(); } catch(Exception e) { _log.warn("Olympiad System: Failed to save Olympiad configuration:"); _log.error("", e); } Olympiad.init(); } }
[ "l2agedev@gmail.com" ]
l2agedev@gmail.com
a7c9b5d6813fd8c0fb634e77130f25544bf6f79d
0721305fd9b1c643a7687b6382dccc56a82a2dad
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/zendesk/core/UserTagRequest.java
1f2ab00331179f68142f5427c2b5fbb753745239
[]
no_license
a2en/Zenly_re
09c635ad886c8285f70a8292ae4f74167a4ad620
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
refs/heads/master
2020-12-13T17:07:11.442473
2020-01-17T04:32:44
2020-01-17T04:32:44
234,470,083
1
0
null
null
null
null
UTF-8
Java
false
false
199
java
package zendesk.core; import java.util.List; class UserTagRequest { UserTagRequest() { } /* access modifiers changed from: 0000 */ public void setTags(List<String> list) { } }
[ "developer@appzoc.com" ]
developer@appzoc.com
a8271990221e12fe0e23de57bb50e78f9af6c2e6
87873856a23cd5ebdcd227ef39386fb33f5d6b13
/java-algorithm/src/main/java/io/jsd/training/udemy/balazs/advanced/graphalgorithmscode/kruskalalgorithm/DisjointSet.java
37c97f9f3db9ed3efd32a0e5f9674e4cd2da6a85
[]
no_license
jsdumas/java-training
da204384223c3e7871ccbb8f4a73996ae55536f3
8df1da57ea7a5dd596fea9b70c6cd663534d9d18
refs/heads/master
2022-06-28T16:08:47.529631
2019-06-06T07:49:30
2019-06-06T07:49:30
113,677,424
0
0
null
2022-06-20T23:48:24
2017-12-09T14:55:56
Java
UTF-8
Java
false
false
2,327
java
package io.jsd.training.udemy.balazs.advanced.graphalgorithmscode.kruskalalgorithm; import java.util.ArrayList; import java.util.List; public class DisjointSet { private int nodeCount = 0; private int setCount = 0; private List<Node> rootNodes; public DisjointSet(List<Vertex> vertices) { this.rootNodes = new ArrayList<Node>(vertices.size()); makeSets(vertices); } /* * Returns the index of the set that n is currently in. The index of the * root node of each set uniquely identifies the set. This is used to * determine whether two elements are in the same set. */ public int find(Node n) { Node current = n; /* Ride the pointer up to the root node */ while (current.getParent() != null) current = current.getParent(); Node root = current; /* * Ride the pointer up to the root node again, but make each node below * a direct child of the root. This alters the tree such that future * calls will reach the root more quickly. "path comression" */ current = n; while (current != root) { Node temp = current.getParent(); current.setParent( root ); current = temp; } return root.getId(); } /* * Combines the sets containing nodes i and j. */ public void union(Node node1, Node node2) { int index1 = find(node1); int index2 = find(node2); /* Are these nodes already part of the same set? */ if (index1 == index2) return; /* Get the root nodes of each set (this will run in constant time) */ Node root1 = this.rootNodes.get(index1); Node root2 = this.rootNodes.get(index2); /* Attach the smaller tree to the root of the larger tree ez a "union by height" */ if (root1.getHeight() < root2.getHeight()) { root1.setParent(root2); } else if (root1.getHeight() > root2.getHeight()) { root2.setParent(root1); } else { root2.setParent(root1); root1.setHeight(root1.getHeight()+1); } this.setCount--; } /* * Takes a list of n vertices and creates n disjoint singleton sets. */ public void makeSets(List<Vertex> vertices) { for (Vertex v : vertices) makeSet(v); } /* * Creates a singleton set containing one vertex. */ public void makeSet(Vertex vertex) { Node n = new Node(0, rootNodes.size(), null); vertex.setNode(n); this.rootNodes.add(n); this.setCount++; this.nodeCount++; } }
[ "jsdumas@free.fr" ]
jsdumas@free.fr
248d69034513fa3f8d27903cc69abab78971da8b
377405a1eafa3aa5252c48527158a69ee177752f
/src/com/google/android/gms/tagmanager/cn.java
e7f416ccbcc3a4723f43eca7f82df201dbecdbfe
[]
no_license
apptology/AltFuelFinder
39c15448857b6472ee72c607649ae4de949beb0a
5851be78af47d1d6fcf07f9a4ad7f9a5c4675197
refs/heads/master
2016-08-12T04:00:46.440301
2015-10-25T18:25:16
2015-10-25T18:25:16
44,921,258
0
1
null
null
null
null
UTF-8
Java
false
false
4,733
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.google.android.gms.tagmanager; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import java.io.ByteArrayOutputStream; import java.io.FileNotFoundException; import java.io.IOException; // Referenced classes of package com.google.android.gms.tagmanager: // bm, bh, bg, bl, // cq, r, cd class cn implements Runnable { private final String WJ; private volatile String Xg; private final bm Zd; private final String Ze; private bg Zf; private volatile r Zg; private volatile String Zh; private final Context mContext; cn(Context context, String s, bm bm1, r r1) { mContext = context; Zd = bm1; WJ = s; Zg = r1; Ze = (new StringBuilder()).append("/r?id=").append(s).toString(); Xg = Ze; Zh = null; } public cn(Context context, String s, r r1) { this(context, s, new bm(), r1); } private boolean kW() { NetworkInfo networkinfo = ((ConnectivityManager)mContext.getSystemService("connectivity")).getActiveNetworkInfo(); if (networkinfo == null || !networkinfo.isConnected()) { bh.y("...no network connectivity"); return false; } else { return true; } } private void kX() { bl bl1; String s; if (!kW()) { Zf.a(bg.a.Yy); return; } bh.y("Start loading resource from network ..."); s = kY(); bl1 = Zd.kH(); Object obj = bl1.bD(s); ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream(); cq.b(((java.io.InputStream) (obj)), bytearrayoutputstream); obj = com.google.android.gms.internal.c.j.b(bytearrayoutputstream.toByteArray()); bh.y((new StringBuilder()).append("Successfully loaded supplemented resource: ").append(obj).toString()); if (((com.google.android.gms.internal.c.j) (obj)).fK == null && ((com.google.android.gms.internal.c.j) (obj)).fJ.length == 0) { bh.y((new StringBuilder()).append("No change for container: ").append(WJ).toString()); } Zf.i(obj); bl1.close(); bh.y("Load resource from network finished."); return; Object obj1; obj1; bh.z((new StringBuilder()).append("No data is retrieved from the given url: ").append(s).append(". Make sure container_id: ").append(WJ).append(" is correct.").toString()); Zf.a(bg.a.YA); bl1.close(); return; obj1; bh.c((new StringBuilder()).append("Error when loading resources from url: ").append(s).append(" ").append(((IOException) (obj1)).getMessage()).toString(), ((Throwable) (obj1))); Zf.a(bg.a.Yz); bl1.close(); return; obj1; bh.c((new StringBuilder()).append("Error when parsing downloaded resources from url: ").append(s).append(" ").append(((IOException) (obj1)).getMessage()).toString(), ((Throwable) (obj1))); Zf.a(bg.a.YA); bl1.close(); return; Exception exception; exception; bl1.close(); throw exception; } void a(bg bg1) { Zf = bg1; } void bJ(String s) { bh.v((new StringBuilder()).append("Setting previous container version: ").append(s).toString()); Zh = s; } void bu(String s) { if (s == null) { Xg = Ze; return; } else { bh.v((new StringBuilder()).append("Setting CTFE URL path: ").append(s).toString()); Xg = s; return; } } String kY() { String s1 = (new StringBuilder()).append(Zg.kn()).append(Xg).append("&v=a65833898").toString(); String s = s1; if (Zh != null) { s = s1; if (!Zh.trim().equals("")) { s = (new StringBuilder()).append(s1).append("&pv=").append(Zh).toString(); } } s1 = s; if (cd.kT().kU().equals(cd.a.YV)) { s1 = (new StringBuilder()).append(s).append("&gtm_debug=x").toString(); } return s1; } public void run() { if (Zf == null) { throw new IllegalStateException("callback must be set before execute"); } else { Zf.kl(); kX(); return; } } }
[ "rich.foreman@apptology.com" ]
rich.foreman@apptology.com
0b3a7d787239344f0596d9ca59180df1b546fdad
83e81c25b1f74f88ed0f723afc5d3f83e7d05da8
/packages/PrintRecommendationService/src/com/android/printservice/recommendation/plugin/hp/VendorInfo.java
cf1e3f2f6299f8558a18f7e12c85511249498a27
[ "Apache-2.0", "LicenseRef-scancode-unicode" ]
permissive
Ankits-lab/frameworks_base
8a63f39a79965c87a84e80550926327dcafb40b7
150a9240e5a11cd5ebc9bb0832ce30e9c23f376a
refs/heads/main
2023-02-06T03:57:44.893590
2020-11-14T09:13:40
2020-11-14T09:13:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,396
java
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.printservice.recommendation.plugin.hp; import android.content.res.Resources; import java.util.Arrays; public final class VendorInfo { public final String mPackageName; public final String mVendorID; public final String[] mDNSValues; public final int mID; public VendorInfo(Resources resources, int vendor_info_id) { mID = vendor_info_id; String[] data = resources.getStringArray(vendor_info_id); if ((data == null) || (data.length < 2)) { data = new String[] { null, null }; } mPackageName = data[0]; mVendorID = data[1]; mDNSValues = (data.length > 2) ? Arrays.copyOfRange(data, 2, data.length) : new String[]{}; } }
[ "keneankit01@gmail.com" ]
keneankit01@gmail.com
50e54960a3b9a37e08d6dcb59a064fc894dde2c8
a16f840f0fc170e4698f6fd32dbb521e90aab4ba
/src/test/java/examples/simple/ReusableWhereTest.java
bf7f1031839c372b90e60a9b1b3c35c632bb211c
[ "Apache-2.0" ]
permissive
SMicroSun/mybatis-dynamic-sql
6d387f551b483896871004903a4823652d8dee30
ebf824bb5092d5c436c25729c58cfa96a4960f9d
refs/heads/master
2022-11-13T08:31:22.178660
2020-07-05T00:03:21
2020-07-05T00:03:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,271
java
/** * Copyright 2016-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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 examples.simple; import static examples.simple.PersonDynamicSqlSupport.id; import static examples.simple.PersonDynamicSqlSupport.occupation; import static org.assertj.core.api.Assertions.assertThat; import static org.mybatis.dynamic.sql.SqlBuilder.isEqualTo; import static org.mybatis.dynamic.sql.SqlBuilder.isNull; import java.io.InputStream; import java.io.InputStreamReader; import java.sql.Connection; import java.sql.DriverManager; import java.util.List; import org.apache.ibatis.datasource.unpooled.UnpooledDataSource; import org.apache.ibatis.jdbc.ScriptRunner; import org.apache.ibatis.mapping.Environment; import org.apache.ibatis.session.Configuration; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; import org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mybatis.dynamic.sql.where.WhereApplier; public class ReusableWhereTest { private static final String JDBC_URL = "jdbc:hsqldb:mem:aname"; private static final String JDBC_DRIVER = "org.hsqldb.jdbcDriver"; private SqlSessionFactory sqlSessionFactory; @BeforeEach public void setup() throws Exception { Class.forName(JDBC_DRIVER); InputStream is = getClass().getResourceAsStream("/examples/simple/CreateSimpleDB.sql"); try (Connection connection = DriverManager.getConnection(JDBC_URL, "sa", "")) { ScriptRunner sr = new ScriptRunner(connection); sr.setLogWriter(null); sr.runScript(new InputStreamReader(is)); } UnpooledDataSource ds = new UnpooledDataSource(JDBC_DRIVER, JDBC_URL, "sa", ""); Environment environment = new Environment("test", new JdbcTransactionFactory(), ds); Configuration config = new Configuration(environment); config.addMapper(PersonMapper.class); config.addMapper(PersonWithAddressMapper.class); sqlSessionFactory = new SqlSessionFactoryBuilder().build(config); } @Test public void testCount() { try (SqlSession session = sqlSessionFactory.openSession()) { PersonMapper mapper = session.getMapper(PersonMapper.class); long rows = mapper.count(c -> c.applyWhere(commonWhere)); assertThat(rows).isEqualTo(3); } } @Test public void testDelete() { try (SqlSession session = sqlSessionFactory.openSession()) { PersonMapper mapper = session.getMapper(PersonMapper.class); int rows = mapper.delete(c -> c.applyWhere(commonWhere)); assertThat(rows).isEqualTo(3); } } @Test public void testSelect() { try (SqlSession session = sqlSessionFactory.openSession()) { PersonMapper mapper = session.getMapper(PersonMapper.class); List<PersonRecord> rows = mapper.select(c -> c.applyWhere(commonWhere) .orderBy(id)); assertThat(rows.size()).isEqualTo(3); } } @Test public void testUpdate() { try (SqlSession session = sqlSessionFactory.openSession()) { PersonMapper mapper = session.getMapper(PersonMapper.class); int rows = mapper.update(c -> c.set(occupation).equalToStringConstant("worker") .applyWhere(commonWhere)); assertThat(rows).isEqualTo(3); } } private WhereApplier commonWhere = d -> d.where(id, isEqualTo(1)).or(occupation, isNull()); }
[ "jeffgbutler@gmail.com" ]
jeffgbutler@gmail.com
12b6792820c77a796e4f16855d4831361e66511b
f51fca74e8ecfefd2b60af7501194c16d7ac3364
/hotchatmodule/build/generated/source/r/release/android/support/graphics/drawable/animated/R.java
a8a3ee1c1c08fe955670d758817a18bebd168e7d
[]
no_license
fajuary/XiuBaLiveApp
2a387865d44a2b49d8e37a50a0ee3e3d6675edb8
b6465dc05043399c3fcdc975916a5657f51d0f86
refs/heads/master
2022-12-11T19:33:56.224128
2020-09-04T04:01:50
2020-09-04T04:01:50
292,742,084
0
0
null
null
null
null
UTF-8
Java
false
false
7,048
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package android.support.graphics.drawable.animated; public final class R { public static final class attr { public static int font = 0x7f010126; public static int fontProviderAuthority = 0x7f01011f; public static int fontProviderCerts = 0x7f010122; public static int fontProviderFetchStrategy = 0x7f010123; public static int fontProviderFetchTimeout = 0x7f010124; public static int fontProviderPackage = 0x7f010120; public static int fontProviderQuery = 0x7f010121; public static int fontStyle = 0x7f010125; public static int fontWeight = 0x7f010127; } public static final class bool { public static int abc_action_bar_embed_tabs = 0x7f0a0000; } public static final class color { public static int notification_action_color_filter = 0x7f0b0000; public static int notification_icon_bg_color = 0x7f0b0043; public static int ripple_material_light = 0x7f0b0053; public static int secondary_text_default_material_light = 0x7f0b0055; } public static final class dimen { public static int compat_button_inset_horizontal_material = 0x7f080552; public static int compat_button_inset_vertical_material = 0x7f080553; public static int compat_button_padding_horizontal_material = 0x7f080554; public static int compat_button_padding_vertical_material = 0x7f080555; public static int compat_control_corner_material = 0x7f080556; public static int notification_action_icon_size = 0x7f08056b; public static int notification_action_text_size = 0x7f08056c; public static int notification_big_circle_margin = 0x7f08056d; public static int notification_content_margin_start = 0x7f080511; public static int notification_large_icon_height = 0x7f08056e; public static int notification_large_icon_width = 0x7f08056f; public static int notification_main_column_padding_top = 0x7f080512; public static int notification_media_narrow_margin = 0x7f080513; public static int notification_right_icon_size = 0x7f080570; public static int notification_right_side_padding_top = 0x7f08050f; public static int notification_small_icon_background_padding = 0x7f080571; public static int notification_small_icon_size_as_large = 0x7f080572; public static int notification_subtext_size = 0x7f080573; public static int notification_top_pad = 0x7f080574; public static int notification_top_pad_large_text = 0x7f080575; } public static final class drawable { public static int notification_action_background = 0x7f02009c; public static int notification_bg = 0x7f02009d; public static int notification_bg_low = 0x7f02009e; public static int notification_bg_low_normal = 0x7f02009f; public static int notification_bg_low_pressed = 0x7f0200a0; public static int notification_bg_normal = 0x7f0200a1; public static int notification_bg_normal_pressed = 0x7f0200a2; public static int notification_icon_background = 0x7f0200a3; public static int notification_template_icon_bg = 0x7f020100; public static int notification_template_icon_low_bg = 0x7f020101; public static int notification_tile_bg = 0x7f0200a4; public static int notify_panel_notification_icon_bg = 0x7f0200a5; } public static final class id { public static int action_container = 0x7f0c0097; public static int action_divider = 0x7f0c009e; public static int action_image = 0x7f0c0098; public static int action_text = 0x7f0c0099; public static int actions = 0x7f0c00a5; public static int async = 0x7f0c0033; public static int blocking = 0x7f0c0034; public static int chronometer = 0x7f0c00a2; public static int forever = 0x7f0c0035; public static int icon = 0x7f0c004f; public static int icon_group = 0x7f0c00a6; public static int info = 0x7f0c00a3; public static int italic = 0x7f0c0036; public static int line1 = 0x7f0c000a; public static int line3 = 0x7f0c000b; public static int normal = 0x7f0c0014; public static int notification_background = 0x7f0c00a4; public static int notification_main_column = 0x7f0c00a0; public static int notification_main_column_container = 0x7f0c009f; public static int right_icon = 0x7f0c00a7; public static int right_side = 0x7f0c00a1; public static int text = 0x7f0c000f; public static int text2 = 0x7f0c0010; public static int time = 0x7f0c0096; public static int title = 0x7f0c0011; } public static final class integer { public static int status_bar_notification_info_maxnum = 0x7f0d0004; } public static final class layout { public static int notification_action = 0x7f030025; public static int notification_action_tombstone = 0x7f030026; public static int notification_template_custom_big = 0x7f03002d; public static int notification_template_icon_group = 0x7f03002e; public static int notification_template_part_chronometer = 0x7f030032; public static int notification_template_part_time = 0x7f030033; } public static final class string { public static int status_bar_notification_info_overflow = 0x7f070014; } public static final class style { public static int TextAppearance_Compat_Notification = 0x7f09008c; public static int TextAppearance_Compat_Notification_Info = 0x7f09008d; public static int TextAppearance_Compat_Notification_Line2 = 0x7f090116; public static int TextAppearance_Compat_Notification_Time = 0x7f090090; public static int TextAppearance_Compat_Notification_Title = 0x7f090092; public static int Widget_Compat_NotificationActionContainer = 0x7f090094; public static int Widget_Compat_NotificationActionText = 0x7f090095; } public static final class styleable { public static int[] FontFamily = { 0x7f01011f, 0x7f010120, 0x7f010121, 0x7f010122, 0x7f010123, 0x7f010124 }; public static int[] FontFamilyFont = { 0x7f010125, 0x7f010126, 0x7f010127 }; public static int FontFamilyFont_font = 1; public static int FontFamilyFont_fontStyle = 0; public static int FontFamilyFont_fontWeight = 2; public static int FontFamily_fontProviderAuthority = 0; public static int FontFamily_fontProviderCerts = 3; public static int FontFamily_fontProviderFetchStrategy = 4; public static int FontFamily_fontProviderFetchTimeout = 5; public static int FontFamily_fontProviderPackage = 1; public static int FontFamily_fontProviderQuery = 2; } }
[ "18242312549@163.com" ]
18242312549@163.com
1562c8d086f56d0b3177eb246fc0025f25bdc5ba
427a70a1bd9f83ee004f332f15fde5cac996b696
/app/src/main/java/com/example/wanhao/aclassapp/presenter/CourseListPresenter.java
1ca10b750f5b708f0706de8ad70c8450164a6430
[]
no_license
3441242166/AClassApp
aba468fd20b17717906c67424b553cb38ceef912
9adc02ee63eb585a0b03a71d8123ed5fcdf86148
refs/heads/master
2021-01-24T04:13:32.370843
2018-11-25T07:37:12
2018-11-25T07:37:12
122,927,503
0
0
null
null
null
null
UTF-8
Java
false
false
5,674
java
package com.example.wanhao.aclassapp.presenter; import android.annotation.SuppressLint; import android.content.Context; import android.content.Intent; import android.util.Log; import com.example.wanhao.aclassapp.backService.CourseService; import com.example.wanhao.aclassapp.base.IBasePresenter; import com.example.wanhao.aclassapp.bean.Course; import com.example.wanhao.aclassapp.bean.HttpResult; import com.example.wanhao.aclassapp.config.ApiConstant; import com.example.wanhao.aclassapp.config.Constant; import com.example.wanhao.aclassapp.db.ChatDB; import com.example.wanhao.aclassapp.db.CourseDB; import com.example.wanhao.aclassapp.util.RetrofitHelper; import com.example.wanhao.aclassapp.util.SaveDataUtil; import com.example.wanhao.aclassapp.view.ICourseFgView; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; import java.util.LinkedList; import java.util.List; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.schedulers.Schedulers; import io.realm.Realm; import io.realm.Sort; /** * Created by wanhao on 2018/2/23. */ public class CourseListPresenter implements IBasePresenter{ private static final String TAG = "CourseListPresenter"; private Context context; private ICourseFgView view; private Realm realm; private List<CourseDB> dataList; public CourseListPresenter(Context context, ICourseFgView view){ this.context = context; this.view = view; realm = Realm.getDefaultInstance(); EventBus.getDefault().register(this); } public void getListDataByDB(){ realm.beginTransaction(); String count = SaveDataUtil.getValueFromSharedPreferences(context,ApiConstant.USER_COUNT); List<CourseDB> list = realm.where(CourseDB.class) .equalTo("userCount",count) .findAllSorted("priority", Sort.DESCENDING); realm.commitTransaction(); // 如果本地数据库为空 则从网络获取数据 if(list == null || list.size() == 0){ Log.i(TAG, "getListDataByDB: 本地数据库为空"); getListDataByInternet(); return; } dataList = list; startService(list); view.loadDataSuccess(list); } @SuppressLint("CheckResult") public void getListDataByInternet() { String token = SaveDataUtil.getValueFromSharedPreferences(context,ApiConstant.USER_TOKEN); com.example.wanhao.aclassapp.service.CourseService service = RetrofitHelper.get(com.example.wanhao.aclassapp.service.CourseService.class); service.getCourseList(token) .subscribeOn(Schedulers.newThread()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(responseBodyResponse -> { String body = responseBodyResponse.body().string(); Log.i(TAG, "getListDataByInternet body : "+body); HttpResult<CourseListData> result = new Gson().fromJson(body,new TypeToken<HttpResult<CourseListData>>(){}.getType()); if(result.getCode().equals(ApiConstant.RETURN_SUCCESS)){ List<Course> list = result.getData().courses; List<CourseDB> data = saveData(list); dataList = data; startService(data); view.loadDataSuccess(data); }else{ view.errorMessage(result.getMessage()); } }, throwable -> { view.errorMessage("网络异常"); Log.i(TAG, "accept: "+throwable); }); } private void startService(List<CourseDB> list){ for(CourseDB course :list){ Intent intent = new Intent(context, CourseService.class); //intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.putExtra(ApiConstant.IM_ACTION ,ApiConstant.MESSAGE_CONNECT); intent.putExtra(ApiConstant.COURSE_ID,course.getCourseID()); context.startService(intent); } } private List<CourseDB> saveData(List<Course> list){ String count = SaveDataUtil.getValueFromSharedPreferences(context,ApiConstant.USER_COUNT); List<CourseDB> data = new LinkedList<>(); for(Course course:list){ data.add(new CourseDB(course,count)); } realm.beginTransaction(); realm.copyToRealmOrUpdate(data); realm.commitTransaction(); return data; } @Subscribe(priority = 888,threadMode = ThreadMode.MAIN) public void handleIMMessage(ChatDB bean) { Log.i(Constant.TAG_EVENTBUS, "ListPresenter: content = "+bean.getContent()); String count = SaveDataUtil.getValueFromSharedPreferences(context,ApiConstant.USER_COUNT); Realm realm = Realm.getDefaultInstance(); realm.beginTransaction(); List<CourseDB> list = realm.where(CourseDB.class) .equalTo("userCount",count) .findAll(); for(CourseDB courseDB:list){ if(courseDB.getCourseID().equals(bean.getCourseID())){ courseDB.setUnRead(courseDB.getUnRead()+1); break; } } realm.commitTransaction(); view.loadDataSuccess(list); } @Override public void destroy() { EventBus.getDefault().unregister(this); } static class CourseListData { List<Course> courses; } }
[ "3441242166@qq.com" ]
3441242166@qq.com
bfd0a148faff2c903cb0cd3e7cb61ee867952c44
753244933fc4465b0047821aea81c311738e1732
/core/target/java/ts37/src/haxe/root/TS37.java
ffbf88e775ee3d6e6adbf45c8ac4ec2b84793687
[ "MIT" ]
permissive
mboussaa/HXvariability
abfaba5452fecb1b83bc595dc3ed942a126510b8
ea32b15347766b6e414569b19cbc113d344a56d9
refs/heads/master
2021-01-01T17:45:54.656971
2017-07-26T01:27:49
2017-07-26T01:27:49
98,127,672
0
0
null
null
null
null
UTF-8
Java
false
true
2,445
java
// Generated by Haxe 3.3.0 package haxe.root; import haxe.root.*; @SuppressWarnings(value={"rawtypes", "unchecked"}) public class TS37 extends haxe.lang.HxObject { public static void main(String[] args) { Sys._args = args; main(); } public TS37(haxe.lang.EmptyObject empty) { } public TS37() { //line 4 "/HXvariability/core/test/TS37.hx" haxe.root.TS37.__hx_ctor__TS37(this); } public static void __hx_ctor__TS37(haxe.root.TS37 __temp_me15) { } public static void addTests(utest.Runner runner) { //line 7 "/HXvariability/core/test/TS37.hx" java.lang.String w = ""; //line 8 "/HXvariability/core/test/TS37.hx" { //line 8 "/HXvariability/core/test/TS37.hx" int _g = 0; //line 8 "/HXvariability/core/test/TS37.hx" haxe.root.Array<java.lang.String> _g1 = haxe.root.Sys.args(); //line 8 "/HXvariability/core/test/TS37.hx" while (( _g < _g1.length )) { //line 8 "/HXvariability/core/test/TS37.hx" java.lang.String arg = _g1.__get(_g); //line 8 "/HXvariability/core/test/TS37.hx" ++ _g; //line 9 "/HXvariability/core/test/TS37.hx" w = arg; } } //line 10 "/HXvariability/core/test/TS37.hx" haxe.Log.trace.__hx_invoke2_o(0.0, ( "The value of loop_wrapper is " + w ), 0.0, new haxe.lang.DynamicObject(new java.lang.String[]{"className", "fileName", "methodName"}, new java.lang.Object[]{"TS37", "TS37.hx", "addTests"}, new java.lang.String[]{"lineNumber"}, new double[]{((double) (((double) (10) )) )})); //line 12 "/HXvariability/core/test/TS37.hx" int x = ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(w))) ); //line 49 "/HXvariability/core/test/TS37.hx" runner.addCase(new thx.TestQueryString(((int) (x) )), null, null, null, null); } public static void main() { //line 73 "/HXvariability/core/test/TS37.hx" utest.Runner runner = new utest.Runner(); //line 74 "/HXvariability/core/test/TS37.hx" haxe.root.TS37.addTests(runner); //line 75 "/HXvariability/core/test/TS37.hx" utest.ui.Report.create(runner, null, null); //line 76 "/HXvariability/core/test/TS37.hx" runner.run(); } public static java.lang.Object __hx_createEmpty() { //line 4 "/HXvariability/core/test/TS37.hx" return new haxe.root.TS37(haxe.lang.EmptyObject.EMPTY); } public static java.lang.Object __hx_create(haxe.root.Array arr) { //line 4 "/HXvariability/core/test/TS37.hx" return new haxe.root.TS37(); } }
[ "mohamed.boussaa@inria.fr" ]
mohamed.boussaa@inria.fr
ce0483d6724a5b3430005c2a5195c6a1ca9f6021
d7603c019ed6c475dea24085c43623564feff5b1
/src/main/java/com/secure_srm/listeners/AuthenticationSuccessListener.java
671c60904d9e9f13a0923fb32da65d8fe43a8048
[]
no_license
jfspps/Secure-SRM
55ec661ad0025f51b022b38fbaa8851f703a106e
eef7683c155cca57d0c5c1cd4295b1f71a472dc6
refs/heads/master
2023-04-13T20:27:30.549178
2021-04-22T18:26:27
2021-04-22T18:26:27
295,505,391
0
0
null
2020-11-19T17:10:57
2020-09-14T18:33:58
Java
UTF-8
Java
false
false
2,186
java
package com.secure_srm.listeners; import com.secure_srm.model.security.LoginSuccess; import com.secure_srm.model.security.User; import com.secure_srm.repositories.security.LoginSuccessRepository; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.context.event.EventListener; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.authentication.event.AuthenticationSuccessEvent; import org.springframework.security.web.authentication.WebAuthenticationDetails; import org.springframework.stereotype.Component; @RequiredArgsConstructor @Component @Slf4j public class AuthenticationSuccessListener { private final LoginSuccessRepository loginSuccessRepository; //executes when successful events occur @EventListener public void listen(AuthenticationSuccessEvent successEvent){ log.debug("Authentication successful"); LoginSuccess.LoginSuccessBuilder loginSuccessBuilder = LoginSuccess.builder(); //check the type of the successEvent before casting, and then extract properties if (successEvent.getSource() instanceof UsernamePasswordAuthenticationToken){ UsernamePasswordAuthenticationToken token = (UsernamePasswordAuthenticationToken) successEvent.getSource(); //successEvent.source holds principal and some credentials if (token.getPrincipal() instanceof User){ User user = (User) token.getPrincipal(); loginSuccessBuilder.user(user); log.debug("Username: " + user.getUsername() + " logged in"); } if (token.getDetails() instanceof WebAuthenticationDetails){ WebAuthenticationDetails details = (WebAuthenticationDetails) token.getDetails(); loginSuccessBuilder.sourceIP(details.getRemoteAddress()); log.debug("User IP: " + details.getRemoteAddress()); } } LoginSuccess saved = loginSuccessRepository.save(loginSuccessBuilder.build()); log.debug("Login success record saved, login record ID: " + saved.getId()); } }
[ "jfsapps@gmail.com" ]
jfsapps@gmail.com
3e049f8f6791bb4397c692b9a06996ad43a80e01
6350764c8268d5d4b40e05d80773bd0123d8eb5d
/carnival-spring-boot-starter-springutils/src/main/java/com/github/yingzhuo/carnival/spring/PropertyUtils.java
12c12f82c73c6f743b432f1dda4306bd0414ceed
[ "Apache-2.0" ]
permissive
chenshufeng/carnival
3f33b7b60c231a7a836236e3bdfd168672c508d8
bfa7c7cc7ce98a55adfee6f8adb48f5afeb9a8cf
refs/heads/master
2020-03-23T12:02:15.958590
2018-07-19T03:13:48
2018-07-19T03:13:48
141,533,023
1
0
Apache-2.0
2018-07-19T06:18:19
2018-07-19T06:18:18
null
UTF-8
Java
false
false
1,612
java
/* * ____ _ ____ _ _ _____ ___ _ * / ___| / \ | _ \| \ | |_ _\ \ / / \ | | * | | / _ \ | |_) | \| || | \ \ / / _ \ | | * | |___/ ___ \| _ <| |\ || | \ V / ___ \| |___ * \____/_/ \_\_| \_\_| \_|___| \_/_/ \_\_____| * * https://github.com/yingzhuo/carnival */ package com.github.yingzhuo.carnival.spring; import lombok.val; import org.springframework.util.StringUtils; import java.util.Arrays; import java.util.Collections; import java.util.List; /** * @author 应卓 */ public final class PropertyUtils { private PropertyUtils() { } public static boolean hasPropertyValue(String propertyName) { return getPropertyValue(propertyName) != null; } public static String getPropertyValue(String propertyName) { return getPropertyValue(propertyName, String.class); } public static <T> T getPropertyValue(String propertyName, Class<T> targetType) { return getPropertyValue(propertyName, targetType, null); } public static <T> T getPropertyValue(String propertyName, Class<T> targetType, T defaultIfNull) { return SpringUtils.getEnvironment().getProperty(propertyName, targetType, defaultIfNull); } public static List<String> getCommaDelimitedPropertyValue(String propertyName) { val value = getPropertyValue(propertyName); if (value == null) { return Collections.emptyList(); } else { return Collections.unmodifiableList( Arrays.asList(StringUtils.commaDelimitedListToStringArray(value)) ); } } }
[ "yingzhor@gmail.com" ]
yingzhor@gmail.com
c611729f6244346c0c00404ce42d5dfdbd5322b9
61fa6101d74bff27cd4f85be205e5f9bd9b1ae30
/2016-06-21_usgame_competition/src/cn/usgame/dao/dbutils_impl/UserDaoImply.java
37d7579e9adcaf5159ec71d3e73844ae6f5694fc
[]
no_license
LiHuaYang/college
93810c6f15aa213f8386a295b2c474dbd6c5c4bc
5648bbee3d2df252be0fb925d41dd8b158476e56
refs/heads/main
2023-02-22T09:49:04.944870
2021-01-20T07:15:00
2021-01-20T07:15:00
89,077,293
0
0
null
null
null
null
UTF-8
Java
false
false
3,838
java
package cn.usgame.dao.dbutils_impl; import java.sql.SQLException; import java.util.List; import org.apache.commons.dbutils.QueryRunner; import org.apache.commons.dbutils.handlers.BeanHandler; import org.apache.commons.dbutils.handlers.BeanListHandler; import cn.usgame.dao.UserDao; import cn.usgame.entity.ApplyReport; import cn.usgame.entity.User; import cn.usgame.utils.JdbcUtils_DBCP; import cn.usgame.utils.TransactionUtil; public class UserDaoImply implements UserDao { private static QueryRunner runerUpdate = new QueryRunner(); private static QueryRunner runerQuery = new QueryRunner(JdbcUtils_DBCP.getDataSource()); @Override public boolean registerUser(String id,String phone, String password) { boolean result = false; String sql = "INSERT INTO `bsjw`.`user` ( `userId`,`phonenumber`, `password`) VALUES (? , ? , ?)"; Object[ ] param = { id,phone,password }; try { int res = runerUpdate.update(TransactionUtil.getConnection(), sql, param); result = true; } catch (SQLException e) { result = false; e.printStackTrace(); } return result; } @Override public boolean login(String phone, String password) { boolean result = false; String sql = "select password from User where phonenumber= ? "; Object[ ] param = { phone }; try { User user = runerQuery.query(sql, param, new BeanHandler<>(User.class)); String pw = user.getPassword(); if(pw.equals(password)) { result = true; } } catch (SQLException e) { result = false; e.printStackTrace(); } return result; } @Override public User getUser(String phone) { User user = null; String sql = "select * from User where phonenumber= ? "; Object[ ] param = { phone }; try { user = runerQuery.query(sql, param, new BeanHandler<>(User.class)); } catch (SQLException e) { e.printStackTrace(); } return user; } @Override public boolean toUser(User user) { boolean result = false; String sql = "update User set name = ?,sex=?,school=?,grade=?,contactNumber=?,iDcard=?,address=?,motto=? where phonenumber=?"; Object[ ] param = { user.getName(),user.getSex(),user.getSchool(),user.getGrade(),user.getContactNumber(),user.getiDcard(),user.getAddress(),user.getMotto(),user.getPhonenumber() }; try { int res = runerUpdate.update(TransactionUtil.getConnection(), sql, param); if(res>=1) { result = true; } } catch (SQLException e) { result = false; e.printStackTrace(); } return result; } @Override public boolean changepw(String new_pw, String phonenumber) { boolean result = false; String sql = "update User set password = ? where phonenumber=?"; Object[ ] param = { new_pw,phonenumber }; try { int res = runerUpdate.update(TransactionUtil.getConnection(), sql, param); if(res>=1) { result = true; } } catch (SQLException e) { result = false; e.printStackTrace(); } return result; } @Override public List<ApplyReport> getUserCompetition(String Phonenumber) { List<ApplyReport> applyreports = null; String sql = "select * from applyreport where phoneNumber = ?"; Object[] param = {Phonenumber}; try { applyreports = runerQuery.query(sql, param, new BeanListHandler<ApplyReport>(ApplyReport.class)); } catch (SQLException e) { e.printStackTrace(); } return applyreports; } @Override public ApplyReport applyreportInfo(String Phonenumber, String applyReportId) { ApplyReport applyreport = null; String sql = "select * from applyreport where phoneNumber = ? and applyReportId= ?"; Object[] param = {Phonenumber,applyReportId}; try { applyreport = runerQuery.query(sql, param, new BeanHandler<>(ApplyReport.class)); } catch (SQLException e) { e.printStackTrace(); } return applyreport; } }
[ "lihy@fingard.com" ]
lihy@fingard.com
09e9962e9711a52c47c7e76faedec19db25e6c29
dc65a02223cac4cc2389457bbd0aabb642fc328a
/core/src/main/java/software/amazon/awssdk/protocol/json/SdkJsonGenerator.java
0a793c0fc9986b068ffb9d656b8a974a0b507f75
[ "Apache-2.0" ]
permissive
dysmento/aws-sdk-java-v2
e7553d88eda719a84e83f8b1ba7bdd3784b89cd9
0b787beb7de60873e8806afbb7b266ce6248f4db
refs/heads/master
2020-12-03T02:12:01.961876
2017-06-30T18:41:19
2017-06-30T18:41:19
95,914,399
0
0
null
2017-06-30T18:35:59
2017-06-30T18:35:59
null
UTF-8
Java
false
false
7,879
java
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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 software.amazon.awssdk.protocol.json; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonGenerator; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; import java.nio.ByteBuffer; import java.util.Date; import software.amazon.awssdk.SdkClientException; import software.amazon.awssdk.annotation.SdkInternalApi; import software.amazon.awssdk.util.DateUtils; import software.amazon.awssdk.utils.BinaryUtils; /** * Thin wrapper around Jackson's JSON generator. */ @SdkInternalApi public class SdkJsonGenerator implements StructuredJsonGenerator { /** * Default buffer size for the BAOS. Chosen somewhat arbitrarily. Should be large enough to * prevent frequent resizings but small enough to avoid wasted allocations for small requests. */ private static final int DEFAULT_BUFFER_SIZE = 1024; private final ByteArrayOutputStream baos = new ByteArrayOutputStream(DEFAULT_BUFFER_SIZE); private final JsonGenerator generator; private final String contentType; public SdkJsonGenerator(JsonFactory factory, String contentType) { try { /** * A {@link JsonGenerator} created is by default enabled with * UTF-8 encoding */ this.generator = factory.createGenerator(baos); this.contentType = contentType; } catch (IOException e) { throw new JsonGenerationException(e); } } @Override public StructuredJsonGenerator writeStartArray() { try { generator.writeStartArray(); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeEndArray() { try { generator.writeEndArray(); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeNull() { try { generator.writeNull(); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeStartObject() { try { generator.writeStartObject(); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeEndObject() { try { generator.writeEndObject(); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeFieldName(String fieldName) { try { generator.writeFieldName(fieldName); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeValue(String val) { try { generator.writeString(val); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeValue(boolean bool) { try { generator.writeBoolean(bool); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeValue(long val) { try { generator.writeNumber(val); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeValue(double val) { try { generator.writeNumber(val); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeValue(float val) { try { generator.writeNumber(val); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeValue(short val) { try { generator.writeNumber(val); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeValue(int val) { try { generator.writeNumber(val); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeValue(ByteBuffer bytes) { try { generator.writeBinary(BinaryUtils.copyBytesFrom(bytes)); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeValue(Date date) { try { generator.writeNumber(DateUtils.formatServiceSpecificDate(date)); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeValue(BigDecimal value) { try { /** * Note that this is not how the backend represents BigDecimal types. On the wire * it's normally a JSON number but this causes problems with certain JSON implementations * that parse JSON numbers as floating points automatically. (See API-433) */ generator.writeString(value.toString()); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } @Override public StructuredJsonGenerator writeValue(BigInteger value) { try { generator.writeNumber(value); } catch (IOException e) { throw new JsonGenerationException(e); } return this; } /** * Closes the generator and flushes to write. Must be called when finished writing JSON * content. */ private void close() { try { generator.close(); } catch (IOException e) { throw new JsonGenerationException(e); } } /** * Get the JSON content as a UTF-8 encoded byte array. It is recommended to hold onto the array * reference rather then making repeated calls to this method as a new array will be created * each time. * * @return Array of UTF-8 encoded bytes that make up the generated JSON. */ @Override public byte[] getBytes() { close(); return baos.toByteArray(); } @Override public String getContentType() { return contentType; } protected JsonGenerator getGenerator() { return generator; } /** * Indicates an issue writing JSON content. */ public static class JsonGenerationException extends SdkClientException { public JsonGenerationException(Throwable t) { super(t); } } }
[ "millem@amazon.com" ]
millem@amazon.com
df6dfe483d37bd4128053f22921e8310fb1482fe
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/digits/d2b889e1ac42bc85f9df5c45c10708f46784be93d69acd1415cfd4d028cb50b19f50c374a9498c8e8b909173053a100e20c279ddb06c6359a06a920ead3e8080/004/mutations/52/digits_d2b889e1_004.java
6aa658acfe67f78fb4204193996af81353fe7ed8
[]
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,726
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 digits_d2b889e1_004 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { digits_d2b889e1_004 mainClass = new digits_d2b889e1_004 (); 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 x = new IntObj (), a = new IntObj (), b = new IntObj (), c = new IntObj (), y = new IntObj (); output += (String.format ("Enter an integer > ")); b.value = scanner.nextInt (); a.value = b.value / 10; c.value = b.value % 10; if ((b.value) / 10 > 0) { output += (String.format ("\n%d\n", c.value)); } else if (c.value < 0) { y.value = c.value * (-1); output += (String.format ("%d\n", y.value)); } if (a.value > 0) { while (a.value > 0) { x.value = a.value % 10; a.value = a.value / 10; output += (String.format ("%d\n", x.value)); if (a.value < 10) { output += (String.format ("%d\nThat's all, have a nice day!\n", a.value)); if (true) return;; } } } else if (a.value < 0) { a.value = a.value * (-1); while (a.value > 0) { x.value = a.value % 10; a.value = a.value / 10; output += (String.format ("%d\n", x.value)); if (a.value < 10) { a.value = a.value * (-1); output += (String.format ("%d\nThat's all, have a nice day!\n", a.value)); } } } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
93a5476e7a986d46717b1b8bfbb08db0a8348117
012af20870157a3c84623e09eadf636b1c3b793b
/javautils/src/main/java/ipsk/swing/JImageFileWriter.java
0b713ffbf5ca9f33e48cdb662f0efaaeb348fbfa
[]
no_license
naseem91/SpeechRecorderSBT
77c7e129676ffe39da28cc39e1ddc4bb3cfc6407
002fd9fb341ca162495c274da94d0e348a283b52
refs/heads/master
2020-03-19T18:36:42.967724
2018-06-10T14:51:30
2018-06-10T14:51:30
136,816,898
0
0
null
null
null
null
UTF-8
Java
false
false
4,354
java
// IPS Java Utils // (c) Copyright 2011 // Institute of Phonetics and Speech Processing, // Ludwig-Maximilians-University, Munich, Germany // // // This file is part of IPS Java Utils // // // IPS Java Utils is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, version 3 of the License. // // IPS Java Utils is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with IPS Java Utils. If not, see <http://www.gnu.org/licenses/>. package ipsk.swing; import ipsk.io.FileFilterByExtension; import java.awt.Component; import java.awt.image.RenderedImage; import java.io.File; import java.io.IOException; import java.util.Iterator; import javax.imageio.ImageIO; import javax.imageio.ImageWriter; import javax.imageio.stream.FileImageOutputStream; import javax.imageio.stream.ImageOutputStream; import javax.swing.JFileChooser; import javax.swing.JOptionPane; /** * @author klausj * */ public class JImageFileWriter{ public static void showFileStoreDialog(Component dialogParent,RenderedImage image){ try{ String[] writerFileSuffixes=ImageIO.getWriterFileSuffixes(); JFileChooser jfc=new JFileChooser(); FileFilterByExtension pngFilter=new FileFilterByExtension("Image",writerFileSuffixes); jfc.setFileFilter(pngFilter); jfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); int returnVal = jfc.showSaveDialog(dialogParent); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = jfc.getSelectedFile(); if(file.exists()){ if (JOptionPane.showConfirmDialog(dialogParent, file.getName() + " exists. Do you want to overwrite ?", "Overwrite file ?", JOptionPane.YES_NO_OPTION) != JOptionPane.YES_OPTION){ return; } } String selExtension=pngFilter.extension(file); if(selExtension==null){ JOptionPane.showMessageDialog(dialogParent,"Could not determine image file type by filename extension.", "Image writing error", JOptionPane.ERROR_MESSAGE); return; }else{ try { Iterator<ImageWriter> wrs=ImageIO.getImageWritersBySuffix(selExtension); if(wrs.hasNext()){ ImageWriter iw=wrs.next(); FileImageOutputStream fios=new FileImageOutputStream(file); iw.setOutput(fios); iw.write(image); iw.dispose(); }else{ JOptionPane.showMessageDialog(dialogParent,"No image file writer found for extension: \""+selExtension+"\"", "Image writing error", JOptionPane.ERROR_MESSAGE); return; } } catch (IOException e) { JOptionPane.showMessageDialog(dialogParent, e .getLocalizedMessage(), "Image writing error", JOptionPane.ERROR_MESSAGE); e.printStackTrace(); return; } } }else if (returnVal==JFileChooser.CANCEL_OPTION){ JOptionPane.showMessageDialog(dialogParent,"Image save canceled", "Image writing cancel", JOptionPane.INFORMATION_MESSAGE); return; }else{ return; } }catch(SecurityException se){ JOptionPane.showMessageDialog(dialogParent, se.getLocalizedMessage(), "Security error", JOptionPane.ERROR_MESSAGE); } } }
[ "naseemmahasneh1991@gmail.com" ]
naseemmahasneh1991@gmail.com
3820e0dcffe8f577dc63c24bfc6512ce35e2a6ee
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/com/avito/android/str_calendar/analytics/StrAnalyticsTrackerImpl.java
7549a00aef9f4a862bf3edd1730dea0f7457c2a8
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
1,971
java
package com.avito.android.str_calendar.analytics; import com.avito.android.analytics.Analytics; import com.avito.android.booking.info.BookingInfoActivity; import com.avito.android.remote.auth.AuthSource; import com.avito.android.str_calendar.analytics.event.StrSelectCalendarEvent; import javax.inject.Inject; import kotlin.Metadata; import kotlin.jvm.internal.Intrinsics; import org.jetbrains.annotations.NotNull; @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\u0018\u00002\u00020\u0001B\u0011\b\u0007\u0012\u0006\u0010\n\u001a\u00020\u0007¢\u0006\u0004\b\u000b\u0010\fJ\u0017\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0016¢\u0006\u0004\b\u0005\u0010\u0006R\u0016\u0010\n\u001a\u00020\u00078\u0002@\u0002X‚\u0004¢\u0006\u0006\n\u0004\b\b\u0010\t¨\u0006\r"}, d2 = {"Lcom/avito/android/str_calendar/analytics/StrAnalyticsTrackerImpl;", "Lcom/avito/android/str_calendar/analytics/StrAnalyticsTracker;", "", BookingInfoActivity.EXTRA_ITEM_ID, "", "trackSelectCalendarEvent", "(Ljava/lang/String;)V", "Lcom/avito/android/analytics/Analytics;", AuthSource.SEND_ABUSE, "Lcom/avito/android/analytics/Analytics;", "analytics", "<init>", "(Lcom/avito/android/analytics/Analytics;)V", "str-calendar_release"}, k = 1, mv = {1, 4, 2}) public final class StrAnalyticsTrackerImpl implements StrAnalyticsTracker { public final Analytics a; @Inject public StrAnalyticsTrackerImpl(@NotNull Analytics analytics) { Intrinsics.checkNotNullParameter(analytics, "analytics"); this.a = analytics; } @Override // com.avito.android.str_calendar.analytics.StrAnalyticsTracker public void trackSelectCalendarEvent(@NotNull String str) { Intrinsics.checkNotNullParameter(str, BookingInfoActivity.EXTRA_ITEM_ID); this.a.track(new StrSelectCalendarEvent(str)); } }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com