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
5bf174ec6b1f93fd18f6f4d9b66fdd2ce7db4ab3
6da53d9434a0f2d13eca1b033bc80931147b1b6d
/src/main/java/com/lun/light/component/collectioncomponent/Person.java
b78a00b3f73bdd8cbacf5dee28d4e0e9a74cbe81
[]
no_license
JallenKwong/LearnHibernate
02af1425061818ca7f02299198b4e71852db8299
a83d6739ac2930df8ae9c00bd79262cf6d699c61
refs/heads/master
2022-11-27T14:32:42.319030
2020-02-15T12:52:14
2020-02-15T12:52:14
148,677,523
0
0
null
2022-11-24T04:28:30
2018-09-13T18:02:50
Java
UTF-8
Java
false
false
1,462
java
package com.lun.light.component.collectioncomponent; import java.util.*; import javax.persistence.*; /** * @version 1.0 */ @Entity @Table(name="person_inf") public class Person { @Id @Column(name="person_id") @GeneratedValue(strategy=GenerationType.IDENTITY) private Integer id; private int age; // Map集合元素是组件 @ElementCollection(targetClass=Score.class) @CollectionTable(name="score_inf", joinColumns=@JoinColumn(name="person_id" , nullable=false)) @MapKeyColumn(name="subject_name") @MapKeyClass(String.class) private Map<String , Score> scores = new HashMap<>(); // List集合元素是组件 @ElementCollection(targetClass=Name.class) @CollectionTable(name="nick_inf", joinColumns=@JoinColumn(name="person_id" , nullable=false)) @OrderColumn(name="list_order") private List<Name> nicks = new ArrayList<>(); // id的setter和getter方法 public void setId(Integer id) { this.id = id; } public Integer getId() { return this.id; } // age的setter和getter方法 public void setAge(int age) { this.age = age; } public int getAge() { return this.age; } // nicks的setter和getter方法 public void setNicks(List<Name> nicks) { this.nicks = nicks; } public List<Name> getNicks() { return this.nicks; } // scores的setter和getter方法 public void setScores(Map<String , Score> scores) { this.scores = scores; } public Map<String , Score> getScores() { return this.scores; } }
[ "jallenkwong@163.com" ]
jallenkwong@163.com
0f6ea10aacb6566a0c58a11697160a306d453c70
df4af740ec42e1771cf11b5412d7201fcb39d80d
/configcenter-spring-boot-starter/src/main/java/org/antframework/configcenter/spring/boot/EnvironmentInitializer.java
4b666b469598fe3ed99eb7cf36f8cadaec8cdac7
[]
no_license
ZhangLe1993/configcenter
0bb20c4e529f03aafa6b269be338f56b2f88ba20
6068ad1efe38388ac39592dc5b834811de0d78d0
refs/heads/master
2020-04-19T02:46:08.994474
2019-01-10T15:13:24
2019-01-10T15:13:24
167,914,087
1
0
null
null
null
null
UTF-8
Java
false
false
3,071
java
/* * 作者:钟勋 (e-mail:zhongxunking@163.com) */ /* * 修订记录: * @author 钟勋 2018-05-03 10:10 创建 */ package org.antframework.configcenter.spring.boot; import org.antframework.configcenter.client.Config; import org.antframework.configcenter.spring.ConfigsContexts; import org.antframework.configcenter.spring.context.Contexts; import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; import org.springframework.boot.logging.LoggingApplicationListener; import org.springframework.context.ApplicationListener; import org.springframework.core.annotation.Order; import org.springframework.core.env.EnumerablePropertySource; import org.springframework.core.env.MutablePropertySources; import org.springframework.core.env.PropertySource; /** * environment初始化器(将配置中心的配置加入到environment) * <p> * 日志初始化后再初始化配置中心的配置。原因: * 1、比日志先初始化的好处:在配置中心的日志相关配置会生效;坏处:初始化配置中心的配置报错时,日志打印不出来。 * 2、比日志后初始化的好处:初始化配置中心的配置报错时,能打印日志;坏处:在配置中心的日志相关配置不会生效。 * 总结:一般日志需要进行动态化的配置比较少(比如:日志格式、日志文件路径等),所以设置为日志初始化后再初始化配置中心的配置。 */ @Order(LoggingApplicationListener.DEFAULT_ORDER + 1) public class EnvironmentInitializer implements ApplicationListener<ApplicationEnvironmentPreparedEvent> { @Override public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) { // 创建配置资源 PropertySource propertySource = new ConfigcenterPropertySource(ConfigsContexts.getConfig(Contexts.getAppId())); // 将配置资源添加到environment中 MutablePropertySources propertySources = event.getEnvironment().getPropertySources(); if (ConfigcenterProperties.INSTANCE.getPriorTo() == null) { propertySources.addLast(propertySource); } else { propertySources.addBefore(ConfigcenterProperties.INSTANCE.getPriorTo(), propertySource); } } /** * 配置中心配置资源 */ public static class ConfigcenterPropertySource extends EnumerablePropertySource<Config> { /** * 配置资源名称 */ public static final String PROPERTY_SOURCE_NAME = "configcenter"; public ConfigcenterPropertySource(Config source) { super(PROPERTY_SOURCE_NAME, source); } @Override public boolean containsProperty(String name) { return source.getProperties().contains(name); } @Override public String[] getPropertyNames() { return source.getProperties().getPropertyKeys(); } @Override public Object getProperty(String name) { return source.getProperties().getProperty(name); } } }
[ "zhongxunking@163.com" ]
zhongxunking@163.com
cd9255da27f325e7eccd65300a292bd2614d36f0
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/BoilerActuator1733.java
a6810baa6493103153c5a3a28cf92a29ccaef98c
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
267
java
package syncregions; public class BoilerActuator1733 { public int execute(int temperatureDifference1733, boolean boilerStatus1733) { //sync _bfpnGUbFEeqXnfGWlV1733, behaviour Half Change - return temperature - targetTemperature; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
dafa748be6cd8f8b29808552cf87e8b7d6b5d13b
b9b51ae6bb0ca7e423d3e7d94c2cd02ee2708668
/src/main/java/com/experts/core/biller/statemachine/api/jooq/tables/records/TransactionRecord.java
0b65fb59f5a7ed45aadbeede85bc79fe9420ed0e
[]
no_license
expertsleads1987/billers-latest
2be313849c9cfc5aa95a6d4eb51cf275b197f4e1
64b6f5dbeff379a59aded0339a93829d444b6460
refs/heads/master
2022-10-17T09:25:19.921571
2018-09-15T14:07:10
2018-09-15T14:07:10
148,882,161
0
4
null
2022-10-05T19:11:21
2018-09-15T08:00:51
JavaScript
UTF-8
Java
false
true
7,932
java
/* * This file is generated by jOOQ. */ package com.experts.core.biller.statemachine.api.jooq.tables.records; import com.experts.core.biller.statemachine.api.jooq.tables.Transaction; import java.sql.Timestamp; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.Record1; import org.jooq.Record6; import org.jooq.Row6; import org.jooq.impl.UpdatableRecordImpl; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.11.4" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TransactionRecord extends UpdatableRecordImpl<TransactionRecord> implements Record6<Long, Timestamp, Timestamp, String, Long, String> { private static final long serialVersionUID = -10534425; /** * Setter for <code>public.transaction.id</code>. */ public void setId(Long value) { set(0, value); } /** * Getter for <code>public.transaction.id</code>. */ public Long getId() { return (Long) get(0); } /** * Setter for <code>public.transaction.createddate</code>. */ public void setCreateddate(Timestamp value) { set(1, value); } /** * Getter for <code>public.transaction.createddate</code>. */ public Timestamp getCreateddate() { return (Timestamp) get(1); } /** * Setter for <code>public.transaction.modifieddate</code>. */ public void setModifieddate(Timestamp value) { set(2, value); } /** * Getter for <code>public.transaction.modifieddate</code>. */ public Timestamp getModifieddate() { return (Timestamp) get(2); } /** * Setter for <code>public.transaction.username</code>. */ public void setUsername(String value) { set(3, value); } /** * Getter for <code>public.transaction.username</code>. */ public String getUsername() { return (String) get(3); } /** * Setter for <code>public.transaction.status_id</code>. */ public void setStatusId(Long value) { set(4, value); } /** * Getter for <code>public.transaction.status_id</code>. */ public Long getStatusId() { return (Long) get(4); } /** * Setter for <code>public.transaction.lastmodifiedby</code>. */ public void setLastmodifiedby(String value) { set(5, value); } /** * Getter for <code>public.transaction.lastmodifiedby</code>. */ public String getLastmodifiedby() { return (String) get(5); } // ------------------------------------------------------------------------- // Primary key information // ------------------------------------------------------------------------- /** * {@inheritDoc} */ @Override public Record1<Long> key() { return (Record1) super.key(); } // ------------------------------------------------------------------------- // Record6 type implementation // ------------------------------------------------------------------------- /** * {@inheritDoc} */ @Override public Row6<Long, Timestamp, Timestamp, String, Long, String> fieldsRow() { return (Row6) super.fieldsRow(); } /** * {@inheritDoc} */ @Override public Row6<Long, Timestamp, Timestamp, String, Long, String> valuesRow() { return (Row6) super.valuesRow(); } /** * {@inheritDoc} */ @Override public Field<Long> field1() { return Transaction.TRANSACTION.ID; } /** * {@inheritDoc} */ @Override public Field<Timestamp> field2() { return Transaction.TRANSACTION.CREATEDDATE; } /** * {@inheritDoc} */ @Override public Field<Timestamp> field3() { return Transaction.TRANSACTION.MODIFIEDDATE; } /** * {@inheritDoc} */ @Override public Field<String> field4() { return Transaction.TRANSACTION.USERNAME; } /** * {@inheritDoc} */ @Override public Field<Long> field5() { return Transaction.TRANSACTION.STATUS_ID; } /** * {@inheritDoc} */ @Override public Field<String> field6() { return Transaction.TRANSACTION.LASTMODIFIEDBY; } /** * {@inheritDoc} */ @Override public Long component1() { return getId(); } /** * {@inheritDoc} */ @Override public Timestamp component2() { return getCreateddate(); } /** * {@inheritDoc} */ @Override public Timestamp component3() { return getModifieddate(); } /** * {@inheritDoc} */ @Override public String component4() { return getUsername(); } /** * {@inheritDoc} */ @Override public Long component5() { return getStatusId(); } /** * {@inheritDoc} */ @Override public String component6() { return getLastmodifiedby(); } /** * {@inheritDoc} */ @Override public Long value1() { return getId(); } /** * {@inheritDoc} */ @Override public Timestamp value2() { return getCreateddate(); } /** * {@inheritDoc} */ @Override public Timestamp value3() { return getModifieddate(); } /** * {@inheritDoc} */ @Override public String value4() { return getUsername(); } /** * {@inheritDoc} */ @Override public Long value5() { return getStatusId(); } /** * {@inheritDoc} */ @Override public String value6() { return getLastmodifiedby(); } /** * {@inheritDoc} */ @Override public TransactionRecord value1(Long value) { setId(value); return this; } /** * {@inheritDoc} */ @Override public TransactionRecord value2(Timestamp value) { setCreateddate(value); return this; } /** * {@inheritDoc} */ @Override public TransactionRecord value3(Timestamp value) { setModifieddate(value); return this; } /** * {@inheritDoc} */ @Override public TransactionRecord value4(String value) { setUsername(value); return this; } /** * {@inheritDoc} */ @Override public TransactionRecord value5(Long value) { setStatusId(value); return this; } /** * {@inheritDoc} */ @Override public TransactionRecord value6(String value) { setLastmodifiedby(value); return this; } /** * {@inheritDoc} */ @Override public TransactionRecord values(Long value1, Timestamp value2, Timestamp value3, String value4, Long value5, String value6) { value1(value1); value2(value2); value3(value3); value4(value4); value5(value5); value6(value6); return this; } // ------------------------------------------------------------------------- // Constructors // ------------------------------------------------------------------------- /** * Create a detached TransactionRecord */ public TransactionRecord() { super(Transaction.TRANSACTION); } /** * Create a detached, initialised TransactionRecord */ public TransactionRecord(Long id, Timestamp createddate, Timestamp modifieddate, String username, Long statusId, String lastmodifiedby) { super(Transaction.TRANSACTION); set(0, id); set(1, createddate); set(2, modifieddate); set(3, username); set(4, statusId); set(5, lastmodifiedby); } }
[ "yousef.ataya@experts.ps" ]
yousef.ataya@experts.ps
08557c5774eb3d49bbde692b4d9eb9d06c7476b4
d4028778cc8c83d77b5b90489a90f7e0a7710815
/plugins/org.infai.m3b.visio.emf/src/org/infai/m3b/visio/emf/visiostub/Windows.java
36e9627b0018bdc6622e60c0e8f1aa6c59e9e5fa
[]
no_license
bflowtoolbox/app
881a856ea055bb8466a1453e2ed3e1b23347e425
997baa8c73528d20603fa515e3d701334acb1be4
refs/heads/master
2021-06-01T15:19:14.222596
2020-06-15T18:36:49
2020-06-15T18:36:49
39,310,563
5
7
null
2019-02-05T16:02:49
2015-07-18T19:44:51
Java
UTF-8
Java
false
false
509
java
package org.infai.m3b.visio.emf.visiostub; import org.jawin.*; /** * Jawin generated code please do not edit * * CoClass Interface: Windows * Description: The windows open in a Visio Application or Window. The first Window in a Windows collection is item 1. * Help file: C:\Program Files\Microsoft Office\Office12\Vis_SDR.CHM * * @author jawin_gen */ public class Windows { public static final GUID CLSID = new GUID("{000d0a0b-0000-0000-C000-000000000046}"); }
[ "astorch@ee779243-7f51-0410-ad50-ee0809328dc4" ]
astorch@ee779243-7f51-0410-ad50-ee0809328dc4
533bb40baaa2493dcdec15529a9338541101dac6
516903a7cc62348994527593101ef86164fd21d7
/content/StorageClient/StorageClientSample/src/main/gen/com/example/android/storageclient/Manifest.java
77dc0aceb0726214a1c885aa204353c34215a078
[]
no_license
dmitrykolesnikovich/android-samples
6e2eed839c7d45be34802d90b787b0c24e072f39
4872cf282444bdbff5df26f309f31389a3b19a49
refs/heads/master
2020-05-17T05:33:40.317164
2015-09-24T17:49:54
2015-09-24T17:49:54
22,377,454
0
0
null
null
null
null
UTF-8
Java
false
false
203
java
/*___Generated_by_IDEA___*/ package com.example.android.storageclient; /* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */ public final class Manifest { }
[ "kolesnikovichdn@gmail.com" ]
kolesnikovichdn@gmail.com
46ec7378e434a4b86bbde78e3b9a911f5026a568
e21d17cdcd99c5d53300a7295ebb41e0f876bbcb
/22_Chapters_Edition/src/main/java/com/lypgod/test/tij4/practices/Ch7_ReusingClasses/Practice2/Detergent.java
030e142b730ee410a5d9a0383e722e47b17cb6b1
[]
no_license
lypgod/Thinking_In_Java_4th_Edition
dc42a377de28ae51de2c4000a860cd3bc93d0620
5dae477f1a44b15b9aa4944ecae2175bd5d8c10e
refs/heads/master
2020-04-05T17:39:55.720961
2018-11-11T12:07:56
2018-11-11T12:08:26
157,070,646
0
0
null
null
null
null
UTF-8
Java
false
false
1,384
java
package com.lypgod.test.tij4.practices.Ch7_ReusingClasses.Practice2;//: reusing/Detergent.java // Inheritance syntax & properties. class Cleanser { private String s = "Cleanser"; public void append(String a) { s += a; } public void dilute() { append(" dilute()"); } public void apply() { append(" apply()"); } public void scrub() { append(" scrub()"); } public String toString() { return s; } public static void main(String[] args) { Cleanser x = new Cleanser(); x.dilute(); x.apply(); x.scrub(); System.out.println(x); } } public class Detergent extends Cleanser { // Change a method: public void scrub() { append(" Detergent.scrub()"); super.scrub(); // Call base-class version } // Add methods to the interface: public void foam() { append(" foam()"); } // Test the new class: public static void main(String[] args) { Detergent x = new Detergent(); x.dilute(); x.apply(); x.scrub(); x.foam(); System.out.println(x); System.out.println("Testing base class:"); Cleanser.main(args); } } /* Output: Cleanser dilute() apply() Detergent.scrub() scrub() foam() Testing base class: Cleanser dilute() apply() scrub() *///:~
[ "lypgod@hotmail.com" ]
lypgod@hotmail.com
b26e9e4e076ee9fe2c97f58c2d38188cf0f3821d
f766baf255197dd4c1561ae6858a67ad23dcda68
/app/src/main/java/com/tencent/mm/u/c/f.java
d33cea260e15c6e1b37a1b05da38740f70e0cfdb
[]
no_license
jianghan200/wxsrc6.6.7
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
eb6c56587cfca596f8c7095b0854cbbc78254178
refs/heads/master
2020-03-19T23:40:49.532494
2018-06-12T06:00:50
2018-06-12T06:00:50
137,015,278
4
2
null
null
null
null
UTF-8
Java
false
false
896
java
package com.tencent.mm.u.c; import com.tencent.mm.u.b.d; import com.tencent.mm.u.d.a; import java.util.HashMap; import junit.framework.Assert; import org.json.JSONObject; public final class f { public a doM; public d doX; public g dpa; public f(d paramd, g paramg, a parama) { Assert.assertNotNull(paramd); Assert.assertNotNull(paramg); Assert.assertNotNull(parama); this.doX = paramd; this.dpa = paramg; this.doM = parama; } public static String Db() { HashMap localHashMap = new HashMap(); localHashMap.put("nativeTime", Long.valueOf(System.currentTimeMillis())); return new JSONObject(localHashMap).toString(); } } /* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes7-dex2jar.jar!/com/tencent/mm/u/c/f.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "526687570@qq.com" ]
526687570@qq.com
ad9e3d5dd96b9a756a39f553cab86c543ec5d8e7
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
/Corpus/eclipse.jdt.ui/8578.java
a0f5de969babfb65ef39d4a1a0809e69d1b37a0f
[ "MIT" ]
permissive
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
d3fd21745dfddb2979e8ac262588cfdfe471899f
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
refs/heads/master
2020-03-31T15:52:01.005505
2018-10-01T23:38:50
2018-10-01T23:38:50
152,354,327
1
0
MIT
2018-10-10T02:57:02
2018-10-10T02:57:02
null
UTF-8
Java
false
false
2,653
java
/******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation 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: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.internal.ui.text.folding; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.jdt.ui.text.folding.IJavaFoldingPreferenceBlock; /** * Empty preference block for extensions to the * <code>org.eclipse.jdt.ui.javaFoldingStructureProvider</code> extension * point that do not specify their own. * * @since 3.0 */ class EmptyJavaFoldingPreferenceBlock implements IJavaFoldingPreferenceBlock { /* * @see org.eclipse.jdt.internal.ui.text.folding.IJavaFoldingPreferences#createControl(org.eclipse.swt.widgets.Group) */ @Override public Control createControl(Composite composite) { Composite inner = new Composite(composite, SWT.NONE); inner.setLayout(new GridLayout(3, false)); Label label = new Label(inner, SWT.CENTER); GridData gd = new GridData(GridData.FILL_BOTH); gd.widthHint = 30; label.setLayoutData(gd); label = new Label(inner, SWT.CENTER); label.setText(FoldingMessages.EmptyJavaFoldingPreferenceBlock_emptyCaption); gd = new GridData(GridData.CENTER); label.setLayoutData(gd); label = new Label(inner, SWT.CENTER); gd = new GridData(GridData.FILL_BOTH); gd.widthHint = 30; label.setLayoutData(gd); return inner; } /* * @see org.eclipse.jdt.internal.ui.text.folding.IJavaFoldingPreferenceBlock#initialize() */ @Override public void initialize() { } /* * @see org.eclipse.jdt.internal.ui.text.folding.IJavaFoldingPreferenceBlock#performOk() */ @Override public void performOk() { } /* * @see org.eclipse.jdt.internal.ui.text.folding.IJavaFoldingPreferenceBlock#performDefaults() */ @Override public void performDefaults() { } /* * @see org.eclipse.jdt.internal.ui.text.folding.IJavaFoldingPreferenceBlock#dispose() */ @Override public void dispose() { } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
c3e0c698f9e25f1776101346f14db5604b8f8e76
c62ddcd27b0c259fd77c19b2c10af12f832ab5ef
/xungen/src/main/java/com/ruihuo/ixungen/utils/ShareUtils.java
2cd848796c9e882fe75dab6c26a0f809b6878784
[]
no_license
yudonghui/ixungen
f759d0059a4b5d64e877d0518d76c4210980c119
e1e2bd9ae1d5719cd66e91404f206efc060fd25d
refs/heads/master
2020-04-16T18:20:31.172362
2019-01-15T08:48:57
2019-01-15T08:48:57
165,815,142
0
0
null
null
null
null
UTF-8
Java
false
false
6,404
java
package com.ruihuo.ixungen.utils; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.text.TextUtils; import android.util.Log; import com.ruihuo.ixungen.R; import java.util.HashMap; import cn.sharesdk.framework.Platform; import cn.sharesdk.framework.PlatformActionListener; import cn.sharesdk.framework.ShareSDK; import cn.sharesdk.sina.weibo.SinaWeibo; import cn.sharesdk.tencent.qq.QQ; import cn.sharesdk.tencent.qzone.QZone; import cn.sharesdk.wechat.friends.Wechat; import cn.sharesdk.wechat.moments.WechatMoments; /** * @author yudonghui * @date 2017/4/26 * @describe May the Buddha bless bug-free!!! */ public class ShareUtils { private Context mContext; public ShareUtils(Context mContext) { this.mContext = mContext; } public void share(final String title, final String text, final String url) { // ShareSDK.initSDK(mContext); cn.sharesdk.onekeyshare.OnekeyShare oks = new cn.sharesdk.onekeyshare.OnekeyShare(); // 关闭sso授权 oks.disableSSOWhenAuthorize(); oks.setShareContentCustomizeCallback(new cn.sharesdk.onekeyshare.ShareContentCustomizeCallback() { @Override public void onShare(Platform platform, Platform.ShareParams paramsToShare) { if (WechatMoments.NAME.equals(platform.getName()) || Wechat.NAME.equals(platform.getName())) { paramsToShare.setTitle(title); paramsToShare.setText(text); paramsToShare.setUrl(url); paramsToShare.setShareType(Platform.SHARE_WEBPAGE); } else if (QQ.NAME.equals(platform.getName()) || QZone.NAME.equals(platform.getName())) { paramsToShare.setTitle(title); paramsToShare.setText(text); paramsToShare.setTitleUrl(url); paramsToShare.setSite(mContext.getString(R.string.app_name)); paramsToShare.setSiteUrl("http://www.ixungen.cn/portal.php"); } else { // paramsToShare.setTitle(title + "\n" + text); paramsToShare.setText(title + "\n" + text + "\n" + url); // paramsToShare.setUrl(url); } } }); // 启动分享GUI oks.show(mContext); } /** * @param linkUrl 链接 * @param title 标题 * @param text 介绍 * @param imgUrl 图片链接 * @param type 分享方式(0-新浪,1-微信,4-QQ) */ public void shareSelf(String linkUrl, String title, String text, String imgUrl, String type) { switch (type) { case "0": shareWB(title, text, linkUrl, imgUrl); break; case "1": shareWx(title, text, linkUrl, imgUrl); break; case "4": shareQQ(title, text, linkUrl, imgUrl); break; } } public void shareWx(String title, String text, String linkUrl, String imgUrl) { Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setShareType(Platform.SHARE_WEBPAGE); if (TextUtils.isEmpty(imgUrl)) { Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.mipmap.icon); shareParams.setImageData(bitmap); } else shareParams.setImageUrl(imgUrl); shareParams.setText(text); shareParams.setTitle(title); //如果是分享图片,那么不要设置url shareParams.setUrl(linkUrl); Platform platform = ShareSDK.getPlatform(Wechat.NAME); platform.setPlatformActionListener(new PlatformActionListener() { @Override public void onComplete(Platform platform, int i, HashMap<String, Object> hashMap) { Log.e("分享结果", "onComplete"); } @Override public void onError(Platform platform, int i, Throwable throwable) { Log.e("分享结果", "onError"); } @Override public void onCancel(Platform platform, int i) { Log.e("分享结果", "onCancel"); } }); platform.share(shareParams); } public void shareQQ(String title, String text, String linkUrl, String imgUrl) { Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setTitle(title); shareParams.setText(text); shareParams.setTitleUrl(linkUrl); shareParams.setSite(mContext.getString(R.string.app_name)); shareParams.setSiteUrl("http://www.ixungen.cn/portal.php"); Platform platform = ShareSDK.getPlatform(QQ.NAME); platform.setPlatformActionListener(new PlatformActionListener() { @Override public void onComplete(Platform platform, int i, HashMap<String, Object> hashMap) { Log.e("分享结果", "onComplete"); } @Override public void onError(Platform platform, int i, Throwable throwable) { Log.e("分享结果", "onError"); } @Override public void onCancel(Platform platform, int i) { Log.e("分享结果", "onCancel"); } }); platform.share(shareParams); } public void shareWB(String title, String text, String linkUrl, String imgUrl) { Platform.ShareParams shareParams = new SinaWeibo.ShareParams(); shareParams.setText(title + "\n" + text + "\n" + linkUrl); Platform platform = ShareSDK.getPlatform(SinaWeibo.NAME); platform.setPlatformActionListener(new PlatformActionListener() { @Override public void onComplete(Platform platform, int i, HashMap<String, Object> hashMap) { Log.e("分享结果", "onComplete"); } @Override public void onError(Platform platform, int i, Throwable throwable) { Log.e("分享结果", "onError"); } @Override public void onCancel(Platform platform, int i) { Log.e("分享结果", "onCancel"); } }); platform.share(shareParams); } }
[ "yudonghui@51caixiang.com" ]
yudonghui@51caixiang.com
dc95fa57c5cd5ade85ebc892b3f89b6fdbe8688b
4c309dfe0c97f20ddefd443c4175f5c39ca9b436
/src/main/java/com/mycompany/tech/client/UserFeignClientInterceptor.java
f5a176a63e63dca616dd33e962cf2ec8a05302c1
[]
no_license
MEJDIGHORRI/tech
a8e37752d3a26b6d990f72fe414b67594caa5fa4
5425108a8031a739df9a98e644536d6854166c98
refs/heads/main
2023-03-02T04:56:44.512707
2021-02-13T11:55:45
2021-02-13T11:55:45
239,346,098
0
0
null
null
null
null
UTF-8
Java
false
false
610
java
package com.mycompany.tech.client; import com.mycompany.tech.security.SecurityUtils; import feign.RequestInterceptor; import feign.RequestTemplate; import org.springframework.stereotype.Component; @Component public class UserFeignClientInterceptor implements RequestInterceptor { private static final String AUTHORIZATION_HEADER = "Authorization"; private static final String BEARER = "Bearer"; @Override public void apply(RequestTemplate template) { SecurityUtils.getCurrentUserJWT().ifPresent(s -> template.header(AUTHORIZATION_HEADER, String.format("%s %s", BEARER, s))); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
2047903d291bf1d2766d358cbdfb167b3faa3834
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_5960fbc34544c0269d5d1f1b9f8f6c4cb64f7604/XpandResourceParser/11_5960fbc34544c0269d5d1f1b9f8f6c4cb64f7604_XpandResourceParser_t.java
549e74c87b7095bc072c7bfeb6654afc936c7ddf
[]
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,272
java
/* * Copyright (c) 2005, 2009 Sven Efftinge 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: * Sven Efftinge - Initial API and implementation * Artem Tikhomirov - LPG lexer/parser and error reporting */ package org.eclipse.gmf.internal.xpand.util; import java.io.IOException; import java.io.Reader; import org.eclipse.gmf.internal.xpand.ast.Template; import org.eclipse.gmf.internal.xpand.model.XpandResource; import org.eclipse.gmf.internal.xpand.parser.XpandLexer; import org.eclipse.gmf.internal.xpand.parser.XpandParser; import org.eclipse.gmf.internal.xpand.util.ParserException.ErrorLocationInfo; public class XpandResourceParser { // XXX everything except exact lexer and parser instances are the same as n XtendResourceParser public XpandResource parse(final Reader source, final String qualifiedTemplateName) throws IOException, ParserException { Template tpl = null; XpandParser parser = null; XpandLexer scanner = null; final char[] buffer = new StreamConverter().toCharArray(source); if (buffer.length > 0 && buffer[0] == '\uFEFF') { System.arraycopy(buffer, 1, buffer, 0, buffer.length-1); } try { scanner = new XpandLexer(buffer, qualifiedTemplateName); parser = new XpandParser(scanner); scanner.lexer(parser); tpl = parser.parser(); // FIXME handle errors if find out how to force generated parser to throw exception instead of consuming it } catch (final Exception e) { ErrorLocationInfo[] errors = extractErrors(scanner, parser); if (errors.length == 0) { throw new IOException("Unexpected exception while parsing:" + e.toString()); } else { throw new ParserException(qualifiedTemplateName, errors); } } ErrorLocationInfo[] errors = extractErrors(scanner, parser); if (errors.length > 0) { // TODO: instead of throwing an exception all errors should be added // into the parsed template and processed later. This will allow us // executing partially parsed template. throw new ParserException(qualifiedTemplateName, errors); } if (tpl != null) { // XXX two choices here - // (1) pass any name into parse method, do not assume it's fqn and move setFQN outside of this method // (2) assume fqn is passed into parse() as it's now. tpl.setFullyQualifiedName(qualifiedTemplateName); return tpl; } assert false : "no reason not to get template"; throw new ParserException(qualifiedTemplateName, errors); } // FIXME do it in the parser itself, though keeping errors separate may help // those willing to report them separately private static ErrorLocationInfo[] extractErrors(XpandLexer scanner, XpandParser parser) { ErrorLocationInfo[] e1 = scanner.getErrors(); ErrorLocationInfo[] e2 = parser.getErrors(); ErrorLocationInfo[] res = new ErrorLocationInfo[e1.length + e2.length]; System.arraycopy(e1, 0, res, 0, e1.length); System.arraycopy(e2, 0, res, e1.length, e2.length); return res; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3692148a2be1e6ef1a74d6503418cd59f5071731
fd91a17b15285d60a49d67c79a2a5bb199814cb4
/commonui/src/bean/embed/AbstractSalesOrPurchase.java
3733c8f0bdbf7a9b38c3e66b408f6dd1bf6c14c7
[]
no_license
ugurk/aasuite
b27d186b69bca6fc1983c26be515f83d2a17883a
5c3aa229b612b2fc1d791f018c4e421179c0d745
refs/heads/master
2021-01-10T02:24:37.034074
2011-11-11T13:15:34
2011-11-11T13:15:34
55,149,900
0
2
null
null
null
null
UTF-8
Java
false
false
4,567
java
/* * Salesorder.java * * Created on Nov 22, 2007, 6:07:49 PM * * To change this template, choose Tools | Templates * and open the template in the editor. */ package bean.embed; import java.io.Serializable; import java.util.Date; import java.util.List; import javax.persistence.Embeddable; import javax.persistence.Embedded; import javax.persistence.Temporal; import javax.persistence.TemporalType; import service.util.AbstractIBean; /** * * @author pogi */ @Embeddable public class AbstractSalesOrPurchase implements Serializable { public int partnerId; public String referenceNumber; public String contactPerson; public String currency; public String status; @Temporal(value = TemporalType.DATE) public Date postingDate; @Temporal(value = TemporalType.DATE) public Date deliveryDate; @Temporal(value = TemporalType.DATE) public Date documentDate; public String itemType; //this may be service or item public int employeeId; public double totalBeforeDiscount; public double discountPercentage; public double discountAmount; public double freightAmount; public int rounding; public double taxAmount; public double totalAmount; public int invoiceId; @Embedded public AbstractLogistics logistics; @Embedded public AbstractAccounting accounting; public AbstractLogistics getLogistics() { return logistics; } public void setLogistics(AbstractLogistics logistics) { this.logistics = logistics; } public AbstractAccounting getAccounting() { return accounting; } public void setAccounting(AbstractAccounting accounting) { this.accounting = accounting; } public String getContactPerson() { return contactPerson; } public void setContactPerson(String contactPerson) { this.contactPerson = contactPerson; } public String getCurrency() { return currency; } public void setCurrency(String currency) { this.currency = currency; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public Date getPostingDate() { return postingDate; } public void setPostingDate(Date postingDate) { this.postingDate = postingDate; } public Date getDeliveryDate() { return deliveryDate; } public void setDeliveryDate(Date deliveryDate) { this.deliveryDate = deliveryDate; } public Date getDocumentDate() { return documentDate; } public void setDocumentDate(Date documentDate) { this.documentDate = documentDate; } public String getItemType() { return itemType; } public void setItemType(String itemType) { this.itemType = itemType; } public double getTotalBeforeDiscount() { return totalBeforeDiscount; } public void setTotalBeforeDiscount(double totalBeforeDiscount) { this.totalBeforeDiscount = totalBeforeDiscount; } public double getDiscountPercentage() { return discountPercentage; } public void setDiscountPercentage(double discountPercentage) { this.discountPercentage = discountPercentage; } public double getDiscountAmount() { return discountAmount; } public void setDiscountAmount(double discountAmount) { this.discountAmount = discountAmount; } public double getFreightAmount() { return freightAmount; } public void setFreightAmount(double freightAmount) { this.freightAmount = freightAmount; } public int getRounding() { return rounding; } public void setRounding(int rounding) { this.rounding = rounding; } public double getTaxAmount() { return taxAmount; } public void setTaxAmount(double taxAmount) { this.taxAmount = taxAmount; } public double getTotalAmount() { return totalAmount; } public void setTotalAmount(double totalAmount) { this.totalAmount = totalAmount; } public int getInvoiceId() { return invoiceId; } public void setInvoiceId(int invoiceId) { this.invoiceId = invoiceId; } public int getPartnerId() { return partnerId; } public void setPartnerId(int partnerId) { this.partnerId = partnerId; } public String getReferenceNumber() { return referenceNumber; } public void setReferenceNumber(String referenceNumber) { this.referenceNumber = referenceNumber; } public int getEmployeeId() { return employeeId; } public void setEmployeeId(int employeeId) { this.employeeId = employeeId; } }
[ "sales.softlabs@d6e7c0fa-23b8-11df-b9ed-85270ab41615" ]
sales.softlabs@d6e7c0fa-23b8-11df-b9ed-85270ab41615
e06953f5c87035e37199219bc5598eb62a2ec917
d099b49dc23a0af079ae1c172afb1b7b40b9fc30
/src/main/java/org/apache/camel/salesforce/dto/ContentDistributionView.java
b1db76fbbb9c8403e86a7f646e2c770c859a0113
[]
no_license
jorgecanoc/salesforce-demo
a5bea92dd33f7327d0694ebe03eb00987e586b50
5dfa7c1cb1bbbb88cc24dcbdd302006a86ad1d57
refs/heads/master
2021-01-10T09:21:54.522025
2016-03-04T19:29:39
2016-03-04T19:29:39
53,092,243
0
0
null
null
null
null
UTF-8
Java
false
false
1,719
java
/* * Salesforce DTO generated by camel-salesforce-maven-plugin * Generated on: Thu Feb 11 22:46:57 CST 2016 */ package org.apache.camel.salesforce.dto; import com.thoughtworks.xstream.annotations.XStreamAlias; import org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase; import org.codehaus.jackson.annotate.JsonProperty; /** * Salesforce DTO for SObject ContentDistributionView */ @XStreamAlias("ContentDistributionView") public class ContentDistributionView extends AbstractSObjectBase { // DistributionId private String DistributionId; @JsonProperty("DistributionId") public String getDistributionId() { return this.DistributionId; } @JsonProperty("DistributionId") public void setDistributionId(String DistributionId) { this.DistributionId = DistributionId; } // ParentViewId private String ParentViewId; @JsonProperty("ParentViewId") public String getParentViewId() { return this.ParentViewId; } @JsonProperty("ParentViewId") public void setParentViewId(String ParentViewId) { this.ParentViewId = ParentViewId; } // IsInternal private Boolean IsInternal; @JsonProperty("IsInternal") public Boolean getIsInternal() { return this.IsInternal; } @JsonProperty("IsInternal") public void setIsInternal(Boolean IsInternal) { this.IsInternal = IsInternal; } // IsDownload private Boolean IsDownload; @JsonProperty("IsDownload") public Boolean getIsDownload() { return this.IsDownload; } @JsonProperty("IsDownload") public void setIsDownload(Boolean IsDownload) { this.IsDownload = IsDownload; } }
[ "jorge.canoc@gmail.com" ]
jorge.canoc@gmail.com
4d74c5815f1c03b2b99ffd0f3908ea3719aa4112
c31094261c489f7ff94cb181ae7e0a0af5e2a6f9
/src/controller/DangNhapServlet.java
25f784730f4f7b79ecbb7bb53b84fb2033e12850
[]
no_license
vinhtranphuc/Demo_MVC_JspServlet
1b9316e768e9060349e536e024e65753db7ee47a
43f7b7b807a96ebfcb1b6c3ad95528c99766e4d6
refs/heads/master
2020-05-27T21:12:14.369104
2017-03-02T00:43:18
2017-03-02T00:43:18
83,614,339
0
0
null
null
null
null
UTF-8
Java
false
false
1,499
java
package controller; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import model.bo.NguoiDungBO; /** * Servlet implementation class DangNhapServlet */ public class DangNhapServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public DangNhapServlet() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String username=request.getParameter("tenDangNhap"); String password=request.getParameter("matKhau"); NguoiDungBO nguoiDungBO=new NguoiDungBO(); if(nguoiDungBO.checkLogin(username,password)) { response.sendRedirect("DanhSachSinhVienServlet"); } else { RequestDispatcher rd=request.getRequestDispatcher("loginFail.jsp"); rd.forward(request,response); } } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub doGet(request, response); } }
[ "you@example.com" ]
you@example.com
800445359454bf9e95ff806293405f74e2e77e8b
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
/flakiness-predicter/input_data/original_tests/wro4j-wro4j/nonFlakyMethods/ro.isdc.wro.model.resource.processor.decorator.TestBenchmarkProcessorDecorator-shouldInvokeBeforeAndAfterInDebugMode.java
6c9ca7ed78d483df7f2e2ebe062e37fc5d0cb1c1
[ "BSD-3-Clause" ]
permissive
Taher-Ghaleb/FlakeFlagger
6fd7c95d2710632fd093346ce787fd70923a1435
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
refs/heads/main
2023-07-14T16:57:24.507743
2021-08-26T14:50:16
2021-08-26T14:50:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
248
java
@Test public void shouldInvokeBeforeAndAfterInDebugMode() throws Exception { Context.get().getConfig().setDebug(true); victim.process(mockResource,mockReader,mockWriter); Mockito.verify(mockBefore).run(); Mockito.verify(mockAfter).run(); }
[ "aalsha2@masonlive.gmu.edu" ]
aalsha2@masonlive.gmu.edu
0a58e4895857ffcd453c9927b529d63c4b0af625
3fdc23d1f6a30d00fde0f27b883b24acd02dc93e
/kyu8/YesOrNo.java
67a29d6f11dc528eeab36d2d12fe53ad2b877700
[]
no_license
RossHS/CodeWars
e14ebe58c2ce52f65c04b84a11d9163ff99c80b7
ad7327bc21e965d7a272c2bde5203940dd0d6b5b
refs/heads/master
2020-03-12T02:25:13.591643
2019-07-11T13:22:03
2019-07-11T13:22:03
130,402,330
0
0
null
null
null
null
UTF-8
Java
false
false
324
java
package exercises.codewars.kyu8; /** * Complete the method that takes a boolean value and return a "Yes" string for true, or a "No" string for false. * * @author Ross Khapilov * @version 1.0 02.07.2018 */ public class YesOrNo { public static String boolToWord(boolean b) { return b ? "Yes" : "No"; } }
[ "rossxpanteley@gmail.com" ]
rossxpanteley@gmail.com
97f972e98a3b96474fa2914ff48d1f371381d6d9
9c2ee93014f91da3e6eb37bebe9bfd54e9b07591
/models/src/main/java/com/emc/vipr/model/object/datastore/DataStoreRestRep.java
ae7b9de45b62010713f1a03e8574d3cc947f584c
[ "Apache-2.0" ]
permissive
jasoncwik/controller-client-java
c0b58be4c579ad9d748dc9a5d674be5ec12d4d24
b1c115f73393381a58fd819e758dae55968ff488
refs/heads/master
2021-01-18T16:24:57.131929
2014-03-13T15:27:30
2014-03-13T15:27:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,515
java
/** * Copyright (c) 2008-2011 EMC Corporation * All Rights Reserved * * This software contains the intellectual property of EMC Corporation * or is licensed to EMC Corporation from third parties. Use of this * software and the intellectual property contained therein is expressly * limited to the terms and conditions of the License Agreement under which * it is provided by or on behalf of EMC. */ package com.emc.vipr.model.object.datastore; import com.emc.storageos.model.DataObjectRestRep; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; /** * Information about the data store */ @XmlRootElement(name = "data_store") @XmlAccessorType(XmlAccessType.PROPERTY) public class DataStoreRestRep extends DataObjectRestRep { private String _description; private Long _totalCapacityInGB; private Long _availableCapacityInGB; private String _deviceState; private String _vPool; private String _additionalInfo; public DataStoreRestRep(){ } /** * <p>State of the data store</p> * <li>uninitialized - has not been initialized, unavailable for use</li> * <li>initializing - being initialized</li> * <li>initialized - initialized, ready for use</li> * <li>deleting - being deleted, can not be used</li> * <li>deleted - deleted, no longer exists</li> * @valid uninitialized, initializing, initialized, deleting, deleted * @return State of data store */ @XmlElement(name = "device_state") public String getDeviceState() { return _deviceState; } @XmlElement(name = "device_info") public String getDeviceInfo() { return _additionalInfo; } /** * vpool which is used for thisdata store * @valid None * @return vpool */ @XmlElement(name = "data_services_vpool") public String getCoS() { return _vPool; } /** * Total capacity for this data store * @valid None * @return Total Capacity */ @XmlElement(name = "usable_gb") public Long getTotalCapacityInGB() { return _totalCapacityInGB; } /** * Estimated available capacity for this data store * @valid None * @return Available capacity */ @XmlElement(name = "free_gb") public Long getAvailableCapacityInGB() { return _availableCapacityInGB; } @XmlElement(name = "used_gb") public Long getUsedCapacityInGB(){ return _totalCapacityInGB - _availableCapacityInGB; } /** * Description for this data store * @valid None * @return data store description */ @XmlElement(name = "description") public String getDescription() { return _description; } public void setDeviceInfo(String _additionalInfo) { this._additionalInfo = _additionalInfo; } public void setAvailableCapacityInGB(Long _availableCapacityInGB) { this._availableCapacityInGB = _availableCapacityInGB; } public void setDescription(String _description) { this._description = _description; } public void setDeviceState(String _deviceState) { this._deviceState = _deviceState; } public void setTotalCapacityInGB(Long _totalCapacityInGB) { this._totalCapacityInGB = _totalCapacityInGB; } public void setCoS(String _vPool) { this._vPool = _vPool; } }
[ "Christopher.Dail@emc.com" ]
Christopher.Dail@emc.com
7acf986d7b2193c6fc514d9faed86391bcb02718
0ece1d19765c9e7b322972c427861ea4fad516bd
/imsdk/src/main/java/com/qunar/im/ui/presenter/views/IAnnounceView.java
9ab97c170f60237ad0aa311076fc9f6f174e3da4
[ "MIT" ]
permissive
froyomu/imsdk-android
ef9c8308dcf8fe9e9983b384f6bbe0b0519c8036
a800f75dc6653eeb932346f6c083f1c547ebd876
refs/heads/master
2020-04-11T06:42:15.067453
2019-09-25T05:32:32
2019-09-25T05:32:32
161,588,802
0
0
MIT
2018-12-13T05:33:02
2018-12-13T05:33:02
null
UTF-8
Java
false
false
331
java
package com.qunar.im.ui.presenter.views; import com.qunar.im.base.module.IMMessage; import java.util.List; /** * Created by xinbo.wang on 2015/6/8. */ public interface IAnnounceView { void setAnnounceList(List<IMMessage> msgs); void setTitle(String name); void addHistoryMessage(List<IMMessage> historyMessage); }
[ "lihaibin.li@qunar.com" ]
lihaibin.li@qunar.com
6d3fcb3f6a949f12d8ea33f2169f784de8d6c873
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/microgw-20200810/src/main/java/com/aliyun/microgw20200810/models/GetAuthTicketByIdHeaders.java
78602626f5bcbc15be0fa84bbd845301c938dc44
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,074
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.microgw20200810.models; import com.aliyun.tea.*; public class GetAuthTicketByIdHeaders extends TeaModel { @NameInMap("commonHeaders") public java.util.Map<String, String> commonHeaders; // cookie @NameInMap("cookie") public java.util.Map<String, ?> cookie; public static GetAuthTicketByIdHeaders build(java.util.Map<String, ?> map) throws Exception { GetAuthTicketByIdHeaders self = new GetAuthTicketByIdHeaders(); return TeaModel.build(map, self); } public GetAuthTicketByIdHeaders setCommonHeaders(java.util.Map<String, String> commonHeaders) { this.commonHeaders = commonHeaders; return this; } public java.util.Map<String, String> getCommonHeaders() { return this.commonHeaders; } public GetAuthTicketByIdHeaders setCookie(java.util.Map<String, ?> cookie) { this.cookie = cookie; return this; } public java.util.Map<String, ?> getCookie() { return this.cookie; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
d77ec0cd76c93703df87ca89a2407142a6662bf9
3eb360b54c646b2bdf9239696ddd7ce8409ece8d
/lm_terminal/src/com/lauvan/emergencyplan/service/MonitoringWarningService.java
a37774bbb3b22f9222db1ba1ba97d8e4d492dab1
[]
no_license
amoydream/workspace
46a8052230a1eeede2c51b5ed2ca9e4c3f8fc39e
72f0f1db3e4a63916634929210d0ab3512a69df5
refs/heads/master
2021-06-11T12:05:24.524282
2017-03-01T01:43:35
2017-03-01T01:43:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
234
java
package com.lauvan.emergencyplan.service; import com.lauvan.base.dao.BaseDAO; import com.lauvan.emergencyplan.entity.E_Monitoring_Warning; public interface MonitoringWarningService extends BaseDAO<E_Monitoring_Warning> { }
[ "jason.ss.tao@qq.com" ]
jason.ss.tao@qq.com
ae17c85264d4a07956b41a02a850f30167c13216
48e0f257417cfb75a79aa2c1cec4238f6b43de83
/eclipse/plugins/org.switchyard.tools.ui.editor/src/org/switchyard/tools/ui/editor/diagram/implementation/SCADiagramAddImplementationFeature.java
89d4c98e3b5882fe3814064b4762df2f52121788
[]
no_license
bfitzpat/tools
4833487de846e577cf3de836b4aa700bdd04ce52
26ea82a46c481b196180c7cb16fcd306d894987f
refs/heads/master
2021-01-17T16:06:29.271555
2017-10-13T19:14:25
2017-10-19T15:49:41
3,909,717
0
1
null
2017-08-01T09:05:50
2012-04-02T18:38:01
Java
UTF-8
Java
false
false
1,972
java
/******************************************************************************* * Copyright (c) 2012 Red Hat, Inc. * All rights reserved. * This program is 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: * Red Hat, Inc. - initial API and implementation * * @author bfitzpat ******************************************************************************/ package org.switchyard.tools.ui.editor.diagram.implementation; import org.eclipse.graphiti.features.IFeatureProvider; import org.eclipse.graphiti.features.context.IAddContext; import org.eclipse.graphiti.features.impl.AbstractAddShapeFeature; import org.eclipse.graphiti.mm.pictograms.ContainerShape; import org.eclipse.graphiti.mm.pictograms.PictogramElement; import org.eclipse.soa.sca.sca1_1.model.sca.Component; import org.eclipse.soa.sca.sca1_1.model.sca.Implementation; /** * @author bfitzpat * */ public class SCADiagramAddImplementationFeature extends AbstractAddShapeFeature { /** * @param fp the feature provider */ public SCADiagramAddImplementationFeature(IFeatureProvider fp) { super(fp); } @Override public boolean canAdd(IAddContext context) { // check if user wants to add a component service if (context.getNewObject() instanceof Implementation) { ContainerShape targetContainer = context.getTargetContainer(); // check if user wants to add to a component if (getBusinessObjectForPictogramElement(targetContainer) instanceof Component) { return true; } } return false; } @Override public PictogramElement add(IAddContext context) { ContainerShape targetContainer = context.getTargetContainer(); getDiagramBehavior().refresh(); return targetContainer; } }
[ "rcernich@redhat.com" ]
rcernich@redhat.com
ee7756ee533b85a1b71137bbb77e4bb83d2c7cf9
6392035b0421990479baf09a3bc4ca6bcc431e6e
/projects/spring-data-neo4j-071588a4/curr/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/repositories/RepoScanningTest.java
e5ccf1dfc31f2039847829f1fd197e59c9b395c3
[]
no_license
ameyaKetkar/RMinerEvaluationTools
4975130072bf1d4940f9aeb6583eba07d5fedd0a
6102a69d1b78ae44c59d71168fc7569ac1ccb768
refs/heads/master
2020-09-26T00:18:38.389310
2020-05-28T17:34:39
2020-05-28T17:34:39
226,119,387
3
1
null
null
null
null
UTF-8
Java
false
false
1,966
java
/* * Copyright (c) [2011-2015] "Pivotal Software, Inc." / "Neo Technology" / "Graph Aware Ltd." * * This product is licensed to you under the Apache License, Version 2.0 (the "License"). * You may not use this product except in compliance with the License. * * This product may include a number of subcomponents with * separate copyright notices and license terms. Your use of the source * code for these subcomponents is subject to the terms and * conditions of the subcomponent's license, as noted in the LICENSE file. */ package org.springframework.data.neo4j.repositories; import org.neo4j.ogm.testutil.Neo4jIntegrationTestRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.neo4j.repositories.repo.PersistenceContextInTheSamePackage; import org.springframework.data.neo4j.repositories.domain.User; import org.springframework.data.neo4j.repositories.repo.UserRepository; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import static org.neo4j.ogm.testutil.GraphTestUtils.assertSameGraph; /** * @author Michal Bachman */ @ContextConfiguration(classes = {PersistenceContextInTheSamePackage.class}) @RunWith(SpringJUnit4ClassRunner.class) @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD) public class RepoScanningTest { @Rule public final Neo4jIntegrationTestRule neo4jRule = new Neo4jIntegrationTestRule(7879); @Autowired private UserRepository userRepository; @Test public void enableNeo4jRepositoriesShouldScanSelfPackageByDefault() { User user = new User("Michal"); userRepository.save(user); assertSameGraph(neo4jRule.getGraphDatabaseService(), "CREATE (u:User {name:'Michal'})"); } }
[ "ask1604@gmail.com" ]
ask1604@gmail.com
ecca84deba59bb34af14e6f87a06031b0c0fd95e
94d91903819947c4fb2598af40cf53344304dbac
/wssmall_1.2.0/base_module/inf_server/src/main/fiddler/com/zte/cbss/autoprocess/request/PsptCheckRequest.java
f29cedfa4f4d209ab6b537dbd576373cb75ac3d5
[]
no_license
lichao20000/Union
28175725ad19733aa92134ccbfb8c30570f4795a
a298de70065c5193c98982dacc7c2b3e2d4b5d86
refs/heads/master
2023-03-07T16:24:58.933965
2021-02-22T12:34:05
2021-02-22T12:34:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,382
java
package com.zte.cbss.autoprocess.request; import org.apache.http.message.BasicNameValuePair; import org.dom4j.Document; import org.dom4j.DocumentHelper; import org.dom4j.Element; import com.zte.cbss.autoprocess.AbsHttpRequest; import com.zte.cbss.autoprocess.HttpLoginClient; import com.zte.cbss.autoprocess.PageHttpResponse; import com.zte.cbss.autoprocess.model.PsptInfo; import com.zte.cbss.autoprocess.model.data.PsptCheckData; /** * 身份证检查请求 * @author 张浩 * @version 1.0.0 */ public class PsptCheckRequest extends AbsHttpRequest<PsptCheckData,PsptInfo>{ PsptCheckData data; public PsptCheckRequest(HttpLoginClient client) { super(client); } @Override protected boolean pack(PsptCheckData data) { try{ this.data = data; this.body.add(new BasicNameValuePair("PSPT_ID",data.getPsptId())); this.body.add(new BasicNameValuePair("CUST_NAME",data.getCustomName())); this.body.add(new BasicNameValuePair("globalPageName",data.getGlobalPageName())); return true; }catch(Exception e){ e.printStackTrace(); } return false; } @Override protected PsptInfo unpack(PageHttpResponse response) { try{ //解析XML String respXml = response.getResponse(); // logger.info(respXml); PsptInfo result = new PsptInfo(); Document doc = DocumentHelper.parseText(respXml); Element root = doc.getRootElement();// 获得根节点 Element data = root.element("personCardInfo").element("data"); result.setAddressInfo(data.attributeValue("addressInfo")); result.setBirthday(data.attributeValue("birthday")); result.setIdentityName(data.attributeValue("identityName")); result.setIdentityNo(data.attributeValue("identityNo")); result.setLicencelssAuth(data.attributeValue("licencelssAuth")); result.setNationality(data.attributeValue("nationality")); result.setSex(data.attributeValue("sex")); result.setValidityStart(data.attributeValue("validityStart")); return result; }catch(Exception e){ e.printStackTrace(); } return null; } @Override public String getUrl() { return "https://gd.cbss.10010.com/custserv?service=swallow/popupdialog.PersonCardReaderSX/checkPsptInfo/1"; } @Override public String getReferer() { return this.data.getReferer(); } @Override public boolean isXMLHttpRequest() { return true; } @Override public boolean isPost() { return true; } }
[ "hxl971230.outlook.com" ]
hxl971230.outlook.com
21dfca5ff61259931d9d7665589f9b268dd174c4
7d701debbd995889d42b52739a08cc70c94dbc3d
/elink-platform/device-gateway/elink-device-protocol-jt8082011-codec/src/main/java/com/legaoyi/protocol/messagebody/encoder/JTT808_8701_MessageBodyEncoder.java
1ea6b62ee500df1134e87fdb63a65b84f844b031
[]
no_license
jonytian/code1
e95faccc16ceb91cefbe0b52f1cf5dae0c63c143
3ffbd5017dda31dab29087e6cdf8f12b19a18089
refs/heads/master
2022-12-11T08:13:52.981253
2020-03-24T03:04:32
2020-03-24T03:04:32
249,597,038
3
2
null
2022-12-06T00:46:44
2020-03-24T02:48:20
JavaScript
UTF-8
Java
false
false
2,417
java
package com.legaoyi.protocol.messagebody.encoder; import org.springframework.stereotype.Component; import com.legaoyi.protocol.down.messagebody.JTT808_8701_MessageBody; import com.legaoyi.protocol.exception.IllegalMessageException; import com.legaoyi.protocol.message.MessageBody; import com.legaoyi.protocol.message.encoder.MessageBodyEncoder; import com.legaoyi.protocol.util.ByteUtils; import com.legaoyi.protocol.util.MessageBuilder; import com.legaoyi.protocol.util.SpringBeanUtil; /** * * @author <a href="mailto:shengbo.gao@gmail.com;78772895@qq.com">gaoshengbo</a> * @version 1.0.0 * @since 2015-01-30 */ @Component(MessageBodyEncoder.MESSAGE_BODY_ENCODER_BEAN_PREFIX + "8701_2011" + MessageBodyEncoder.MESSAGE_BODY_ENCODER_BEAN_SUFFIX) public class JTT808_8701_MessageBodyEncoder implements MessageBodyEncoder { @Override public byte[] encode(MessageBody message) throws IllegalMessageException { try { JTT808_8701_MessageBody messageBody = (JTT808_8701_MessageBody) message; MessageBuilder mb = new MessageBuilder(); String commandWord = messageBody.getCommandWord().replace("H", "").replace("h", ""); byte[] bytes = ByteUtils.hex2bytes(commandWord); mb.append(bytes); // 数据块,是否包含完整的数据帧?todo mb.append(ByteUtils.hex2bytes(JTT808_8701_MessageBody.HEAD_FLAG)); mb.append(bytes); try { String messageId = JTT808_8701_MessageBody.MESSAGE_ID.concat("_").concat(commandWord).concat("H"); MessageBodyEncoder messageBodyEncoder = SpringBeanUtil.getMessageBodyEncoder(messageId, "2011"); byte[] data = messageBodyEncoder.encode(message); mb.append(ByteUtils.int2word(data.length)); mb.addByte(0); mb.append(data); } catch (IllegalMessageException e) { mb.addWord(0); mb.addByte(0); } bytes = mb.getBytes(); // 计算校验和 int crc = ByteUtils.byte2int(bytes[0]); for (int i = 1, l = bytes.length; i < l; i++) { crc = crc ^ ByteUtils.byte2int(bytes[i]); } mb.addByte(crc); return mb.getBytes(); } catch (Exception e) { throw new IllegalMessageException(e); } } }
[ "yaojiang.tian@reacheng.com" ]
yaojiang.tian@reacheng.com
a7ac205aea4875ecbe82e3d382cb7b1f3b2f9a96
372e3e07be21f00c121e3bd554d84ae181da655a
/app/src/main/java/com/ariavgroup/aplikasi_pertama_capstone_project/adapter/HomeAdapter.java
f09d979580f52ec81c87aa1b3f02bcbd1ad7b23b
[]
no_license
iavtamvan/CAPSTONE-PROJECT-RECYCLERVIEW-DUMMMY
18df31d7b430f9a22652a56d9f2422506344166c
ba1351878f44fa1b99b47a22d143728ea5029a96
refs/heads/master
2022-12-29T00:04:21.016718
2020-10-02T04:12:28
2020-10-02T04:12:28
300,497,494
0
0
null
null
null
null
UTF-8
Java
false
false
2,638
java
package com.ariavgroup.aplikasi_pertama_capstone_project.adapter; import android.content.Context; import android.content.Intent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.cardview.widget.CardView; import androidx.recyclerview.widget.RecyclerView; import com.ariavgroup.aplikasi_pertama_capstone_project.DetailActivity; import com.ariavgroup.aplikasi_pertama_capstone_project.R; import com.ariavgroup.aplikasi_pertama_capstone_project.model.HomeModel; import java.util.ArrayList; import java.util.List; public class HomeAdapter extends RecyclerView.Adapter<HomeAdapter.ViewHolder> { private Context context; private List<HomeModel> homeModel = new ArrayList<>(); public HomeAdapter(Context context, List<HomeModel> homeModel) { this.context = context; this.homeModel = homeModel; } @NonNull @Override public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item, parent, false); return new ViewHolder(view); } @Override public void onBindViewHolder(@NonNull final ViewHolder holder, int position) { HomeModel homeModels = homeModel.get(position); holder.tvNamaBarang.setText(homeModels.getName()); holder.tvQty.setText(String.valueOf(homeModels.getQuantity())); holder.cvKlik.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(context, DetailActivity.class); intent.putExtra("nama_barang", holder.tvNamaBarang.getText().toString().trim()); intent.putExtra("qty", holder.tvQty.getText().toString().trim()); context.startActivity(intent); } }); } @Override public int getItemCount() { return homeModel.size(); } public void updateData(List<HomeModel> groceryList) { this.homeModel = groceryList; notifyDataSetChanged(); } public class ViewHolder extends RecyclerView.ViewHolder { private TextView tvNamaBarang; private TextView tvQty; private CardView cvKlik; public ViewHolder(@NonNull View itemView) { super(itemView); tvNamaBarang = itemView.findViewById(R.id.tv_nama_barang); tvQty = itemView.findViewById(R.id.tv_qty); cvKlik = itemView.findViewById(R.id.cv_klik); } } }
[ "ade.fajr.ariav@gmail.com" ]
ade.fajr.ariav@gmail.com
a67c8251a62b09f9045957dfde798910abfb4aa8
9f8304a649e04670403f5dc1cb049f81266ba685
/common/src/main/java/com/cmcc/vrp/sms/jilin/model/Root.java
262c86795fb4d79b4d8b5b23cc1053e454aa70d9
[]
no_license
hasone/pdata
632d2d0df9ddd9e8c79aca61a87f52fc4aa35840
0a9cfd988e8a414f3bdbf82ae96b82b61d8cccc2
refs/heads/master
2020-03-25T04:28:17.354582
2018-04-09T00:13:55
2018-04-09T00:13:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
480
java
package com.cmcc.vrp.sms.jilin.model; /** * <p>Title: </p> * <p>Description: </p> * @author lgk8023 * @date 2017年4月25日 上午8:45:34 */ public class Root { private Header HEADER; private Body BODY; public Header getHEADER() { return HEADER; } public void setHEADER(Header hEADER) { HEADER = hEADER; } public Body getBODY() { return BODY; } public void setBODY(Body bODY) { BODY = bODY; } }
[ "fromluozuwu@qq.com" ]
fromluozuwu@qq.com
c047b0f67e4e29a3b5ec58602d930fa7e5fe1e4d
f7160c0f0526cc5afc0fe4e6f06d384394059aa1
/fsa/fs-commons/src/api/java/com/fs/commons/api/event/BeforeActiveEvent.java
c128ea55ea9143aa213e36905a2d7f38a800ebae
[]
no_license
o1711/somecode
e2461c4fb51b3d75421c4827c43be52885df3a56
a084f71786e886bac8f217255f54f5740fa786de
refs/heads/master
2021-09-14T14:51:58.704495
2018-05-15T07:51:05
2018-05-15T07:51:05
112,574,683
0
0
null
null
null
null
UTF-8
Java
false
false
377
java
/** * All right is from Author of the file,to be explained in comming days. * Dec 17, 2012 */ package com.fs.commons.api.event; import com.fs.commons.api.Event; /** * @author wu * */ public class BeforeActiveEvent extends Event { /** * @param type * @param source */ public BeforeActiveEvent(Object source) { super(source); } }
[ "wkz808@163.com" ]
wkz808@163.com
17229e9cc40425420260842c1d05fa1674bd2d10
8d4a69e281915a8a68b0488db0e013b311942cf4
/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigureOrder.java
d96f2e2c3c9d7ced5c962f0be35f8b011a2354b6
[ "Apache-2.0" ]
permissive
yuanmabiji/spring-boot-2.1.0.RELEASE
798b4c29d25fdcb22fa3a0baf24a08ddd0dfa27e
6fe0467c9bc95d3849eb2ad5bae04fd9bdee3a82
refs/heads/master
2023-03-10T05:20:52.846557
2022-03-25T15:53:13
2022-03-25T15:53:13
252,902,347
320
107
Apache-2.0
2023-02-22T07:44:16
2020-04-04T03:49:51
Java
UTF-8
Java
false
false
1,717
java
/* * Copyright 2012-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.boot.autoconfigure; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; /** * Auto-configuration specific variant of Spring Framework's {@link Order} annotation. * Allows auto-configuration classes to be ordered among themselves without affecting the * order of configuration classes passed to * {@link AnnotationConfigApplicationContext#register(Class...)}. * * @author Andy Wilkinson * @since 1.3.0 */ @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.TYPE, ElementType.METHOD, ElementType.FIELD }) @Documented public @interface AutoConfigureOrder { int DEFAULT_ORDER = 0; /** * The order value. Default is {@code 0}. * @see Ordered#getOrder() * @return the order value */ int value() default DEFAULT_ORDER; }
[ "983656956@qq.com" ]
983656956@qq.com
2037727a795ff568e83964b48760c972fd88158a
6a2f63d971fd5ce988c10cdc2401aae3ba5e0fee
/optifine/CloudRenderer.java
33d6cb7087f490a22be1b7904533f6b1513b7590
[ "MIT" ]
permissive
MikeWuang/hawk-client
22d0d723b70826f74d91f0928384513a419592c1
7f62687c62709c595e2945d71678984ba1b832ea
refs/heads/main
2023-04-05T19:50:35.459096
2021-04-28T00:52:19
2021-04-28T00:52:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,081
java
package optifine; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GLAllocation; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.Entity; import org.lwjgl.opengl.GL11; public class CloudRenderer { private boolean updated = false; float partialTicks; private double cloudPlayerZ = 0.0D; int cloudTickCounter; private double cloudPlayerY = 0.0D; private Minecraft mc; private int cloudTickCounterUpdate = 0; private boolean renderFancy = false; private double cloudPlayerX = 0.0D; private int glListClouds = -1; public void reset() { this.updated = false; } public void endUpdateGlList() { GL11.glEndList(); this.cloudTickCounterUpdate = this.cloudTickCounter; this.cloudPlayerX = this.mc.func_175606_aa().prevPosX; this.cloudPlayerY = this.mc.func_175606_aa().prevPosY; this.cloudPlayerZ = this.mc.func_175606_aa().prevPosZ; this.updated = true; GlStateManager.func_179117_G(); } public void renderGlList() { Entity var1 = this.mc.func_175606_aa(); double var2 = var1.prevPosX + (var1.posX - var1.prevPosX) * (double)this.partialTicks; double var4 = var1.prevPosY + (var1.posY - var1.prevPosY) * (double)this.partialTicks; double var6 = var1.prevPosZ + (var1.posZ - var1.prevPosZ) * (double)this.partialTicks; double var8 = (double)((float)(this.cloudTickCounter - this.cloudTickCounterUpdate) + this.partialTicks); float var10 = (float)(var2 - this.cloudPlayerX + var8 * 0.03D); float var11 = (float)(var4 - this.cloudPlayerY); float var12 = (float)(var6 - this.cloudPlayerZ); GlStateManager.pushMatrix(); if (this.renderFancy) { GlStateManager.translate(-var10 / 12.0F, -var11, -var12 / 12.0F); } else { GlStateManager.translate(-var10, -var11, -var12); } GlStateManager.callList(this.glListClouds); GlStateManager.popMatrix(); GlStateManager.func_179117_G(); } public CloudRenderer(Minecraft var1) { this.mc = var1; this.glListClouds = GLAllocation.generateDisplayLists(1); } public void startUpdateGlList() { GL11.glNewList(this.glListClouds, 4864); } public void prepareToRender(boolean var1, int var2, float var3) { if (this.renderFancy != var1) { this.updated = false; } this.renderFancy = var1; this.cloudTickCounter = var2; this.partialTicks = var3; } public boolean shouldUpdateGlList() { if (!this.updated) { return true; } else if (this.cloudTickCounter >= this.cloudTickCounterUpdate + 20) { return true; } else { Entity var1 = this.mc.func_175606_aa(); boolean var2 = this.cloudPlayerY + (double)var1.getEyeHeight() < 128.0D + (double)(this.mc.gameSettings.ofCloudsHeight * 128.0F); boolean var3 = var1.prevPosY + (double)var1.getEyeHeight() < 128.0D + (double)(this.mc.gameSettings.ofCloudsHeight * 128.0F); return var3 ^ var2; } } }
[ "omadude420@gmail.com" ]
omadude420@gmail.com
8fb6b74f70608230d0a58c7dc7ca2497f5ebe222
874e9ea8775d886b87390575231a5f05572abd5d
/workspace/javase/core/src/io/Serializable/ArrSerDemo.zdq
52a8b454231d6f1b28356d638e39c7237753977f
[]
no_license
helifee/corp-project
f801d191ed9a6164b9b28174217ad917ef0380c8
97f8cdfc72ea7ef7a470723de46e91d8c4ecd8c9
refs/heads/master
2020-03-28T12:10:14.956362
2018-09-13T02:43:01
2018-09-13T02:43:01
148,274,917
2
3
null
null
null
null
UTF-8
Java
false
false
1,051
zdq
package io.Serializable; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; public class ArrSerDemo { public static void main(String[] args) throws Exception { Person[] arr = { new Person("zhangsan", 20), new Person("lisi", 21), new Person("wangwu", 22) }; ser(arr); Person[] p = (Person[])unser(); print(p); } public static void ser(Object obj) throws Exception { File file = new File("f:" + File.separator + "person.ser"); ObjectOutputStream oos= null; oos = new ObjectOutputStream(new FileOutputStream(file)); oos.writeObject(obj); oos.close(); } public static Object unser() throws Exception { File file = new File("f:" + File.separator + "person.ser"); ObjectInputStream ois= null; ois = new ObjectInputStream(new FileInputStream(file)); Object temp = ois.readObject(); return temp; } public static void print(Person[] arr) { for(Person per : arr) { System.out.println(per); } } }
[ "helifee@gmail.com" ]
helifee@gmail.com
d73667f3537be046e0cb2f11454cbd71c5a670b7
655a57f06492b8f51d286263ed5aae2e8cca1e0d
/src/main/java/com/yqc/annotation/test2/MyAnnotation.java
f52e8f9fc1174bb0d94b132f9227f88c5a4111b5
[]
no_license
ningfei001/java-basic
05d436a1dcc2e917fefe1b389b76c4b9a5ea4618
55ff3e074ecd15b6cf967bb0f7b7eab139269d3c
refs/heads/master
2020-12-30T13:28:23.743091
2017-05-14T03:35:38
2017-05-14T03:35:38
91,216,645
0
0
null
2017-05-14T03:10:55
2017-05-14T03:10:54
null
UTF-8
Java
false
false
399
java
package com.yqc.annotation.test2; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD,ElementType.TYPE}) public @interface MyAnnotation { String color() default "blue"; String value(); int[] arrayAttr() default {1,2}; }
[ "yangqc_ars@outlook.com" ]
yangqc_ars@outlook.com
b182e09104aefc1cb13b5e40c531aeb8452ce736
ed29778a20ac25b4eda542fcfce449a764a9229c
/ProductRecommendation/src/main/java/com/prime/jax/SM201010PersonalSettings.java
042567bf5e964ca3293bebba08235493cc90b015
[]
no_license
AgilePrimeFighting/2016Semester2Agile
e9b7d7feb84260088d21d85ea2987be3ddafe42b
f12df0183b368838c381a7aa5a83a76a9674f021
refs/heads/master
2020-04-10T21:25:15.717018
2016-10-06T07:29:09
2016-10-06T07:29:09
65,066,545
1
2
null
2016-10-05T05:22:47
2016-08-06T05:24:40
Java
UTF-8
Java
false
false
5,929
java
package com.prime.jax; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for SM201010PersonalSettings complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="SM201010PersonalSettings"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="DisplayName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="PDFSigningCertificate" type="{http://www.acumatica.com/generic/}Field" minOccurs="0"/> * &lt;element name="TimeZone" type="{http://www.acumatica.com/generic/}Field" minOccurs="0"/> * &lt;element name="DefaultBranch" type="{http://www.acumatica.com/generic/}Field" minOccurs="0"/> * &lt;element name="DefaultBranchBranch" type="{http://www.acumatica.com/generic/}Field" minOccurs="0"/> * &lt;element name="HomePage" type="{http://www.acumatica.com/generic/}Field" minOccurs="0"/> * &lt;element name="ServiceCommands" type="{http://www.acumatica.com/generic/}SM201010PersonalSettingsServiceCommands" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SM201010PersonalSettings", propOrder = { "displayName", "pdfSigningCertificate", "timeZone", "defaultBranch", "defaultBranchBranch", "homePage", "serviceCommands" }) public class SM201010PersonalSettings { @XmlElement(name = "DisplayName") protected String displayName; @XmlElement(name = "PDFSigningCertificate") protected Field pdfSigningCertificate; @XmlElement(name = "TimeZone") protected Field timeZone; @XmlElement(name = "DefaultBranch") protected Field defaultBranch; @XmlElement(name = "DefaultBranchBranch") protected Field defaultBranchBranch; @XmlElement(name = "HomePage") protected Field homePage; @XmlElement(name = "ServiceCommands") protected SM201010PersonalSettingsServiceCommands serviceCommands; /** * Gets the value of the displayName property. * * @return * possible object is * {@link String } * */ public String getDisplayName() { return displayName; } /** * Sets the value of the displayName property. * * @param value * allowed object is * {@link String } * */ public void setDisplayName(String value) { this.displayName = value; } /** * Gets the value of the pdfSigningCertificate property. * * @return * possible object is * {@link Field } * */ public Field getPDFSigningCertificate() { return pdfSigningCertificate; } /** * Sets the value of the pdfSigningCertificate property. * * @param value * allowed object is * {@link Field } * */ public void setPDFSigningCertificate(Field value) { this.pdfSigningCertificate = value; } /** * Gets the value of the timeZone property. * * @return * possible object is * {@link Field } * */ public Field getTimeZone() { return timeZone; } /** * Sets the value of the timeZone property. * * @param value * allowed object is * {@link Field } * */ public void setTimeZone(Field value) { this.timeZone = value; } /** * Gets the value of the defaultBranch property. * * @return * possible object is * {@link Field } * */ public Field getDefaultBranch() { return defaultBranch; } /** * Sets the value of the defaultBranch property. * * @param value * allowed object is * {@link Field } * */ public void setDefaultBranch(Field value) { this.defaultBranch = value; } /** * Gets the value of the defaultBranchBranch property. * * @return * possible object is * {@link Field } * */ public Field getDefaultBranchBranch() { return defaultBranchBranch; } /** * Sets the value of the defaultBranchBranch property. * * @param value * allowed object is * {@link Field } * */ public void setDefaultBranchBranch(Field value) { this.defaultBranchBranch = value; } /** * Gets the value of the homePage property. * * @return * possible object is * {@link Field } * */ public Field getHomePage() { return homePage; } /** * Sets the value of the homePage property. * * @param value * allowed object is * {@link Field } * */ public void setHomePage(Field value) { this.homePage = value; } /** * Gets the value of the serviceCommands property. * * @return * possible object is * {@link SM201010PersonalSettingsServiceCommands } * */ public SM201010PersonalSettingsServiceCommands getServiceCommands() { return serviceCommands; } /** * Sets the value of the serviceCommands property. * * @param value * allowed object is * {@link SM201010PersonalSettingsServiceCommands } * */ public void setServiceCommands(SM201010PersonalSettingsServiceCommands value) { this.serviceCommands = value; } }
[ "liu_taichen@hotmail.com" ]
liu_taichen@hotmail.com
452d81db27e09588d7d269a1086ac32dd6757603
6dd79a56d5b04248cc3f3b9eefa5d5de34d0c7a4
/CotizadorProduccion/src/com/qbe/cotizador/model/Session.java
a19f3d8833420b80ce0cd77214587102141cbfec
[]
no_license
luisitocaiza17/Cotizador
7b3de15e0e68bfc4ef8dc4a2266b0f5ff3672a83
973e912254d1422709f696cbc05adc58f6bcf110
refs/heads/master
2021-10-15T09:05:52.576305
2019-02-05T15:49:52
2019-02-05T15:49:52
169,265,091
0
0
null
null
null
null
UTF-8
Java
false
false
1,987
java
package com.qbe.cotizador.model; import java.io.Serializable; import javax.persistence.*; import java.sql.Timestamp; /** * The persistent class for the SESSION database table. * */ @Entity @NamedQueries({ @NamedQuery(name="Session.buscarPorId", query="SELECT c FROM Session c where c.id = :id"), @NamedQuery(name="Session.buscarPorToken", query="SELECT c FROM Session c where c.token = :token"), @NamedQuery(name="Session.buscarPorUsuario", query="SELECT c FROM Session c where c.usuario = :usuario"), @NamedQuery(name="Session.eliminarPorUsuario", query="delete FROM Session c where c.usuario = :usuario ") }) public class Session implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private String id; @Column(name="hora_fin") private Timestamp horaFin; @Column(name="hora_inicio") private Timestamp horaInicio; private String token; //bi-directional many-to-one association to Usuario @ManyToOne private Usuario usuario; public Session() { } public Session(Timestamp horaFin, Timestamp horaInicio, String token, Usuario usuario) { super(); this.horaFin = horaFin; this.horaInicio = horaInicio; this.token = token; this.usuario = usuario; } public String getId() { return this.id; } public void setId(String id) { this.id = id; } public Timestamp getHoraFin() { return this.horaFin; } public void setHoraFin(Timestamp horaFin) { this.horaFin = horaFin; } public Timestamp getHoraInicio() { return this.horaInicio; } public void setHoraInicio(Timestamp horaInicio) { this.horaInicio = horaInicio; } public Usuario getUsuario() { return this.usuario; } public void setUsuario(Usuario usuario) { this.usuario = usuario; } public String getToken() { return token; } public void setToken(String token) { this.token = token; } }
[ "luisito_caiza17" ]
luisito_caiza17
519a54bc15b98e943e36d87fc754d0e58428444a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_31bb84522b11c3aa608b4a4d167212076da1e343/J/2_31bb84522b11c3aa608b4a4d167212076da1e343_J_s.java
609f82aa8978e3a83e512c1d2f9af0d8a7af7d5c
[]
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
160
java
package test public class J { public static void main(String[] args) { new S().foo("ahoy"); } public String bar(String s) { return s + s; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
2ea6db18c6215406615066d8c2954d0bd4247d2f
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Spring/Spring4675.java
febb13977c01b03fe6f3ce9ae10820efdf3e5a7c
[]
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
416
java
@Override public UUID generateId() { byte[] randomBytes = new byte[16]; this.random.nextBytes(randomBytes); long mostSigBits = 0; for (int i = 0; i < 8; i++) { mostSigBits = (mostSigBits << 8) | (randomBytes[i] & 0xff); } long leastSigBits = 0; for (int i = 8; i < 16; i++) { leastSigBits = (leastSigBits << 8) | (randomBytes[i] & 0xff); } return new UUID(mostSigBits, leastSigBits); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
2590f5454a24a3d277aa8059416cdc1752a6cad5
401f4a57e06a3fc372f013fb4633313932c8229a
/com.dh_international.jprestaproduct/src/com/dh_international/jprestaproduct/schemas/AddressesId/IdCustomerElement.java
d7faf72ee88dd041e6fd8a3a0dac6d7a70281aa9
[]
no_license
solidturtle/workspace-tp
49ae3cfe42497933fcf116904d859ccfe7f330d0
568deab542b52cb89763335d62a5e6eea0c554c5
refs/heads/master
2021-01-25T08:54:27.142100
2013-10-30T19:01:18
2013-10-30T19:01:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,405
java
U2FsdGVkX19x4o91wRhYyzSNPYIUgaAYiV3MXspXYmqlmfSVlRC2ogDZapG4Ia3v OU+SK2jUmqIu49Hi+2NFPamBDTii0VekLNslpQN/R/TE8o2HnudMHPFkBgyt751e H25/GgqIu3S3Z7Y37eOVHTJkoFVyQTvoifJRsctRNKaJSkDzu2qHQmJdQTaZPQml ewjKkfgDujPxGgmlMJfeO2Zneka7xjZMIESGCZLRZiX3Nr98I5Y4goqdzV4FVQKq 47wR/ZlRROdI1pw19MvBdfKQGC7kuq1phlrVq5C+HI23ovDl0dR1TfUHPbD5IdKX zb3TH8SFu7rYtSaEcLLAeo9lkH2Evib4H6MTQGNgTFbz5EcrTpiqQcqHedIMEGMs ZVsMxUUbl1tw3VXOZkeNlu+rIXv3KL4tNPobz3amVnaiUEJAJofDLZTSnMpSnU1J wufEmQOIuwxmmXYIHt2KkAwwtkRqSPMNtQEmLR/1rqrNSDZmhUFKT8zemjiiS/6n jkU3Oo6RmUjRNhnUMnzHa7kD073PaQ7D3t0uL8k15DQ4pb3XJVaqbff0rJItzaw4 4SNUkIJaRfDLOtkGo+dvplCsa2oOX7i1/ZABjoQOx1WMwkd443JRQ453wbceTp3o egYG21MDx/51iM5eERjM8lCsa2oOX7i1/ZABjoQOx1WMwkd443JRQ453wbceTp3o /Jm4bVd77cF0pYW0De1tT7R0HvB186wapXZXy4giFFFx6av/HwHxjStv6IN/OGOz OeXFp3R+0C7bJfHZdOsYDAtIjLTQWtdLnWbW7SInMlfPkF32cJE2cfAypgCb0Zz+ 3laMGHrdZfpt3Fav12CJFbrZLJ7pBqsvTgi61nmSR2Nx6av/HwHxjStv6IN/OGOz 47gvECgBtPJQ9oOdEW/0SLR0HvB186wapXZXy4giFFFx6av/HwHxjStv6IN/OGOz 7rEnvp2Q1atOoh+Jz5yyl/EXw14EaLTXM7Jr/z/F4aH14SIdH6NsnpaHlTfnDDiQ BnNs3qXhI3D73n13uapvQpSc0APArQwQt0lSLPgDuO3NHXTA4DtteH0BQqX8cTcU 46TuQRYUch14sAog6iUWMRVkFmL2Qk7JuB87ON67QWejaUciJOw7wDyosx9i8Jfi HOsU7I9tnaBxUeGcDPE0g6bdK5Hr0VL6YOFruulq6usatZsfJFbjAVGPAepmIBmQ 5NdnyKkWJ2d36csgV4QmDe4UlzbffKbLXKhVPxbuijXgmf4UndD4ZEXFbceHlvtr EqZLv87G7xmkwOTcFFo+12bFlGzCrw1e9Uy+jD9oht/crwCLAI+7ckCdrwOhwN04 5nTcJnhOGsz7wGAFLG1K5rHDZfAdUT1pbrjlHymlGDIxInXjJ7ZEbQRUdZTfPXcU T/egXXsqoFzuTSNFUI/LQqEiIOBKqIG1wiL2IXsJ71yKv0z9XYhLoQWabkO+7Ihw zfvXpq7sd3i63lxkGGAYXqwZWOXdx0uP8i+0PpT1bm29mWkIq7TzonCIJmTP+R8a Q8LlXjyMkGD0WdSMqOOeW6vXrAdIHt97rBAYW7HOkrRuwg2ZHZbkZqloCkJj79M3 Doq34nUmaOa5wLtkf+KkOrYmBmejGUi3b6Bv/q3zYCYezcjasXEQNd5QAiMwkrNg y9WBKutYUy42DZOQyOQqrF4m3gBe6gKzO+/Eg10nCCrUjxJbaWWZ3mkcyEJKvbMv bSKSw/JbXLk0vJrvOR3l0oxE1CjEzgZ9XjZqn4zHMSPk9cCvKYK4g/ZaAwCOA4bF NUPFwOZvBGjTwXxqsU+HmzXjW5EJd6oxoID2Y7xh2FohwMkMThWwuauHl6OWXrgs 1fFZi/+kIaE443/54yPreaicmzR5SV6JNnvu6Y++qurNvaYAjiB6lYbxX/00y4TX idxUgqHR8u6LaSXBrCSbTuBS6jKvRuRKkaTwRlPBtWVMMAP/Tg9cVK9470AToGAb GygpjW8tmLYCJ13kcH6eUWkIrDHY2QfxPgniYNtaiM1jJOAg2zM8F3jWfNs4gzZr iwEvu5VGYJ1Znrf8ASiB0S+ZdZ7XGI4A1TdUYLInvjlX7vwLolnsTJ9Fk2fWAlG3 afLVaJMw470GOb8/9Q8mjr8T/Il6YqYCYfyZ3TBgwyT00DPLPedvGKbBu3BYkCXO pcNtJyqUFCSa6rHHXCyweEaz7m4mqGwloqTBRKXiADhZrdlB5MChXDMqRAAkWDh0 UNtSWcXwszAW/SawpV+wOfI7tMIHvRarPLvoS3mdeJbLHwRRX1nwNDlVvdrFwQzV ul0ABK3O6TXaCro1iaJKfR4HyRHZ0w2oN4rtdqiwpYDLATGHyY6upxzUVlAztWpl gqTvU4V8KEx/tPAgBzpUC53jnrY1/Fhr+ohNcCXRILzIY+rMCV4c6hx/7B43v1MO VkoUCSaxjQfC+ZrrWqpIE14zzneZPQ6VlwQ8LpuxfN3/MjfdqcUccoZqsAbRqWtt Y40XDr4sc6/Qfl9sPizfV6aEqrD8O+icGzC4EilkVOveuhA55bithYainz1BlM76 WTEzR0XRaA2diiUg0xDeSv80NM5XhwdyHRU8Kd4l31bPnX8bXsCTFY2L9bZ0kbJ4 6YmB7ze5TF1jVNfwj6e2hovkrOQcQPYQiMo3hZHktlWwHqEe0r1zmQAqU2CXNnrF YHBKMWmZHaucA7iYnL39fyvD18egbQnT/0ZmJ91Pskx71/M8tNK+0mr5EyuyAw9l bOlzlfQL1EEPqqJ6GWnanSRCzJjwtpZJ+gX5wSeccAz/MjfdqcUccoZqsAbRqWtt +XIfDAtBFh0MgguVX2Q4vrAeowy6dlUEeC9dU8dmbZFxjxCbJVzjL1ESdgOZCAwK JtGUJZCx6QHfW5og3dOzejc5wtayCUDdDP8kow3M4uN4Gly9r++O8bsJYvPMaVJC MhKwM30RlX+qZAM83ITm9bEoyPZlre0Lx446Y0pLdA8DkNrGfSxyjOD/nydbTyAJ 4F3O0cBVVs5DvfagkHJSengQNI4EJ7a409JPW6om09wc4I0wjv5Z6PK2JvPfx6uJ GKid6u3WwTss4uC7OvjTG5+PgQT7jf/tOLko5+OZKaZYglBk1amOO+1ok1oNrxLf bIVDxw2+I7H7OYtHkXu5OB7JlorjZu8gOUWxkttGVo183JP6e2RN9E4nwkbNX45K DjACJ4aSXcrMAZKP61ht2vvfcikqBNvrdCrpWeyKjbDT2mJ2ctAljvWksOq8bDnZ OKD+mOG85GEiYj/XLhJ3ItZhE09g8upe6OqT6uv1475mP8jiIg5YQBN0QBqTLNOY HqQqdnUUcmckOckz31rLSw==
[ "guillaume.sorbier@gmail.com" ]
guillaume.sorbier@gmail.com
f8845bda0c21e33ad9deb1e75f1c3896e01dfd9b
bb036aa7789904be16f4a706db96882a19901550
/src/main/java/object_programming/lab3/pacjenci/ChoryNaDyspepsje.java
809daa341bccf4c80e3dafab4ef01035e7085e45
[]
no_license
Av3r/excercise-adrian
0385a03a69a6e5d2782017cc22fb97e2e3f4899c
df1da989b0d27056b57b6044978fb0b6e6c43500
refs/heads/master
2021-06-12T12:54:20.860165
2017-03-19T10:13:36
2017-03-19T10:13:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
341
java
package object_programming.lab3.pacjenci; public class ChoryNaDyspepsje extends Pacjent { public ChoryNaDyspepsje(String name) { super(name); } @Override public String choroba() { return "dyspensja"; } @Override public String leczenie() { return "węgiel"; } }
[ "michalskidaniel2@gmail.com" ]
michalskidaniel2@gmail.com
f94aae2f6e0dd85c973231b5f161057eaaf3b3ef
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/83/4283.java
02048330f574e433f2da105c3d953fcfcd8e46ea
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,485
java
package <missing>; public class GlobalMembers { public static int Main() { int[] a = new int[10]; int[] b = new int[10]; int i; int n; double[] g = new double[10]; double[] c = new double[10]; double jidian; double xuefen; float GPA; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { n = Integer.parseInt(tempVar); } for (i = 0;i < n;i++) { String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { a[i] = Integer.parseInt(tempVar2); } } for (i = 0;i < n;i++) { String tempVar3 = ConsoleInput.scanfRead(); if (tempVar3 != null) { b[i] = Integer.parseInt(tempVar3); } } for (i = 0;i < n;i++) { if (b[i] >= 90 && b[i] <= 100) { g[i] = 4.0; } else if (b[i] >= 85 && b[i] <= 89) { g[i] = 3.7; } else if (b[i] >= 82 && b[i] <= 84) { g[i] = 3.3; } else if (b[i] >= 78 && b[i] <= 81) { g[i] = 3.0; } else if (b[i] >= 75 && b[i] <= 77) { g[i] = 2.7; } else if (b[i] >= 72 && b[i] <= 74) { g[i] = 2.3; } else if (b[i] >= 68 && b[i] <= 71) { g[i] = 2.0; } else if (b[i] >= 64 && b[i] <= 67) { g[i] = 1.5; } else if (b[i] >= 60 && b[i] <= 63) { g[i] = 1.0; } else { g[i] = 0; } } for (i = 0;i < n;i++) { c[i] = g[i] * a[i]; jidian += c[i]; xuefen += a[i]; } GPA = (float)(jidian / xuefen); System.out.printf("%.2f",GPA); return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
1c563a99e2ea5f8976a5490fec195c3ae016865b
43ca534032faa722e206f4585f3075e8dd43de6c
/src/com/instagram/android/fragment/cl.java
254a1b40a0855a50666e7796526a76be7b7a899f
[]
no_license
dnoise/IG-6.9.1-decompiled
3e87ba382a60ba995e582fc50278a31505109684
316612d5e1bfd4a74cee47da9063a38e9d50af68
refs/heads/master
2021-01-15T12:42:37.833988
2014-10-29T13:17:01
2014-10-29T13:17:01
26,952,948
1
0
null
null
null
null
UTF-8
Java
false
false
2,504
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.instagram.android.fragment; import android.app.Dialog; import android.content.Intent; import android.os.Bundle; import android.view.View; import com.facebook.az; import com.instagram.a.c; import com.instagram.android.widget.x; import com.instagram.share.b.a; import com.instagram.ui.dialog.b; import com.instagram.ui.menu.e; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; // Referenced classes of package com.instagram.android.fragment: // co, cn, cm public final class cl extends e implements c { private co i; public cl() { i = new co(this, (byte)0); } static co a(cl cl1) { return cl1.i; } private void a(View view, x x1) { b b1 = new b(n()); String s = c(az.unlink_account); Object aobj[] = new Object[1]; aobj[0] = x1.a(n()); b1.b(com.instagram.common.y.e.a(s, aobj)).c(az.cancel, null).b(az.unlink, new cn(this, x1, view)).c().show(); } static void a(cl cl1, View view, x x1) { cl1.a(view, x1); } static void a(cl cl1, Collection collection) { cl1.a(collection); } static List b(cl cl1) { return cl1.d(); } private List d() { ArrayList arraylist = new ArrayList(); x x1; for (Iterator iterator = x.b(n()).iterator(); iterator.hasNext(); arraylist.add(new com.instagram.ui.menu.b(x1.a(), x1.b(), x1.c(), new cm(this, x1)))) { x1 = (x)iterator.next(); } return arraylist; } public final void F() { super.F(); a(d()); } public final void a(int j, int k, Intent intent) { if (k != -1) { return; } com.facebook.b.b b1; switch (j) { default: return; case 32665: b1 = com.instagram.share.b.a.a(); break; } b1.a(i); b1.a(j, k, intent); } public final void a(View view, Bundle bundle) { super.a(view, bundle); } public final void a(com.instagram.a.b b1) { b1.a(az.linked_accounts); b1.a(true); } public final String j_() { return "sharing_settings"; } }
[ "leo.sjoberg@gmail.com" ]
leo.sjoberg@gmail.com
29bd1823e055a52d19fde9f07f62c07e702026e3
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module372/src/main/java/module372packageJava0/Foo15.java
5aaa01863e0744be2e1ae79de98062a93ff29d47
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
349
java
package module372packageJava0; import java.lang.Integer; public class Foo15 { Integer int0; Integer int1; public void foo0() { new module372packageJava0.Foo14().foo4(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
12e5b62aef8a37bfd4e17bb0c14e6a2e8f465e00
de1f94643567aca0cbf023233eb61f1de871b47d
/calculator/src/scu/edu/ch22Bridge/BridgeMain.java
a18b9b24d52699d2d2c8d25abe07e06d6921273f
[]
no_license
xingyiyang/designpatterns
a54afc6e6a5e5e0a216e9a040f4bd49f437b5b95
5ff8715773e9bd8c83fd15e7c69c285098dcc48d
refs/heads/master
2021-07-09T05:31:15.194351
2017-10-08T04:28:32
2017-10-08T04:28:32
106,149,971
0
0
null
null
null
null
UTF-8
Java
false
false
596
java
package scu.edu.ch22Bridge; public class BridgeMain { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Mobile ab; ab = new MobileM(); ab.SetMobileSoft(new MobileGame()); ab.Run(); ab.SetMobileSoft(new MobileAddrList()); ab.Run(); ab.SetMobileSoft(new MobileMP3()); ab.Run(); System.out.println("\n"); ab = new MobileN(); ab.SetMobileSoft(new MobileGame()); ab.Run(); ab.SetMobileSoft(new MobileAddrList()); ab.Run(); ab.SetMobileSoft(new MobileMP3()); ab.Run(); System.out.println("\n"); } }
[ "532956941@qq.com" ]
532956941@qq.com
9b6f1e6ba2b8b0f57f2ca285a230788b02d659f2
a544cb5ab5b1762d720653fa7233b1cfffe5220a
/Exam Preparation/Fast Food/src/main/java/app/exam/domain/dto/json/ItemJSONExportDTO.java
e5a95a83d84f38a4148de71ffbebc096c9a14f57
[]
no_license
AtanasYordanov/JavaDB-Frameworks---Hibernate-Spring-Data
ec2c7954ffed8df767d950a0a4e8aff231c185b4
cecd44ee0a6e20f6ea23c7bec5e9f62796a612a5
refs/heads/master
2021-04-03T10:08:36.875455
2018-06-19T07:42:06
2018-06-19T07:42:06
125,184,186
0
1
null
null
null
null
UTF-8
Java
false
false
737
java
package app.exam.domain.dto.json; import com.google.gson.annotations.Expose; import java.math.BigDecimal; public class ItemJSONExportDTO { @Expose private String name; @Expose private BigDecimal price; @Expose private Integer quantity; public ItemJSONExportDTO() { } public String getName() { return name; } public void setName(String name) { this.name = name; } public BigDecimal getPrice() { return price; } public void setPrice(BigDecimal price) { this.price = price; } public Integer getQuantity() { return quantity; } public void setQuantity(Integer quantity) { this.quantity = quantity; } }
[ "naskoraist@gmail.com" ]
naskoraist@gmail.com
9440848584f98b21fa62d99dd8756cf881e41749
ebe222e23b4022e29c95ea5823ff7b646ef51d5a
/app/src/main/java/com/runtai/newdexintong/module/homepage/utils/SkipToPointActivityUtil.java
ba9fc9a5d63d7560840bf8f037a23b72a5f9b947
[]
no_license
hailinliu/Dexintong
902a0875bc6060b9031235e7af1d2cff2c062930
abacf20126b79d0f42a67c626634a2c73b97fbf3
refs/heads/master
2021-05-15T04:18:45.814739
2018-02-04T14:53:35
2018-02-04T14:53:35
114,599,643
0
0
null
null
null
null
UTF-8
Java
false
false
4,636
java
package com.runtai.newdexintong.module.homepage.utils; import android.content.Context; import android.content.Intent; import android.widget.Toast; import com.runtai.newdexintong.comment.utils.ToastUtil; import com.runtai.newdexintong.module.fenlei.activity.ProductDetailActivity; import com.runtai.newdexintong.module.homepage.activity.DhhActivity; import com.runtai.newdexintong.module.homepage.activity.RegularBuyListActivity; import com.runtai.newdexintong.module.homepage.activity.SearchResultAcivity; import com.runtai.newdexintong.module.homepage.activity.SpecialListActivity; import com.runtai.newdexintong.module.homepage.activity.SpecialSaleActivity; import com.runtai.newdexintong.module.homepage.activity.SpikeActivity; /** * @author:rhf * @date:2017/10/27time10:45 * @detail:跳转到指定界面 */ public class SkipToPointActivityUtil { /** * 一个参数跳转的页面 * * @param ads2Url * @param oneParamsKey * @param oneParamsValue */ public static void jumpToOneParams(Context mContext,String ads2Url, String oneParamsKey, String oneParamsValue) { if (ads2Url != null && !"".equals(ads2Url)) { if ("api/promotion/list".equals(ads2Url)) { Intent intent = new Intent(mContext, SpecialListActivity.class); intent.putExtra("paramName0", oneParamsKey); intent.putExtra("paramValue0", oneParamsValue); intent.putExtra("mUrl", ads2Url); mContext.startActivity(intent); } else if ("api/product/search".equals(ads2Url)) { Intent intent = new Intent(mContext, SearchResultAcivity.class); intent.putExtra("paramName0", oneParamsKey); intent.putExtra("paramValue0", oneParamsValue); intent.putExtra("mUrl", ads2Url); mContext.startActivity(intent); } else if ("api/product/detail".equals(ads2Url)) { Intent intent = new Intent(mContext, ProductDetailActivity.class); intent.putExtra("paramName0", oneParamsKey); intent.putExtra("paramValue0", oneParamsValue); intent.putExtra("mUrl", ads2Url); mContext.startActivity(intent); } } else { ToastUtil.showToast(mContext, "暂时没有设置此活动", Toast.LENGTH_SHORT); } } /** * 两个参数跳转的页面 * * @param twoParamsUrl * @param oneParamsKey * @param oneParamsValue * @param secParamsKey * @param secParamsValue */ public static void jumpToTwoParams(Context mContext,String twoParamsUrl, String oneParamsKey, String oneParamsValue, String secParamsKey, String secParamsValue) { if (twoParamsUrl != null && !"".equals(twoParamsUrl)) { if ("api/promotion/activity".equals(twoParamsUrl)) { Intent intent = new Intent(mContext, SpecialSaleActivity.class); intent.putExtra("mUrl", twoParamsUrl); intent.putExtra("paramName0", oneParamsKey); intent.putExtra("paramValue0", oneParamsValue); intent.putExtra("paramName1", secParamsKey); intent.putExtra("paramValue1", secParamsValue); mContext.startActivity(intent); } } else { ToastUtil.showToast(mContext, "暂时没有设置此活动", Toast.LENGTH_SHORT); } } /** * 没有参数跳转的页面 * * @param mNoParamsUrl */ public static void jumpToNoParams(Context mContext,String mNoParamsUrl) { if (mNoParamsUrl != null && !"".equals(mNoParamsUrl)) { if ("api/promotion/spike".equals(mNoParamsUrl)) { Intent intent = new Intent(mContext, SpikeActivity.class); intent.putExtra("mUrl", mNoParamsUrl); mContext.startActivity(intent); } else if ("api/promotion/dhh".equals(mNoParamsUrl)) { Intent intent = new Intent(mContext, DhhActivity.class); intent.putExtra("mUrl", mNoParamsUrl); mContext.startActivity(intent); } else if ("api/main/buy".equals(mNoParamsUrl)) {//常购清单 Intent intent = new Intent(mContext, RegularBuyListActivity.class); intent.putExtra("mUrl", mNoParamsUrl); mContext.startActivity(intent); } } else { ToastUtil.showToast(mContext, "暂时没有设置此活动", Toast.LENGTH_SHORT); } } }
[ "1135231523@qq.com" ]
1135231523@qq.com
7f4c09b28762999662fc305bf22758e92d896574
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/plugin/appbrand/jsapi/nfc/HCEEventLogic.java
60b776abc1affd49ceff2cb424c28869ddfbd766
[]
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
2,310
java
package com.tencent.mm.plugin.appbrand.jsapi.nfc; import android.os.Bundle; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.plugin.appbrand.g; import com.tencent.mm.plugin.appbrand.g.c; import com.tencent.mm.plugin.appbrand.ipc.AppBrandMainProcessService; import com.tencent.mm.plugin.appbrand.r.h; import com.tencent.mm.sdk.platformtools.ab; public class HCEEventLogic { private static String hRT; private static boolean hRU; private static g.c hRV; static { AppMethodBeat.i(137858); hRT = null; hRU = true; hRV = new HCEEventLogic.1(); AppMethodBeat.o(137858); } public static void BE(String paramString) { AppMethodBeat.i(137855); if ((hRT != null) && (hRV != null)) { ab.i("MicroMsg.HCEEventLogic", "alvinluo remove HCELifeCycleListener before add, appId: %s", new Object[] { hRT }); g.b(hRT, hRV); } hRT = paramString; g.a(paramString, hRV); AppMethodBeat.o(137855); } public static void BF(String paramString) { AppMethodBeat.i(137856); if (paramString != null) g.b(paramString, hRV); AppMethodBeat.o(137856); } public static void a(String paramString, int paramInt, Bundle paramBundle) { AppMethodBeat.i(137857); Bundle localBundle = paramBundle; if (paramBundle == null) localBundle = new Bundle(); ab.i("MicroMsg.HCEEventLogic", "alvinluo HCEEventLogic sendHCEEventToMM appId: %s, eventType: %d", new Object[] { paramString, Integer.valueOf(paramInt) }); paramString = new HCEEventLogic.SendHCEEventToMMTask(paramString, paramInt, localBundle, (byte)0); h.bB(paramString); AppBrandMainProcessService.a(paramString); AppMethodBeat.o(137857); } public static boolean aEt() { try { boolean bool = hRU; return bool; } finally { } } public static void eo(boolean paramBoolean) { try { hRU = paramBoolean; return; } finally { } } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes7-dex2jar.jar * Qualified Name: com.tencent.mm.plugin.appbrand.jsapi.nfc.HCEEventLogic * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
cf15c35e6fdb378dd8f86bdf3d7abf4e54470421
252e371bb9041b08f208dd608cde0ab5ddef7918
/src/main/java/com/cropaccounting/repository/FarmerTaskRepository.java
49fe95bfa17a72c83add11e4574f157f20653982
[ "MIT" ]
permissive
wahid-nwr/cropaccounting-spring
d0bd1f1321408ce3a7be7fb0b9d366fd671a1d05
708ae04a5a6bc8c4cf40147f0ab5c1e6b4be82c8
refs/heads/master
2020-03-22T01:54:59.448892
2018-07-04T20:32:30
2018-07-04T20:32:30
139,338,001
0
0
null
null
null
null
UTF-8
Java
false
false
230
java
package com.cropaccounting.repository; import org.springframework.data.repository.CrudRepository; import com.cropaccounting.models.FarmerTask; public interface FarmerTaskRepository extends CrudRepository<FarmerTask, Long> { }
[ "wahid_nwr@yahoo.com" ]
wahid_nwr@yahoo.com
f55b8318d2cb9a95e47f842f020d7c4f69794671
71c826ffa53ac8af9760f4443ba0dc0d78b4a8e9
/src/main/java/oasis/names/specification/ubl/schema/xsd/commonbasiccomponents_2/ResponseTimeType.java
a31830a2cb07a1b4cd1d4db6ae2ac44a4734f917
[]
no_license
yosmellopez/xml-dependencies
5fc4df3b40ea9af6d6815d64a55aa02cbbe2fb45
ad2404c11ae9982e9500692f2173261b2f258796
refs/heads/master
2022-09-25T15:03:45.927106
2020-05-27T03:20:13
2020-05-27T03:20:13
267,195,324
0
0
null
null
null
null
UTF-8
Java
false
false
1,223
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147 // 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: 2017.04.19 at 09:27:25 AM COT // package oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2; import un.unece.uncefact.data.specification.unqualifieddatatypesschemamodule._2.TimeType; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ResponseTimeType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ResponseTimeType"> * &lt;simpleContent> * &lt;extension base="&lt;urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2>TimeType"> * &lt;/extension> * &lt;/simpleContent> * &lt;/complexType> * </pre> */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ResponseTimeType") public class ResponseTimeType extends TimeType { }
[ "yosmellopez@gmail.com" ]
yosmellopez@gmail.com
1e16b77371373bd9e1a36e5e466886d905588880
e5431a10d8a82b382fa586724be9f804041fa0fe
/gaia-hadoop/behemoth-crawler-job/src/main/java/com/lucid/crawl/behemoth/DirectAccessCorpusGenerator.java
126d85a94b757cc86ac9a502d3517e396df4ac93
[]
no_license
whlee21/gaia
65ca1a45e3c85ac0a368a94827e53cf73834d48b
9abcb86b7c2ffc33c39ec1cf66a25e9d2144aae0
refs/heads/master
2022-12-26T14:06:44.067143
2014-05-19T16:15:47
2014-05-19T16:15:47
14,943,649
2
0
null
2022-12-14T20:22:44
2013-12-05T04:16:26
Java
UTF-8
Java
false
false
7,356
java
package com.lucid.crawl.behemoth; import com.digitalpebble.behemoth.BehemothConfiguration; import com.digitalpebble.behemoth.util.CorpusGenerator.Counters; import java.io.FileNotFoundException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.GnuParser; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configured; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.PathFilter; import org.apache.hadoop.io.IOUtils; import org.apache.hadoop.io.SequenceFile; import org.apache.hadoop.io.SequenceFile.Writer; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapred.Reporter; import org.apache.hadoop.util.Tool; import org.apache.hadoop.util.ToolRunner; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class DirectAccessCorpusGenerator extends Configured implements Tool { private static transient Logger log = LoggerFactory.getLogger(DirectAccessCorpusGenerator.class); private Path input; private Path output; private Reporter reporter; public static String unpackParamName = "CorpusGenerator-unpack"; private volatile boolean stop = false; public DirectAccessCorpusGenerator() { } public DirectAccessCorpusGenerator(Path input, Path output) { setInput(input); setOutput(output); } public DirectAccessCorpusGenerator(Path input, Path output, Reporter reporter) { this.input = input; this.output = output; this.reporter = reporter; } public void setInput(Path input) { this.input = input; } public void setOutput(Path output) { this.output = output; } public long generate(boolean recurse) throws IOException { long result = 0L; Text key = new Text(); Text value = new Text("file"); SequenceFile.Writer writer = null; try { Configuration conf = getConf(); FileSystem fs = this.output.getFileSystem(conf); writer = SequenceFile.createWriter(fs, conf, this.output, key.getClass(), value.getClass()); PerformanceFileFilter pff = new PerformanceFileFilter(writer, key, value, conf, this.reporter); result = processFiles(conf, this.input, recurse, pff); } finally { IOUtils.closeStream(writer); } return result; } public static void main(String[] args) throws Exception { int res = ToolRunner.run(BehemothConfiguration.create(), new DirectAccessCorpusGenerator(), args); System.exit(res); } public int run(String[] args) throws Exception { Options options = new Options(); HelpFormatter formatter = new HelpFormatter(); CommandLineParser parser = new GnuParser(); options.addOption("h", "help", false, "print this message"); options.addOption("i", "input", true, "input file or directory"); options.addOption("o", "output", true, "output Behemoth corpus"); options.addOption("r", "recurse", true, "processes directories recursively (default true)"); options.addOption("u", "unpack", true, "unpack content of archives (default true)"); options.addOption("md", "metadata", true, "add document metadata separated by semicolon e.g. -md source=internet;label=public"); CommandLine line = null; try { line = parser.parse(options, args); if (line.hasOption("help")) { formatter.printHelp("CorpusGenerator", options); return 0; } if (!line.hasOption("i")) { formatter.printHelp("CorpusGenerator", options); return -1; } if (!line.hasOption("o")) { formatter.printHelp("CorpusGenerator", options); return -1; } } catch (ParseException e) { formatter.printHelp("CorpusGenerator", options); } boolean recurse = true; if ((line.hasOption("r")) && ("false".equalsIgnoreCase(line.getOptionValue("r")))) recurse = false; boolean unpack = true; if ((line.hasOption("u")) && ("false".equalsIgnoreCase(line.getOptionValue("u")))) { unpack = false; } getConf().setBoolean(unpackParamName, unpack); Path inputDir = new Path(line.getOptionValue("i")); Path output = new Path(line.getOptionValue("o")); if (line.hasOption("md")) { String md = line.getOptionValue("md"); getConf().set("md", md); } setInput(inputDir); setOutput(output); long start = System.currentTimeMillis(); long count = generate(recurse); long finish = System.currentTimeMillis(); if (log.isInfoEnabled()) { log.info("CorpusGenerator completed. Timing: " + (finish - start) + " ms"); } log.info(count + " docs converted"); return 0; } private long processFiles(Configuration conf, Path input, boolean recurse, PerformanceFileFilter pff) throws IOException { if (this.stop) { return pff.counter; } FileSystem fs = input.getFileSystem(conf); FileStatus[] statuses = fs.listStatus(input, pff); for (int i = 0; i < statuses.length; i++) { FileStatus status = statuses[i]; if (recurse == true) { processFiles(conf, status.getPath(), recurse, pff); } } return pff.counter; } public void stop() { this.stop = true; } public boolean isStopped() { return this.stop; } public static String pathToStringEncoded(Path p, FileSystem fs) { if (p == null) { return null; } String url = null; if (fs != null) url = p.makeQualified(fs).toString(); else { url = p.toString(); } if (url == null) return null; try { return URLEncoder.encode(url, "UTF-8"); } catch (UnsupportedEncodingException e) { } return url; } static class PerformanceFileFilter implements PathFilter { long counter = 0L; PathFilter defaultIgnores = new PathFilter() { public boolean accept(Path file) { String name = file.getName(); return !name.startsWith("."); } }; private SequenceFile.Writer writer; private Text key; private Text value; private Configuration conf; private Reporter reporter; public PerformanceFileFilter(SequenceFile.Writer writer, Text key, Text value, Configuration conf, Reporter reporter) { this.writer = writer; this.key = key; this.value = value; this.conf = conf; this.reporter = reporter; } public boolean accept(Path file) { try { FileSystem fs = file.getFileSystem(this.conf); boolean unpack = this.conf.getBoolean(DirectAccessCorpusGenerator.unpackParamName, true); if ((this.defaultIgnores.accept(file)) && (!fs.getFileStatus(file).isDir())) { String uri = DirectAccessCorpusGenerator.pathToStringEncoded(file, fs); int processed = 0; if (processed == 0) { try { this.key.set(uri); this.value.set("file"); this.writer.append(this.key, this.value); this.counter += 1L; if (this.reporter != null) this.reporter.incrCounter(CorpusGenerator.Counters.DOC_COUNT, 1L); } catch (FileNotFoundException e) { log.warn("File not found " + file + ", skipping: " + e); } catch (IOException e) { log.warn("IO error reading file " + file + ", skipping: " + e); } } } return fs.getFileStatus(file).isDir(); } catch (IOException e) { log.error("Exception", e); } return false; } } }
[ "whlee21@gmail.com" ]
whlee21@gmail.com
7ccca05ef6b0ca5f245518ff80c385c6157cc7d0
40665051fadf3fb75e5a8f655362126c1a2a3af6
/ibinti-bugvm/654ad9ec920329636929e5981fdea4935039c70b/7899/NSCoreDataErrorUserInfoKey.java
7d7301ec45b7cea98c19857467db85dc446ba0d3
[]
no_license
fermadeiral/StyleErrors
6f44379207e8490ba618365c54bdfef554fc4fde
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
refs/heads/master
2020-07-15T12:55:10.564494
2019-10-24T02:30:45
2019-10-24T02:30:45
205,546,543
2
0
null
null
null
null
UTF-8
Java
false
false
7,825
java
/* * Copyright (C) 2013-2015 RoboVM AB * * 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.bugvm.apple.coredata; /*<imports>*/ import java.io.*; import java.nio.*; import java.util.*; import com.bugvm.objc.*; import com.bugvm.objc.annotation.*; import com.bugvm.objc.block.*; import com.bugvm.rt.*; import com.bugvm.rt.annotation.*; import com.bugvm.rt.bro.*; import com.bugvm.rt.bro.annotation.*; import com.bugvm.rt.bro.ptr.*; import com.bugvm.apple.foundation.*; /*</imports>*/ /*<javadoc>*/ /*</javadoc>*/ /*<annotations>*/@Library("CoreData") @StronglyLinked/*</annotations>*/ @Marshaler(/*<name>*/NSCoreDataErrorUserInfoKey/*</name>*/.Marshaler.class) /*<visibility>*/public/*</visibility>*/ class /*<name>*/NSCoreDataErrorUserInfoKey/*</name>*/ extends /*<extends>*/NSErrorUserInfoKey/*</extends>*/ /*<implements>*//*</implements>*/ { static { Bro.bind(/*<name>*/NSCoreDataErrorUserInfoKey/*</name>*/.class); } /*<marshalers>*/ public static class Marshaler { @MarshalsPointer public static NSCoreDataErrorUserInfoKey toObject(Class<NSCoreDataErrorUserInfoKey> cls, long handle, long flags) { NSString o = (NSString) NSObject.Marshaler.toObject(NSString.class, handle, flags); if (o == null) { return null; } return NSCoreDataErrorUserInfoKey.valueOf(o); } @MarshalsPointer public static long toNative(NSCoreDataErrorUserInfoKey o, long flags) { if (o == null) { return 0L; } return NSObject.Marshaler.toNative(o.value(), flags); } } public static class AsListMarshaler { @SuppressWarnings("unchecked") @MarshalsPointer public static List<NSCoreDataErrorUserInfoKey> toObject(Class<? extends NSObject> cls, long handle, long flags) { NSArray<NSString> o = (NSArray<NSString>) NSObject.Marshaler.toObject(NSArray.class, handle, flags); if (o == null) { return null; } List<NSCoreDataErrorUserInfoKey> list = new ArrayList<>(); for (int i = 0; i < o.size(); i++) { list.add(NSCoreDataErrorUserInfoKey.valueOf(o.get(i))); } return list; } @MarshalsPointer public static long toNative(List<NSCoreDataErrorUserInfoKey> l, long flags) { if (l == null) { return 0L; } NSArray<NSString> array = new NSMutableArray<>(); for (NSCoreDataErrorUserInfoKey o : l) { array.add(o.value()); } return NSObject.Marshaler.toNative(array, flags); } } /*</marshalers>*/ /*<constants>*/ /** * @since Available in iOS 3.0 and later. */ public static final NSCoreDataErrorUserInfoKey DetailedErrorsKey = new NSCoreDataErrorUserInfoKey("DetailedErrorsKey"); /** * @since Available in iOS 3.0 and later. */ public static final NSCoreDataErrorUserInfoKey ValidationObjectErrorKey = new NSCoreDataErrorUserInfoKey("ValidationObjectErrorKey"); /** * @since Available in iOS 3.0 and later. */ public static final NSCoreDataErrorUserInfoKey ValidationKeyErrorKey = new NSCoreDataErrorUserInfoKey("ValidationKeyErrorKey"); /** * @since Available in iOS 3.0 and later. */ public static final NSCoreDataErrorUserInfoKey ValidationPredicateErrorKey = new NSCoreDataErrorUserInfoKey("ValidationPredicateErrorKey"); /** * @since Available in iOS 3.0 and later. */ public static final NSCoreDataErrorUserInfoKey ValidationValueErrorKey = new NSCoreDataErrorUserInfoKey("ValidationValueErrorKey"); /** * @since Available in iOS 3.0 and later. */ public static final NSCoreDataErrorUserInfoKey AffectedStoresErrorKey = new NSCoreDataErrorUserInfoKey("AffectedStoresErrorKey"); /** * @since Available in iOS 3.0 and later. */ public static final NSCoreDataErrorUserInfoKey AffectedObjectsErrorKey = new NSCoreDataErrorUserInfoKey("AffectedObjectsErrorKey"); /** * @since Available in iOS 5.0 and later. */ public static final NSCoreDataErrorUserInfoKey PersistentStoreSaveConflictsErrorKey = new NSCoreDataErrorUserInfoKey("PersistentStoreSaveConflictsErrorKey"); /*</constants>*/ private static /*<name>*/NSCoreDataErrorUserInfoKey/*</name>*/[] values = new /*<name>*/NSCoreDataErrorUserInfoKey/*</name>*/[] {/*<value_list>*/DetailedErrorsKey, ValidationObjectErrorKey, ValidationKeyErrorKey, ValidationPredicateErrorKey, ValidationValueErrorKey, AffectedStoresErrorKey, AffectedObjectsErrorKey, PersistentStoreSaveConflictsErrorKey/*</value_list>*/}; /*<name>*/NSCoreDataErrorUserInfoKey/*</name>*/ (String getterName) { super(Values.class, getterName); } public static /*<name>*/NSCoreDataErrorUserInfoKey/*</name>*/ valueOf(/*<type>*/NSString/*</type>*/ value) { for (/*<name>*/NSCoreDataErrorUserInfoKey/*</name>*/ v : values) { if (v.value().equals(value)) { return v; } } throw new IllegalArgumentException("No constant with value " + value + " found in " + /*<name>*/NSCoreDataErrorUserInfoKey/*</name>*/.class.getName()); } /*<methods>*//*</methods>*/ /*<annotations>*/@Library("CoreData") @StronglyLinked/*</annotations>*/ public static class Values { static { Bro.bind(Values.class); } /*<values>*/ /** * @since Available in iOS 3.0 and later. */ @GlobalValue(symbol="NSDetailedErrorsKey", optional=true) public static native NSString DetailedErrorsKey(); /** * @since Available in iOS 3.0 and later. */ @GlobalValue(symbol="NSValidationObjectErrorKey", optional=true) public static native NSString ValidationObjectErrorKey(); /** * @since Available in iOS 3.0 and later. */ @GlobalValue(symbol="NSValidationKeyErrorKey", optional=true) public static native NSString ValidationKeyErrorKey(); /** * @since Available in iOS 3.0 and later. */ @GlobalValue(symbol="NSValidationPredicateErrorKey", optional=true) public static native NSString ValidationPredicateErrorKey(); /** * @since Available in iOS 3.0 and later. */ @GlobalValue(symbol="NSValidationValueErrorKey", optional=true) public static native NSString ValidationValueErrorKey(); /** * @since Available in iOS 3.0 and later. */ @GlobalValue(symbol="NSAffectedStoresErrorKey", optional=true) public static native NSString AffectedStoresErrorKey(); /** * @since Available in iOS 3.0 and later. */ @GlobalValue(symbol="NSAffectedObjectsErrorKey", optional=true) public static native NSString AffectedObjectsErrorKey(); /** * @since Available in iOS 5.0 and later. */ @GlobalValue(symbol="NSPersistentStoreSaveConflictsErrorKey", optional=true) public static native NSString PersistentStoreSaveConflictsErrorKey(); /*</values>*/ } }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
b0b1788ea734f0643e28e639efe4751b2fa3f8ec
8759da2b77b1c48ad1e015cdd9737e5566a6f24e
/src/Project/ClassProjeler/TahminEtmeOyunu.java
53bb7519c8aa8f68dc4b140b3a10b793b3b6f771
[]
no_license
Mehmet0626/Java2021allFiles
aa1e55f652476a6538d7e897b90133af37f24e7d
3a84ba2cfc9f966a23597f0bee3bb4b58846803d
refs/heads/master
2023-08-31T05:05:45.057755
2021-10-11T09:06:04
2021-10-11T09:06:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,230
java
package Project.ClassProjeler; import java.util.Random; import java.util.Scanner; public class TahminEtmeOyunu { /* * Sayi tahmin etme oyunu.... * Bilgisayardan rastle(random class kullanilarak) * 0-100 arasinda bir sayi alip kullanicinin tahminini her defasinda * buyuk kucuk yonlendirerek rastgele sayiyi bulmasini saglayan kod yaziniz. * Random rnd = new Random(); * - int sayi = rnd.nextInt(101); * Eger kullanici ilk tahmininde bilirse x4 Kredi kazansin, * ikici tahmininde bilirse x3, * ucuncu tahmininde bilirse x2 * 4 ve sonrasinda herhangi bir bonus kazanmasin kazanirsa * yeni bir oyuna baslamak istiyor mu diye sor. * Baslarsa oyunu zorlastir. * Kredi seviyesi kritik duzeye indiginde yeni bir oyun hakki tani (30) */ static Scanner scan = new Scanner(System.in); public static void main(String[] args) { int kredi = 100; byte yeniOyun = 0; byte oyunSayisi = 1; int ekstraOyunHakki = 1; do { Random rnd = new Random(); int sayi = rnd.nextInt(101); boolean kazandiMi = false; int tahminSayisi = 1; if (oyunSayisi > 1) { System.out.println("Yeni oyuna hos geldiniz. Umariz sansiniz ebediyen devam eder :)"); sayi = rnd.nextInt(300); } do { System.out.println("Lutfen " + tahminSayisi + ". tahmininizi giriniz: "); System.out.println(sayi); int tahmin = scan.nextInt(); if (sayi == tahmin) { if (tahminSayisi < 4) { switch (tahminSayisi) { case 1: kredi += kredi * 4; break; case 2: kredi += kredi * 3; break; case 3: kredi += kredi * 2; break; } } System.out.println("Tebrikler oyunu kazandiniz! \nMevcut krediniz " + kredi); System.out.println( "Mevcut krediniz ile yeni bir oyuna baslamak ister misiniz? \nEvet icin 1'i Hayir icin 2'yi tuslayiniz"); yeniOyun = scan.nextByte(); oyunSayisi++; kazandiMi = true; } else { kredi -= 10; if (sayi < tahmin) { System.out.println("Birazdaha kucuk bir tahminde bulunmaya ne dersin?"); } else { System.out.println("Biraz daha buyuk bir tahminde bulunmaya ne dersin?"); } System.out.println("Kalan kredi miktariniz: " + kredi); if (kredi <= 30 && ekstraOyunHakki == 1) { ekstraOyunHakki++; System.out.println( "Kredi miktariniz kritik seviyeye indi. Mevcut krediniz ile yeni bir oyunabaslamak ister misiniz? Boylelikle bonuslardan tekrardan yararlanma hakkina sahip olabilirsiniz. Evet icin 1'i Hayir icin 2'yi tuslayin."); byte ekstraOyunHakkiTercih = scan.nextByte(); if (ekstraOyunHakkiTercih == 1) { kredi = ekstraOyun(kredi); if (kredi > 0) { System.out.println("Tebrikler oyunu kazandiniz! \nMevcut krediniz " + kredi); System.out.println( "Mevcut krediniz ile yeni bir oyuna baslamak ister misiniz? \nEvet icin 1'i Hayir icin 2'yi tuslayiniz"); yeniOyun = scan.nextByte(); oyunSayisi++; kazandiMi = true; } } } } tahminSayisi++; } while (!kazandiMi && kredi > 0); if (yeniOyun == 2 || kredi <= 0) { System.out.println("THE END"); break; } } while (yeniOyun == 1); } private static int ekstraOyun(int kredi) { Random rnd = new Random(); int sayi = rnd.nextInt(101); boolean kazandiMi = false; int tahminSayisi = 1; do { System.out.println("Lutfen " + tahminSayisi + ". tahmininizi giriniz: "); System.out.println(sayi); int tahmin = scan.nextInt(); if (sayi == tahmin) { if (tahminSayisi < 4) { switch (tahminSayisi) { case 1: kredi += kredi * 4; break; case 2: kredi += kredi * 3; break; case 3: kredi += kredi * 2; break; } } kazandiMi = true; } else { kredi -= 10; if (sayi < tahmin) { System.out.println("Birazdaha kucuk bir tahminde bulunmaya ne dersin?"); } else { System.out.println("Biraz daha buyuk bir tahminde bulunmaya ne dersin?"); } System.out.println("Kalan kredi miktariniz: " + kredi); } tahminSayisi++; } while (!kazandiMi && kredi > 0); return kredi; } }
[ "delenkar2825@gmail.com" ]
delenkar2825@gmail.com
5ab85ebf3f5d7a344f659ef853b919c079bf10f8
fb2b27f0638feaa8a435425a563910de48925931
/df_miniapp/classes/com/tt/miniapp/manager/basebundle/handler/CheckBuildInBaseBundleHandler.java
7a7b6cdf47167ac93040e1f0f0c2770d2fd94ad9
[]
no_license
0moura/tiktok_source
168fdca45a76e9dc41a4667e41b7743c54692e45
dc2f1740f1f4adcb16448107e5c15fabc40ed8e5
refs/heads/master
2023-01-08T22:51:02.019984
2020-11-03T13:18:24
2020-11-03T13:18:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,239
java
package com.tt.miniapp.manager.basebundle.handler; import android.content.Context; import android.text.TextUtils; import com.tt.miniapp.event.BaseBundleEventHelper; import com.tt.miniapp.manager.basebundle.BaseBundleDAO; import com.tt.miniapp.manager.basebundle.BaseBundleFileManager; import com.tt.miniapphost.util.IOUtils; public class CheckBuildInBaseBundleHandler extends BaseBundleHandler { private boolean isNeedUpdate(Context paramContext) { long l1 = BaseBundleDAO.getLastBundleVersion(paramContext); long l2 = Long.valueOf("1700001").longValue(); String str = BaseBundleDAO.getLastVersionName(paramContext); if (l2 > l1 || !TextUtils.equals("3.7.4-tiktok", str)) { BaseBundleDAO.setLastBundleVersion(paramContext, l2); BaseBundleDAO.setLastVersionName(paramContext, "3.7.4-tiktok"); return true; } return false; } public BundleHandlerParam handle(Context paramContext, BundleHandlerParam paramBundleHandlerParam) { BaseBundleEventHelper.BaseBundleEvent baseBundleEvent1; StringBuilder stringBuilder; BaseBundleEventHelper.BaseBundleEvent baseBundleEvent2 = paramBundleHandlerParam.baseBundleEvent; long l = paramBundleHandlerParam.bundleVersion; if (!IOUtils.isAssetsFileExist(paramContext, "__dev__.zip")) { baseBundleEvent1 = paramBundleHandlerParam.baseBundleEvent; stringBuilder = new StringBuilder("ignore download Task?"); stringBuilder.append(paramBundleHandlerParam.isIgnoreTask); baseBundleEvent1.appendLog(stringBuilder.toString()); return paramBundleHandlerParam; } if (isNeedUpdate((Context)baseBundleEvent1) || BaseBundleFileManager.getLatestBaseBundleVersion() <= 0L) l = BaseBundleFileManager.unZipAssetsBundle((Context)baseBundleEvent1, "__dev__.zip", "buildin_bundle", (BaseBundleEventHelper.BaseBundleEvent)stringBuilder, false); paramBundleHandlerParam.bundleVersion = l; return paramBundleHandlerParam; } } /* Location: C:\Users\august\Desktop\tik\df_miniapp\classes.jar!\com\tt\miniapp\manager\basebundle\handler\CheckBuildInBaseBundleHandler.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "augustgl@protonmail.ch" ]
augustgl@protonmail.ch
398007fb025dcfa219ac572187222054ff0ca6a7
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-2.0.0-M1/transports/axis/src/test/java/org/mule/providers/soap/axis/style/DefaultMessageService.java
ede2cbfae6732d367383782b926c8b7642029030
[]
no_license
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
2,891
java
/* * $Id$ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com * * The software in this package is published under the terms of the MuleSource MPL * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ /* * Copyright 2002-2004 The Apache Software Foundation. * * 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 =mplied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.mule.providers.soap.axis.style; import javax.xml.soap.Name; import javax.xml.soap.SOAPBody; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPEnvelope; import javax.xml.soap.SOAPException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Simple message-style service sample. */ public class DefaultMessageService implements MessageService { private static Log logger = LogFactory.getLog(DefaultMessageService.class); /** * Service method, which simply echoes back any XML it receives. * * @param bodyElements an array of DOM Elements, one for each SOAP body =lement * @return an array of DOM Elements to be sent in the response body */ public org.apache.axis.message.SOAPBodyElement[] soapBodyElement(org.apache.axis.message.SOAPBodyElement[] bodyElements) { // Echo back logger.debug("bodyElementTest Called"); return bodyElements; } public Document document(Document body) { // Echo back logger.debug("documentTest Called"); body.setNodeValue("TEST RESPONSE"); return body; } public Element[] elementArray(Element[] elems) { // Echo back logger.debug("echoElements Called"); return elems; } public void soapRequestResponse(SOAPEnvelope req, SOAPEnvelope resp) throws SOAPException { // Echo back logger.debug("envelopeTest Called"); SOAPBody body = resp.getBody(); Name ns0 = resp.createName("TestNS0", "ns0", "http://example.com"); Name ns1 = resp.createName("TestNS1", "ns1", "http://example.com"); SOAPElement bodyElmnt = body.addBodyElement(ns0); SOAPElement el = bodyElmnt.addChildElement(ns1); el.addTextNode("TEST RESPONSE"); } }
[ "tcarlson@bf997673-6b11-0410-b953-e057580c5b09" ]
tcarlson@bf997673-6b11-0410-b953-e057580c5b09
57f39a1f2be04accb9a069888ea52ad7bcb2d408
90f9d0d74e6da955a34a97b1c688e58df9f627d0
/com.ibm.ccl.soa.deploy.core.ui/src/com/ibm/ccl/soa/deploy/core/ui/actions/AddCapabilityAction.java
872564e427c3fef3ada35e83200099e6e2a87ea3
[]
no_license
kalapriyakannan/UMLONT
0431451674d7b3eb744fb436fab3d13e972837a4
560d9f5d2ba6a800398a24fd8265e5a946179fd3
refs/heads/master
2020-03-30T03:16:44.327160
2018-09-28T03:28:11
2018-09-28T03:28:11
150,679,726
1
1
null
null
null
null
UTF-8
Java
false
false
3,784
java
/*************************************************************************************************** * Copyright (c) 2008 IBM Corporation. All rights reserved. * * Contributors: IBM Corporation - initial API and implementation **************************************************************************************************/ package com.ibm.ccl.soa.deploy.core.ui.actions; import java.util.LinkedList; import java.util.List; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.gmf.runtime.common.core.command.CommandResult; import org.eclipse.jface.window.Window; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.dialogs.ElementListSelectionDialog; import com.ibm.ccl.soa.deploy.core.Capability; import com.ibm.ccl.soa.deploy.core.DeployModelObject; import com.ibm.ccl.soa.deploy.core.Unit; import com.ibm.ccl.soa.deploy.core.ui.DeployCoreUIPlugin; import com.ibm.ccl.soa.deploy.core.ui.ISharedImages; import com.ibm.ccl.soa.deploy.core.ui.dialogs.NewCapabilityCreationDialog; import com.ibm.ccl.soa.deploy.core.ui.properties.PropertyUtils; import com.ibm.ccl.soa.deploy.core.util.UnitUtil; /** * A UI action to create a new {@link Capability} for a {@link Unit}. The action will prompt the * user to select the capability type to create. * */ public class AddCapabilityAction extends AbstractAddUnitPropertiesAction { /** * @param workbenchPage */ public AddCapabilityAction(IWorkbenchPage workbenchPage) { super(workbenchPage); setId(DeployActionIds.ACTION_ADD_CAPABILITY); setImageDescriptor(DeployCoreUIPlugin.getDefault().getSharedImages().getImageDescriptor( ISharedImages.IMG_ADD_CAPABILITY)); setToolTipText(com.ibm.ccl.soa.deploy.core.ui.Messages.NubEditDialog_Add_Capabilit_); setText(com.ibm.ccl.soa.deploy.core.ui.Messages.NubEditDialog_Add_Capabilit_); } protected String getOperationTitle() { return com.ibm.ccl.soa.deploy.core.ui.Messages.NubEditDialog_Add_Capabilit_; } @Override protected DeployModelObject createDmo() { Capability cap = null; //Launch dialog Shell shell = Display.getCurrent().getActiveShell(); final List<Object> list = new LinkedList<Object>(); BusyIndicator.showWhile(Display.getCurrent(), new Runnable() { public void run() { list.addAll(PropertyUtils.getBankedCapabilities()); list.addAll(PropertyUtils.getInstantiatableCapTypeNames()); } }); ElementListSelectionDialog dlg = new NewCapabilityCreationDialog(shell, PropertyUtils .getSoaLabelProvider()); dlg .setTitle(com.ibm.ccl.soa.deploy.core.ui.properties.Messages.NewCapabilityDialog_ADD_CAPABILITY); dlg.setHelpAvailable(false); dlg.setElements(list.toArray()); if (dlg.open() == Window.OK) { Object sel = dlg.getFirstResult(); if (sel instanceof Capability) { cap = (Capability) sel; cap = (Capability) EcoreUtil.copy(cap); } else if (sel instanceof String) { String ecName = (String) sel; cap = PropertyUtils.createCapability(ecName); } } return cap; } @Override protected UnitPropertyFlyoutHandler createUnitPropertyFlyoutHandler() { return new OpenCapabilitiesFlyout(); } @Override protected boolean canEditUnit(Unit owner) { return super.canEditUnit(owner) && owner.isPublicEditable(); } @SuppressWarnings("unchecked") @Override protected CommandResult doRun(Unit owner, DeployModelObject newDmo) { String name = UnitUtil.generateUniqueName(owner, newDmo.eClass().getName()); newDmo.setName(name); newDmo.setDisplayName(name); owner.getCapabilities().add(newDmo); return null; } }
[ "kalapriya.kannan@in.ibm.com" ]
kalapriya.kannan@in.ibm.com
73812eaa8eff27a113a4bace0169815abb1d48b8
fd73aa5db00e5bc23367d57fd4b9ef540f363585
/src/test/java/com/citadier/amelie/web/rest/UserJWTControllerIT.java
22dfc30dfdab1534cc909d51ad5841d094813344
[]
no_license
rafreid/amelie
6346da149ab27ce4416df3ce799cd6ef7ea6b8db
b6291f03d40f80b43a56802db764ec48ed219427
refs/heads/master
2022-12-21T10:53:44.424400
2020-02-24T00:37:03
2020-02-24T00:37:03
242,612,342
0
0
null
2022-12-16T05:13:08
2020-02-24T00:09:13
TypeScript
UTF-8
Java
false
false
4,150
java
package com.citadier.amelie.web.rest; import com.citadier.amelie.AmelieApp; import com.citadier.amelie.domain.User; import com.citadier.amelie.repository.UserRepository; import com.citadier.amelie.web.rest.vm.LoginVM; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.transaction.annotation.Transactional; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.emptyString; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; /** * Integration tests for the {@link UserJWTController} REST controller. */ @AutoConfigureMockMvc @SpringBootTest(classes = AmelieApp.class) public class UserJWTControllerIT { @Autowired private UserRepository userRepository; @Autowired private PasswordEncoder passwordEncoder; @Autowired private MockMvc mockMvc; @Test @Transactional public void testAuthorize() throws Exception { User user = new User(); user.setLogin("user-jwt-controller"); user.setEmail("user-jwt-controller@example.com"); user.setActivated(true); user.setPassword(passwordEncoder.encode("test")); userRepository.saveAndFlush(user); LoginVM login = new LoginVM(); login.setUsername("user-jwt-controller"); login.setPassword("test"); mockMvc.perform(post("/api/authenticate") .contentType(TestUtil.APPLICATION_JSON) .content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isOk()) .andExpect(jsonPath("$.id_token").isString()) .andExpect(jsonPath("$.id_token").isNotEmpty()) .andExpect(header().string("Authorization", not(nullValue()))) .andExpect(header().string("Authorization", not(is(emptyString())))); } @Test @Transactional public void testAuthorizeWithRememberMe() throws Exception { User user = new User(); user.setLogin("user-jwt-controller-remember-me"); user.setEmail("user-jwt-controller-remember-me@example.com"); user.setActivated(true); user.setPassword(passwordEncoder.encode("test")); userRepository.saveAndFlush(user); LoginVM login = new LoginVM(); login.setUsername("user-jwt-controller-remember-me"); login.setPassword("test"); login.setRememberMe(true); mockMvc.perform(post("/api/authenticate") .contentType(TestUtil.APPLICATION_JSON) .content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isOk()) .andExpect(jsonPath("$.id_token").isString()) .andExpect(jsonPath("$.id_token").isNotEmpty()) .andExpect(header().string("Authorization", not(nullValue()))) .andExpect(header().string("Authorization", not(is(emptyString())))); } @Test public void testAuthorizeFails() throws Exception { LoginVM login = new LoginVM(); login.setUsername("wrong-user"); login.setPassword("wrong password"); mockMvc.perform(post("/api/authenticate") .contentType(TestUtil.APPLICATION_JSON) .content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isUnauthorized()) .andExpect(jsonPath("$.id_token").doesNotExist()) .andExpect(header().doesNotExist("Authorization")); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
b793544682e3a4b7e7738c69db18dcb3f55ee18f
d5f09c7b0e954cd20dd613af600afd91b039c48a
/sources/androidx/core/widget/AutoSizeableTextView.java
6b6ebbfe797847d71d712fba4f2b6a651a22d551
[]
no_license
t0HiiBwn/CoolapkRelease
af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3
a6a2b03e32cde0e5163016e0078391271a8d33ab
refs/heads/main
2022-07-29T23:28:35.867734
2021-03-26T11:41:18
2021-03-26T11:41:18
345,290,891
5
2
null
null
null
null
UTF-8
Java
false
false
1,120
java
package androidx.core.widget; import android.os.Build; public interface AutoSizeableTextView { public static final boolean PLATFORM_SUPPORTS_AUTOSIZE = (Build.VERSION.SDK_INT >= 27); @Override // androidx.core.widget.AutoSizeableTextView int getAutoSizeMaxTextSize(); @Override // androidx.core.widget.AutoSizeableTextView int getAutoSizeMinTextSize(); @Override // androidx.core.widget.AutoSizeableTextView int getAutoSizeStepGranularity(); @Override // androidx.core.widget.AutoSizeableTextView int[] getAutoSizeTextAvailableSizes(); @Override // androidx.core.widget.AutoSizeableTextView int getAutoSizeTextType(); @Override // androidx.core.widget.AutoSizeableTextView void setAutoSizeTextTypeUniformWithConfiguration(int i, int i2, int i3, int i4) throws IllegalArgumentException; @Override // androidx.core.widget.AutoSizeableTextView void setAutoSizeTextTypeUniformWithPresetSizes(int[] iArr, int i) throws IllegalArgumentException; @Override // androidx.core.widget.AutoSizeableTextView void setAutoSizeTextTypeWithDefaults(int i); }
[ "test@gmail.com" ]
test@gmail.com
def6986e9aab1508c1a79ff522af8b4af0fc23a1
b0f37c1b45f30f5bdde035b70c5fe025b6610e2a
/src/main/java/com/github/sufbo/stats/LeaveOneOut.java
f31454ff81c9bef683a0260793e662812b0c6dca
[]
no_license
tamada/sufbo
ac5b86131dea854ccd60c24168e767bccaff8fbf
b31f70e6d97ad769e512b9f737aad1b061a2de43
refs/heads/master
2021-03-19T18:51:13.043356
2018-11-16T02:33:26
2018-11-16T02:33:26
86,790,351
0
0
null
2018-11-16T02:33:27
2017-03-31T07:22:48
Java
UTF-8
Java
false
false
5,885
java
package com.github.sufbo.stats; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; import com.github.sufbo.Arguments; import com.github.sufbo.Key; import com.github.sufbo.Options; import com.github.sufbo.OptionsArgumentsBuilder; import com.github.sufbo.entities.ByteArray; import com.github.sufbo.stats.calculators.SimilarityCalculatorFactory; import com.github.sufbo.stats.entities.Item; import com.github.sufbo.stats.entities.Similarity; import com.github.sufbo.stats.entities.SimpleItemStringifier; public class LeaveOneOut { public static final Key PARALLEL = new Key("-p", "--parallel", false); public static final Key OUTPUT_RESULT = new Key("-o", "--output-result", false); public static final Key OUTPUT_HEATMAP = new Key("-H", "--heatmap", false); public static final Key ALGORITHM = new Key("-a", "--algorithm", true); private ItemBuilder builder = new ItemBuilder(); private SimilarityCalculator calculator = new SimilarityCalculatorFactory() .calculatorOrDefault("jaccard_index"); private SimpleItemStringifier stringifier = new SimpleItemStringifier(); private HeatmapImageCreator creator = new HeatmapImageCreator(); private Arguments arguments; private Options options; public LeaveOneOut(String[] args){ OptionsArgumentsBuilder optionArguments = OptionsArgumentsBuilder.builder(availableOptions(), args); arguments = optionArguments.arguments(); options = optionArguments.options(); calculator = new SimilarityCalculatorFactory().calculatorOrDefault(options.valueOrElse(ALGORITHM, "levenshtein")); } protected List<Key> availableOptions(){ return Arrays.asList(PARALLEL, OUTPUT_RESULT, OUTPUT_HEATMAP, Key.HELP, ALGORITHM); } public void run() throws IOException{ if(options.has(Key.HELP)) printHelp(); else arguments.forEach(file -> { try{ execute(file); } catch(IOException e){ throw new InternalError(e); } }); } private void printHelp(){ System.out.println("java com.github.sufbo.stats.LeaveOneOut [OPTIONS] <FILES...>"); System.out.println("OPTIONS"); System.out.println(" -p, --parallel: execute parallel."); System.out.println(" -o, --output-result: output comparing result. if this option is not specified,"); System.out.println(" this program do not output the comparison result."); System.out.println(" -H, --heatmap: output heatmap image in heatmap.ppm."); System.out.println(" -a, --algorithm <ALGORITHM>: specify the comparison algorithm. default is levenshtein."); System.out.println(" -h, --help: print this message and exit."); } public void execute(String file) throws IOException{ Path path = Paths.get(file); Index index = new Index(); TimeHolder holder = new TimeHolder(); try(Stream<String> stream = Files.lines(path)){ stream.forEach( string -> holder.append(executeLeaveOne(string, path, index.incrementAfter()))); } holder.printf(System.err, "total time: %,f ms%n"); creator.close(); } private long executeLeaveOne(String itemString, Path path, int ignoreIndex){ long start = System.nanoTime(); int size = leaveOne(builder.build(itemString), path, ignoreIndex); long time = System.nanoTime() - start; System.err.printf("%,6d/%,6d (%,f ms)%n", ignoreIndex + 1, size + ignoreIndex, time / 1000000d); return time; } private int leaveOne(Item item, Path path, int ignoreIndex){ try(Stream<String> stream = Files.lines(path)){ if(options.has(PARALLEL)) return leaveOneImpl(item, stream.parallel(), ignoreIndex); return leaveOneImpl(item, stream, ignoreIndex); } catch(IOException e){ throw new InternalError(e); } } private int leaveOneImpl(Item item, Stream<String> stream, int ignoreIndex) throws IOException{ List<Similarity> list = compareThem(stream, item.bytecode(), ignoreIndex); options.ifKeyPresent(OUTPUT_RESULT, value -> printList(item, ignoreIndex, list)); options.ifKeyPresent(OUTPUT_HEATMAP, value -> updateHeatMap(ignoreIndex, list)); return list.size(); } private List<Similarity> compareThem(Stream<String> stream, ByteArray array, int ignoreIndex){ return stream.skip(ignoreIndex) .map(line -> calculate(array, line)) .collect(Collectors.toList()); } private void updateHeatMap(int index, List<Similarity> similarities) throws IOException{ if(index == 0) creator.constructImage(similarities.size(), similarities.size()); creator.update(index, similarities); } private void printList(Item item, int ignoreIndex, List<Similarity> list){ System.out.print(stringifier.stringify(item)); for(int i = 0; i < list.size(); i++){ System.out.print(","); if(i == ignoreIndex) System.out.print(","); System.out.print(list.get(i)); } System.out.println(); } private Similarity calculate(ByteArray array, String line){ ByteArray array2 = builder.buildArray(line); return calculator.calculate(array, array2); } public static void main(String[] args) throws IOException{ LeaveOneOut loo = new LeaveOneOut(args); loo.run(); } }
[ "tamada@users.noreply.github.com" ]
tamada@users.noreply.github.com
bd3e8fa8d8651826ef1732c826acc30383712c72
489390ba13ce6b1d4edcb401c87af42805b1a7a1
/mic-provider/mic-provider-search/src/main/java/com/mic/search/controller/AggregationController.java
2d3d1c97fe48c342f3646b5998ee76a07709ca20
[ "Apache-2.0" ]
permissive
pf-oss/mic-frame
f9a0be25f9212941103740bc7f1fc6357b2e5fac
235a73f0ac15f385bd1d4e103c76a439997d875b
refs/heads/main
2023-03-09T08:32:35.235670
2021-02-03T06:11:20
2021-02-03T06:11:20
328,859,413
4
0
null
null
null
null
UTF-8
Java
false
false
1,205
java
package com.mic.search.controller; import com.mic.search.service.IAggregationService; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.io.IOException; import java.util.Map; /** * @Description: 聚合统计 * @author: pf * @create: 2021/1/20 17:24 */ @Slf4j @RestController @RequestMapping("/agg") public class AggregationController { @Resource private IAggregationService aggregationService; // public AggregationController(IAggregationService aggregationService) { // this.aggregationService = aggregationService; // } /** * 访问统计聚合查询 * @param indexName 索引名 * @param routing es的路由 */ @GetMapping("/requestStat/{indexName}/{routing}") public Map<String, Object> requestStatAgg(@PathVariable String indexName, @PathVariable String routing) throws IOException { return aggregationService.requestStatAgg(indexName, routing); } }
[ "pengfei.yao@yunlsp.com" ]
pengfei.yao@yunlsp.com
a41affe9cd6aee87bd3f3dae7a1eb0a8f9e508e8
5b112f41a381320bc81e62e371fc3240a7b20709
/springboot-context-demo/src/main/java/demo/lazybean/LazyBeanService4.java
63aebce15bb5b08e0ca0007303bb36f8cf09b455
[]
no_license
zacscoding/spring-boot-example
1147b5d3203e56b6c4bfaeda253997c6136127e6
48b20a60dd752ee65263503d99d7ef3945072f17
refs/heads/master
2021-11-25T21:43:50.880065
2021-11-07T12:43:39
2021-11-07T12:43:39
114,388,056
3
6
null
2020-03-06T05:35:58
2017-12-15T16:03:35
Java
UTF-8
Java
false
false
424
java
package demo.lazybean; import javax.annotation.PostConstruct; import lombok.extern.slf4j.Slf4j; /** * @author zacconding * @Date 2018-08-28 * @GitHub : https://github.com/zacscoding */ @Slf4j public class LazyBeanService4 { @PostConstruct private void setUp() { logger.info("## Create LazyBeanService4 in PostContruct"); } public String getName() { return "LazyBeanService4"; } }
[ "zaccoding725@gmail.com" ]
zaccoding725@gmail.com
f6e1cdc18d4c50a598a06e6d04e29c561c2a7252
aaa17f8233980b699ef5dae6010c01232cb9fce9
/Java/834.SumDistancesTree/Solution.java
9bbaba77198a331fcd583aa88eb19762b6d376c4
[]
no_license
mud2man/LeetCode
6aa329a66c4785ecfe550b52b04b5fededdfb814
7f97f9fc0ff1d57d35b67d9d240ac990d66ac5aa
refs/heads/master
2021-12-12T01:40:43.208616
2021-11-21T06:12:13
2021-11-21T06:12:13
63,312,728
2
1
null
null
null
null
UTF-8
Java
false
false
3,007
java
/* DFS + Map: Time:O(n), Space:O(n) * 1. Use getSumAndCount to get node2SuccessorNumber and the sum of distances of node 0 * 2. Vist nodes from node 0 and assign sumOfDistances[curr] with prevSum - successorNumber + predecessorNumber - 1; */ import java.util.*; // Stack public class Solution { private int[] getSumAndCount(int prev, int curr, Map<Integer, List<Integer>> adjacentList, Map<Integer, Integer> node2SuccessorNumber){ List<Integer> children = adjacentList.getOrDefault(curr, new ArrayList<>()); int[] totalSumAndCount = new int[2]; for(int child: children){ if(child != prev) { int[] sumAndCount = getSumAndCount(curr, child, adjacentList, node2SuccessorNumber); totalSumAndCount[0] += sumAndCount[0]; totalSumAndCount[1] += sumAndCount[1]; } } node2SuccessorNumber.put(curr, totalSumAndCount[1]); totalSumAndCount[0] += totalSumAndCount[1]; totalSumAndCount[1]++; return totalSumAndCount; } private void dfs(int n, int prev, int curr, int[] sumOfDistances, Map<Integer, List<Integer>> adjacentList, Map<Integer, Integer> node2SuccessorNumber){ if(prev != -1){ int prevSum = sumOfDistances[prev]; int successorNumber = node2SuccessorNumber.getOrDefault(curr, 0); int predecessorNumber = n - successorNumber - 1; sumOfDistances[curr] = prevSum - successorNumber + predecessorNumber - 1; } List<Integer> children = adjacentList.getOrDefault(curr, new ArrayList<>()); for(int child: children){ if(child != prev){ dfs(n, curr, child, sumOfDistances, adjacentList, node2SuccessorNumber); } } } public int[] sumOfDistancesInTree(int N, int[][] edges) { Map<Integer, Integer> node2SuccessorNumber = new HashMap<>(); Map<Integer, List<Integer>> adjacentList = new HashMap<>(); for(int[] edge: edges){ adjacentList.computeIfAbsent(edge[0], key -> new ArrayList<>()).add(edge[1]); adjacentList.computeIfAbsent(edge[1], key -> new ArrayList<>()).add(edge[0]); } int[] sumAndCount = getSumAndCount(-1, 0, adjacentList, node2SuccessorNumber); int[] sumOfDistances = new int[N]; sumOfDistances[0] = sumAndCount[0]; dfs(N, -1, 0, sumOfDistances, adjacentList, node2SuccessorNumber); return sumOfDistances; } public static void main(String[] args){ Solution sol = new Solution(); int N = 6; int[][] edges = {{0,1}, {0, 2}, {2, 3}, {2, 4}, {2, 5}}; System.out.println("N:" + N); System.out.print("edges:"); for(int[] edge: edges){ System.out.print(Arrays.toString(edge) + ","); } System.out.println(""); System.out.println("sum of distances:" + Arrays.toString(sol.sumOfDistancesInTree(N, edges))); } }
[ "chih-hung.lu@columbia.edu" ]
chih-hung.lu@columbia.edu
1c27e3d82db110b79bea34daed1d30c1b767afd3
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_313560c3dca34e217515e2179dccfee455a9ffa9/VM/12_313560c3dca34e217515e2179dccfee455a9ffa9_VM_t.java
a9e8f2ce02293aeb3044123224386e707cf80b26
[]
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,564
java
package lua; import lua.io.Closure; import lua.value.LValue; public interface VM { // ================ interfaces for performing calls /** Prepare the VM stack for a new call with arguments to be pushed */ public void newCall(); /** Push an argument or return value onto the stack */ public void push( LValue value ); /** Push an int argument or return value onto the stack */ public void push( int value ); /** Push a double argument or return value onto the stack */ public void push( double value ); /** Push a boolean argument or return value onto the stack */ public void push( boolean value ); /** Push a String argument or return value onto the stack */ public void push( String value ); /** * Create a call frame for a call that has been set up on * the stack. The first value on the stack must be a Closure, * and subsequent values are arguments to the closure. */ public void prepStackCall(); /** * Execute bytecodes until the current call completes * or the vm yields. */ public void execute(); /** * Put the closure on the stack with arguments, * then perform the call. Leave return values * on the stack for later querying. * * @param c * @param values */ public void doCall(Closure c, LValue[] values); /** * Set the number of results that are expected from the function being called. * (This should be called before prepStackCall) */ public void setExpectedResultCount( int nresults ); /** * Returns the number of results that are expected by the calling function, * or -1 if the calling function can accept a variable number of results. */ public int getExpectedResultCount(); /** * Adjust the stack to contain the expected number of results by adjusting * the top. */ public void adjustResults(); // ================ interfaces for getting arguments when called /** * Get the number of argumnets supplied in the call. */ public int getArgCount(); /** * Get the index-th argument supplied, or NIL if fewer than index were supplied. * @param index * @return */ public LValue getArg(int index); /** * Get the index-th argument as an int value, or 0 if fewer than index arguments were supplied. * @param index * @return */ public int getArgAsInt( int index ); /** * Get the index-th argument as a double value, or 0 if fewer than index arguments were supplied. * @param index * @return */ public double getArgAsDouble( int index ); /** * Get the index-th argument as a boolean value, or false if fewer than index arguments were supplied. * @param index * @return */ public boolean getArgAsBoolean( int index ); /** * Get the index-th argument as a String value, or "" if fewer than index arguments were supplied. * @param index * @return */ public String getArgAsString( int index ); /** Set top to base in preparation for pushing return values. * Can be used when returning no values. * * Once this is called, calls to getArg() are undefined. * * @see push() to push additional results once result is reset. */ public void setResult(); /** Convenience utility to set val to stack[base] and top to base + 1 * in preparation for returning one value * * Once this is called, calls to getArg() are undefined. * * @param val value to provide as the only result. */ public void setResult(LValue val); }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
63d03d5d2e2edaaa4555dbae3c78e9397d772bd9
dfbc143422bb1aa5a9f34adf849a927e90f70f7b
/Contoh Project/video walp/android/support/transition/k.java
8cd115a76650f021c024699190cb89e66ca3f968
[]
no_license
IrfanRZ44/Set-Wallpaper
82a656acbf99bc94010e4f74383a4269e312a6f6
046b89cab1de482a9240f760e8bcfce2b24d6622
refs/heads/master
2020-05-18T11:18:14.749232
2019-05-01T04:17:54
2019-05-01T04:17:54
184,367,300
0
0
null
null
null
null
UTF-8
Java
false
false
840
java
package android.support.transition; import android.animation.Animator; import android.graphics.Matrix; import android.os.Build.VERSION; import android.widget.ImageView; class k { private static final n a = new l(); static { if (Build.VERSION.SDK_INT >= 21) { a = new m(); return; } } static void a(ImageView paramImageView) { a.a(paramImageView); } static void a(ImageView paramImageView, Animator paramAnimator) { a.a(paramImageView, paramAnimator); } static void a(ImageView paramImageView, Matrix paramMatrix) { a.a(paramImageView, paramMatrix); } } /* Location: C:\Users\IrfanRZ\Desktop\video walp\classes_dex2jar.jar * Qualified Name: android.support.transition.k * JD-Core Version: 0.7.0.1 */
[ "irfan.rozal44@gmail.com" ]
irfan.rozal44@gmail.com
4058ccbeadbdf5d5fc34978318a7d80d6f731527
e9b0bd0dfa45d3ed3d2dc77412cab1accf637018
/app/src/main/java/com/moemoe/lalala/di/components/PhoneMenuListComponent.java
ce16f2d539743b58b254849392eb30d79f774d24
[ "Apache-2.0" ]
permissive
Pragmatism0220/Kira
81a01a81ddca6978c4a1f53f4d45ede2374811c6
95497149e2e0a5721c91a582105c6558287f692c
refs/heads/master
2021-10-09T17:46:06.228815
2018-07-27T10:49:09
2018-07-27T10:49:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
460
java
package com.moemoe.lalala.di.components; import com.moemoe.lalala.di.modules.PhoneMenuListModule; import com.moemoe.lalala.di.scopes.UserScope; import com.moemoe.lalala.view.fragment.PhoneMenuListFragment; import dagger.Component; /** * Created by yi on 2016/11/27. */ @UserScope @Component(modules = PhoneMenuListModule.class,dependencies = NetComponent.class) public interface PhoneMenuListComponent { void inject(PhoneMenuListFragment fragment); }
[ "hyggexuanyuan@gmail.com" ]
hyggexuanyuan@gmail.com
be9b6b72484d6713cff5bb5c5896fecbd310c004
573b9c497f644aeefd5c05def17315f497bd9536
/src/main/java/com/alipay/api/response/SsdataDataserviceRiskAlixiaohaoQueryResponse.java
8383a4d53d957fbadf47ee6aef792acc43494b02
[ "Apache-2.0" ]
permissive
zzzyw-work/alipay-sdk-java-all
44d72874f95cd70ca42083b927a31a277694b672
294cc314cd40f5446a0f7f10acbb5e9740c9cce4
refs/heads/master
2022-04-15T21:17:33.204840
2020-04-14T12:17:20
2020-04-14T12:17:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
699
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: ssdata.dataservice.risk.alixiaohao.query response. * * @author auto create * @since 1.0, 2020-02-10 16:14:42 */ public class SsdataDataserviceRiskAlixiaohaoQueryResponse extends AlipayResponse { private static final long serialVersionUID = 8632447469227387545L; /** * 是否阿里小号 */ @ApiField("is_alixiaohao") private Boolean isAlixiaohao; public void setIsAlixiaohao(Boolean isAlixiaohao) { this.isAlixiaohao = isAlixiaohao; } public Boolean getIsAlixiaohao( ) { return this.isAlixiaohao; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
aad5ceb9c5d2a085938ef1c6be3a29263ecc7a7d
fdd4cc6f8b5a473c0081af5302cb19c34433a0cf
/src/modules/agrega/publicacion/src/main/java/es/pode/publicacion/negocio/dominio/ActividadDesdeHastaCriteria.java
b8193dd284aa1812dc14b0e662ca2ea3c5159686
[]
no_license
nwlg/Colony
0170b0990c1f592500d4869ec8583a1c6eccb786
07c908706991fc0979e4b6c41d30812d861776fb
refs/heads/master
2021-01-22T05:24:40.082349
2010-12-23T14:49:00
2010-12-23T14:49:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,837
java
// license-header java merge-point // // Attention: Generated code! Do not modify by hand! // Generated by: SearchCriteria.vsl in andromda-spring-cartridge. // package es.pode.publicacion.negocio.dominio; /** * <p> * Este criterio implementa la busqueda de transiciones a un estado * dado que se producen en un periodo de tiempo. * </p> */ public class ActividadDesdeHastaCriteria implements java.io.Serializable { /** * Constructor por defecto */ public ActividadDesdeHastaCriteria() { } /** * Constructor taking all properties. * @param estado es.pode.publicacion.negocio.dominio.Estado * @param fechaDesde java.util.Calendar * @param fechaHasta java.util.Calendar */ public ActividadDesdeHastaCriteria( es.pode.publicacion.negocio.dominio.Estado estado, java.util.Calendar fechaDesde, java.util.Calendar fechaHasta) { this.estado = estado; this.fechaDesde = fechaDesde; this.fechaHasta = fechaHasta; } /** * Copies constructor from other ActividadDesdeHastaCriteria * @param otherBean ActividadDesdeHastaCriteria */ public ActividadDesdeHastaCriteria(ActividadDesdeHastaCriteria otherBean) { if (otherBean != null) { this.estado = otherBean.getEstado(); this.fechaDesde = otherBean.getFechaDesde(); this.fechaHasta = otherBean.getFechaHasta(); } } /** * The first result to retrieve. */ private java.lang.Integer firstResult; /** * Gets the first result to retrieve. * * @return the first result to retrieve */ public java.lang.Integer getFirstResult() { return this.firstResult; } /** * Sets the first result to retrieve. * * @param firstResult the first result to retrieve */ public void setFirstResult(java.lang.Integer firstResult) { this.firstResult = firstResult; } /** * The fetch size. */ private java.lang.Integer fetchSize; /** * Gets the fetch size. * * @return the fetch size */ public java.lang.Integer getFetchSize() { return this.fetchSize; } /** * Sets the fetch size. * * @param fetchSize the fetch size */ public void setFetchSize(java.lang.Integer fetchSize) { this.fetchSize = fetchSize; } /** * The maximum size of the result set. */ private java.lang.Integer maximumResultSize; /** * Gets the maximum size of the search result. * * @return the maximum size of the search result. */ public java.lang.Integer getMaximumResultSize() { return this.maximumResultSize; } /** * Sets the maxmimum size of the result. * * @param maximumResultSize A number indicating how many results will be returned. */ public void setMaximumResultSize(java.lang.Integer maximumResultSize) { this.maximumResultSize = maximumResultSize; } private es.pode.publicacion.negocio.dominio.Estado estado; /** * <p> * Estado actual. * </p> * @return es.pode.publicacion.negocio.dominio.Estado */ public es.pode.publicacion.negocio.dominio.Estado getEstado() { return this.estado; } /** * <p> * Estado actual. * </p> * @param estado Estado actual. */ public void setEstado(es.pode.publicacion.negocio.dominio.Estado estado) { this.estado = estado; } private java.util.Calendar fechaDesde; /** * <p> * Fecha desde del periodo en el que se esta interesado. * </p> * @return java.util.Calendar */ public java.util.Calendar getFechaDesde() { return this.fechaDesde; } /** * <p> * Fecha desde del periodo en el que se esta interesado. * </p> * @param fechaDesde Fecha desde del periodo en el que se esta interesado. */ public void setFechaDesde(java.util.Calendar fechaDesde) { this.fechaDesde = fechaDesde; } private java.util.Calendar fechaHasta; /** * <p> * Fecha hasta del periodo en el que se esta interesado. * </p> * @return java.util.Calendar */ public java.util.Calendar getFechaHasta() { return this.fechaHasta; } /** * <p> * Fecha hasta del periodo en el que se esta interesado. * </p> * @param fechaHasta Fecha hasta del periodo en el que se esta interesado. */ public void setFechaHasta(java.util.Calendar fechaHasta) { this.fechaHasta = fechaHasta; } }
[ "build@zeno.siriusit.co.uk" ]
build@zeno.siriusit.co.uk
a525b20b6536029f0139f5ee5fe838161c3c0377
6a649709010f35916b58ad639eb24dc9d7452344
/AL-Login/data/scripts/system/database/mysql5/MySQL5TaskFromDBDAO.java
85010b9a57e5a3a8b5721e2580635faff11115a0
[]
no_license
soulxj/aion-cn
807860611e746d8d4c456a769a36d3274405fd7e
8a0a53cf8f99233cbee82f341f2b5c33be0364fa
refs/heads/master
2016-09-11T01:12:19.660692
2014-08-11T14:59:38
2014-08-11T14:59:38
41,342,802
2
2
null
null
null
null
UTF-8
Java
false
false
3,196
java
/* * This file is part of aion-unique <aion-unique.org>. * * aion-unique is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * aion-unique is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with aion-unique. If not, see <http://www.gnu.org/licenses/>. */ package mysql5; import com.aionemu.commons.database.DatabaseFactory; import com.aionemu.loginserver.dao.TaskFromDBDAO; import com.aionemu.loginserver.taskmanager.handler.TaskFromDBHandler; import com.aionemu.loginserver.taskmanager.handler.TaskFromDBHandlerHolder; import com.aionemu.loginserver.taskmanager.trigger.TaskFromDBTrigger; import com.aionemu.loginserver.taskmanager.trigger.TaskFromDBTriggerHolder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.sql.*; import java.util.ArrayList; /** * @author Divinity, nrg */ public class MySQL5TaskFromDBDAO extends TaskFromDBDAO { /** * Logger for this class. */ private static final Logger log = LoggerFactory.getLogger(MySQL5TaskFromDBDAO.class); private static final String SELECT_ALL_QUERY = "SELECT * FROM tasks ORDER BY id"; @Override public ArrayList<TaskFromDBTrigger> getAllTasks() { final ArrayList<TaskFromDBTrigger> result = new ArrayList<TaskFromDBTrigger>(); Connection con = null; PreparedStatement stmt = null; try { con = DatabaseFactory.getConnection(); stmt = con.prepareStatement(SELECT_ALL_QUERY); ResultSet rset = stmt.executeQuery(); while (rset.next()) { try { TaskFromDBTrigger trigger = TaskFromDBTriggerHolder.valueOf(rset.getString("trigger_type")).getTriggerClass().newInstance(); TaskFromDBHandler handler = TaskFromDBHandlerHolder.valueOf(rset.getString("task_type")).getTaskClass().newInstance(); handler.setTaskId(rset.getInt("id")); String execParamsResult = rset.getString("exec_param"); if (execParamsResult != null) { handler.setParams(rset.getString("exec_param").split(" ")); } trigger.setHandlerToTrigger(handler); String triggerParamsResult = rset.getString("trigger_param"); if (triggerParamsResult != null) { trigger.setParams(rset.getString("trigger_param").split(" ")); } result.add(trigger); } catch (InstantiationException ex) { log.error(ex.getMessage(), ex); } catch (IllegalAccessException ex) { log.error(ex.getMessage(), ex); } } rset.close(); stmt.close(); } catch (SQLException e) { log.error("Loading tasks failed: ", e); } finally { DatabaseFactory.close(stmt, con); } return result; } @Override public boolean supports(String s, int i, int i1) { return MySQL5DAOUtils.supports(s, i, i1); } }
[ "feidebugao@gmail.com" ]
feidebugao@gmail.com
3e377d7d284da53478692cdf3fe81eac6e979ba5
280ca7e9bc0643e7aec53c2729fb0c65a4e77aef
/src/p06/lecture/p4method/MyClass3.java
3613487baa29612170f95b28579248865ad73714
[]
no_license
ParkSangPil/java20210325
0620701c603a847dd1a71f5272c7406d3fb6a439
2e0e42a1f4324fe8df7d7eed2e7a1532db8ca12d
refs/heads/master
2023-07-11T22:46:59.876381
2021-08-25T03:17:53
2021-08-25T03:17:53
351,269,453
0
0
null
null
null
null
UTF-8
Java
false
false
331
java
package p06.lecture.p4method; public class MyClass3 { int a; void method1() { // int a; System.out.println("a:"+a/* == this.a*/); System.out.println("method1 호출"); /*this. 를 써도 됨*/method2(); System.out.println("method1 진행...."); } void method2() { System.out.println("method2 호출"); } }
[ "kevin01123@naver.com" ]
kevin01123@naver.com
a00d178d84cc31f8ed431ad1a02aaea11e25ac9a
67089a783d4a4385b2c47c2573489c60abc36bc2
/src/main/java/com/samaauto/web/rest/errors/InvalidPasswordException.java
b7b2d7d49bc3cba4880d8e2ead5c0d2a7fd03d05
[]
no_license
SEYE9/samaAutoV1
b9193b17dfdf4719278fdc249b6c882997766445
c2e33cf3d9c13e3cd3e41e3e68cda1d8f9f04396
refs/heads/master
2021-05-12T01:10:06.523806
2018-01-15T13:57:45
2018-01-15T13:57:45
117,552,234
0
0
null
null
null
null
UTF-8
Java
false
false
345
java
package com.samaauto.web.rest.errors; import org.zalando.problem.AbstractThrowableProblem; import org.zalando.problem.Status; public class InvalidPasswordException extends AbstractThrowableProblem { public InvalidPasswordException() { super(ErrorConstants.INVALID_PASSWORD_TYPE, "Incorrect password", Status.BAD_REQUEST); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
0fdfed72fb4914624f579dc36e5a3f058a52be00
03d61086047f041168f9a77b02a63a9af83f0f3f
/newrelic/src/main/java/com/newrelic/agent/deps/org/apache/http/client/params/AllClientPNames.java
10c66afc11d64d1b18563f245ca2d800efaf6149
[]
no_license
masonmei/mx2
fa53a0b237c9e2b5a7c151999732270b4f9c4f78
5a4adc268ac1e52af1adf07db7a761fac4c83fbf
refs/heads/master
2021-01-25T10:16:14.807472
2015-07-30T21:49:33
2015-07-30T21:49:35
39,944,476
1
0
null
null
null
null
UTF-8
Java
false
false
842
java
// // Decompiled by Procyon v0.5.29 // package com.newrelic.agent.deps.org.apache.http.client.params; import com.newrelic.agent.deps.org.apache.http.conn.params.ConnRoutePNames; import com.newrelic.agent.deps.org.apache.http.conn.params.ConnManagerPNames; import com.newrelic.agent.deps.org.apache.http.conn.params.ConnConnectionPNames; import com.newrelic.agent.deps.org.apache.http.cookie.params.CookieSpecPNames; import com.newrelic.agent.deps.org.apache.http.auth.params.AuthPNames; import com.newrelic.agent.deps.org.apache.http.params.CoreProtocolPNames; import com.newrelic.agent.deps.org.apache.http.params.CoreConnectionPNames; @Deprecated public interface AllClientPNames extends CoreConnectionPNames, CoreProtocolPNames, ClientPNames, AuthPNames, CookieSpecPNames, ConnConnectionPNames, ConnManagerPNames, ConnRoutePNames { }
[ "dongxu.m@gmail.com" ]
dongxu.m@gmail.com
05ee3b0df3f53aee59e72f602370e57004724a6f
3885f57c43f30e980ffde73ad3dad633c36ad33e
/src/main/java/com/eshipper/repository/BoxPackageTypeRepository.java
51e3044581431ed74d156a71e599e0385b71db3f
[]
no_license
Saikiran7569/eshipper
504c3d1bf1e116aa592153a1d59bed490ec63656
0fb67e29c6b40e738f5e25e21e6756e9723cbde3
refs/heads/master
2022-12-21T14:05:55.549045
2020-05-22T09:14:44
2020-05-22T09:14:44
210,282,419
0
0
null
2022-12-16T05:05:45
2019-09-23T06:40:41
Java
UTF-8
Java
false
false
375
java
package com.eshipper.repository; import com.eshipper.domain.BoxPackageType; import org.springframework.data.jpa.repository.*; import org.springframework.stereotype.Repository; /** * Spring Data repository for the BoxPackageType entity. */ @SuppressWarnings("unused") @Repository public interface BoxPackageTypeRepository extends JpaRepository<BoxPackageType, Long> { }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
8288c256382d2c3dd2a8f8051aaee7a881edf88f
8f322f02a54dd5e012f901874a4e34c5a70f5775
/src/main/java/PTUCharacterCreator/Feats/Dance_Form.java
78eec42defb64e30d4b1ed11f5ae496425865e9f
[]
no_license
BMorgan460/PTUCharacterCreator
3514a4040eb264dec69aee90d95614cb83cb53d8
e55f159587f2cb8d6d7b456e706f910ba5707b14
refs/heads/main
2023-05-05T08:26:04.277356
2021-05-13T22:11:25
2021-05-13T22:11:25
348,419,608
0
0
null
null
null
null
UTF-8
Java
false
false
596
java
package PTUCharacterCreator.Feats; import PTUCharacterCreator.Trainer; import PTUCharacterCreator.Feature; public class Dance_Form extends Feature { { name = "Dance Form"; tags = "[+Speed]"; frequency = "Static"; effect = "Create and learn two Dance Moves, plus one more for each other Dancer Feature you have. Whenever you gain another Dancer Feature, create and learn another Dance Move. See Extras - Class Mechanics for Dance Move details."; prereqs.put("Dancer", -1); } public Dance_Form(){} @Override public boolean checkPrereqs(Trainer t) { return t.hasFeat("Dancer"); } }
[ "alaskablake460@gmail.com" ]
alaskablake460@gmail.com
bf7462f10cb397f9d991a796cfcdd6b669171095
d523206fce46708a6fe7b2fa90e81377ab7b6024
/com/google/android/gms/plus/PlusOneDummyView.java
645b0065bbd36b004822e95e63ee3b0646d1d5ac
[]
no_license
BlitzModder/BlitzJava
0ee94cc069dc4b7371d1399ff5575471bdc88aac
6c6d71d2847dfd5f9f4f7c716cd820aeb7e45f2c
refs/heads/master
2021-06-11T15:04:05.571324
2017-02-04T16:04:55
2017-02-04T16:04:55
77,459,517
1
2
null
null
null
null
UTF-8
Java
false
false
5,392
java
package com.google.android.gms.plus; import android.content.Context; import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Resources; import android.graphics.Point; import android.graphics.drawable.Drawable; import android.util.DisplayMetrics; import android.util.TypedValue; import android.widget.Button; import android.widget.FrameLayout; import android.widget.FrameLayout.LayoutParams; public class PlusOneDummyView extends FrameLayout { public static final String TAG = "PlusOneDummyView"; public PlusOneDummyView(Context paramContext, int paramInt) { super(paramContext); paramContext = new Button(paramContext); paramContext.setEnabled(false); paramContext.setBackgroundDrawable(zzDc().getDrawable(paramInt)); Point localPoint = zzjr(paramInt); addView(paramContext, new FrameLayout.LayoutParams(localPoint.x, localPoint.y, 17)); } private zzd zzDc() { Object localObject2 = new zzb(getContext(), null); Object localObject1 = localObject2; if (!((zzd)localObject2).isValid()) { localObject1 = new zzc(getContext(), null); } localObject2 = localObject1; if (!((zzd)localObject1).isValid()) { localObject2 = new zza(getContext(), null); } return (zzd)localObject2; } private Point zzjr(int paramInt) { int j = 24; int i = 20; Point localPoint = new Point(); switch (paramInt) { default: paramInt = 38; i = 24; } for (;;) { DisplayMetrics localDisplayMetrics = getResources().getDisplayMetrics(); float f1 = TypedValue.applyDimension(1, paramInt, localDisplayMetrics); float f2 = TypedValue.applyDimension(1, i, localDisplayMetrics); localPoint.x = ((int)(f1 + 0.5D)); localPoint.y = ((int)(f2 + 0.5D)); return localPoint; paramInt = 32; continue; i = 14; paramInt = j; continue; paramInt = 50; } } private static class zza implements PlusOneDummyView.zzd { private Context mContext; private zza(Context paramContext) { this.mContext = paramContext; } public Drawable getDrawable(int paramInt) { return this.mContext.getResources().getDrawable(17301508); } public boolean isValid() { return true; } } private static class zzb implements PlusOneDummyView.zzd { private Context mContext; private zzb(Context paramContext) { this.mContext = paramContext; } public Drawable getDrawable(int paramInt) { for (;;) { try { Resources localResources = this.mContext.createPackageContext("com.google.android.gms", 4).getResources(); switch (paramInt) { case 2: return localResources.getDrawable(localResources.getIdentifier(str1, "drawable", "com.google.android.gms")); } } catch (PackageManager.NameNotFoundException localNameNotFoundException) { String str1; return null; } str1 = "ic_plusone_tall"; continue; String str2 = "ic_plusone_standard"; continue; str2 = "ic_plusone_small"; continue; str2 = "ic_plusone_medium"; } } public boolean isValid() { try { this.mContext.createPackageContext("com.google.android.gms", 4).getResources(); return true; } catch (PackageManager.NameNotFoundException localNameNotFoundException) {} return false; } } private static class zzc implements PlusOneDummyView.zzd { private Context mContext; private zzc(Context paramContext) { this.mContext = paramContext; } public Drawable getDrawable(int paramInt) { String str; switch (paramInt) { default: str = "ic_plusone_standard_off_client"; } for (;;) { paramInt = this.mContext.getResources().getIdentifier(str, "drawable", this.mContext.getPackageName()); return this.mContext.getResources().getDrawable(paramInt); str = "ic_plusone_small_off_client"; continue; str = "ic_plusone_medium_off_client"; continue; str = "ic_plusone_tall_off_client"; } } public boolean isValid() { int i = this.mContext.getResources().getIdentifier("ic_plusone_small_off_client", "drawable", this.mContext.getPackageName()); int j = this.mContext.getResources().getIdentifier("ic_plusone_medium_off_client", "drawable", this.mContext.getPackageName()); int k = this.mContext.getResources().getIdentifier("ic_plusone_tall_off_client", "drawable", this.mContext.getPackageName()); int m = this.mContext.getResources().getIdentifier("ic_plusone_standard_off_client", "drawable", this.mContext.getPackageName()); return (i != 0) && (j != 0) && (k != 0) && (m != 0); } } private static abstract interface zzd { public abstract Drawable getDrawable(int paramInt); public abstract boolean isValid(); } } /* Location: /Users/subdiox/Downloads/dex2jar-2.0/net.wargaming.wot.blitz-dex2jar.jar!/com/google/android/gms/plus/PlusOneDummyView.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "subdiox@gmail.com" ]
subdiox@gmail.com
34909d479bacba148a7de5862b5b7fc646c6a654
2f25731f9ca9db606083bdec2ec2b42e64f66540
/platform/src/java/com/xcase/salesforce/constant/SalesforceConstant.java
be034bd6761176e24f1e2408d2ace64bf0cba72e
[]
no_license
chg95211/xcase
64f09b76738a6276868be4a8f6dd80966e3385d7
2c37f4f26ae3ecf097524a2a1cbaca4c9da5c1c2
refs/heads/master
2020-04-23T02:05:09.126378
2019-02-08T05:36:16
2019-02-08T05:36:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,474
java
/** * Copyright 2016 Xcase All rights reserved. */ package com.xcase.salesforce.constant; /** * * @author martin */ public class SalesforceConstant { public static final String CONFIG_API_REQUEST_FORMAT_REST = ""; public static final String CONFIG_API_OAUTH_TOKEN_PREFIX = "salesforce.config.api.oauth2_token_prefix"; public static final String CONFIG_API_OAUTH_AUTHORIZE_PREFIX = ""; public static final String CONFIG_API_OAUTH_REVOKE_PREFIX = ""; public static final String CONFIG_API_URL_PREFIX = "salesforce.config.api.url_prefix"; public static final String CONFIG_API_UPLOAD_URL_PREFIX = ""; public static final String CONFIG_API_VERSION = "salesforce.config.api.version"; public static final String CONFIG_API_REQUEST_FORMAT = ""; public static final String CONFIG_API_REQUEST_FORMAT_SOAP = ""; public static final String CONFIG_API_REQUEST_FORMAT_XML = ""; public static final String CONFIG_FILE_NAME = "salesforce-config.properties"; public static final String CONFIG_FILE_DEFAULT_NAME = "salesforce-config-default.properties"; public static final String LOCAL_CONFIG_FILE_NAME = "salesforce-local-config.properties"; public static final String LOCAL_OAUTH2_ACCESS_TOKEN = "salesforce.config.api.oauth2_access_token"; public static final String LOCAL_OAUTH2_CLIENT_ID = "salesforce.config.api.oauth2_client_id"; public static final String LOCAL_OAUTH2_CLIENT_SECRET = "salesforce.config.api.oauth2_client_secret"; public static final String LOCAL_OAUTH2_INSTANCE_URL = "salesforce.config.api.instance_url"; public static final String LOCAL_OAUTH2_REFRESH_TOKEN = "salesforce.config.api.oauth2_refresh_token"; public static final String PARAM_NAME_CLIENT_ID = "client_id"; public static final String PARAM_NAME_CLIENT_SECRET = "client_secret"; public static final String PARAM_NAME_CODE = ""; public static final String PARAM_NAME_GRANT_TYPE = "grant_type"; public static final String PARAM_NAME_REFRESH_TOKEN = "refresh_token"; public static final String PARAM_NAME_SOAP_BODY = ""; public static final String PARAM_NAME_SOAP_ENVELOPE = ""; /** * OK status code. */ public static final String STATUS_GET_ACCESS_TOKEN_OK = "OK"; /** * NOT LOGGED IN status code. */ public static final String STATUS_NOT_LOGGED_IN = "not_logged_in"; private SalesforceConstant() { } }
[ "martin.gilchrist@intapp.com" ]
martin.gilchrist@intapp.com
32012b440fb40a88a11d13fcd4c4066770c94496
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.27.0/sources/com/google/android/gms/tagmanager/zzbv.java
05c71676a0d57df7fab964c4f859117e7f982d84
[]
no_license
kkagill/Decompiler-IQ-Option
7fe5911f90ed2490687f5d216cb2940f07b57194
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
refs/heads/master
2020-09-14T20:44:49.115289
2019-11-04T06:58:55
2019-11-04T06:58:55
223,236,327
1
0
null
2019-11-21T18:17:17
2019-11-21T18:17:16
null
UTF-8
Java
false
false
2,180
java
package com.google.android.gms.tagmanager; import com.google.android.gms.internal.gtm.zza; import com.google.android.gms.internal.gtm.zzb; import com.google.android.gms.internal.gtm.zzl; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Map; final class zzbv extends zzbq { private static final String ID = zza.HASH.toString(); private static final String zzags = zzb.ARG0.toString(); private static final String zzagu = zzb.INPUT_FORMAT.toString(); private static final String zzagx = zzb.ALGORITHM.toString(); public zzbv() { super(ID, zzags); } public final boolean zzgw() { return true; } public final zzl zzb(Map<String, zzl> map) { zzl zzl = (zzl) map.get(zzags); if (zzl == null || zzl == zzgj.zzkc()) { return zzgj.zzkc(); } String str; Object obj; byte[] bytes; String valueOf; String zzc = zzgj.zzc(zzl); zzl zzl2 = (zzl) map.get(zzagx); if (zzl2 == null) { str = "MD5"; } else { str = zzgj.zzc(zzl2); } zzl zzl3 = (zzl) map.get(zzagu); String str2 = "text"; if (zzl3 == null) { obj = str2; } else { obj = zzgj.zzc(zzl3); } if (str2.equals(obj)) { bytes = zzc.getBytes(); } else if ("base16".equals(obj)) { bytes = zzo.decode(zzc); } else { zzc = "Hash: unknown input format: "; valueOf = String.valueOf(obj); zzdi.zzav(valueOf.length() != 0 ? zzc.concat(valueOf) : new String(zzc)); return zzgj.zzkc(); } try { MessageDigest instance = MessageDigest.getInstance(str); instance.update(bytes); return zzgj.zzi(zzo.encode(instance.digest())); } catch (NoSuchAlgorithmException unused) { valueOf = "Hash: unknown algorithm: "; zzc = String.valueOf(str); zzdi.zzav(zzc.length() != 0 ? valueOf.concat(zzc) : new String(valueOf)); return zzgj.zzkc(); } } }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
ee9a9c05f9cebdefbdde2e6e38443d8f967ec17a
e34f983c1b891b73a938137c72176e8065c54a9f
/src/main/java/com/piece/piece/config/CloudDatabaseConfiguration.java
99a1b5c10e47c3d44a476c767301cc019af77eb7
[]
no_license
PIECE-x/PIECE
2c58747b6762f069c30886c86956489a1f505c0d
294fc311dab80908a629c8353bf513a2ca140e87
refs/heads/master
2020-03-19T09:41:09.544516
2018-06-06T09:58:30
2018-06-06T09:58:30
136,309,391
0
0
null
null
null
null
UTF-8
Java
false
false
762
java
package com.piece.piece.config; import io.github.jhipster.config.JHipsterConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cache.CacheManager; import org.springframework.cloud.config.java.AbstractCloudConfig; import org.springframework.context.annotation.*; import javax.sql.DataSource; @Configuration @Profile(JHipsterConstants.SPRING_PROFILE_CLOUD) public class CloudDatabaseConfiguration extends AbstractCloudConfig { private final Logger log = LoggerFactory.getLogger(CloudDatabaseConfiguration.class); @Bean public DataSource dataSource(CacheManager cacheManager) { log.info("Configuring JDBC datasource from a cloud provider"); return connectionFactory().dataSource(); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
65373549b7e7e5faecd895ce728c2f7c48d5404d
7b81ddd3280abfbb8c3529e116a2209cbee18c9e
/src/main/java/nc/tab/NCTabs.java
4c0bb56126ad9a2f49937c6064e1f0fc320c9f4f
[ "CC0-1.0" ]
permissive
dizzyd/NuclearCraft
84be0c93cda968e70d86c91ad73712595156fd89
01ab0221462b301be59c6af8bfbae2c3627e4c1e
refs/heads/master
2022-06-24T00:50:46.570414
2020-05-03T18:43:22
2020-05-03T19:04:47
110,978,229
0
0
null
2017-11-16T14:00:29
2017-11-16T14:00:28
null
UTF-8
Java
false
false
826
java
package nc.tab; import nc.config.NCConfig; import net.minecraft.creativetab.CreativeTabs; public class NCTabs { public static final CreativeTabs NUCLEARCRAFT = NCConfig.single_creative_tab ? new TabNuclearCraft() : CreativeTabs.MISC; public static final CreativeTabs MATERIAL = NCConfig.single_creative_tab ? NUCLEARCRAFT : new TabMaterial(); public static final CreativeTabs MACHINE = NCConfig.single_creative_tab ? NUCLEARCRAFT : new TabMachine(); public static final CreativeTabs MULTIBLOCK = NCConfig.single_creative_tab ? NUCLEARCRAFT : new TabMultiblock(); public static final CreativeTabs RADIATION = (NCConfig.single_creative_tab || !NCConfig.radiation_enabled_public) ? MATERIAL : new TabRadiation(); public static final CreativeTabs MISC = NCConfig.single_creative_tab ? NUCLEARCRAFT : new TabMisc(); }
[ "joedodd35@gmail.com" ]
joedodd35@gmail.com
834d005b7381b50f1b1d140a7f467821a51e7a5b
e32479a53c8ade548fd7e100e6dd4ceba9f92f8e
/experiments/subjects/math_10/fuzzing/src/test/org/apache/commons/math3/distribution/ZipfDistribution.java
a5bf9c3335206531e94414b57bb064180edef2b0
[ "MIT" ]
permissive
yannicnoller/hydiff
5d4981006523c6a7ce6afcc0f44017799359c65c
4df7df1d2f00bf28d6fb2e2ed7a14103084c39f3
refs/heads/master
2021-08-28T03:42:09.297288
2021-08-09T07:02:18
2021-08-09T07:02:18
207,993,923
24
4
null
null
null
null
UTF-8
Java
false
false
7,853
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 test.org.apache.commons.math3.distribution; import test.org.apache.commons.math3.exception.NotStrictlyPositiveException; import test.org.apache.commons.math3.exception.util.LocalizedFormats; import test.org.apache.commons.math3.random.RandomGenerator; import test.org.apache.commons.math3.random.Well19937c; import test.org.apache.commons.math3.util.FastMath; /** * Implementation of the Zipf distribution. * * @see <a href="http://mathworld.wolfram.com/ZipfDistribution.html">Zipf distribution (MathWorld)</a> * @version $Id$ */ public class ZipfDistribution extends AbstractIntegerDistribution { /** Serializable version identifier. */ private static final long serialVersionUID = -140627372283420404L; /** Number of elements. */ private final int numberOfElements; /** Exponent parameter of the distribution. */ private final double exponent; /** Cached numerical mean */ private double numericalMean = Double.NaN; /** Whether or not the numerical mean has been calculated */ private boolean numericalMeanIsCalculated = false; /** Cached numerical variance */ private double numericalVariance = Double.NaN; /** Whether or not the numerical variance has been calculated */ private boolean numericalVarianceIsCalculated = false; /** * Create a new Zipf distribution with the given number of elements and * exponent. * * @param numberOfElements Number of elements. * @param exponent Exponent. * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} * or {@code exponent <= 0}. */ public ZipfDistribution(final int numberOfElements, final double exponent) { this(new Well19937c(), numberOfElements, exponent); } /** * Creates a Zipf distribution. * * @param rng Random number generator. * @param numberOfElements Number of elements. * @param exponent Exponent. * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} * or {@code exponent <= 0}. * @since 3.1 */ public ZipfDistribution(RandomGenerator rng, int numberOfElements, double exponent) throws NotStrictlyPositiveException { super(rng); if (numberOfElements <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.DIMENSION, numberOfElements); } if (exponent <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.EXPONENT, exponent); } this.numberOfElements = numberOfElements; this.exponent = exponent; } /** * Get the number of elements (e.g. corpus size) for the distribution. * * @return the number of elements */ public int getNumberOfElements() { return numberOfElements; } /** * Get the exponent characterizing the distribution. * * @return the exponent */ public double getExponent() { return exponent; } /** {@inheritDoc} */ public double probability(final int x) { if (x <= 0 || x > numberOfElements) { return 0.0; } return (1.0 / FastMath.pow(x, exponent)) / generalizedHarmonic(numberOfElements, exponent); } /** {@inheritDoc} */ public double cumulativeProbability(final int x) { if (x <= 0) { return 0.0; } else if (x >= numberOfElements) { return 1.0; } return generalizedHarmonic(x, exponent) / generalizedHarmonic(numberOfElements, exponent); } /** * {@inheritDoc} * * For number of elements {@code N} and exponent {@code s}, the mean is * {@code Hs1 / Hs}, where * <ul> * <li>{@code Hs1 = generalizedHarmonic(N, s - 1)},</li> * <li>{@code Hs = generalizedHarmonic(N, s)}.</li> * </ul> */ public double getNumericalMean() { if (!numericalMeanIsCalculated) { numericalMean = calculateNumericalMean(); numericalMeanIsCalculated = true; } return numericalMean; } /** * Used by {@link #getNumericalMean()}. * * @return the mean of this distribution */ protected double calculateNumericalMean() { final int N = getNumberOfElements(); final double s = getExponent(); final double Hs1 = generalizedHarmonic(N, s - 1); final double Hs = generalizedHarmonic(N, s); return Hs1 / Hs; } /** * {@inheritDoc} * * For number of elements {@code N} and exponent {@code s}, the mean is * {@code (Hs2 / Hs) - (Hs1^2 / Hs^2)}, where * <ul> * <li>{@code Hs2 = generalizedHarmonic(N, s - 2)},</li> * <li>{@code Hs1 = generalizedHarmonic(N, s - 1)},</li> * <li>{@code Hs = generalizedHarmonic(N, s)}.</li> * </ul> */ public double getNumericalVariance() { if (!numericalVarianceIsCalculated) { numericalVariance = calculateNumericalVariance(); numericalVarianceIsCalculated = true; } return numericalVariance; } /** * Used by {@link #getNumericalVariance()}. * * @return the variance of this distribution */ protected double calculateNumericalVariance() { final int N = getNumberOfElements(); final double s = getExponent(); final double Hs2 = generalizedHarmonic(N, s - 2); final double Hs1 = generalizedHarmonic(N, s - 1); final double Hs = generalizedHarmonic(N, s); return (Hs2 / Hs) - ((Hs1 * Hs1) / (Hs * Hs)); } /** * Calculates the Nth generalized harmonic number. See * <a href="http://mathworld.wolfram.com/HarmonicSeries.html">Harmonic * Series</a>. * * @param n Term in the series to calculate (must be larger than 1) * @param m Exponent (special case {@code m = 1} is the harmonic series). * @return the n<sup>th</sup> generalized harmonic number. */ private double generalizedHarmonic(final int n, final double m) { double value = 0; for (int k = n; k > 0; --k) { value += 1.0 / FastMath.pow(k, m); } return value; } /** * {@inheritDoc} * * The lower bound of the support is always 1 no matter the parameters. * * @return lower bound of the support (always 1) */ public int getSupportLowerBound() { return 1; } /** * {@inheritDoc} * * The upper bound of the support is the number of elements. * * @return upper bound of the support */ public int getSupportUpperBound() { return getNumberOfElements(); } /** * {@inheritDoc} * * The support of this distribution is connected. * * @return {@code true} */ public boolean isSupportConnected() { return true; } }
[ "nolleryc@gmail.com" ]
nolleryc@gmail.com
2b5fb5620a46fd37a6c2e7e454a432b26e3741f3
c52ba72dfc48b5efceb931585ad0d513bcbf1ea5
/Playground/src/vs/play/exec/Task.java
9536cfbbd25609c89143e099a2a6b79ef55aa46c
[]
no_license
davekessener/VerteilteSysteme
bac9db575db22c1fdb8fd055084e7f38cbd87a5a
1fd65bce4318c57cb802e5ac7e73c7791bf8ea95
refs/heads/master
2020-03-28T22:53:13.036691
2018-12-12T16:51:42
2018-12-12T16:51:42
149,263,813
0
0
null
null
null
null
UTF-8
Java
false
false
155
java
package vs.play.exec; import java.io.Serializable; public interface Task<T extends Serializable> extends Serializable { public abstract T execute( ); }
[ "davekessener@gmail.com" ]
davekessener@gmail.com
b69f563c7f80c9df03c547f30a349ab7b0b1d770
aabc5f7f9796ec0b6bc754e35e26a0cb94333250
/SeleniumEvening/src/basics/WebTableTest3.java
13f16e2a9c6dce57ed76afe00c1c528977f8a201
[]
no_license
nagarjunreddykasu/seleniumtraining
2006b733e9e75fcadd723d98709b6b5c36b6dc1f
e69b80fddae6dce8e65b280cd58bcd72fcd78187
refs/heads/master
2023-06-16T04:40:59.889078
2021-07-09T15:24:56
2021-07-09T15:24:56
345,562,967
0
1
null
null
null
null
UTF-8
Java
false
false
2,718
java
package basics; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.ui.Select; public class WebTableTest3 { public static void main(String[] args) throws InterruptedException { //To Launch the Chrome browser System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir")+"//drivers//chromedriver.exe"); WebDriver driver=new ChromeDriver(); driver.manage().window().maximize(); driver.get("http://qa.circulus.io/login.aspx"); driver.findElement(By.id("TxtEmail")).sendKeys("nkasu@frontier.com"); driver.findElement(By.id("TxtPassword")).sendKeys("xeno@1234"); driver.findElement(By.id("BtnLogin")).click(); WebElement billsMenu=driver.findElement(By.id("menu_aBills")); Actions act=new Actions(driver); act.moveToElement(billsMenu).perform(); Thread.sleep(2000); driver.findElement(By.linkText("Approve Bills")).click(); new Select(driver.findElement(By.id("cpBody_GVBillReviewApprove_lbDynamicPager"))).selectByVisibleText("25"); int pageCount=driver.findElements(By.xpath("//ul[contains(@class,'pagination')]/li")).size(); System.out.println("Page Count: "+pageCount); int actualPages=pageCount-4; System.out.println("Actual Page Count: "+actualPages); int totalRecords=0; if(pageCount>0){ for(int i=1;i<=actualPages;i++){ if(i!=1){ driver.findElement(By.xpath("//ul[contains(@class,'pagination')]/li["+(2+i)+"]/a")).click(); Thread.sleep(5000); } int rowCount=driver.findElements(By.xpath("//*[@id='cpBody_GVBillReviewApprove']/tbody/tr")).size(); System.out.println("Row Count in page-"+i+": "+rowCount); totalRecords=totalRecords+rowCount; //To get Vendor column data for(int row=1;row<=rowCount;row++){ WebElement vendor=driver.findElement(By.xpath("//*[@id='cpBody_GVBillReviewApprove']/tbody/tr["+row+"]/td[2]")); Reusable.scroll(driver,vendor); String vendorName=vendor.getText(); System.out.println(vendorName); } } System.out.println("Total Records from all the pages: "+totalRecords); } else{ int rowCount=driver.findElements(By.xpath("//*[@id='cpBody_GVBillReviewApprove']/tbody/tr")).size(); System.out.println("Row Count: "+rowCount); //To get Vendor column data for(int row=1;row<=rowCount;row++){ WebElement vendor=driver.findElement(By.xpath("//*[@id='cpBody_GVBillReviewApprove']/tbody/tr["+row+"]/td[2]")); Reusable.scroll(driver,vendor); String vendorName=vendor.getText(); System.out.println(vendorName); } } } }
[ "nagarjun.sdet@gmail.com" ]
nagarjun.sdet@gmail.com
f331eb7beaf2447b6f7c9ccea7aab24994504174
54178c4e4b6210f94495a3ec32137440e24b261b
/src/main/java/be/isach/ultracosmetics/cosmetics/gadgets/GadgetChickenator.java
cbb7696d3d69abeb460aeb2eb2107270e8aa7160
[]
no_license
biglooc/UltraCosmetics
dd0cc54351a803058ca3254e61cb9b8204cddc5f
6252d7095ef864a059728839491da1d64910bc78
refs/heads/master
2021-04-15T09:00:01.404805
2016-01-24T12:25:50
2016-01-24T12:25:50
50,338,816
1
0
null
2016-01-25T09:03:59
2016-01-25T09:03:59
null
UTF-8
Java
false
false
3,687
java
package be.isach.ultracosmetics.cosmetics.gadgets; import be.isach.ultracosmetics.Core; import be.isach.ultracosmetics.util.ItemFactory; import org.bukkit.*; import org.bukkit.entity.Chicken; import org.bukkit.entity.EntityType; import org.bukkit.entity.Firework; import org.bukkit.entity.Item; import org.bukkit.event.HandlerList; import org.bukkit.inventory.meta.FireworkMeta; import org.bukkit.util.Vector; import java.util.ArrayList; import java.util.Random; import java.util.UUID; /** * Created by sacha on 03/08/15. */ public class GadgetChickenator extends Gadget { static Random r = new Random(); ArrayList<Item> items = new ArrayList<>(); public GadgetChickenator(UUID owner) { super(owner, GadgetType.CHICKENATOR); } @Override void onRightClick() { final Chicken CHICKEN = (Chicken) getPlayer().getWorld().spawnEntity(getPlayer().getEyeLocation(), EntityType.CHICKEN); CHICKEN.setNoDamageTicks(500); CHICKEN.setVelocity(getPlayer().getLocation().getDirection().multiply(Math.PI / 1.5)); getPlayer().playSound(getPlayer().getLocation(), Sound.CHICKEN_IDLE, 1.4f, 1.5f); getPlayer().playSound(getPlayer().getLocation(), Sound.EXPLODE, 0.3f, 1.5f); Bukkit.getScheduler().runTaskLater(Core.getPlugin(), new Runnable() { @Override public void run() { spawnRandomFirework(CHICKEN.getLocation()); getPlayer().playSound(getPlayer().getLocation(), Sound.CHICKEN_HURT, 1.4f, 1.5f); CHICKEN.remove(); for (int i = 0; i < 30; i++) { final Item ITEM = CHICKEN.getWorld().dropItem(CHICKEN.getLocation(), ItemFactory.create(Material.COOKED_CHICKEN, (byte) 0, UUID.randomUUID().toString())); ITEM.setPickupDelay(30000); ITEM.setVelocity(new Vector(r.nextDouble() - 0.5, r.nextDouble() / 2.0, r.nextDouble() - 0.5)); items.add(ITEM); } Bukkit.getScheduler().runTaskLater(Core.getPlugin(), new Runnable() { @Override public void run() { for (Item i : items) i.remove(); } }, 50); } }, 9); getPlayer().updateInventory(); } @Override void onUpdate() { } @Override public void onClear() { for (Item i : items) i.remove(); HandlerList.unregisterAll(this); } public static FireworkEffect getRandomFireworkEffect() { FireworkEffect.Builder builder = FireworkEffect.builder(); FireworkEffect effect = builder.flicker(false).trail(false).with(FireworkEffect.Type.BALL_LARGE).withColor(Color.fromRGB(r.nextInt(255), r.nextInt(255), r.nextInt(255))).withFade(Color.fromRGB(r.nextInt(255), r.nextInt(255), r.nextInt(255))).build(); return effect; } public void spawnRandomFirework(Location location) { final ArrayList<Firework> fireworks = new ArrayList<>(); for (int i = 0; i < 4; i++) { final Firework f = getPlayer().getWorld().spawn(location, Firework.class); FireworkMeta fm = f.getFireworkMeta(); fm.addEffect(getRandomFireworkEffect()); f.setFireworkMeta(fm); fireworks.add(f); } Bukkit.getScheduler().runTaskLater(Core.getPlugin(), new Runnable() { @Override public void run() { for (Firework f : fireworks) f.detonate(); } }, 2); } @Override void onLeftClick() { } }
[ "sacha.lewin@me.com" ]
sacha.lewin@me.com
c2bd3eb06a45c0c6de94b2a4b1c561c190943453
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/k9mail--k-9/fdb1267cb1e4586b4f7f728c82f69834227652ee/before/Message.java
5a25c0f14a5beb3abea7539c2233fe800d0f3870
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
7,743
java
package com.fsck.k9.mail; import java.util.Date; import java.util.HashSet; import java.util.Set; import java.io.IOException; import android.util.Log; import com.fsck.k9.activity.MessageReference; import com.fsck.k9.mail.filter.CountingOutputStream; import com.fsck.k9.mail.filter.EOLConvertingOutputStream; import com.fsck.k9.mail.store.UnavailableStorageException; import com.fsck.k9.K9; public abstract class Message implements Part, Body { private static final Flag[] EMPTY_FLAG_ARRAY = new Flag[0]; private MessageReference mReference = null; public enum RecipientType { TO, CC, BCC, } protected String mUid; protected HashSet<Flag> mFlags = new HashSet<Flag>(); protected Date mInternalDate; protected Folder mFolder; public boolean olderThan(Date earliestDate) { if (earliestDate == null) { return false; } Date myDate = getSentDate(); if (myDate == null) { myDate = getInternalDate(); } if (myDate != null) { return myDate.before(earliestDate); } return false; } @Override public boolean equals(Object o) { if (o == null || !(o instanceof Message)) { return false; } Message other = (Message)o; return (mUid.equals(other.getUid()) && mFolder.getName().equals(other.getFolder().getName()) && mFolder.getAccount().getUuid().equals(other.getFolder().getAccount().getUuid())); } @Override public int hashCode() { final int MULTIPLIER = 31; int result = 1; result = MULTIPLIER * result + mFolder.getName().hashCode(); result = MULTIPLIER * result + mFolder.getAccount().getUuid().hashCode(); result = MULTIPLIER * result + mUid.hashCode(); return result; } public String getUid() { return mUid; } public void setUid(String uid) { mReference = null; this.mUid = uid; } public Folder getFolder() { return mFolder; } public abstract String getSubject(); public abstract void setSubject(String subject) throws MessagingException; public Date getInternalDate() { return mInternalDate; } public void setInternalDate(Date internalDate) { this.mInternalDate = internalDate; } public abstract Date getSentDate(); public abstract void setSentDate(Date sentDate) throws MessagingException; public abstract Address[] getRecipients(RecipientType type) throws MessagingException; public abstract void setRecipients(RecipientType type, Address[] addresses) throws MessagingException; public void setRecipient(RecipientType type, Address address) throws MessagingException { setRecipients(type, new Address[] { address }); } public abstract Address[] getFrom(); public abstract void setFrom(Address from) throws MessagingException; public abstract Address[] getReplyTo(); public abstract void setReplyTo(Address[] from) throws MessagingException; public abstract String getMessageId() throws MessagingException; public abstract void setInReplyTo(String inReplyTo) throws MessagingException; public abstract String[] getReferences() throws MessagingException; public abstract void setReferences(String references) throws MessagingException; public abstract Body getBody(); public abstract String getContentType() throws MessagingException; public abstract void addHeader(String name, String value) throws MessagingException; public abstract void setHeader(String name, String value) throws MessagingException; public abstract String[] getHeader(String name) throws MessagingException; public abstract Set<String> getHeaderNames() throws UnavailableStorageException; public abstract void removeHeader(String name) throws MessagingException; public abstract void setBody(Body body) throws MessagingException; public boolean isMimeType(String mimeType) throws MessagingException { return getContentType().startsWith(mimeType); } public void delete(String trashFolderName) throws MessagingException {} /* * TODO Refactor Flags at some point to be able to store user defined flags. */ public Flag[] getFlags() { return mFlags.toArray(EMPTY_FLAG_ARRAY); } /** * @param flag * Flag to set. Never <code>null</code>. * @param set * If <code>true</code>, the flag is added. If <code>false</code> * , the flag is removed. * @throws MessagingException */ public void setFlag(Flag flag, boolean set) throws MessagingException { if (set) { mFlags.add(flag); } else { mFlags.remove(flag); } } /** * This method calls setFlag(Flag, boolean) * @param flags * @param set */ public void setFlags(Flag[] flags, boolean set) throws MessagingException { for (Flag flag : flags) { setFlag(flag, set); } } public boolean isSet(Flag flag) { return mFlags.contains(flag); } public void destroy() throws MessagingException {} public abstract void saveChanges() throws MessagingException; public abstract void setEncoding(String encoding) throws UnavailableStorageException; public abstract void setCharset(String charset) throws MessagingException; public MessageReference makeMessageReference() { if (mReference == null) { mReference = new MessageReference(); mReference.accountUuid = getFolder().getAccount().getUuid(); mReference.folderName = getFolder().getName(); mReference.uid = mUid; } return mReference; } public boolean equalsReference(MessageReference ref) { MessageReference tmpReference = makeMessageReference(); return tmpReference.equals(ref); } public long calculateSize() { try { CountingOutputStream out = new CountingOutputStream(); EOLConvertingOutputStream eolOut = new EOLConvertingOutputStream(out); writeTo(eolOut); eolOut.flush(); return out.getCount(); } catch (IOException e) { Log.e(K9.LOG_TAG, "Failed to calculate a message size", e); } catch (MessagingException e) { Log.e(K9.LOG_TAG, "Failed to calculate a message size", e); } return 0; } /** * Copy the contents of this object into another {@code Message} object. * * @param destination * The {@code Message} object to receive the contents of this instance. */ protected void copy(Message destination) { destination.mUid = mUid; destination.mInternalDate = mInternalDate; destination.mFolder = mFolder; destination.mReference = mReference; // mFlags contents can change during the object lifetime, so copy the Set destination.mFlags = new HashSet<Flag>(mFlags); } /** * Creates a new {@code Message} object with the same content as this object. * * <p> * <strong>Note:</strong> * This method was introduced as a hack to prevent {@code ConcurrentModificationException}s. It * shouldn't be used unless absolutely necessary. See the comment in * {@link com.fsck.k9.activity.MessageView.Listener#loadMessageForViewHeadersAvailable(com.fsck.k9.Account, String, String, Message)} * for more information. * </p> */ public abstract Message clone(); }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
97bd480ebd4f4f98be4247605a54dad3aa9de3ac
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/elastic--elasticsearch/cc83c2f848be69a77f1275fe1ff5363dcdd4c955/after/DeleteByQueryRequestBuilder.java
c4d3f33304982f1179d82525c1d7f77581ff6742
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
5,142
java
/* * Licensed to ElasticSearch and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. ElasticSearch 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.elasticsearch.action.deletebyquery; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.WriteConsistencyLevel; import org.elasticsearch.action.support.replication.IndicesReplicationOperationRequestBuilder; import org.elasticsearch.action.support.replication.ReplicationType; import org.elasticsearch.client.Client; import org.elasticsearch.client.internal.InternalClient; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.query.QueryBuilder; import java.util.Map; /** * */ public class DeleteByQueryRequestBuilder extends IndicesReplicationOperationRequestBuilder<DeleteByQueryRequest, DeleteByQueryResponse, DeleteByQueryRequestBuilder> { public DeleteByQueryRequestBuilder(Client client) { super((InternalClient) client, new DeleteByQueryRequest()); } /** * The types of documents the query will run against. Defaults to all types. */ public DeleteByQueryRequestBuilder setTypes(String... types) { request.setTypes(types); return this; } /** * A comma separated list of routing values to control the shards the action will be executed on. */ public DeleteByQueryRequestBuilder setRouting(String routing) { request.setRouting(routing); return this; } /** * The routing values to control the shards that the action will be executed on. */ public DeleteByQueryRequestBuilder setRouting(String... routing) { request.setRouting(routing); return this; } /** * The query source to execute. * * @see org.elasticsearch.index.query.QueryBuilders */ public DeleteByQueryRequestBuilder setQuery(QueryBuilder queryBuilder) { request.setQuery(queryBuilder); return this; } /** * The query source to execute. It is preferable to use either {@link #setQuery(byte[])} * or {@link #setQuery(org.elasticsearch.index.query.QueryBuilder)}. */ public DeleteByQueryRequestBuilder setQuery(String querySource) { request.setQuery(querySource); return this; } /** * The query source to execute in the form of a map. */ public DeleteByQueryRequestBuilder setQuery(Map<String, Object> querySource) { request.setQuery(querySource); return this; } /** * The query source to execute in the form of a builder. */ public DeleteByQueryRequestBuilder setQuery(XContentBuilder builder) { request.setQuery(builder); return this; } /** * The query source to execute. */ public DeleteByQueryRequestBuilder setQuery(byte[] querySource) { request.setQuery(querySource); return this; } /** * The query source to execute. */ public DeleteByQueryRequestBuilder setQuery(BytesReference querySource) { request.setQuery(querySource, false); return this; } /** * The query source to execute. */ public DeleteByQueryRequestBuilder setQuery(BytesReference querySource, boolean unsafe) { request.setQuery(querySource, unsafe); return this; } /** * The query source to execute. */ public DeleteByQueryRequestBuilder setQuery(byte[] querySource, int offset, int length, boolean unsafe) { request.setQuery(querySource, offset, length, unsafe); return this; } /** * The replication type to use with this operation. */ public DeleteByQueryRequestBuilder setReplicationType(ReplicationType replicationType) { request.setReplicationType(replicationType); return this; } /** * The replication type to use with this operation. */ public DeleteByQueryRequestBuilder setReplicationType(String replicationType) { request.setReplicationType(replicationType); return this; } public DeleteByQueryRequestBuilder setConsistencyLevel(WriteConsistencyLevel consistencyLevel) { request.setConsistencyLevel(consistencyLevel); return this; } @Override protected void doExecute(ActionListener<DeleteByQueryResponse> listener) { ((Client) client).deleteByQuery(request, listener); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
5eec41c9258f43c3494843ba6f6e9bb7be341c72
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-418-37-7-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/wysiwyg/server/internal/converter/DefaultHTMLConverter_ESTest.java
db3c347b6f554ec069f93ba55b09ce9de4a1f281
[]
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
590
java
/* * This file was automatically generated by EvoSuite * Wed Apr 01 21:45:14 UTC 2020 */ package org.xwiki.wysiwyg.server.internal.converter; 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 DefaultHTMLConverter_ESTest extends DefaultHTMLConverter_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
e51b358f33cd41cf0bdfeedaa3f933338e60ca12
52aa753885647b44c60abf691bfb0116be6fca4e
/src/edu/cmu/cs/stage3/alice/authoringtool/util/RenderTargetManipulatorMode.java
fda50e0de83353d1c78e7922a1b0c78f2d250a74
[ "MIT" ]
permissive
ai-ku/langvis
10083029599dac0a0098cdc4cbf77f3e1bdf6d43
4ccd37107a3dea4b7b12696270a25df9c17d579d
refs/heads/master
2020-12-24T15:14:43.644569
2014-03-26T13:43:25
2014-03-26T14:09:03
15,770,922
1
0
null
null
null
null
UTF-8
Java
false
false
2,235
java
/* * Copyright (c) 1999-2003, Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. Products derived from the software may not be called "Alice", * nor may "Alice" appear in their name, without prior written * permission of Carnegie Mellon University. * * 4. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes software developed by Carnegie Mellon University" */ package edu.cmu.cs.stage3.alice.authoringtool.util; /** * @author Jason Pratt */ public abstract class RenderTargetManipulatorMode { protected edu.cmu.cs.stage3.alice.scenegraph.renderer.OnscreenRenderTarget renderTarget; protected java.awt.Cursor preferredCursor; public edu.cmu.cs.stage3.alice.scenegraph.renderer.OnscreenRenderTarget getRenderTarget() { return renderTarget; } public void setRenderTarget( edu.cmu.cs.stage3.alice.scenegraph.renderer.OnscreenRenderTarget renderTarget ) { this.renderTarget = renderTarget; } public java.awt.Cursor getPreferredCursor() { return preferredCursor; } public void setPreferredCursor( java.awt.Cursor preferredCursor ) { this.preferredCursor = preferredCursor; } public abstract boolean requiresPickedObject(); public abstract boolean hideCursorOnDrag(); public abstract void mousePressed( java.awt.event.MouseEvent ev, edu.cmu.cs.stage3.alice.core.Transformable pickedTransformable, edu.cmu.cs.stage3.alice.scenegraph.renderer.PickInfo pickInfo ); public abstract void mouseReleased( java.awt.event.MouseEvent ev ); public abstract void mouseDragged( java.awt.event.MouseEvent ev, int dx, int dy ); }
[ "emreunal99@gmail.com" ]
emreunal99@gmail.com
5bc1a3e79772e2dad31c102b0b8bc4daa8ab0bea
b2e56ba872d60c9fdafee5a4fec7f4d33710b3d0
/Zadania/StrategiaRabatowa/src/main/devfoundry/price_calculator/princing_strategy/SalePrice.java
646f9d49ee75e31edf1a707b8fab581bae1a9070
[]
no_license
SmallKriszo/WzorceProjektowe
de8382f6f70cc475637cdf224570bbb67bb4a264
5db8b8cd72381e97c297c161d338a9d7d86c2fb8
refs/heads/master
2020-03-22T07:17:19.640893
2018-06-14T12:31:03
2018-06-14T12:31:03
139,691,193
0
0
null
null
null
null
UTF-8
Java
false
false
450
java
package devfoundry.price_calculator.princing_strategy; public class SalePrice implements PricingStrategy { public void calculatePrice(int price, boolean isSignedUpForNewsletter) { if (isSignedUpForNewsletter) { System.out.println("Przecena: " + price / 2 + "zł"); } else { System.out.println("Użytkownik nie jest zapisany do newslettera, należy wybrać inną strategię cenową!"); } } }
[ "qris70@gmail.com" ]
qris70@gmail.com
2bdb74b0145ee68c3d8fd9c7145437c590804e98
00086e741c3faeb8775e7cdfeede42418f952a08
/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/parser/XmlParserR4Test.java
9be7c175f0c82ca7b6088225fe4d1da774528477
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
chb/hapi-fhir
f4e3f0c58a17294319f30afc2a2632e3f768966f
d6bed58bf027dd7e9a23ff5ecd1054bf632c3a49
refs/heads/master
2019-07-02T05:22:42.741348
2018-01-05T17:20:30
2018-01-05T17:20:30
116,403,114
1
0
null
2018-01-05T16:10:22
2018-01-05T16:10:21
null
UTF-8
Java
false
false
5,486
java
package ca.uhn.fhir.parser; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.util.TestUtil; import com.google.common.collect.Sets; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Patient; import org.junit.AfterClass; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.HashSet; import java.util.Set; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.core.IsNot.not; import static org.junit.Assert.*; public class XmlParserR4Test { private static final Logger ourLog = LoggerFactory.getLogger(XmlParserR4Test.class); private static FhirContext ourCtx = FhirContext.forR4(); private Bundle createBundleWithPatient() { Bundle b = new Bundle(); b.setId("BUNDLEID"); b.getMeta().addProfile("http://FOO"); Patient p = new Patient(); p.setId("PATIENTID"); p.getMeta().addProfile("http://BAR"); p.addName().addGiven("GIVEN"); b.addEntry().setResource(p); return b; } @Test public void testExcludeNothing() { IParser parser = ourCtx.newXmlParser().setPrettyPrint(true); Set<String> excludes = new HashSet<>(); // excludes.add("*.id"); parser.setDontEncodeElements(excludes); Bundle b = createBundleWithPatient(); String encoded = parser.encodeResourceToString(b); ourLog.info(encoded); assertThat(encoded, containsString("BUNDLEID")); assertThat(encoded, containsString("http://FOO")); assertThat(encoded, containsString("PATIENTID")); assertThat(encoded, containsString("http://BAR")); assertThat(encoded, containsString("GIVEN")); b = parser.parseResource(Bundle.class, encoded); assertEquals("BUNDLEID", b.getIdElement().getIdPart()); assertEquals("Patient/PATIENTID", ((Patient) b.getEntry().get(0).getResource()).getId()); assertEquals("GIVEN", ((Patient) b.getEntry().get(0).getResource()).getNameFirstRep().getGivenAsSingleString()); } @Test public void testExcludeRootStuff() { IParser parser = ourCtx.newXmlParser().setPrettyPrint(true); Set<String> excludes = new HashSet<>(); excludes.add("id"); excludes.add("meta"); parser.setDontEncodeElements(excludes); Bundle b = createBundleWithPatient(); String encoded = parser.encodeResourceToString(b); ourLog.info(encoded); assertThat(encoded, not(containsString("BUNDLEID"))); assertThat(encoded, not(containsString("http://FOO"))); assertThat(encoded, (containsString("PATIENTID"))); assertThat(encoded, (containsString("http://BAR"))); assertThat(encoded, containsString("GIVEN")); b = parser.parseResource(Bundle.class, encoded); assertNotEquals("BUNDLEID", b.getIdElement().getIdPart()); assertEquals("Patient/PATIENTID", ((Patient) b.getEntry().get(0).getResource()).getId()); assertEquals("GIVEN", ((Patient) b.getEntry().get(0).getResource()).getNameFirstRep().getGivenAsSingleString()); } @Test public void testExcludeStarDotStuff() { IParser parser = ourCtx.newXmlParser().setPrettyPrint(true); Set<String> excludes = new HashSet<>(); excludes.add("*.id"); excludes.add("*.meta"); parser.setDontEncodeElements(excludes); Bundle b = createBundleWithPatient(); String encoded = parser.encodeResourceToString(b); ourLog.info(encoded); assertThat(encoded, not(containsString("BUNDLEID"))); assertThat(encoded, not(containsString("http://FOO"))); assertThat(encoded, not(containsString("PATIENTID"))); assertThat(encoded, not(containsString("http://BAR"))); assertThat(encoded, containsString("GIVEN")); b = parser.parseResource(Bundle.class, encoded); assertNotEquals("BUNDLEID", b.getIdElement().getIdPart()); assertNotEquals("Patient/PATIENTID", ((Patient) b.getEntry().get(0).getResource()).getId()); assertEquals("GIVEN", ((Patient) b.getEntry().get(0).getResource()).getNameFirstRep().getGivenAsSingleString()); } @Test public void testParseAndEncodeExtensionWithValueWithExtension() { String input = "<Patient xmlns=\"http://hl7.org/fhir\">\n" + " <extension url=\"https://purl.org/elab/fhir/network/StructureDefinition/1/BirthWeight\">\n" + " <valueDecimal>\n" + " <extension url=\"http://www.hl7.org/fhir/extension-data-absent-reason.html\">\n" + " <valueCoding>\n" + " <system value=\"http://hl7.org/fhir/ValueSet/birthweight\"/>\n" + " <code value=\"Underweight\"/>\n" + " <userSelected value=\"false\"/>\n" + " </valueCoding>\n" + " </extension>\n" + " </valueDecimal>\n" + " </extension>\n" + " <identifier>\n" + " <system value=\"https://purl.org/elab/fhir/network/StructureDefinition/1/EuroPrevallStudySubjects\"/>\n" + " <value value=\"1\"/>\n" + " </identifier>\n" + " <gender value=\"female\"/>\n" + "</Patient>"; IParser xmlParser = ourCtx.newXmlParser(); IParser jsonParser = ourCtx.newJsonParser(); jsonParser.setDontEncodeElements(Sets.newHashSet("id", "meta")); xmlParser.setDontEncodeElements(Sets.newHashSet("id", "meta")); Patient parsed = xmlParser.parseResource(Patient.class, input); ourLog.info(jsonParser.setPrettyPrint(true).encodeResourceToString(parsed)); assertThat(xmlParser.encodeResourceToString(parsed), containsString("Underweight")); assertThat(jsonParser.encodeResourceToString(parsed), containsString("Underweight")); } @AfterClass public static void afterClassClearContext() { TestUtil.clearAllStaticFieldsForUnitTest(); } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
6c7e24900ff1d018fe02574b296ac6b1d30f937c
7099faaa76b4df9ad60ee7c878b34d4037ab5fd9
/baselib/src/main/java/com/example/tomasyb/baselib/web/MWebChromeClient.java
4e695a98f2d824cc17e931ccc0585581e903ad77
[]
no_license
loading103/CommonNanNing
655bb57de9dc945d08f665e48fee4e186b024928
0b4362ab67d4909e585b63f7c25e0a1b735b1214
refs/heads/main
2023-07-25T11:11:30.094251
2021-09-06T02:50:24
2021-09-06T02:50:24
403,457,236
0
0
null
null
null
null
UTF-8
Java
false
false
5,919
java
package com.example.tomasyb.baselib.web; import android.graphics.Bitmap; import android.net.Uri; import android.os.Message; import android.support.v7.app.AlertDialog; import android.view.View; import android.view.Window; import android.webkit.JsPromptResult; import android.webkit.JsResult; import android.webkit.ValueCallback; import android.webkit.WebChromeClient; import android.webkit.WebView; import android.widget.Button; import android.widget.TextView; import com.example.tomasyb.baselib.R; import com.example.tomasyb.baselib.base.app.BaseApplication; import com.example.tomasyb.baselib.util.ToastUtils; public class MWebChromeClient extends WebChromeClient { @Override public void onCloseWindow(WebView window) { super.onCloseWindow(window); } @Override public boolean onCreateWindow(WebView view, boolean dialog, boolean userGesture, Message resultMsg) { return super.onCreateWindow(view, dialog, userGesture, resultMsg); } /** * 覆盖默认的window.alert展示界面,避免title里显示为“:来自file:////” */ @Override public boolean onJsAlert(WebView view, String url, String message, final JsResult result) { ToastUtils.showShortCenter(message); result.cancel(); return true; } @Override public boolean onJsBeforeUnload(WebView view, String url, String message, JsResult result) { return super.onJsBeforeUnload(view, url, message, result); } /** * 覆盖默认的window.confirm展示界面,避免title里显示为“:来自file:////” */ @Override public boolean onJsConfirm(WebView view, String url, String message, final JsResult result) { final AlertDialog dialog = new AlertDialog.Builder(BaseApplication.getAppContext()).create(); dialog.show(); Window window = dialog.getWindow(); window.setContentView(R.layout.dialog_wap); dialog.setCancelable(false); dialog.setCanceledOnTouchOutside(false); TextView tvDescription = (TextView) window.findViewById(R.id.tv_dialog_wap_content); Button btnCancel = (Button) window.findViewById(R.id.btn_dialog_wap_cancel); Button btnSure = (Button) window.findViewById(R.id.btn_dialog_wap_sure); tvDescription.setText(message); btnCancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dialog.dismiss(); result.cancel(); } }); btnSure.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dialog.dismiss(); result.confirm(); } }); return true; } /** * 覆盖默认的window.prompt展示界面,避免title里显示为“:来自file:////” * window.prompt('请输入您的域名地址', '618119.com'); */ @Override public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, final JsPromptResult result) { final AlertDialog dialog = new AlertDialog.Builder(BaseApplication.getAppContext()).create(); dialog.show(); Window window = dialog.getWindow(); window.setContentView(R.layout.dialog_wap); dialog.setCancelable(false); dialog.setCanceledOnTouchOutside(false); TextView tvDescription = (TextView) window.findViewById(R.id.tv_dialog_wap_content); Button btnCancel = (Button) window.findViewById(R.id.btn_dialog_wap_cancel); Button btnSure = (Button) window.findViewById(R.id.btn_dialog_wap_sure); tvDescription.setText(message); btnCancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dialog.dismiss(); result.cancel(); } }); btnSure.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dialog.dismiss(); result.confirm(); } }); return true; } @Override public void onReceivedIcon(WebView view, Bitmap icon) { super.onReceivedIcon(view, icon); } @Override public void onRequestFocus(WebView view) { super.onRequestFocus(view); } private OpenFileChooserCallBack mOpenFileChooserCallBack; public MWebChromeClient() { super(); } public MWebChromeClient(OpenFileChooserCallBack openFileChooserCallBack) { mOpenFileChooserCallBack = openFileChooserCallBack; } //For Android 3.0+ public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType) { mOpenFileChooserCallBack.openFileChooserCallBack(uploadMsg, acceptType); } // For Android < 3.0 public void openFileChooser(ValueCallback<Uri> uploadMsg) { openFileChooser(uploadMsg, ""); } // For Android > 4.1.1 public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType, String capture) { openFileChooser(uploadMsg, acceptType); } // For Android > 5.0 @Override public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> uploadMsg, FileChooserParams fileChooserParams) { mOpenFileChooserCallBack.openFileChooserCallBack5(uploadMsg, ""); //openFileChooser(uploadMsg, ""); return true; } public interface OpenFileChooserCallBack { void openFileChooserCallBack(ValueCallback<Uri> uploadMsg, String acceptType); void openFileChooserCallBack5(ValueCallback<Uri[]> uploadMsg, String acceptType); } }
[ "qiuql@daqsoft.com" ]
qiuql@daqsoft.com
e6449052290292e21060fd0d1c10649c86615209
d60e287543a95a20350c2caeabafbec517cabe75
/NLPCCd/Hadoop/9900_2.java
2fc9d52d151e520ba6db509a57cf66a039f31085
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
448
java
//,temp,sample_8792.java,2,18,temp,sample_8793.java,2,17 //,3 public class xxx { public void dummy_method(){ TimelineEntityConverterV2 converter = new TimelineEntityConverterV2(); Collection<JobFiles> jobs = helper.getJobFiles(); if (jobs.isEmpty()) { } else { } for (JobFiles job: jobs) { String jobIdStr = job.getJobId(); if (job.getJobConfFilePath() == null || job.getJobHistoryFilePath() == null) { continue; } log.info("processing"); } } };
[ "sgholami@uwaterloo.ca" ]
sgholami@uwaterloo.ca
e77221977fb27571e0d333a4737bb481f8e12347
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
/Method_Scraping/xml_scraping/NicadOutputFile_t1_beam_new2/Nicad_t1_beam_new22321.java
950ba6689877a047ee8fe5fed682659c3736cd58
[]
no_license
ryosuke-ku/TestCodeSeacherPlus
cfd03a2858b67a05ecf17194213b7c02c5f2caff
d002a52251f5461598c7af73925b85a05cea85c6
refs/heads/master
2020-05-24T01:25:27.000821
2019-08-17T06:23:42
2019-08-17T06:23:42
187,005,399
0
0
null
null
null
null
UTF-8
Java
false
false
566
java
// clone pairs:15335:70% // 17032:beam/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ApproximateQuantiles.java public class Nicad_t1_beam_new22321 { public boolean equals(Object other) { if (other == this) { return true; } if (!(other instanceof QuantileStateCoder)) { return false; } QuantileStateCoder<?, ?> that = (QuantileStateCoder<?, ?>) other; return Objects.equals(this.elementCoder, that.elementCoder) && Objects.equals(this.compareFn, that.compareFn); } }
[ "naist1020@gmail.com" ]
naist1020@gmail.com
f75d3c76bfe995055c35ca9bc4319de1a02b97ec
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/6/org/apache/commons/math3/dfp/Dfp_equals_904.java
bc69ffe2b1ad06ff251c6c6bd1f3451b2bd0c0dd
[]
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
4,333
java
org apach common math3 dfp decim float point librari java float point built radix decim design goal decim math close settabl precis mix number set portabl code portabl perform accuraci result ulp basic algebra oper compli ieee ieee note trade off memori foot print memori repres number perform digit bigger round greater loss decim digit base digit partial fill number repres form pre sign time mant time radix exp pre sign plusmn mantissa repres fraction number mant signific digit exp rang ieee note differ ieee requir radix radix requir met subclass made make behav radix number opinion behav radix number requir met radix chosen faster oper decim digit time radix behavior realiz ad addit round step ensur number decim digit repres constant ieee standard specif leav intern data encod reason conclud subclass radix system encod radix system ieee specifi exist normal number entiti signific radix digit support gradual underflow rais underflow flag number expon exp min expmin flush expon reach min exp digit smallest number repres min exp digit digit min exp ieee defin impli radix point li signific digit left remain digit implement put impli radix point left digit includ signific signific digit radix point fine detail matter definit side effect render invis subclass dfp field dfpfield version dfp real field element realfieldel dfp check instanc equal param object check instanc instanc equal nan overrid equal object dfp dfp dfp isnan isnan field radix digit getradixdigit field radix digit getradixdigit compar
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
467cea69ea31de800b5aa0d31be4260798072aff
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/smiley/w.java
e6babd8c6436f26a672d07d3ed2e32f5487eca9b
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
1,371
java
package com.tencent.mm.smiley; import com.tencent.matrix.trace.core.AppMethodBeat; import java.util.Iterator; import java.util.List; import kotlin.Metadata; import kotlin.a.p; @Metadata(d1={""}, d2={"Lcom/tencent/mm/smiley/SystemEmojiItem;", "Lcom/tencent/mm/smiley/IEmojiItem;", "codePointList", "", "", "picItem", "Lcom/tencent/mm/smiley/PicEmojiItem;", "(Ljava/util/List;Lcom/tencent/mm/smiley/PicEmojiItem;)V", "codePoints", "", "getCodePoints", "()[I", "getPicItem", "()Lcom/tencent/mm/smiley/PicEmojiItem;", "plugin-emojisdk_release"}, k=1, mv={1, 5, 1}, xi=48) public final class w implements l { final q acwN; public final int[] mdx; public w(List<Integer> paramList, q paramq) { AppMethodBeat.i(242868); this.acwN = paramq; this.mdx = new int[paramList.size()]; paramList = ((Iterable)paramList).iterator(); int i = 0; while (paramList.hasNext()) { paramq = paramList.next(); if (i < 0) { p.kkW(); } int j = ((Number)paramq).intValue(); this.mdx[i] = j; i += 1; } AppMethodBeat.o(242868); } public final int[] aTW() { return this.mdx; } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes6.jar * Qualified Name: com.tencent.mm.smiley.w * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
21f64bc83a0a13441a5ffe99984080e1d58b789d
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
/Method_Scraping/xml_scraping/NicadOutputFile_t2_flink/Nicad_t2_flink490.java
db6534cb71d9efe5eec35ae6c6146aaca7b8ca8e
[]
no_license
ryosuke-ku/TestCodeSeacherPlus
cfd03a2858b67a05ecf17194213b7c02c5f2caff
d002a52251f5461598c7af73925b85a05cea85c6
refs/heads/master
2020-05-24T01:25:27.000821
2019-08-17T06:23:42
2019-08-17T06:23:42
187,005,399
0
0
null
null
null
null
UTF-8
Java
false
false
943
java
// clone pairs:10215:72% // 11206:flink/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/NetworkEnvironment.java public class Nicad_t2_flink490 { private NetworkEnvironment( ResourceID taskExecutorLocation, NetworkEnvironmentConfiguration config, NetworkBufferPool networkBufferPool, ConnectionManager connectionManager, ResultPartitionManager resultPartitionManager, ResultPartitionFactory resultPartitionFactory, SingleInputGateFactory singleInputGateFactory) { this.taskExecutorLocation = taskExecutorLocation; this.config = config; this.networkBufferPool = networkBufferPool; this.connectionManager = connectionManager; this.resultPartitionManager = resultPartitionManager; this.inputGatesById = new ConcurrentHashMap<>(); this.resultPartitionFactory = resultPartitionFactory; this.singleInputGateFactory = singleInputGateFactory; this.isShutdown = false; } }
[ "naist1020@gmail.com" ]
naist1020@gmail.com
3cab53bee54504c5f7e1035cd801b4498ec67cfa
5e19c3b375680ec4267db1ad4c43c8b53ac00b99
/app/src/main/java/vn/com/vsc/ptpm/VNPT_DMS/model/request/glab/GlabThemMoiDonHangRequest.java
991e9fb1767981139c9e9bb07ccb36bb7a479f4f
[]
no_license
minhdn7/dms
b478214c2c6dc1c5438232830d8e873d80fa2907
8fde79c7adef24997d186a0cb4354169a4552cf5
refs/heads/master
2020-03-17T13:50:08.844025
2018-05-16T10:21:35
2018-05-16T10:21:35
133,646,559
0
1
null
null
null
null
UTF-8
Java
false
false
3,157
java
package vn.com.vsc.ptpm.VNPT_DMS.model.request.glab; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import lombok.Getter; import lombok.Setter; /** * Created by MinhDN on 1/12/2017. */ public class GlabThemMoiDonHangRequest { @SerializedName("ncc") @Expose private String ncc; @SerializedName("ngaydh") @Expose private String ngaydh; @SerializedName("fullname") @Expose private String fullname; @SerializedName("dob") @Expose private String dob; @SerializedName("gtinh") @Expose private String gtinh; @SerializedName("diachi") @Expose private String diachi; @SerializedName("email") @Expose private String email; @SerializedName("moblie") @Expose private String moblie; @SerializedName("diengiai") @Expose private String diengiai; @SerializedName("ngayyc") @Expose private String ngayyc; @SerializedName("phieugiao") @Expose private String phieugiao; @SerializedName("tien_km") @Expose private String tienKm; @SerializedName("product_cat_id") @Expose private String productCatId; @SerializedName("ghichu") @Getter @Setter private String ghiChu; public String getNcc() { return ncc; } public void setNcc(String ncc) { this.ncc = ncc; } public String getNgaydh() { return ngaydh; } public void setNgaydh(String ngaydh) { this.ngaydh = ngaydh; } public String getFullname() { return fullname; } public void setFullname(String fullname) { this.fullname = fullname; } public String getDob() { return dob; } public void setDob(String dob) { this.dob = dob; } public String getGtinh() { return gtinh; } public void setGtinh(String gtinh) { this.gtinh = gtinh; } public String getDiachi() { return diachi; } public void setDiachi(String diachi) { this.diachi = diachi; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getMoblie() { return moblie; } public void setMoblie(String moblie) { this.moblie = moblie; } public String getDiengiai() { return diengiai; } public void setDiengiai(String diengiai) { this.diengiai = diengiai; } public String getNgayyc() { return ngayyc; } public void setNgayyc(String ngayyc) { this.ngayyc = ngayyc; } public String getPhieugiao() { return phieugiao; } public void setPhieugiao(String phieugiao) { this.phieugiao = phieugiao; } public String getTienKm() { return tienKm; } public void setTienKm(String tienKm) { this.tienKm = tienKm; } public String getProductCatId() { return productCatId; } public void setProductCatId(String productCatId) { this.productCatId = productCatId; } }
[ "minhdn231@gmail.com" ]
minhdn231@gmail.com
575ffcc82fefc8d37e7e13c34a48eb1932241933
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/branches/4.0.backup/dso-l2/src/main/java/com/tc/l2/msg/IndexSyncMessageFactory.java
39e409c7be49cbaba2edc3065648e7ea0f1fbfcb
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
1,688
java
/* * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. */ package com.tc.l2.msg; import com.tc.net.NodeID; import com.tc.net.groups.MessageID; public class IndexSyncMessageFactory { public static IndexSyncStartMessage createIndexSyncStartMessage(final long sequenceID) { IndexSyncStartMessage msg = new IndexSyncStartMessage(IndexSyncStartMessage.INDEX_SYNC_START_TYPE); msg.initialize(sequenceID); return msg; } public static IndexSyncMessage createIndexSyncMessage(String cacheName, String indexId, String fileName, byte[] fileData, long sequenceID, boolean isTCFile, boolean isLast) { IndexSyncMessage msg = new IndexSyncMessage(IndexSyncMessage.INDEX_SYNC_TYPE); msg.initialize(cacheName, indexId, fileName, fileData, sequenceID, isTCFile, isLast); return msg; } public static IndexSyncCompleteMessage createIndexSyncCompleteMessage(final long sequenceID) { IndexSyncCompleteMessage msg = new IndexSyncCompleteMessage(IndexSyncCompleteMessage.INDEX_SYNC_COMPLETE_TYPE); msg.initialize(sequenceID); return msg; } public static IndexSyncAckMessage createIndexSyncAckMessage(MessageID requestID, int amount) { IndexSyncAckMessage msg = new IndexSyncAckMessage(IndexSyncAckMessage.INDEX_SYNC_ACK_TYPE, requestID); msg.initialize(amount); return msg; } public static IndexSyncCompleteAckMessage createIndexSyncCompleteAckMessage(NodeID nodeID) { return new IndexSyncCompleteAckMessage(IndexSyncCompleteAckMessage.INDEX_SYNC_COMPLETE_ACK_TYPE, nodeID); } }
[ "jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864
f64f0122175a26b5ac2f432100be6a92815003af
7c4355a36c36e8079e94246e1c4f18aa78442791
/src/main/java/com/sudoplay/joise/mapping/MappingMode.java
f700c7a3d92f001347104572e6fdc43334e33582
[ "Apache-2.0", "Zlib" ]
permissive
Mr00Anderson/Joise
ddacc005f876db09840e75bc617b7785c93ff33c
238bff1573ba9092938273584e6ad6ed6fbf1a3b
refs/heads/master
2020-06-24T03:04:18.095917
2018-10-31T20:43:47
2018-10-31T20:43:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,418
java
/* * Copyright (C) 2016 Jason Taylor. * Released as open-source under the Apache License, Version 2.0. * * ============================================================================ * | Joise * ============================================================================ * * Copyright (C) 2016 Jason Taylor * * 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. * * ============================================================================ * | Accidental Noise Library * | -------------------------------------------------------------------------- * | Joise is a derivative work based on Josua Tippetts' C++ library: * | http://accidentalnoise.sourceforge.net/index.html * ============================================================================ * * Copyright (C) 2011 Joshua Tippetts * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. */ package com.sudoplay.joise.mapping; @SuppressWarnings("WeakerAccess") public enum MappingMode { NORMAL, SEAMLESS_X, SEAMLESS_Y, SEAMLESS_Z, SEAMLESS_XY, SEAMLESS_XZ, SEAMLESS_YZ, SEAMLESS_XYZ }
[ "jason@codetaylor.com" ]
jason@codetaylor.com
99d8a68e29c02b06b7ea480a402b2e80000fc305
395fdaed6042b4f85663f95b8ce181305bf75968
/java/e-java/chegg-18/src/SinglyLinkedList.java
4bea69cde8fd729c20dbd64583885f24284accc0
[]
no_license
amitkumar-panchal/ChQuestiions
88b6431d3428a14b0e5619ae6a30b8c851476de7
448ec1368eca9544fde0c40f892d68c3494ca209
refs/heads/master
2022-12-09T18:03:14.954130
2020-09-23T01:58:17
2020-09-23T01:58:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,736
java
import java.util.NoSuchElementException; public class SinglyLinkedList { protected Node start; protected Node end; public int size; /* Constructor */ public SinglyLinkedList() { start = null; end = null; size = 0; } /* Function to check if list is empty */ public boolean isEmpty() { return start == null; } /* Function to get size of list */ public int getSize() { return size; } /* Function to insert an element at beginning */ public void insertAtStart(int val) { Node newnode = new Node(val, null); size++; if (start == null) { start = newnode; end = start; } else { newnode.setLink(start); start = newnode; } } /* Function to insert an element at end */ public void insertAtEnd(int val) { Node newnode = new Node(val, null); size++; if (start == null) { start = newnode; end = start; } else { end.setLink(newnode); end = newnode; } } /* Function to insert an element at position */ public void insertAtPos(int val, int pos) { Node newnode = new Node(val, null); Node ptr = start; pos = pos - 1; for (int i = 1; i < size; i++) { if (i == pos) { Node tmp = ptr.getLink(); ptr.setLink(newnode); newnode.setLink(tmp); break; } ptr = ptr.getLink(); } size++; } /* Function to delete an element at position */ public void deleteAtPos(int pos) { if (pos == 1) { start = start.getLink(); size--; return; } if (pos == size) { Node s = start; Node t = start; while (s != end) { t = s; s = s.getLink(); } end = t; end.setLink(null); size--; return; } Node ptr = start; pos = pos - 1; for (int i = 1; i < size - 1; i++) { if (i == pos) { Node tmp = ptr.getLink(); tmp = tmp.getLink(); ptr.setLink(tmp); break; } ptr = ptr.getLink(); } size--; } /* Function to display elements */ public void display() { System.out.print("\nSingly Linked List = "); if (size == 0) { System.out.print("empty\n"); return; } if (start.getLink() == null) { System.out.println(start.getData()); return; } Node ptr = start; System.out.print(start.getData() + "->"); ptr = start.getLink(); while (ptr.getLink() != null) { System.out.print(ptr.getData() + "->"); ptr = ptr.getLink(); } System.out.print(ptr.getData() + "\n"); } /** * * @param index position at we want to set the value * @param value */ public void set(int index, int value) { Node temp = this.start; if(this.isEmpty()) { throw new NoSuchElementException("Error: linked list is empty."); } int i=0; for(i=0; i<this.size; i++) { if(i == index) { temp.data = value; break; } temp = temp.getLink(); } if(i == this.size) { throw new IndexOutOfBoundsException("Error: no index found"); } } /** * * @return minimum value present in linkedlist */ public int min() { if(this.isEmpty()) { throw new NoSuchElementException("Error: linked list is empty"); } int min = this.start.getData(); int i=1; Node temp = this.start.getLink(); while(i<this.size) { if(min > temp.getData()) { min = temp.getData(); } temp = temp.getLink(); i++; } return min; } /** * * @return true if linked list is sorted in nondecreasing order otherwise return false */ public boolean isSorted() { int i = 0; Node temp = this.start; while(i<this.size -1) { if(temp.getData() > temp.getLink().getData()) { return false; } temp = temp.getLink(); i++; } return true; } /** * * @param value * @return index form last node of given value */ public int indexOf(int value) { int i = 0; int res = -1; Node temp = this.start; while(i < this.size) { if(value == temp.getData()) { res = i; } temp = temp.getLink(); i++; } return res; } class Node { protected int data; protected Node link; /* Constructor */ public Node() { link = null; data = 0; } /* Constructor */ public Node(int d) { data = d; link = null; } /* Constructor */ public Node(int d, Node n) { data = d; link = n; } /* Function to set link to next Node */ public void setLink(Node n) { link = n; } /* Function to set data to current Node */ public void setData(int d) { data = d; } /* Function to get link to next node */ public Node getLink() { return link; } /* Function to get data from current Node */ public int getData() { return data; } } }
[ "=" ]
=
fcfdccf19eb877200a3fd91e51a74f7b9dd64c81
4312a71c36d8a233de2741f51a2a9d28443cd95b
/RawExperiments/DB/Math 3.2 RC4/AstorMain-Math 3.2 RC4/src/variant-829/org/apache/commons/math/analysis/solvers/BrentSolver.java
47a05c8f789b4f3da719f461db3dabb6b0344d13
[]
no_license
SajjadZaidi/AutoRepair
5c7aa7a689747c143cafd267db64f1e365de4d98
e21eb9384197bae4d9b23af93df73b6e46bb749a
refs/heads/master
2021-05-07T00:07:06.345617
2017-12-02T18:48:14
2017-12-02T18:48:14
112,858,432
0
0
null
null
null
null
UTF-8
Java
false
false
6,634
java
package org.apache.commons.math.analysis.solvers; public class BrentSolver extends org.apache.commons.math.analysis.solvers.UnivariateRealSolverImpl { private static final java.lang.String NON_BRACKETING_MESSAGE = "function values at endpoints do not have different signs. " + "Endpoints: [{0}, {1}], Values: [{2}, {3}]"; private static final long serialVersionUID = 7694577816772532779L; @java.lang.Deprecated public BrentSolver(org.apache.commons.math.analysis.UnivariateRealFunction f) { super(f, 100, 1.0E-6); } public BrentSolver() { super(100, 1.0E-6); } @java.lang.Deprecated public double solve(double min, double max) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { return solve(f, min, max); } @java.lang.Deprecated public double solve(double min, double max, double initial) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { return solve(f, min, max, initial); } public double solve(final org.apache.commons.math.analysis.UnivariateRealFunction f, final double min, final double max, final double initial) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { clearResult(); verifySequence(min, initial, max); double yInitial = f.value(initial); if ((java.lang.Math.abs(yInitial)) <= (functionValueAccuracy)) { setResult(initial, 0); return result; } double yMin = f.value(min); if ((java.lang.Math.abs(yMin)) <= (functionValueAccuracy)) { setResult(yMin, 0); return result; } if ((yInitial * yMin) < 0) { return solve(f, min, yMin, initial, yInitial, min, yMin); } double yMax = f.value(max); if ((java.lang.Math.abs(yMax)) <= (functionValueAccuracy)) { setResult(yMax, 0); return result; } if ((yInitial * yMax) < 0) { return solve(f, initial, yInitial, max, yMax, initial, yInitial); } return org.apache.commons.math.linear.BigMatrixImpl.ZERO; } public double solve(final org.apache.commons.math.analysis.UnivariateRealFunction f, final double min, final double max) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { clearResult(); verifyInterval(min, max); double ret = java.lang.Double.NaN; double yMin = f.value(min); double yMax = f.value(max); double sign = yMin * yMax; if (sign > 0) { if ((java.lang.Math.abs(yMin)) <= (functionValueAccuracy)) { setResult(min, 0); ret = min; } else { if ((java.lang.Math.abs(yMax)) <= (functionValueAccuracy)) { setResult(max, 0); ret = max; } else { throw org.apache.commons.math.MathRuntimeException.createIllegalArgumentException(org.apache.commons.math.analysis.solvers.BrentSolver.NON_BRACKETING_MESSAGE, min, max, yMin, yMax); } } } else { if (sign < 0) { ret = solve(f, min, yMin, max, yMax, min, yMin); } else { if (yMin == 0.0) { ret = min; } else { ret = max; } } } return ret; } private double solve(final org.apache.commons.math.analysis.UnivariateRealFunction f, double x0, double y0, double x1, double y1, double x2, double y2) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { double delta = x1 - x0; double oldDelta = delta; int i = 0; while (i < (maximalIterationCount)) { if ((java.lang.Math.abs(y2)) < (java.lang.Math.abs(y1))) { x0 = x1; x1 = x2; x2 = x0; y0 = y1; y1 = y2; y2 = y0; } if ((java.lang.Math.abs(y1)) <= (functionValueAccuracy)) { setResult(x1, i); return result; } double dx = x2 - x1; double tolerance = java.lang.Math.max(((relativeAccuracy) * (java.lang.Math.abs(x1))), absoluteAccuracy); if ((java.lang.Math.abs(dx)) <= tolerance) { setResult(x1, i); return result; } if (((java.lang.Math.abs(oldDelta)) < tolerance) || ((java.lang.Math.abs(y0)) <= (java.lang.Math.abs(y1)))) { delta = 0.5 * dx; oldDelta = delta; } else { double r3 = y1 / y0; double p; double p1; if (x0 == x2) { p = dx * r3; p1 = 1.0 - r3; } else { double r1 = y0 / y2; double r2 = y1 / y2; p = r3 * (((dx * r1) * (r1 - r2)) - ((x1 - x0) * (r2 - 1.0))); p1 = ((r1 - 1.0) * (r2 - 1.0)) * (r3 - 1.0); } if (p > 0.0) { p1 = -p1; } else { p = -p; } if (((2.0 * p) >= (((1.5 * dx) * p1) - (java.lang.Math.abs((tolerance * p1))))) || (p >= (java.lang.Math.abs(((0.5 * oldDelta) * p1))))) { delta = 0.5 * dx; oldDelta = delta; } else { oldDelta = delta; delta = p / p1; } } x0 = x1; y0 = y1; if ((java.lang.Math.abs(delta)) > tolerance) { x1 = x1 + delta; } else { if (dx > 0.0) { x1 = x1 + (0.5 * tolerance); } else { if (dx <= 0.0) { x1 = x1 - (0.5 * tolerance); } } } y1 = f.value(x1); if ((y1 > 0) == (y2 > 0)) { x2 = x0; y2 = y0; delta = x1 - x0; oldDelta = delta; } i++; } throw new org.apache.commons.math.MaxIterationsExceededException(maximalIterationCount); } }
[ "sajjad.syed@ucalgary.ca" ]
sajjad.syed@ucalgary.ca
85ab76a8316eef9b2f5cb3db85aba5552eb2ec6c
655ba4cd265397d33129638c4d2920898434f6f7
/src/test/java/com/telecom/pycata/web/rest/TestUtil.java
da868106e7103aa5bf02b81ee18841c0c2800ec7
[]
no_license
YannMlr/pycata
f423ef468aa66675e5f544f41b0cd1d5fde862e5
82367efdebabd8ec040f154c3a730f6659154fd7
refs/heads/master
2022-12-21T19:49:55.997771
2020-01-29T11:05:08
2020-01-29T11:05:54
232,591,661
1
0
null
2022-12-16T04:43:17
2020-01-08T15:14:47
Java
UTF-8
Java
false
false
6,048
java
package com.telecom.pycata.web.rest; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import org.hamcrest.Description; import org.hamcrest.TypeSafeDiagnosingMatcher; import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; import org.springframework.format.support.DefaultFormattingConversionService; import org.springframework.format.support.FormattingConversionService; import org.springframework.http.MediaType; import java.io.IOException; import java.time.ZonedDateTime; import java.time.format.DateTimeParseException; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.TypedQuery; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Root; import static org.assertj.core.api.Assertions.assertThat; /** * Utility class for testing REST controllers. */ public final class TestUtil { private static final ObjectMapper mapper = createObjectMapper(); /** MediaType for JSON UTF8 */ public static final MediaType APPLICATION_JSON_UTF8 = MediaType.APPLICATION_JSON_UTF8; private static ObjectMapper createObjectMapper() { ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); mapper.registerModule(new JavaTimeModule()); return mapper; } /** * Convert an object to JSON byte array. * * @param object the object to convert. * @return the JSON byte array. * @throws IOException */ public static byte[] convertObjectToJsonBytes(Object object) throws IOException { return mapper.writeValueAsBytes(object); } /** * Create a byte array with a specific size filled with specified data. * * @param size the size of the byte array. * @param data the data to put in the byte array. * @return the JSON byte array. */ public static byte[] createByteArray(int size, String data) { byte[] byteArray = new byte[size]; for (int i = 0; i < size; i++) { byteArray[i] = Byte.parseByte(data, 2); } return byteArray; } /** * A matcher that tests that the examined string represents the same instant as the reference datetime. */ public static class ZonedDateTimeMatcher extends TypeSafeDiagnosingMatcher<String> { private final ZonedDateTime date; public ZonedDateTimeMatcher(ZonedDateTime date) { this.date = date; } @Override protected boolean matchesSafely(String item, Description mismatchDescription) { try { if (!date.isEqual(ZonedDateTime.parse(item))) { mismatchDescription.appendText("was ").appendValue(item); return false; } return true; } catch (DateTimeParseException e) { mismatchDescription.appendText("was ").appendValue(item) .appendText(", which could not be parsed as a ZonedDateTime"); return false; } } @Override public void describeTo(Description description) { description.appendText("a String representing the same Instant as ").appendValue(date); } } /** * Creates a matcher that matches when the examined string represents the same instant as the reference datetime. * @param date the reference datetime against which the examined string is checked. */ public static ZonedDateTimeMatcher sameInstant(ZonedDateTime date) { return new ZonedDateTimeMatcher(date); } /** * Verifies the equals/hashcode contract on the domain object. */ public static <T> void equalsVerifier(Class<T> clazz) throws Exception { T domainObject1 = clazz.getConstructor().newInstance(); assertThat(domainObject1.toString()).isNotNull(); assertThat(domainObject1).isEqualTo(domainObject1); assertThat(domainObject1.hashCode()).isEqualTo(domainObject1.hashCode()); // Test with an instance of another class Object testOtherObject = new Object(); assertThat(domainObject1).isNotEqualTo(testOtherObject); assertThat(domainObject1).isNotEqualTo(null); // Test with an instance of the same class T domainObject2 = clazz.getConstructor().newInstance(); assertThat(domainObject1).isNotEqualTo(domainObject2); // HashCodes are equals because the objects are not persisted yet assertThat(domainObject1.hashCode()).isEqualTo(domainObject2.hashCode()); } /** * Create a {@link FormattingConversionService} which use ISO date format, instead of the localized one. * @return the {@link FormattingConversionService}. */ public static FormattingConversionService createFormattingConversionService() { DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService (); DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); registrar.setUseIsoFormat(true); registrar.registerFormatters(dfcs); return dfcs; } /** * Makes a an executes a query to the EntityManager finding all stored objects. * @param <T> The type of objects to be searched * @param em The instance of the EntityManager * @param clss The class type to be searched * @return A list of all found objects */ public static <T> List<T> findAll(EntityManager em, Class<T> clss) { CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<T> cq = cb.createQuery(clss); Root<T> rootEntry = cq.from(clss); CriteriaQuery<T> all = cq.select(rootEntry); TypedQuery<T> allQuery = em.createQuery(all); return allQuery.getResultList(); } private TestUtil() {} }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
99e123aaa4aad31a552dc543c6e8a4a6d5ad763d
24af099955ef23d02ec18a84125cb57db2ac0c3b
/AgenziaDiViaggio/src/voyager/nove/exception/UtenteInesistenteException.java
2f56e85aad3ec5a6cff0dea95f7b22965a70149f
[]
no_license
AndreaNocera/AgenziaDiViaggi
bd626bb39d58f61976d74eb27fcf0289907ac205
c162d848ff37d94ec7846a428b1a1cdcde4c9988
refs/heads/master
2020-12-25T10:13:54.135200
2013-07-21T19:10:54
2013-07-21T19:10:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
431
java
/** * @project WebVoyager * * @package gestioneutenti.exception * * @name UtenteInesistenteException.java * * @description * * @author TEAM 9: Giacomo Marciani, Jesus Cevallos, Ilyas Aboki, Ludovic William * */ package voyager.nove.exception; public class UtenteInesistenteException extends Exception { private static final long serialVersionUID = 19898L; public UtenteInesistenteException() { super(); } }
[ "giacomo.marciani@gmail.com" ]
giacomo.marciani@gmail.com
5496e4d14e33dfdc083e63706719d5e231db96f6
20a11652eb06b3bb16c3d8cd8a23f2f5a22fa2e9
/app/src/main/java/com/guohanhealth/shop/bean/PdrechargeInfo.java
644ff93050adfa3cadad472959610b8b5c452bd1
[]
no_license
majicking/ghdjksc
4d1f45474893ff084956684f64eed6887c56bc47
2fd0bb31368be669057a95d8dc75d4923ba3f332
refs/heads/master
2020-03-17T09:43:01.581634
2018-08-07T09:43:21
2018-08-07T09:43:21
133,450,237
0
0
null
null
null
null
UTF-8
Java
false
false
6,077
java
package com.guohanhealth.shop.bean; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; /** * 预存款日志Bean * <p/> * dqw * 2015/8/25 */ public class PdrechargeInfo { private String id; private String sn; private String memberId; private String memberName; private String amount; private String paymentCode; private String paymentName; private String tradeSn; private String addTime; private String addTimeText; private String paymentState; private String paymentStateText; private String paymentTime; private String admin; public PdrechargeInfo(String id, String sn, String memberId, String memberName, String amount, String paymentCode, String paymentName, String tradeSn, String addTime, String addTimeText, String paymentState, String paymentStateText, String paymentTime, String admin) { this.id = id; this.sn = sn; this.memberId = memberId; this.memberName = memberName; this.amount = amount; this.paymentCode = paymentCode; this.paymentName = paymentName; this.tradeSn = tradeSn; this.addTime = addTime; this.addTimeText = addTimeText; this.paymentState = paymentState; this.paymentStateText = paymentStateText; this.paymentTime = paymentTime; this.admin = admin; } public static ArrayList<PdrechargeInfo> newInstanceList(String json) { ArrayList<PdrechargeInfo> list = new ArrayList<PdrechargeInfo>(); try { JSONArray arr = new JSONArray(json); int size = null == arr ? 0 : arr.length(); for (int i = 0; i < size; i++) { JSONObject obj = arr.getJSONObject(i); String id = obj.optString("pdr_id"); String sn = obj.optString("pdr_sn"); String memberId = obj.optString("pdr_member_id"); String memberName = obj.optString("pdr_member_name"); String amount = obj.optString("pdr_amount"); String paymentCode = obj.optString("pdr_payment_code"); String paymentName = obj.optString("pdr_payment_name"); String tradeSn = obj.optString("pdr_trade_sn"); String addTime = obj.optString("pdr_add_time"); String addTimeText = obj.optString("pdr_add_time_text"); String paymentState = obj.optString("pdr_payment_state"); String paymentStateText = obj.optString("pdr_payment_state_text"); String paymentTime = obj.optString("pdr_payment_time"); String admin = obj.optString("pdr_admin"); list.add(new PdrechargeInfo(id, sn, memberId, memberName, amount, paymentCode, paymentName, tradeSn, addTime, addTimeText, paymentState, paymentStateText, paymentTime, admin)); } } catch (JSONException e) { e.printStackTrace(); } return list; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getSn() { return sn; } public void setSn(String sn) { this.sn = sn; } public String getMemberId() { return memberId; } public void setMemberId(String memberId) { this.memberId = memberId; } public String getMemberName() { return memberName; } public void setMemberName(String memberName) { this.memberName = memberName; } public String getAmount() { return amount; } public void setAmount(String amount) { this.amount = amount; } public String getPaymentCode() { return paymentCode; } public void setPaymentCode(String paymentCode) { this.paymentCode = paymentCode; } public String getPaymentName() { return paymentName; } public void setPaymentName(String paymentName) { this.paymentName = paymentName; } public String getTradeSn() { return tradeSn; } public void setTradeSn(String tradeSn) { this.tradeSn = tradeSn; } public String getAddTime() { return addTime; } public void setAddTime(String addTime) { this.addTime = addTime; } public String getAddTimeText() { return addTimeText; } public void setAddTimeText(String addTimeText) { this.addTimeText = addTimeText; } public String getPaymentState() { return paymentState; } public void setPaymentState(String paymentState) { this.paymentState = paymentState; } public String getPaymentStateText() { return paymentStateText; } public void setPaymentStateText(String paymentStateText) { this.paymentStateText = paymentStateText; } public String getPaymentTime() { return paymentTime; } public void setPaymentTime(String paymentTime) { this.paymentTime = paymentTime; } public String getAdmin() { return admin; } public void setAdmin(String admin) { this.admin = admin; } @Override public String toString() { return "PdrechargeInfo{" + "id='" + id + '\'' + ", sn='" + sn + '\'' + ", memberId='" + memberId + '\'' + ", memberName='" + memberName + '\'' + ", amount='" + amount + '\'' + ", paymentCode='" + paymentCode + '\'' + ", paymentName='" + paymentName + '\'' + ", tradeSn='" + tradeSn + '\'' + ", addTime='" + addTime + '\'' + ", addTimeText='" + addTimeText + '\'' + ", paymentState='" + paymentState + '\'' + ", paymentStateText='" + paymentStateText + '\'' + ", paymentTime='" + paymentTime + '\'' + ", admin='" + admin + '\'' + '}'; } }
[ "majick@aliyun.com" ]
majick@aliyun.com
675691b01eb23f0e6986b0f72ce3848ac8e06d9d
83d781a9c2ba33fde6df0c6adc3a434afa1a7f82
/Wallet/Wallet.CreditCard/src/main/java/com/servicelive/wallet/creditcard/Result.java
80b24f063de3e6b97c7d25a164e976d768b2ac9d
[]
no_license
ssriha0/sl-b2b-platform
71ab8ef1f0ccb0a7ad58b18f28a2bf6d5737fcb6
5b4fcafa9edfe4d35c2dcf1659ac30ef58d607a2
refs/heads/master
2023-01-06T18:32:24.623256
2020-11-05T12:23:26
2020-11-05T12:23:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
734
java
package com.servicelive.wallet.creditcard; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamAsAttribute; /** * This is a generic bean class for storing Result information. * @author Infosys * */ @XStreamAlias("result") public class Result { @MaskedValue("0000") @XStreamAlias("code") @XStreamAsAttribute() private String code; @XStreamAlias("message") private String message; public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } }
[ "Kunal.Pise@transformco.com" ]
Kunal.Pise@transformco.com