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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4b7ce28534e82f342f80c161aa6dcf40de3f8576
|
f0568343ecd32379a6a2d598bda93fa419847584
|
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201302/ContactServiceInterfacegetContact.java
|
ba749eb9336472944a9f9e6cbf8d48d12610b036
|
[
"Apache-2.0"
] |
permissive
|
frankzwang/googleads-java-lib
|
bd098b7b61622bd50352ccca815c4de15c45a545
|
0cf942d2558754589a12b4d9daa5902d7499e43f
|
refs/heads/master
| 2021-01-20T23:20:53.380875
| 2014-07-02T19:14:30
| 2014-07-02T19:14:30
| 21,526,492
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,789
|
java
|
package com.google.api.ads.dfp.jaxws.v201302;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
*
* Returns the {@link Contact} uniquely identified by the given ID.
*
* @param contactId the ID of the contact, which must already exist
* @return the {@code Contact} uniquely identified by the given ID
*
*
* <p>Java class for getContact element declaration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <element name="getContact">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="contactId" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"contactId"
})
@XmlRootElement(name = "getContact")
public class ContactServiceInterfacegetContact {
protected Long contactId;
/**
* Gets the value of the contactId property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getContactId() {
return contactId;
}
/**
* Sets the value of the contactId property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setContactId(Long value) {
this.contactId = value;
}
}
|
[
"jradcliff@google.com"
] |
jradcliff@google.com
|
d06bd72085610c77a17ad69bb9bcf5e3b9b91e62
|
ba44e8867d176d74a6ca0a681a4f454ca0b53cad
|
/com/sybase/automation/framework/widget/interfaces/ILabel.java
|
9e7e6b9736558cfb3f056126448425b9a5f0428a
|
[] |
no_license
|
eric2323223/FATPUS
|
1879e2fa105c7e7683afd269965d8b59a7e40894
|
989d2cf49127d88fdf787da5ca6650e2abd5a00e
|
refs/heads/master
| 2016-09-15T19:10:35.317021
| 2012-06-29T02:32:36
| 2012-06-29T02:32:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 264
|
java
|
/**
* Created on Mar 28, 2007
*
* Copyright (c) Sybase, Inc. 2004-2007. All rights reserved.
*/
package com.sybase.automation.framework.widget.interfaces;
/**
* @author zhouw
*/
public interface ILabel
{
static String TEXT="text" ;
String getText();
}
|
[
"eric2323223@gmail.com"
] |
eric2323223@gmail.com
|
3cae80a9b5c753c362ba5a752c0bf4c56d32288b
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MATH-58b-12-8-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/apache/commons/math/optimization/fitting/GaussianFitter_ESTest_scaffolding.java
|
4be4aceec6d498b3b543143c4f7f656b01003756
|
[] |
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
| 463
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Apr 06 07:07:21 UTC 2020
*/
package org.apache.commons.math.optimization.fitting;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class GaussianFitter_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
fcf8e3059a082a8dc5f4c983ad3a04cac8badfb7
|
4e3c5dc1cfd033b0e7c1bea625f9ee64ae12871a
|
/com/vungle/publisher/lx.java
|
da8ed9e5506a3d93dd4c37f96bd61504556bd250
|
[] |
no_license
|
haphan2014/idle_heroes
|
ced0f6301b7a618e470ebfa722bef3d4becdb6ba
|
5bcc66f8e26bf9273a2a8da2913c27a133b7d60a
|
refs/heads/master
| 2021-01-20T05:01:54.157508
| 2017-08-25T14:06:51
| 2017-08-25T14:06:51
| 101,409,563
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,345
|
java
|
package com.vungle.publisher;
import com.vungle.publisher.lr.C1811a;
import com.vungle.publisher.lv.C1812b;
import com.vungle.publisher.ly.C1813a;
import dagger.MembersInjector;
import javax.inject.Provider;
/* compiled from: vungle */
public final class lx implements MembersInjector<C1812b> {
static final /* synthetic */ boolean f2507a = (!lx.class.desiredAssertionStatus());
private final Provider<C1811a> f2508b;
private final Provider<C1813a> f2509c;
public final /* synthetic */ void injectMembers(Object obj) {
C1812b c1812b = (C1812b) obj;
if (c1812b == null) {
throw new NullPointerException("Cannot inject members into a null reference");
}
c1812b.f2503a = (C1811a) this.f2508b.get();
c1812b.f2504b = (C1813a) this.f2509c.get();
}
private lx(Provider<C1811a> provider, Provider<C1813a> provider2) {
if (f2507a || provider != null) {
this.f2508b = provider;
if (f2507a || provider2 != null) {
this.f2509c = provider2;
return;
}
throw new AssertionError();
}
throw new AssertionError();
}
public static MembersInjector<C1812b> m2147a(Provider<C1811a> provider, Provider<C1813a> provider2) {
return new lx(provider, provider2);
}
}
|
[
"hien.bui@vietis.com.vn"
] |
hien.bui@vietis.com.vn
|
61895187b9f4e9c3730bf500718dab331a20509d
|
d9477e8e6e0d823cf2dec9823d7424732a7563c4
|
/plugins/JDiffPlugin/tags/jdiffplugin-2_2_1/jdiff/options/JDiffOptionPane.java
|
dd0c23d2f786114a2b41bcaf8b7892c0653ed2f3
|
[] |
no_license
|
RobertHSchmidt/jedit
|
48fd8e1e9527e6f680de334d1903a0113f9e8380
|
2fbb392d6b569aefead29975b9be12e257fbe4eb
|
refs/heads/master
| 2023-08-30T02:52:55.676638
| 2018-07-11T13:28:01
| 2018-07-11T13:28:01
| 140,587,948
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,361
|
java
|
/*
* JDiffOptionPane.java
* Copyright (c) 2000, 2001, 2002 Andre Kaplan
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jdiff.options;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JRadioButton;
import org.gjt.sp.jedit.AbstractOptionPane;
import org.gjt.sp.jedit.jEdit;
import jdiff.component.MergeToolBar;
import ise.java.awt.KappaLayout;
public class JDiffOptionPane extends AbstractOptionPane {
private JCheckBox ignoreCase;
private JCheckBox trimWhitespace;
private JCheckBox ignoreAmountOfWhitespace;
private JCheckBox ignoreAllWhitespace;
private JCheckBox autoShowDockable;
private JCheckBox beepOnError;
private JRadioButton horizontal;
private JRadioButton vertical;
private JRadioButton compact;
private JCheckBox showLineDiff;
private JCheckBox restoreView;
public JDiffOptionPane() {
super( "jdiff-general" );
}
public void _init() {
setBorder( BorderFactory.createEmptyBorder( 3, 3, 3, 3 ) );
// diff options
JLabel diff_options_label = new JLabel( jEdit.getProperty( "options.diff-options.label", "Diff Options:" ) );
ignoreCase = createCheckBox( "jdiff.ignore-case", false );
trimWhitespace = createCheckBox( "jdiff.trim-whitespace", false );
ignoreAmountOfWhitespace = createCheckBox( "jdiff.ignore-amount-whitespace", false );
ignoreAllWhitespace = createCheckBox( "jdiff.ignore-all-whitespace", false );
// UI options
JLabel ui_options_label = new JLabel( jEdit.getProperty( "options.ui-options.label", "UI Options:" ) );
autoShowDockable = createCheckBox( "jdiff.auto-show-dockable", false );
showLineDiff = createCheckBox( "jdiff.show-line-diff", true );
beepOnError = createCheckBox( "jdiff.beep-on-error", true );
restoreView = createCheckBox( "jdiff.restore-view", true );
// dockable UI options
int orientation = jEdit.getIntegerProperty( "jdiff.toolbar-orientation", MergeToolBar.HORIZONTAL );
horizontal = new JRadioButton( jEdit.getProperty( "options.jdiff.toolbar-horizontal" ) );
vertical = new JRadioButton( jEdit.getProperty( "options.jdiff.toolbar-vertical" ) );
compact = new JRadioButton( jEdit.getProperty( "options.jdiff.toolbar-compact" ) );
ButtonGroup button_group = new ButtonGroup();
button_group.add( horizontal );
button_group.add( vertical );
button_group.add( compact );
switch ( orientation ) {
case MergeToolBar.VERTICAL:
horizontal.setSelected( false );
vertical.setSelected( true );
compact.setSelected( false );
break;
case MergeToolBar.COMPACT:
horizontal.setSelected( false );
vertical.setSelected( false );
compact.setSelected( true );
break;
default:
horizontal.setSelected( true );
vertical.setSelected( false );
compact.setSelected( false );
break;
}
JLabel orientation_label = new JLabel( jEdit.getProperty( "options.toolbar-orientation.label", "Merge Toolbar Orientation:" ) );
addComponent( diff_options_label );
addComponent( ignoreCase );
addComponent( trimWhitespace );
addComponent( ignoreAmountOfWhitespace );
addComponent( ignoreAllWhitespace );
addComponent( KappaLayout.createVerticalStrut( 11 ) );
addComponent( ui_options_label );
addComponent( autoShowDockable );
addComponent( showLineDiff );
addComponent( beepOnError );
addComponent( restoreView );
addComponent( KappaLayout.createVerticalStrut( 11 ) );
addComponent( orientation_label );
addComponent( horizontal );
addComponent( vertical );
addComponent( compact );
}
public void _save() {
if ( vertical.isSelected() ) {
jEdit.setIntegerProperty( "jdiff.toolbar-orientation", MergeToolBar.VERTICAL );
}
else if ( compact.isSelected() ) {
jEdit.setIntegerProperty( "jdiff.toolbar-orientation", MergeToolBar.COMPACT );
}
else {
jEdit.setIntegerProperty( "jdiff.toolbar-orientation", MergeToolBar.HORIZONTAL );
}
jEdit.setBooleanProperty( "jdiff.ignore-case", ignoreCase.isSelected() );
jEdit.setBooleanProperty( "jdiff.trim-whitespace", trimWhitespace.isSelected() );
jEdit.setBooleanProperty( "jdiff.ignore-amount-whitespace", ignoreAmountOfWhitespace.isSelected() );
jEdit.setBooleanProperty( "jdiff.ignore-all-whitespace", ignoreAllWhitespace.isSelected() );
jEdit.setBooleanProperty( "jdiff.auto-show-dockable", autoShowDockable.isSelected() );
jEdit.setBooleanProperty( "jdiff.show-line-diff", showLineDiff.isSelected() );
jEdit.setBooleanProperty( "jdiff.beep-on-error", beepOnError.isSelected() );
jEdit.setBooleanProperty( "jdiff.restore-view", restoreView.isSelected() );
// virtual overview has been removed, since it hasn't worked since jEdit 4.2,
// so make sure the property is false
jEdit.setBooleanProperty( "jdiff.global-virtual-overview", false );
}
private JCheckBox createCheckBox( String property, boolean defaultValue ) {
JCheckBox cb = new JCheckBox( jEdit.getProperty( "options." + property ) );
cb.setSelected( jEdit.getBooleanProperty( property, defaultValue ) );
return cb;
}
}
|
[
"daleanson@6b1eeb88-9816-0410-afa2-b43733a0f04e"
] |
daleanson@6b1eeb88-9816-0410-afa2-b43733a0f04e
|
0845f6139a5d6640e51f94c3b0e33c8a1b3e197e
|
32f38cd53372ba374c6dab6cc27af78f0a1b0190
|
/app/src/main/java/com/alipay/mobile/monitor/track/TrackReflector.java
|
dd86d9aa8655edb4d1def0cdd299c67dbf6e2d89
|
[] |
no_license
|
shuixi2013/AmapCode
|
9ea7aefb42e0413f348f238f0721c93245f4eac6
|
1a3a8d4dddfcc5439df8df570000cca12b15186a
|
refs/heads/master
| 2023-06-06T23:08:57.391040
| 2019-08-29T04:36:02
| 2019-08-29T04:36:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,125
|
java
|
package com.alipay.mobile.monitor.track;
import android.os.Build.VERSION;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import java.lang.reflect.Field;
public class TrackReflector {
private static TrackReflector f = null;
Class<?> a = null;
Field b = null;
Field c = null;
Class<?> d = null;
Field e = null;
private TrackReflector() {
try {
this.a = Class.forName("android.view.View");
} catch (ClassCastException e2) {
Log.e("Cast", "Class of view cast exception.");
} catch (ClassNotFoundException e3) {
Log.e("Reflection", "Class Not Found.");
}
if (VERSION.SDK_INT >= 14) {
if (this.a != null) {
try {
this.c = this.a.getDeclaredField("mListenerInfo");
this.c.setAccessible(true);
} catch (NoSuchFieldException e4) {
Log.e("Reflection", "No Such Field.");
}
}
if (this.a != null) {
try {
this.d = Class.forName("android.view.View$ListenerInfo");
this.e = this.d.getDeclaredField("mOnClickListener");
this.e.setAccessible(true);
} catch (NoSuchFieldException e5) {
Log.e("Reflection", "No Such Field.");
} catch (ClassNotFoundException e6) {
Log.e("Reflection", "Class Not Found.");
}
}
} else if (this.a != null) {
try {
this.b = this.a.getDeclaredField("mOnClickListener");
if (!this.b.isAccessible()) {
this.b.setAccessible(true);
}
} catch (NoSuchFieldException e7) {
Log.e("Reflection", "No Such Field.");
}
}
}
public static TrackReflector a() {
if (f == null) {
f = new TrackReflector();
}
return f;
}
public OnClickListener a(View view) {
if (VERSION.SDK_INT >= 14) {
return c(view);
}
return b(view);
}
public void a(View view, OnClickListener onClickListener) {
if (VERSION.SDK_INT >= 14) {
c(view, onClickListener);
} else {
b(view, onClickListener);
}
}
private OnClickListener b(View view) {
if (this.b == null) {
return null;
}
boolean z = false;
try {
return (OnClickListener) this.b.get(view);
} catch (IllegalAccessException e2) {
Log.e("Reflection", "Illegal Access.");
return z;
}
}
private void b(View view, OnClickListener onClickListener) {
if (this.b != null && view != null) {
try {
this.b.setAccessible(true);
this.b.set(view, onClickListener);
} catch (IllegalAccessException e2) {
Log.e("Reflection", "Illegal Access.");
}
}
}
private OnClickListener c(View view) {
if (this.c == null || this.e == null) {
return null;
}
try {
Object listenerInfo = this.c.get(view);
if (listenerInfo != null) {
return (OnClickListener) this.e.get(listenerInfo);
}
return null;
} catch (IllegalAccessException e2) {
Log.e("Reflection", "Illegal Access.");
return null;
}
}
private void c(View view, OnClickListener onClickListener) {
if (this.c != null && this.e != null && view != null) {
try {
Object listenerInfo = this.c.get(view);
if (listenerInfo != null) {
this.e.setAccessible(true);
this.e.set(listenerInfo, onClickListener);
}
} catch (IllegalAccessException e2) {
Log.e("Reflection", "Illegal Access.");
}
}
}
}
|
[
"hubert.yang@nf-3.com"
] |
hubert.yang@nf-3.com
|
f46d896f5007ca4629e520e59901de4729e4bd9e
|
a25c4e35ad54fb98b6dda61bf4b7b7b51ad431a9
|
/src/main/java/com/dongguo/composite/College.java
|
497cdcb353df6dd45fcbd152cc7d29a8e3b792cc
|
[] |
no_license
|
dongguo4812/DesignPattern
|
078906852278aafbc5a6cac52bea93ab77c613ed
|
6d4d6168eedf7847d36f8d2766ff6cf8a2fcd45e
|
refs/heads/master
| 2023-07-07T12:48:09.435073
| 2021-08-23T01:51:21
| 2021-08-23T01:51:21
| 398,534,526
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,397
|
java
|
package com.dongguo.composite;
import java.util.ArrayList;
import java.util.List;
/**
* @author Dongguo
* @date 2021/8/22 0022-14:58
* @description: 大学
*/
public class College extends OrganizationComponent {
//List 中存放的Department
List<OrganizationComponent> organizationComponents = new ArrayList<OrganizationComponent>();
// 构造器
public College(String name, String des) {
super(name, des);
}
// 重写add
@Override
protected void add(OrganizationComponent organizationComponent) {
// 将来实际业务中,Colleage 的add 和University add 不一定完全一样
organizationComponents.add(organizationComponent);
}
// 重写remove
@Override
protected void remove(OrganizationComponent organizationComponent) {
organizationComponents.remove(organizationComponent);
}
@Override
public String getName() {
return super.getName();
}
@Override
public String getDes() {
return super.getDes();
}
// print 方法,就是输出University 包含的学院
@Override
protected void print() {
System.out.println("--------------" + getName() + "--------------");
//遍历organizationComponents
for (OrganizationComponent organizationComponent : organizationComponents) {
organizationComponent.print();
}
}
}
|
[
"291320608@qq.com"
] |
291320608@qq.com
|
1d04ea526ef297796abe794fad07d97f4f048c2f
|
94d91903819947c4fb2598af40cf53344304dbac
|
/wssmall_1.2.0/zj_order_server/src/main/java/com/ztesoft/net/ecsord/params/ecaop/req/WorkOrderUpdateReq.java
|
7b155f4a8ffe40ab8674a456a112ac2d606a3031
|
[] |
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
| 3,587
|
java
|
package com.ztesoft.net.ecsord.params.ecaop.req;
import com.ztesoft.api.ApiRuleException;
import com.ztesoft.net.annotation.ZteSoftCommentAnnotationParam;
import com.ztesoft.net.ecsord.params.ecaop.vo.CustInfo;
import com.ztesoft.net.ecsord.params.ecaop.vo.WorkDeveloperInfo;
import com.ztesoft.net.framework.database.NotDbField;
import params.ZteRequest;
/**
* 工单状态同步接口
*
* @author 宋琪
* @date 2017年12月1日
*/
public class WorkOrderUpdateReq extends ZteRequest {
private static final long serialVersionUID = 1L;
@ZteSoftCommentAnnotationParam(name = "序列号", type = "String", isNecessary = "Y", desc = "serial_no:序列号")
private String serial_no;
@ZteSoftCommentAnnotationParam(name = "时间", type = "String", isNecessary = "Y", desc = "time:时间")
private String time;
@ZteSoftCommentAnnotationParam(name = "发起方系统标识", type = "String", isNecessary = "Y", desc = "source_system:发起方系统标识")
private String source_system;
@ZteSoftCommentAnnotationParam(name = "接收方系统标识", type = "String", isNecessary = "Y", desc = "receive_system:接收方系统标识")
private String receive_system;
@ZteSoftCommentAnnotationParam(name = "工单号", type = "String", isNecessary = "Y", desc = "工单号")
private String work_order_id;
@ZteSoftCommentAnnotationParam(name = "工单处理结果", type = "String", isNecessary = "Y", desc = "工单处理结果")
private String field_survey_result;// 0 失败;1 成功
@ZteSoftCommentAnnotationParam(name = "备注", type = "String", isNecessary = "Y", desc = "备注")
private String remark;
@ZteSoftCommentAnnotationParam(name = "操作员节点信息", type = "String", isNecessary = "Y", desc = "操作员节点信息")
private WorkDeveloperInfo developer_info;
@ZteSoftCommentAnnotationParam(name = "客户信息节点信息", type = "String", isNecessary = "Y", desc = "客户信息节点信息")
private CustInfo cust_info;// 针对实名单节点
public String getSerial_no() {
return serial_no;
}
public void setSerial_no(String serial_no) {
this.serial_no = serial_no;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String getSource_system() {
return source_system;
}
public void setSource_system(String source_system) {
this.source_system = source_system;
}
public String getReceive_system() {
return receive_system;
}
public void setReceive_system(String receive_system) {
this.receive_system = receive_system;
}
public String getWork_order_id() {
return work_order_id;
}
public void setWork_order_id(String work_order_id) {
this.work_order_id = work_order_id;
}
public String getField_survey_result() {
return field_survey_result;
}
public void setField_survey_result(String field_survey_result) {
this.field_survey_result = field_survey_result;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public WorkDeveloperInfo getDeveloper_info() {
return developer_info;
}
public void setDeveloper_info(WorkDeveloperInfo developer_info) {
this.developer_info = developer_info;
}
public CustInfo getCust_info() {
return cust_info;
}
public void setCust_info(CustInfo cust_info) {
this.cust_info = cust_info;
}
@Override
@NotDbField
public void check() throws ApiRuleException {
}
@Override
@NotDbField
public String getApiMethodName() {
return "zte.net.iservice.impl.ZJInfServices.updateWorkOrderUpdateByRequ";
}
}
|
[
"hxl971230.outlook.com"
] |
hxl971230.outlook.com
|
3588427aa708d47830cdf49d449ec23d02dddcbc
|
71975999c9d702a0883ec9038ce3e76325928549
|
/src2.4.0/src/main/java/com/amap/api/maps/model/TileProvider.java
|
a5f1fe8fa506d2e02953275655520488da5f17ff
|
[] |
no_license
|
XposedRunner/PhysicalFitnessRunner
|
dc64179551ccd219979a6f8b9fe0614c29cd61de
|
cb037e59416d6c290debbed5ed84c956e705e738
|
refs/heads/master
| 2020-07-15T18:18:23.001280
| 2019-09-02T04:21:34
| 2019-09-02T04:21:34
| 205,620,387
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 238
|
java
|
package com.amap.api.maps.model;
public interface TileProvider {
public static final Tile NO_TILE = Tile.obtain(-1, -1, null);
Tile getTile(int i, int i2, int i3);
int getTileHeight();
int getTileWidth();
}
|
[
"xr_master@mail.com"
] |
xr_master@mail.com
|
9a181667eda2a9121e62f5299722710e7c5d7139
|
6d6bc3e4935cc2397b373a1e508a81db2dc503fe
|
/src/main/java/esa/bscs/sps/tmx/client/config/StaticResourcesWebConfiguration.java
|
eb1d49b17f917e699ced1f338cc14fb16bda3abd
|
[] |
no_license
|
angelacarasa/tmx-client
|
9a7a7d9b146d80a1e95a692a7dd9271956284c1f
|
b3caee43c3c24fd86085ee1f39c8e26d697be72b
|
refs/heads/master
| 2023-01-06T18:57:48.952345
| 2020-11-04T13:59:33
| 2020-11-04T13:59:33
| 310,018,911
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,166
|
java
|
package esa.bscs.sps.tmx.client.config;
import io.github.jhipster.config.JHipsterConstants;
import io.github.jhipster.config.JHipsterProperties;
import java.util.concurrent.TimeUnit;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.http.CacheControl;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
@Profile({ JHipsterConstants.SPRING_PROFILE_PRODUCTION })
public class StaticResourcesWebConfiguration implements WebMvcConfigurer {
protected static final String[] RESOURCE_LOCATIONS = new String[] {
"classpath:/static/app/",
"classpath:/static/content/",
"classpath:/static/i18n/",
};
protected static final String[] RESOURCE_PATHS = new String[] { "/app/*", "/content/*", "/i18n/*" };
private final JHipsterProperties jhipsterProperties;
public StaticResourcesWebConfiguration(JHipsterProperties jHipsterProperties) {
this.jhipsterProperties = jHipsterProperties;
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
ResourceHandlerRegistration resourceHandlerRegistration = appendResourceHandler(registry);
initializeResourceHandler(resourceHandlerRegistration);
}
protected ResourceHandlerRegistration appendResourceHandler(ResourceHandlerRegistry registry) {
return registry.addResourceHandler(RESOURCE_PATHS);
}
protected void initializeResourceHandler(ResourceHandlerRegistration resourceHandlerRegistration) {
resourceHandlerRegistration.addResourceLocations(RESOURCE_LOCATIONS).setCacheControl(getCacheControl());
}
protected CacheControl getCacheControl() {
return CacheControl.maxAge(getJHipsterHttpCacheProperty(), TimeUnit.DAYS).cachePublic();
}
private int getJHipsterHttpCacheProperty() {
return jhipsterProperties.getHttp().getCache().getTimeToLiveInDays();
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
b4b2ab04a87bc29c25ea848954b597dddeb7f302
|
09e6690147eedf58189c09546a8b4d50300c725b
|
/weizu-parent/weizu-web-modules/weizu-channel/src/main/java/com/weizu/flowsys/web/channel/pojo/CnelBindPgPo.java
|
6754492edd5d7be6cd3b94a9902d2f3437e614c9
|
[] |
no_license
|
showlofans/weizu_channel
|
3c846e8df738b28db539324c28500d2b82172e83
|
39de1347be4a988acd2aa929d0d52e95dc8dbba9
|
refs/heads/master
| 2022-01-27T09:35:10.396785
| 2022-01-23T12:25:32
| 2022-01-23T12:25:32
| 95,176,460
| 0
| 1
| null | 2018-04-14T10:01:38
| 2017-06-23T02:42:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,436
|
java
|
package com.weizu.flowsys.web.channel.pojo;
import com.weizu.flowsys.core.annotation.po.TableName;
import com.weizu.flowsys.core.beans.Po;
/**
* @description: 通道包体绑定实体
* @projectName:weizu-channel
* @className:CnelBindPgPo.java
* @author:微族通道代码设计人 宁强
* @createTime:2017年9月16日 上午10:39:46
* @version 1.0
*/
@TableName(name="cnel_bind_pg")
public class CnelBindPgPo extends Po {
private Long id;
private Long channelId;
private Integer pgId;
private String channelName;
private String pgName;
public CnelBindPgPo(Long channelId, Integer pgId,
String channelName, String pgName) {
super();
this.channelId = channelId;
this.pgId = pgId;
this.channelName = channelName;
this.pgName = pgName;
}
public CnelBindPgPo() {
super();
// TODO Auto-generated constructor stub
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getChannelId() {
return channelId;
}
public void setChannelId(Long channelId) {
this.channelId = channelId;
}
public Integer getPgId() {
return pgId;
}
public void setPgId(Integer pgId) {
this.pgId = pgId;
}
public String getChannelName() {
return channelName;
}
public void setChannelName(String channelName) {
this.channelName = channelName;
}
public String getPgName() {
return pgName;
}
public void setPgName(String pgName) {
this.pgName = pgName;
}
}
|
[
"1727661035@qq.com"
] |
1727661035@qq.com
|
02c1770703719bd7fb507757ff9da713234ad0b3
|
57ab5ccfc179da80bed6dc6aa1407c2181cee926
|
/co.moviired:adquirencia/src/src/main/java/co/moviired/acquisition/src/main/java/co/moviired/acquisition/service/AcquisitionController.java
|
d36d295a46e3b26a0c5379d6205d7ab7bbdc4b38
|
[] |
no_license
|
sandys/filtro
|
7190e8e8af7c7b138922c133a7a0ffe9b9b8efa7
|
9494d10444983577a218a2ab2e0bbce374c6484e
|
refs/heads/main
| 2022-12-08T20:46:08.611664
| 2020-09-11T09:26:22
| 2020-09-11T09:26:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,340
|
java
|
package co.moviired.acquisition.service;
import co.moviired.acquisition.common.model.dto.IComponentDTO;
import co.moviired.acquisition.common.provider.schedulersupport.SchedulerSupportConnector;
import co.moviired.acquisition.common.config.GlobalProperties;
import co.moviired.acquisition.common.config.StatusCodeConfig;
import co.moviired.acquisition.common.service.IPrimaryController;
import co.moviired.acquisition.model.dto.AcquisitionDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpHeaders;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Mono;
import javax.validation.constraints.NotNull;
import static co.moviired.acquisition.common.util.ConstantsHelper.*;
import static co.moviired.acquisition.util.ConstantsHelper.*;
@Slf4j
@Controller
@RequestMapping(PROJECT_PATH)
public class AcquisitionController extends IPrimaryController<AcquisitionService> {
public AcquisitionController(@NotNull AcquisitionService acquisitionService,
@NotNull GlobalProperties globalProperties,
@NotNull StatusCodeConfig statusCodeConfig,
@NotNull @Qualifier(SCHEDULER_HELPER_API) SchedulerSupportConnector schedulerSupportConnector) {
super(acquisitionService, globalProperties, statusCodeConfig, schedulerSupportConnector);
}
@PostMapping(value = PATH_INCOMM_REQUEST)
public final Mono<ResponseEntity<Mono<IComponentDTO>>> incommRequest(@RequestHeader(value = AUTHORIZATION_HEADER) String authorizationHeader,
@RequestHeader(value = CORRELATIVE_HEADER, required = false) String correlative,
@RequestBody AcquisitionDTO request) {
return assignCorrelative(correlative).flatMap(correlativeId ->
startTransaction(correlativeId, request, getBaseBaseService().incommRequest(correlativeId, authorizationHeader, request)));
}
@PostMapping(value = PATH_PRODUCT_CODE_VALIDATION)
public final Mono<ResponseEntity<Mono<IComponentDTO>>> productValidation(@PathVariable String productIdentifier,
@RequestHeader(value = AUTHORIZATION_HEADER) String authorizationHeader,
@RequestHeader(value = CORRELATIVE_HEADER, required = false) String correlative,
@RequestBody AcquisitionDTO request) {
return assignCorrelative(correlative).flatMap(correlativeId ->
startTransaction(correlativeId, request, getBaseBaseService().productValidation(correlativeId, authorizationHeader, productIdentifier, request)));
}
@PostMapping(value = PATH_PRODUCT_CODE_REDEEM)
public final Mono<ResponseEntity<Mono<IComponentDTO>>> productRedeem(@PathVariable String productIdentifier,
@RequestHeader(value = AUTHORIZATION_HEADER) String authorizationHeader,
@RequestHeader(value = CORRELATIVE_HEADER, required = false) String correlative,
@RequestBody AcquisitionDTO request) {
return assignCorrelative(correlative).flatMap(correlativeId ->
startTransaction(correlativeId, request, getBaseBaseService().productRedeem(correlativeId, authorizationHeader, productIdentifier, request)));
}
@PostMapping(value = PATH_PRODUCT_CODES_CREATION)
public final Mono<ResponseEntity<Mono<IComponentDTO>>> productCodesCreation(@PathVariable String productIdentifier,
@RequestHeader(value = AUTHORIZATION_HEADER) String authorizationHeader,
@RequestHeader(value = CORRELATIVE_HEADER, required = false) String correlative,
@RequestBody AcquisitionDTO request) {
return assignCorrelative(correlative).flatMap(correlativeId ->
startTransaction(correlativeId, request, getBaseBaseService().productCodesCreation(correlativeId, authorizationHeader, productIdentifier, request)));
}
@GetMapping(value = PATH_GET_LOTS_IDENTIFIERS)
public final Mono<ResponseEntity<Mono<IComponentDTO>>> getLotsIdentifiers(@RequestHeader(value = AUTHORIZATION_HEADER) String authorizationHeader,
@RequestHeader(value = CORRELATIVE_HEADER, required = false) String correlative) {
return assignCorrelative(correlative).flatMap(correlativeId ->
startTransaction(correlativeId, getBaseBaseService().getLotsIdentifiers(correlativeId, authorizationHeader)));
}
@PostMapping(value = PATH_GET_PRODUCT_CODES)
public final Mono<ResponseEntity<Object>> getProductCodes(@RequestHeader(value = AUTHORIZATION_HEADER) String authorizationHeader,
@RequestHeader(value = CORRELATIVE_HEADER, required = false) String correlative,
@RequestBody AcquisitionDTO request) {
return assignCorrelative(correlative).flatMap(correlativeId ->
startMonoTransaction(correlativeId, request, getBaseBaseService().getProductCodes(correlativeId, authorizationHeader, request)))
.flatMap(response -> {
try {
boolean cantCreateFile = false;
AcquisitionDTO acquisitionDTO = new AcquisitionDTO();
if (response instanceof AcquisitionDTO) {
acquisitionDTO = (AcquisitionDTO) response;
} else {
cantCreateFile = true;
}
if (!cantCreateFile && (request.getFileName() == null && acquisitionDTO.getProductCodesCSV() == null)) {
cantCreateFile = true;
}
if (cantCreateFile) {
return Mono.just(new ResponseEntity<>(response, HttpStatus.INTERNAL_SERVER_ERROR));
}
HttpHeaders headers = new HttpHeaders();
headers.set(HttpHeaders.CONTENT_DISPOSITION, ATTACHMENT_FILE_NAME + request.getFileName());
return Mono.just(new ResponseEntity<>(acquisitionDTO.getProductCodesCSV(), headers, HttpStatus.OK));
} catch (Exception e) {
return Mono.just(new ResponseEntity<>(new byte[]{}, HttpStatus.INTERNAL_SERVER_ERROR));
}
});
}
}
|
[
"me@deletescape.ch"
] |
me@deletescape.ch
|
5d8883f71a8c1890b7ec82925ad37757c7c7c5b8
|
dfb4d97e5ec3db8f7c00fcef65df05bc5caf6134
|
/chap12/src/sec02/exam01_createThread/BeepThread.java
|
2e57f5bb3c8818bb859a6b6b9e44634934e24e57
|
[] |
no_license
|
kho903/ThisisJava
|
f4ba5a7fb4da1a9b61f06685c4e09199f2280b4d
|
1659dbf3cf511b8c557af5e602dec1a65ccde6e0
|
refs/heads/master
| 2023-02-18T08:47:08.409009
| 2021-01-15T11:28:02
| 2021-01-15T11:28:02
| 322,790,592
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 367
|
java
|
package sec02.exam01_createThread;
import java.awt.Toolkit;
public class BeepThread extends Thread {
@Override
public void run() {
// 비프음을 5번 반복해서 소리나게 하는 작업
Toolkit toolkit = Toolkit.getDefaultToolkit();
for (int i = 0; i < 5; i++) {
toolkit.beep();
try {
Thread.sleep(500);
} catch (Exception e) {}
}
}
}
|
[
"gmldnr2222@naver.com"
] |
gmldnr2222@naver.com
|
d91b7e060d0ff884ca82f1bd69bbbebdbd35ca08
|
d65c0e6413ad20b387afa059803060232c0e8723
|
/src/test/java/com/jitterted/yacht/domain/DiceRollerTest.java
|
a6a6356a0d35375cbbde2f3e60004da1c1070665
|
[
"Apache-2.0"
] |
permissive
|
strager/yacht-tdd
|
ff39a0bec178e31a14080ae67bbbb473a2b93f24
|
c272d2292f50bcbe9cc63115f3e15c7a22918d16
|
refs/heads/master
| 2022-11-22T23:14:36.922082
| 2020-07-29T21:40:02
| 2020-07-29T21:40:02
| 283,607,751
| 0
| 0
|
Apache-2.0
| 2020-07-29T21:40:14
| 2020-07-29T21:40:13
| null |
UTF-8
|
Java
| false
| false
| 1,307
|
java
|
package com.jitterted.yacht.domain;
import org.junit.jupiter.api.Test;
import java.util.Iterator;
import java.util.List;
import static org.assertj.core.api.Assertions.*;
public class DiceRollerTest {
@Test
public void multipleRollsShouldUseDieRoller() throws Exception {
DiceRoller diceRoller = new DiceRoller(new DieRoller() {
private final Iterator<Integer> dice = List.of(5, 1, 4, 2, 3).iterator();
@Override
public int roll() {
return dice.next();
}
});
assertThat(diceRoller.roll())
.isEqualTo(DiceRoll.of(5, 1, 4, 2, 3));
}
@Test
public void reRollKeepingTwoDiceResultsInNewRollIncludingKeptDice() throws Exception {
DiceRoller diceRoller = new DiceRoller(new StubDieRoller(List.of(1, 2, 5)));
List<Integer> keptDice = List.of(3, 3);
DiceRoll diceRoll = diceRoller.reRoll(keptDice);
assertThat(diceRoll)
.isEqualTo(DiceRoll.of(3, 3, 1, 2, 5));
}
@Test
public void reRollKeepingFourDiceResultsInNewRollIncludingKeptDice() throws Exception {
DiceRoller diceRoller = new DiceRoller(new StubDieRoller(List.of(4)));
List<Integer> keptDice = List.of(1, 1, 2, 2);
DiceRoll diceRoll = diceRoller.reRoll(keptDice);
assertThat(diceRoll)
.isEqualTo(DiceRoll.of(1, 1, 2, 2, 4));
}
}
|
[
"tedyoung@gmail.com"
] |
tedyoung@gmail.com
|
0f267eabcfb66e4e143c5214179632fc0746acaa
|
58da62dfc6e145a3c836a6be8ee11e4b69ff1878
|
/src/main/java/com/alipay/api/response/AlipayOpenPublicMatchuserLabelCreateResponse.java
|
0b799d4d54a52cbbf2bd4a890d21c167680aea9b
|
[
"Apache-2.0"
] |
permissive
|
zhoujiangzi/alipay-sdk-java-all
|
00ef60ed9501c74d337eb582cdc9606159a49837
|
560d30b6817a590fd9d2c53c3cecac0dca4449b3
|
refs/heads/master
| 2022-12-26T00:27:31.553428
| 2020-09-07T03:39:05
| 2020-09-07T03:39:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,151
|
java
|
package com.alipay.api.response;
import java.util.List;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
import com.alipay.api.domain.ErrorMatcher;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.open.public.matchuser.label.create response.
*
* @author auto create
* @since 1.0, 2020-01-10 18:09:54
*/
public class AlipayOpenPublicMatchuserLabelCreateResponse extends AlipayResponse {
private static final long serialVersionUID = 7399195851131616416L;
/**
* 用户打标失败数量
*/
@ApiField("error_count")
private Long errorCount;
/**
* 出错的匹配器列表
*/
@ApiListField("error_matchers")
@ApiField("error_matcher")
private List<ErrorMatcher> errorMatchers;
public void setErrorCount(Long errorCount) {
this.errorCount = errorCount;
}
public Long getErrorCount( ) {
return this.errorCount;
}
public void setErrorMatchers(List<ErrorMatcher> errorMatchers) {
this.errorMatchers = errorMatchers;
}
public List<ErrorMatcher> getErrorMatchers( ) {
return this.errorMatchers;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
5061c7296c18532aa504b3fa4f0318a1ad9c3a9b
|
e9c2f8cdcee975a5900ecdc12e50aefc1f8be813
|
/spring-framework/test/org/springframework/web/multipart/cos/CosMultipartResolverTests.java
|
86ef3fef40db52a74bc77e1cd5171bbe89ba20e9
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
z-dp/springsource
|
feee1c285667098b72ff65c95a5e8fa5e2aa4b07
|
e217eeb091c27834409ac5ee55b690b8e669c2e8
|
refs/heads/master
| 2020-04-10T03:19:35.581789
| 2018-12-07T04:10:04
| 2018-12-07T04:10:04
| 160,766,989
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,559
|
java
|
/*
* Copyright 2002-2005 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.web.multipart.cos;
import java.io.File;
import java.io.IOException;
import javax.servlet.ServletException;
import junit.framework.TestCase;
import org.springframework.core.io.FileSystemResource;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockServletContext;
import org.springframework.web.context.support.StaticWebApplicationContext;
import org.springframework.web.multipart.MultipartException;
import org.springframework.web.util.WebUtils;
/**
* INCOMPLETE: How to mock <code>com.oreilly.servlet.MultipartRequest</code>?
* @author Juergen Hoeller
* @since 08.10.2003
*/
public class CosMultipartResolverTests extends TestCase {
public void testWithApplicationContext() throws MultipartException {
StaticWebApplicationContext wac = new StaticWebApplicationContext();
wac.setServletContext(new MockServletContext());
wac.getServletContext().setAttribute(WebUtils.TEMP_DIR_CONTEXT_ATTRIBUTE, new File("mytemp"));
wac.refresh();
CosMultipartResolver resolver = new CosMultipartResolver();
resolver.setMaxUploadSize(1000);
resolver.setDefaultEncoding("enc");
resolver.setServletContext(wac.getServletContext());
assertEquals(1000, resolver.getMaxUploadSize());
assertEquals("enc", resolver.getDefaultEncoding());
assertEquals(new File("mytemp"), resolver.getUploadTempDir());
MockHttpServletRequest originalRequest = new MockHttpServletRequest();
originalRequest.setContentType("multipart/form-data");
originalRequest.addHeader("Content-type", "multipart/form-data");
assertTrue(resolver.isMultipart(originalRequest));
}
public void testWithServletContext() throws ServletException, IOException {
MockServletContext sc = new MockServletContext();
sc.setAttribute(WebUtils.TEMP_DIR_CONTEXT_ATTRIBUTE, new File("mytemp"));
CosMultipartResolver resolver = new CosMultipartResolver(sc);
assertEquals(new File("mytemp"), resolver.getUploadTempDir());
}
public void testMultipartResolution() throws MultipartException, IOException{
MockServletContext sc = new MockServletContext();
MockHttpServletRequest rq = new MockHttpServletRequest(sc);
CosMultipartResolver resolver = new CosMultipartResolver(sc);
resolver.setUploadTempDir(new FileSystemResource("bogusTmpDir"));
try {
resolver.resolveMultipart(rq);
fail("the http request was mocked, expected a MultipartException");
}
catch (MultipartException e){
// expected
}
new File("bogusTmpDir").delete();
}
public void testWithPhysicalFile() throws IOException{
MockServletContext sc = new MockServletContext();
CosMultipartResolver resolver = new CosMultipartResolver(sc);
resolver.setUploadTempDir(new FileSystemResource("bogusTmpDir"));
assertTrue(new File("bogusTmpDir").exists());
new File("bogusTmpDir").delete();
}
}
|
[
"zidp@cyclecentury.com"
] |
zidp@cyclecentury.com
|
c09d886d51ad643b96f50fd0ef8379add9eb93c3
|
3bfbdcfd691cb1cc065cd9a0e7c79474d1caafe3
|
/org.metaborg.core/src/main/java/org/metaborg/core/analysis/AnalyzeResults.java
|
a10fc94bcc636952692175de6a8f7bc09b47a6ab
|
[
"Apache-2.0"
] |
permissive
|
bryanchance/spoofax
|
e40be87e58e2e187a25a27b1f71bc29e935d068f
|
1c5bdc20b5c09584b9fa0fb6c8553c9b84419d25
|
refs/heads/master
| 2023-08-13T06:41:16.482587
| 2021-09-14T14:02:55
| 2021-09-14T14:02:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,055
|
java
|
package org.metaborg.core.analysis;
import java.util.Collection;
import org.metaborg.core.context.IContext;
import com.google.common.collect.Lists;
public class AnalyzeResults<A extends IAnalyzeUnit, AU extends IAnalyzeUnitUpdate> implements IAnalyzeResults<A, AU> {
private final Collection<A> results;
private final Collection<AU> updates;
private final IContext context;
public AnalyzeResults(Collection<A> results, Collection<AU> updates, IContext context) {
this.results = results;
this.updates = updates;
this.context = context;
}
public AnalyzeResults(Collection<A> results, IContext context) {
this(results, Lists.<AU>newArrayList(), context);
}
public AnalyzeResults(IContext context) {
this(Lists.<A>newArrayList(), context);
}
@Override public Collection<A> results() {
return results;
}
@Override public Collection<AU> updates() {
return updates;
}
@Override public IContext context() {
return context;
}
}
|
[
"gabrielkonat@gmail.com"
] |
gabrielkonat@gmail.com
|
085d70c06d13d4a93b22bc36ed75e181cdac4955
|
3464004c6217bb20907a3ab1372c22635809b011
|
/jms-ws-domain/src/main/java/com/jms/domain/ws/WSRolePermissions.java
|
3799ba4853638ac42f222872b7a2297394837060
|
[] |
no_license
|
jmsCompany/jms-server1
|
d675385c22566f6c3b2108aef36d44508924fe95
|
50bef61d1a8929e5d5e71ec4994b23eef9c241ef
|
refs/heads/master
| 2021-01-19T09:29:30.420778
| 2017-08-29T07:03:21
| 2017-08-29T07:03:21
| 87,761,894
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 940
|
java
|
package com.jms.domain.ws;
import java.util.ArrayList;
import java.util.List;
import com.jms.domain.ws.m.WSMachine;
import com.jms.domain.ws.p.WSPCppAndriod;
import com.jms.domain.ws.p.WSPWo;
public class WSRolePermissions implements java.io.Serializable{
private static final long serialVersionUID = 1L;
private Long idRole;
private String role;
private String descrption;
private List<WSMenu> menuList=new ArrayList<WSMenu>();
public Long getIdRole() {
return idRole;
}
public void setIdRole(Long idRole) {
this.idRole = idRole;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public String getDescrption() {
return descrption;
}
public void setDescrption(String descrption) {
this.descrption = descrption;
}
public List<WSMenu> getMenuList() {
return menuList;
}
public void setMenuList(List<WSMenu> menuList) {
this.menuList = menuList;
}
}
|
[
"h-t-ren@icloud.com"
] |
h-t-ren@icloud.com
|
0f3db191ad9d8983852427f8f7ca1e043966d28d
|
ad0fe9f21d55ec64ff72fabf77da92a442463b7e
|
/core/src/test/resources/maven-3-trunk/maven-model-builder/src/main/java/org/apache/maven/model/composition/DependencyManagementImporter.java
|
b6cd7b91d802e0512a466f743a9f81814fbed88f
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
gems-uff/oceano
|
91425da8a11aa0268c9b5c1e2db70013f0152bac
|
a37468dab497c1ffe338bbf06df179bfe27b59d1
|
refs/heads/master
| 2020-12-24T19:27:06.468798
| 2018-11-18T00:20:13
| 2018-11-18T00:20:13
| 13,281,731
| 3
| 3
|
MIT
| 2018-11-18T00:20:13
| 2013-10-02T20:18:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,990
|
java
|
package org.apache.maven.model.composition;
/*
* 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.
*/
import java.util.List;
import org.apache.maven.model.DependencyManagement;
import org.apache.maven.model.Model;
import org.apache.maven.model.building.ModelBuildingRequest;
import org.apache.maven.model.building.ModelProblemCollector;
/**
* Handles the import of dependency management from other models into the target model.
*
* @author Benjamin Bentmann
*/
public interface DependencyManagementImporter
{
/**
* Imports the specified dependency management sections into the given target model.
*
* @param target The model into which to import the dependency management section, must not be <code>null</code>.
* @param sources The dependency management sections to import, may be <code>null</code>.
* @param request The model building request that holds further settings, must not be {@code null}.
* @param problems The container used to collect problems that were encountered, must not be {@code null}.
*/
void importManagement( Model target, List<? extends DependencyManagement> sources, ModelBuildingRequest request,
ModelProblemCollector problems );
}
|
[
"leomurta@ic.uff.br"
] |
leomurta@ic.uff.br
|
7fad01419697a8a864ab44fadde9b6122b7f4fbd
|
c238f72675449d842a9533f975c22dc5f240427e
|
/src/main/java/org/kuali/kra/iacuc/correspondence/IacucProtocolCorrespondenceAuthorizationServiceImpl.java
|
25f67f659451522a2c3a7271032840e9a4a1293d
|
[] |
no_license
|
ua-eas/ksd-kc5.2.1-foundation
|
03df619bbffd24f822e13dd046e78ead2b6cbb8a
|
acf6bd1ef9cf976e7a93e31ad791b33a3c8e3a17
|
refs/heads/development
| 2022-06-09T09:11:24.777326
| 2020-07-06T18:21:17
| 2020-07-06T18:21:17
| 20,941,107
| 0
| 1
| null | 2020-06-15T19:07:36
| 2014-06-17T22:06:46
|
Java
|
UTF-8
|
Java
| false
| false
| 1,384
|
java
|
/*
* Copyright 2005-2014 The Kuali Foundation
*
* Licensed under the Educational Community 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.opensource.org/licenses/ecl1.php
*
* 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.kuali.kra.iacuc.correspondence;
import org.kuali.kra.iacuc.IacucProtocol;
import org.kuali.kra.iacuc.auth.IacucProtocolTask;
import org.kuali.kra.protocol.ProtocolBase;
import org.kuali.kra.protocol.auth.ProtocolTaskBase;
import org.kuali.kra.protocol.correspondence.ProtocolCorrespondenceAuthorizationServiceImplBase;
public class IacucProtocolCorrespondenceAuthorizationServiceImpl extends ProtocolCorrespondenceAuthorizationServiceImplBase
implements IacucProtocolCorrespondenceAuthorizationService {
@Override
protected ProtocolTaskBase getNewProtocolTaskInstanceHook(String taskName, ProtocolBase protocol) {
return new IacucProtocolTask(taskName, (IacucProtocol) protocol);
}
}
|
[
"shaloo@email.arizona.edu"
] |
shaloo@email.arizona.edu
|
71dd0ef008ccf467df9c1662533e6aca6ba7a73f
|
39439b61b8ddb53fb2962b2f26cb9153e555ef88
|
/app/src/main/java/net/nashlegend/sourcewall/request/CallBack.java
|
1930502bfdbc3a9154322833649a0c29e27f0d58
|
[] |
no_license
|
joshuayingwhat/SourceWall
|
874e0dbe2cf5c0a088111d3921af570f89f90560
|
a90e2faf5ed67aede165bde3a60291062a57a444
|
refs/heads/master
| 2023-04-07T16:23:29.878727
| 2017-08-27T08:26:32
| 2017-08-27T08:26:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 329
|
java
|
package net.nashlegend.sourcewall.request;
/**
* http 请求基本回调
*/
public abstract class CallBack<T> implements RequestCallBack<T> {
@Override
public void onRequestProgress(long current, long total) {
}
@Override
public void onResponseProgress(long current, long total, boolean done) {
}
}
|
[
"panzhihuipzh@gmail.com"
] |
panzhihuipzh@gmail.com
|
1fc9b3fe4d41050177150432cede959b27096f29
|
dc769cdcc172ee3e918de45980de5307ca15b680
|
/dropwizard-guicey/src/test/groovy/ru/vyarus/dropwizard/guice/test/reuse/NonStaticManualDeclarationTest.java
|
b78cf13e62ffd2034ab4307b3adb988855708cb6
|
[
"MIT"
] |
permissive
|
xvik/dropwizard-guicey
|
1d2fcfe1182e9bb91bf94fe7beffd04706586ffa
|
4fcef6754a7cfb66449146e375a74d08ea36c182
|
refs/heads/master
| 2023-08-30T23:30:04.315416
| 2023-08-23T03:46:31
| 2023-08-23T03:46:31
| 23,605,023
| 238
| 60
|
MIT
| 2023-09-13T08:51:22
| 2014-09-03T03:22:23
|
Java
|
UTF-8
|
Java
| false
| false
| 3,334
|
java
|
package ru.vyarus.dropwizard.guice.test.reuse;
import com.google.common.truth.Truth;
import io.dropwizard.core.Application;
import io.dropwizard.core.Configuration;
import io.dropwizard.core.setup.Bootstrap;
import io.dropwizard.core.setup.Environment;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.junit.platform.engine.TestExecutionResult;
import org.junit.platform.testkit.engine.EngineTestKit;
import ru.vyarus.dropwizard.guice.GuiceBundle;
import ru.vyarus.dropwizard.guice.module.lifecycle.GuiceyLifecycleAdapter;
import ru.vyarus.dropwizard.guice.module.lifecycle.event.jersey.ApplicationStartedEvent;
import ru.vyarus.dropwizard.guice.module.lifecycle.event.jersey.ApplicationStoppedEvent;
import ru.vyarus.dropwizard.guice.test.jupiter.ext.TestGuiceyAppExtension;
import java.util.ArrayList;
import java.util.List;
import static org.junit.platform.engine.discovery.DiscoverySelectors.selectClass;
/**
* @author Vyacheslav Rusakov
* @since 26.12.2022
*/
public class NonStaticManualDeclarationTest {
public static List<String> actions = new ArrayList<>();
@Test
void checkNotAbstractBase() {
EngineTestKit
.engine("junit-jupiter")
.configurationParameter("junit.jupiter.conditions.deactivate", "org.junit.*DisabledCondition")
.selectors(
selectClass(Test1.class)
)
.execute().allEvents().failed().stream()
// exceptions appended to events log
.forEach(event -> {
Throwable err = event.getPayload(TestExecutionResult.class).get().getThrowable().get();
actions.add("Error: (" + err.getClass().getSimpleName() + ") " + err.getMessage());
});
Assertions.assertEquals(1, actions.size());
Truth.assertThat(actions.get(0)).contains("Failed to find declaration field for");
}
public static class Base {
@RegisterExtension
TestGuiceyAppExtension ext = TestGuiceyAppExtension.forApp(App.class)
.reuseApplication()
.create();
}
@Disabled // prevent direct execution
public static class Test1 extends Base {
@Test
void testSample() {
}
}
public static class App extends Application<Configuration> {
public static int cnt;
@Override
public void initialize(Bootstrap<Configuration> bootstrap) {
cnt++;
bootstrap.addBundle(GuiceBundle.builder()
.listen(new GuiceyLifecycleAdapter() {
@Override
protected void applicationStarted(ApplicationStartedEvent event) {
actions.add("started");
}
@Override
protected void applicationStopped(ApplicationStoppedEvent event) {
actions.add("stopped");
}
})
.build());
}
@Override
public void run(Configuration configuration, Environment environment) throws Exception {
}
}
}
|
[
"vyarus@gmail.com"
] |
vyarus@gmail.com
|
c851cf224b52f199a4bd92d656a19f527e199808
|
f946632b3b47af3b564e1ecf4262f7011c75dfa6
|
/app/src/main/java/com/unitesoft/huanrong/widget/adapter/live/FaBuCeLueAdapter.java
|
10c316a82ed803846ad65cde0ea930ad3d8f8594
|
[] |
no_license
|
zyf19930419/RuiYin
|
34228695899a09c32326199e60f877e8794ccf03
|
aabea64c99c32a20504d17aa4b81bf7c153b01ca
|
refs/heads/master
| 2021-01-15T12:43:54.764120
| 2017-10-16T08:24:41
| 2017-10-16T08:24:41
| 99,656,253
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,055
|
java
|
package com.unitesoft.huanrong.widget.adapter.live;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.support.v4.content.ContextCompat;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.ImageSpan;
import com.unitesoft.huanrong.R;
import java.util.List;
/**
* Created by Mr.zhang on 2017/8/15.
*/
public class FaBuCeLueAdapter extends FragmentStatePagerAdapter {
private List<Fragment> fragments;
private String[] titles = {"操作建议", "跟踪建议"};
private Context mContext;
private Drawable drawable = null;
private String title = null;
public FaBuCeLueAdapter(FragmentManager fm, List<Fragment> fragments, Context mContext) {
super(fm);
this.fragments = fragments;
this.mContext = mContext;
}
@Override
public Fragment getItem(int position) {
return fragments.get(position);
}
@Override
public int getCount() {
return fragments.size();
}
@Override
public CharSequence getPageTitle(int position) {
switch (position) {
case 0:
title = titles[0];
drawable = ContextCompat.getDrawable(mContext, R.mipmap.live_icon_caozuohuang);
break;
case 1:
title = titles[1];
drawable = ContextCompat.getDrawable(mContext, R.mipmap.live_icon_genzong);
break;
}
drawable.setBounds(0, 0, 42, 42);
ImageSpan imageSpan = new ImageSpan(drawable, ImageSpan.ALIGN_BOTTOM);
SpannableString spannableString = new SpannableString(title + " ");
spannableString.setSpan(imageSpan, 7, 8, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
return spannableString;
}
@Override
public int getItemPosition(Object object) {
return POSITION_NONE;
}
}
|
[
"32457127@qq.com"
] |
32457127@qq.com
|
0e72cb804b0ec2c33936db4303090998d19a6ac1
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Chart/21/org/jfree/data/xml/PieDatasetHandler_startElement_95.java
|
05a13090bf98ff07435ef14d0e55cf620dfc5022
|
[] |
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
| 973
|
java
|
org jfree data xml
sax handler read link pie dataset piedataset xml file
pie dataset handler piedatasethandl root handler roothandl dataset tag datasettag
start element
param namespac uri namespaceuri namespac
param local localnam element
param qname element
param att element attribut
sax except saxexcept error
start element startel string namespac uri namespaceuri
string local localnam
string qname
attribut att sax except saxexcept
default handler defaulthandl current current handler getcurrenthandl
current
current start element startel namespac uri namespaceuri local localnam qname att
qname equal piedataset tag
dataset default pie dataset defaultpiedataset
qname equal item tag
item handler itemhandl subhandl item handler itemhandl
handler getsubhandl push subhandl
subhandl start element startel namespac uri namespaceuri local localnam qname att
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
5e2035d9d655bd99c41a2365e258fe4b80c820a2
|
0b2dbb927295b30a983790bbb9769351ac75d8e9
|
/hibernate-validator/src/main/java/org/hibernate/validator/metadata/ConstraintOrigin.java
|
9bab2cb6674166d8ac86dcafe8c08ab766bae433
|
[
"Apache-2.0"
] |
permissive
|
emmanuelbernard/hibernate-validator
|
eae1affc9b9666cc56b25d44a21c43f775870b85
|
30c9f4f03fece74886326ab54d667037a6d74c5d
|
refs/heads/master
| 2021-01-18T07:33:07.223820
| 2010-12-01T15:22:41
| 2010-12-01T15:22:41
| 1,065,664
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,133
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* 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.hibernate.validator.metadata;
/**
* Visibility looked at when discovering constraints.
*
* @author Hardy Ferentschik
*/
public enum ConstraintOrigin {
/**
* Constraint is defined on the root class
*/
DEFINED_LOCALLY,
/**
* Constraint is defined in a super-class or interface of the root class.
*/
DEFINED_IN_HIERARCHY
}
|
[
"hibernate@ferentschik.de"
] |
hibernate@ferentschik.de
|
e7deca4a0c3aab6a3da44e442bfb8256d6225981
|
6045518db77c6104b4f081381f61c26e0d19d5db
|
/datasets/file_version_per_commit_backup/jruby/18d7897ad3a6149aaf212cbcbf4628dd123f49a0.java
|
3c755d1005bb1adda75d20eb1a525cc54d44537b
|
[] |
no_license
|
edisutoyo/msr16_td_removal
|
6e039da7fed166b81ede9b33dcc26ca49ba9259c
|
41b07293c134496ba1072837e1411e05ed43eb75
|
refs/heads/master
| 2023-03-22T21:40:42.993910
| 2017-09-22T09:19:51
| 2017-09-22T09:19:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,975
|
java
|
package org.jruby.compiler.ir;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jruby.util.JavaNameMangler;
public class IR_Method implements IR_BuilderContext
{
IR_BuilderContext _container; // The container for this method (can be a script, class, or module)
String _name; // Ruby name
String _irName; // Generated name
List<IR_Instr> _instrs; // List of ir instructions for this method
private Map<String, Integer> _nextVarIndex;
public IR_Method(String name, boolean isRoot)
{
_name = name;
if (root && Boolean.getBoolean("jruby.compile.toplevel")) {
_irName = name;
} else {
String mangledName = JavaNameMangler.mangleStringForCleanJavaIdentifier(name);
// FIXME: What is this script business here?
_irName = "method__" + script.getAndIncrementMethodIndex() + "$RUBY$" + mangledName;
}
_instrs = new ArrayList<IR_Instr>();
_nextVarIndex = new HashMap<String, Integer>();
}
public Variable getNewVariable(String name)
{
return new Variable(prefix + idx);
}
public Variable getNewVariableWithPrefix(prefix)
{
Integer idx = _nextVarIndex.get(prefix);
if (idx == null)
idx = 0;
_nextVarIndex.put(prefix, idx+1);
return new Variable(prefix + idx);
}
public Variable getNewTmpVariable()
{
return getNewVariableWithPrefix("tmp");
}
public Label getNewLabel()
{
Integer idx = _nextVarIndex.get("LBL_");
if (idx == null)
idx = 0;
_nextVarIndex.put(prefix, idx+1);
return new Label(prefix + idx);
}
// Delegate method to the containing class/module
public StringLiteral getFileName() { return _container.getFileName(); }
public void addInstr(IR_Instr i) { _instrs.append(i); }
}
|
[
"everton.maldonado@gmail.com"
] |
everton.maldonado@gmail.com
|
255b7768e0f8a5e49b03262aea2aaccf4258a912
|
9d172524ec55d7b0d22b3b67941833d9c993933c
|
/depaul/csc435/JokeServer/InetClient.java
|
f8db736158a3e124c8bdfa9891225f3a3d018149
|
[] |
no_license
|
shawnchris/java
|
37b47bdbf2c8e2dfeba5d98e8e4ad3f14f791037
|
02404c0e7468ffd6e18cc1f3246b59314994602c
|
refs/heads/master
| 2023-03-08T14:01:51.243074
| 2023-03-04T02:27:20
| 2023-03-04T02:27:20
| 54,849,893
| 5
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,793
|
java
|
/*--------------------------------------------------------
1. Name / Date: Gao, Shan / Sept 14, 2014
2. Java version used: jre1.7.0_67
3. Precise command-line compilation examples / instructions:
> javac InetClient.java
4. Precise examples / instructions to run this program:
In separate shell windows:
> java InetServer
> java InetClient
All acceptable commands are displayed on the various consoles.
5. List of files needed for running the program.
a. Checklist.html
b. InetServer.java
c. InetClient.java
6. Notes:
----------------------------------------------------------*/
package depaul.csc435.JokeServer;
import java.io.*;
import java.net.*;
public class InetClient {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String serverName;
if (args.length < 1) // No argument
serverName = "localhost"; // Assume server is on localhost
else
serverName = args[0]; // Here is the remote server address
System.out.println("Clark Elliott's Inet Client, 1.7.\n");
System.out.println("Using server: " + serverName + ", Port: 1565");
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
try {
String name;
do {
System.out.print("Enter a hostname or an IP address, (quit) to end: ");
System.out.flush ();
name = in.readLine ();
if (name.indexOf("quit") < 0) // Actually it is not a very good idea. Because I can't query sth like www.quit.com...
getRemoteAddress(name, serverName);
} while (name.indexOf("quit") < 0);
System.out.println ("Cancelled by user request.");
} catch (IOException x) {x.printStackTrace ();}
}
static String toText (byte ip[]) { /* Make portable for 128 bit format */
StringBuffer result = new StringBuffer ();
for (int i = 0; i < ip.length; ++ i) {
if (i > 0) result.append (".");
result.append (0xff & ip[i]);
}
return result.toString ();
}
static void getRemoteAddress (String name, String serverName){
Socket sock;
BufferedReader fromServer;
PrintStream toServer;
String textFromServer;
try{
sock = new Socket(serverName, 1565); // Get a connection to server port 1565
fromServer = new BufferedReader(new InputStreamReader(sock.getInputStream()));
toServer = new PrintStream(sock.getOutputStream());
toServer.println(name); // Send the request to server
toServer.flush();
for (int i = 1; i <=3; i++) { // Print the results get from server
textFromServer = fromServer.readLine();
if (textFromServer != null) System.out.println(textFromServer);
}
sock.close();
} catch (IOException x) {
System.out.println ("Socket error.");
x.printStackTrace ();
}
}
}
|
[
"shawn.chris.gao@outlook.com"
] |
shawn.chris.gao@outlook.com
|
4442924e1c8cedf524367380b746e71a8c08e449
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/14/14_77fbc7c723c420ccbf9956c76d510afe9d717cfd/RadioUtil/14_77fbc7c723c420ccbf9956c76d510afe9d717cfd_RadioUtil_t.java
|
d7bef17d421ed49fff59eda3f2f27a75275dc934
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,523
|
java
|
package radio;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.TimeZone;
import radio.server.RadioServer;
/**
* Utilities for the radio server & client
*
* @author Adam Campbell
*/
public class RadioUtil {
/**
* The server's response when the user login is successful
*/
public static final String VALID_USER_MESSAGE = "GOOD";
/**
* The server's response when the user login is not successful
*/
public static final String INVALID_USER_MESSAGE = "BAD";
/**
* The size of the buffer to be used for reading/writing
*/
public static final int BUFFER_SIZE = 1024;
/**
* Running this class lists all of the communiation ports available
*/
public static void main(String[] args){
CommunicationPortUtil.listPorts();
}
/**
* Flush the input stream by reading until it has nothing left to give
*
* @param in
* The input stream to be flushed
* @throws IOException
* If something goes wrong
*/
public static void flush(InputStream in) throws IOException{
while(in.read() > -1)
;
}
/**
* Clear the buffer by filling it with 0s
*
* @param buf
* The buffer to be cleared
*/
public static void clear(byte[] buf){
for(int i = 0; i < buf.length; i++){
buf[i] = 0;
}
}
/**
* Add the bytes contained in <i>toAdd</i> to <i>base</i>.
*
* @param base
* The array list to which the bytes will be appended
* @param toAdd
* The buffer containing the bytes to add
*/
public static void addBytes(ArrayList<Byte> base, byte[] toAdd){
for(int i = 0; i < toAdd.length; i++){
base.add(toAdd[i]);
}
}
/**
* Get the bytes contained in an array list as an array of byte primitives
*
* @param src
* The array list containing the bytes
* @return An array of byte primitives containing the values, in order,
* present in <i>src</i>
*/
public static byte[] getBytes(ArrayList<Byte> src){
byte[] bytes = new byte[src.size()];
int i = 0;
for(Byte b : src){
bytes[i++] = b;
}
return bytes;
}
/**
* Checks if the message is present in the array list of bytes
*
* @param buffer
* The array list of bytes to check
* @param msg
* The string to look for in the bytes
* @return True, if the string is found in the bytes, false otherwise
*/
public static boolean contains(ArrayList<Byte> buffer, String msg){
String bufString = new String(getBytes(buffer));
return bufString.contains(msg);
}
/**
* Trim the trailing 0s from an array of bytes
*
* @param buf
* The byte array
* @return A new array which is a copy of the original array, truncated such
* that the trailing 0s in the original array are removed.
*/
public static byte[] trimTrailing0s(byte[] buf){
int i;
for(i = 0; i < buf.length && buf[i] != 0; i++)
;
return Arrays.copyOf(buf, i);
}
/**
* Get the directory where the jar file is stored on the computer
*
* @return The jar file's directory on the computer
*/
public static String getJarDirectory(){
String path = RadioServer.class.getProtectionDomain().getCodeSource().getLocation().getPath();
try{
String dir = URLDecoder.decode(path, "UTF-8");
//Get rid of the jar file ending (this happens if we run the server from an .exe)
if(dir.endsWith(".jar")){
dir = dir.substring(0, dir.lastIndexOf('/'));
}
//Make sure there's a directory separator
if(!dir.endsWith("/")){
dir += "/";
}
return dir;
} catch(UnsupportedEncodingException e){
e.printStackTrace();
return "";
}
}
/**
* Backup an array of byte data to a file. The data will be appended to the
* log file, and if the file does not exist, it shall be created. The file
* name will be <i>logBaseString/yyyy-MM-dd.txt</i>, where yyyy-MM-dd is the
* date at which the file is created.
*
* @param buffer
* The byte data to be appended to the file
* @param logBaseString
* The name of the file base directory.
*/
public static void backupData(String data, String logBaseString){
// //Get a timestamp to attach to the message (in local time)
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
// String timeStamp = sdf.format(new Date());
// Get a timestamp from the log entry, so that it can be put in the
// appropriate log file
SimpleDateFormat logsdf = new SimpleDateFormat("yyyy-MM-dd");
logsdf.setTimeZone(TimeZone.getTimeZone("UTC"));
String logTimeStamp = logsdf.format(new Date());
// Get a text log and append the message to it
BufferedWriter out;
File logDir = new File(logBaseString);
if(!logDir.exists() || !logDir.isDirectory()){
logDir.mkdirs();
}
try{
out = new BufferedWriter(new FileWriter(new File(logBaseString + logTimeStamp + ".txt"), true));
if(data.length() > 0){
out.write(data + "\n");
}
out.close();
} catch(Exception e){
System.err.println("Error writing to log file!");
e.printStackTrace();
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
fb5dd99ed062abd1d7e48a906960c20ebb1eee63
|
74b2e8708cfe013527704c257e680020aaf8eb3c
|
/src/org/jfree/util/ReadOnlyIterator.java
|
6bbabd0fccc27c77a4d7263cdf6b45057b278822
|
[] |
no_license
|
elfkingw/caipiao
|
7d9768683d50fa92d62f14dc19905eba45a90eba
|
65a0ee0722765ba359e1e88263384b20f3272bcf
|
refs/heads/master
| 2021-06-04T05:40:46.490377
| 2019-02-02T09:10:07
| 2019-02-02T09:10:07
| 10,156,520
| 1
| 1
| null | 2013-05-20T14:41:26
| 2013-05-19T14:26:25
|
Java
|
UTF-8
|
Java
| false
| false
| 3,074
|
java
|
/* ========================================================================
* JCommon : a free general purpose class library for the Java(tm) platform
* ========================================================================
*
* (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jcommon/index.html
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* [Java is a trademark or registered trademark of Sun Microsystems, Inc.
* in the United States and other countries.]
*
* ---------------------
* ReadOnlyIterator.java
* ---------------------
* (C)opyright 2003, 2004, by Thomas Morgner and Contributors.
*
* Original Author: Thomas Morgner;
* Contributor(s): -;
*
* $Id: ReadOnlyIterator.java,v 1.2 2005/10/18 13:24:19 mungady Exp $
*
* Changes
* -------------------------
* 18-Jul-2003 : Initial version
*
*/
package org.jfree.util;
import java.util.Iterator;
/**
* Protects an given iterator by preventing calls to remove().
*
* @author Thomas Morgner
*/
public class ReadOnlyIterator implements Iterator {
/** The base iterator which we protect. */
private Iterator base;
/**
* Creates a new read-only iterator for the given iterator.
*
* @param it the iterator.
*/
public ReadOnlyIterator(final Iterator it) {
if (it == null) {
throw new NullPointerException("Base iterator is null.");
}
this.base = it;
}
/**
* Returns <tt>true</tt> if the iteration has more elements. (In other
* words, returns <tt>true</tt> if <tt>next</tt> would return an element
* rather than throwing an exception.)
*
* @return <tt>true</tt> if the iterator has more elements.
*/
public boolean hasNext() {
return this.base.hasNext();
}
/**
* Returns the next element in the iteration.
* Throws NoSuchElementException when iteration has no more elements.
*
* @return the next element in the iteration.
*/
public Object next() {
return this.base.next();
}
/**
* Throws <code>UnsupportedOperationException</code>.
*/
public void remove() {
throw new UnsupportedOperationException();
}
}
|
[
"elfkingw@gmail.com"
] |
elfkingw@gmail.com
|
900f863eb6dc57d71ff7e2ebf13ca05dfa67c7fc
|
d9c5877bb700b814dcaacf025cd2d3901260ff09
|
/latte-core/src/main/java/com/ascend/wangfeng/latte/ui/recycler/BaseDecoration.java
|
21373e96f58897282691a00342974347a04f0c34
|
[] |
no_license
|
wangfengye/MapleEC
|
db6e0859dee715e1e222090069ce7b5ba2c03eb7
|
3641d0162f071e9192604c07cca920517d4de938
|
refs/heads/master
| 2021-06-26T03:19:30.230817
| 2019-02-21T08:10:45
| 2019-02-21T08:10:45
| 100,348,964
| 12
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,257
|
java
|
package com.ascend.wangfeng.latte.ui.recycler;
import android.support.annotation.ColorInt;
import com.choices.divider.Divider;
import com.choices.divider.DividerItemDecoration;
/**
* Created by fengye on 2017/8/28.
* email 1040441325@qq.com
*/
public class BaseDecoration extends DividerItemDecoration {
public BaseDecoration(@ColorInt int color, int size) {
setDividerLookup( new LookupImpl(color,size));
}
public static BaseDecoration create(@ColorInt int color, int size){
return new BaseDecoration(color,size);
}
public class LookupImpl implements DividerLookup {
private final int COLOR;
private final int SIZE;
public LookupImpl(int color, int size) {
this.COLOR = color;
this.SIZE = size;
}
@Override
public Divider getVerticalDivider(int position) {
return new Divider.Builder()
.size(SIZE)
.color(COLOR)
.build();
}
@Override
public Divider getHorizontalDivider(int position) {
return new Divider.Builder()
.size(SIZE)
.color(COLOR)
.build();
}
}
}
|
[
"1040441325@qq.com"
] |
1040441325@qq.com
|
f3333a9a49609ea37053746defa137bee6900a09
|
e4aea93f2988e2cf1be4f96a39f6cc3328cbbd50
|
/src/com/flagleader/manager/c/a/aR.java
|
089e2606e8a712c94da3ab3efe277e44ac412fe4
|
[] |
no_license
|
lannerate/ruleBuilder
|
18116282ae55e9d56e9eb45d483520f90db4a1a6
|
b5d87495990aa1988adf026366e92f7cbb579b19
|
refs/heads/master
| 2016-09-05T09:13:43.879603
| 2013-11-10T08:32:58
| 2013-11-10T08:32:58
| 14,231,127
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 676
|
java
|
package com.flagleader.manager.c.a;
import com.flagleader.manager.c.c.f;
import com.flagleader.repository.soap.SoapService;
public class aR
implements f
{
public aR(aL paramaL)
{
}
public String a()
{
return this.a.f().getParamNS();
}
public boolean a(String paramString)
{
if (!this.a.f().getParamNS().equals(paramString))
{
this.a.f().setParamNS(paramString.toString());
this.a.f().setModified(true);
return true;
}
return false;
}
}
/* Location: D:\Dev_tools\ruleEngine\rbuilder.jar
* Qualified Name: com.flagleader.manager.c.a.aR
* JD-Core Version: 0.6.0
*/
|
[
"zhanghuizaizheli@hotmail.com"
] |
zhanghuizaizheli@hotmail.com
|
45eb623ea53dc5b936f4ce57cf23e3ce0a21fe86
|
0b214efa15c6f758ee4d5a85d6030018ae23c09f
|
/Themes/25. Generics/src/BoxIntegerContainer.java
|
1f275e70a6eff47838edc954fa6c843a47f7f949
|
[] |
no_license
|
oleg-romanov/11-702
|
69c8a343d34bf005d55387e8b5cd9b29a2a24e64
|
a6e026c85c6ea9f43569faf65ea94be4fb7d5912
|
refs/heads/master
| 2023-02-17T12:35:29.943713
| 2019-05-28T10:52:05
| 2019-05-28T10:52:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 321
|
java
|
/**
* 20.02.2018
* BoxIntegerContainer
*
* @author Sidikov Marsel (First Software Engineering Platform)
* @version v1.0
*/
public class BoxIntegerContainer implements IntegerContainer {
@Override
public void put(Integer value) {
}
@Override
public Integer get() {
return null;
}
}
|
[
"sidikov.marsel@gmail.com"
] |
sidikov.marsel@gmail.com
|
26c2cb2b46fc5a9a3e3d0fb21050950f29546b4a
|
29e184b262bb73e7301fca6b8069c873e910111c
|
/src/main/java/com/example/jaxb/fpml/recordkeeping/CreditDefaultSwapOption.java
|
a6b578a82127878b7b6e5bcd56c7fb7e346bcda7
|
[] |
no_license
|
oliversalmon/fpml
|
6c0578d8b2460e3976033fa9aea4254341aba65b
|
cecf5321e750bbb88c14e9bd75ee341acdccc444
|
refs/heads/master
| 2020-04-03T17:41:00.682605
| 2018-10-30T20:58:56
| 2018-10-30T20:58:56
| 155,455,414
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,313
|
java
|
package com.example.jaxb.fpml.recordkeeping;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* A complex type to support the credit default swap option.
*
* <p>Java class for CreditDefaultSwapOption complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="CreditDefaultSwapOption">
* <complexContent>
* <extension base="{http://www.fpml.org/FpML-5/recordkeeping}OptionBaseExtended">
* <sequence>
* <element name="clearingInstructions" type="{http://www.fpml.org/FpML-5/recordkeeping}SwaptionPhysicalSettlement" minOccurs="0"/>
* <element name="strike" type="{http://www.fpml.org/FpML-5/recordkeeping}CreditOptionStrike"/>
* <element name="creditDefaultSwap" type="{http://www.fpml.org/FpML-5/recordkeeping}CreditDefaultSwap"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CreditDefaultSwapOption", namespace = "http://www.fpml.org/FpML-5/recordkeeping")
public class CreditDefaultSwapOption
extends OptionBaseExtended
{
}
|
[
"oliver.salmon@gmail.com"
] |
oliver.salmon@gmail.com
|
e4d726ce508806f1e30cd7061c967a6efcfa5e9e
|
6d60a8adbfdc498a28f3e3fef70366581aa0c5fd
|
/codebase/selected/seltrans/358884.java
|
348f31adc7d4f860a5796912a183d01b53707a11
|
[] |
no_license
|
rayhan-ferdous/code2vec
|
14268adaf9022d140a47a88129634398cd23cf8f
|
c8ca68a7a1053d0d09087b14d4c79a189ac0cf00
|
refs/heads/master
| 2022-03-09T08:40:18.035781
| 2022-02-27T23:57:44
| 2022-02-27T23:57:44
| 140,347,552
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,493
|
java
|
package playground . mmoyo . ptRouterAdapted . precalculation ;
import java . io . BufferedWriter ;
import java . io . File ;
import java . io . FileWriter ;
import java . io . IOException ;
import java . util . ArrayList ;
import java . util . List ;
import java . util . Map ;
import java . util . TreeMap ;
import org . matsim . api . core . v01 . Id ;
import org . matsim . api . core . v01 . population . Person ;
import org . matsim . api . core . v01 . population . Plan ;
import org . matsim . api . core . v01 . population . Population ;
import org . matsim . api . core . v01 . population . PopulationWriter ;
import org . matsim . core . basic . v01 . IdImpl ;
import org . matsim . core . scenario . ScenarioImpl ;
import org . matsim . core . scenario . ScenarioUtils ;
import org . matsim . core . config . ConfigUtils ;
import playground . mmoyo . utils . DataLoader ;
public class ptRouteAdder {
public static void main ( String [ ] args ) {
String plansDir = "../playgrounds/mmoyo/output/precalculation/routed3150/" ;
String basePopfile = "../playgrounds/mmoyo/output/precalculation/FragPersArea_812020_3.xml" ;
File plansDirfile = new File ( plansDir ) ;
String [ ] plansArray = plansDirfile . list ( ) ;
Map < Id , List < Id > > clonsMap = new TreeMap < Id , List < Id > > ( ) ;
DataLoader loader = new DataLoader ( ) ;
Population basePop = loader . readPopulation ( basePopfile ) ;
Population newPop = ( ( ScenarioImpl ) ScenarioUtils . createScenario ( ConfigUtils . createConfig ( ) ) ) . getPopulation ( ) ;
PlanPTRoutesComparator planPTRoutesComparator = new PlanPTRoutesComparator ( ) ;
for ( int i = 0 ; i < plansArray . length ; i ++ ) {
String fileName = plansArray [ i ] ;
String strId = fileName . substring ( 11 , fileName . length ( ) - 9 ) ;
String filePath = plansDir + fileName ;
Population popX = loader . readPopulation ( filePath ) ;
for ( Person person : basePop . getPersons ( ) . values ( ) ) {
Person personX = popX . getPersons ( ) . get ( person . getId ( ) ) ;
Plan planX = personX . getSelectedPlan ( ) ;
if ( ! clonsMap . containsKey ( person . getId ( ) ) ) {
clonsMap . put ( person . getId ( ) , new ArrayList < Id > ( ) ) ;
}
List < Id > clonsList = clonsMap . get ( person . getId ( ) ) ;
boolean exists = false ;
for ( Id idClon : clonsList ) {
Plan clonPlan = newPop . getPersons ( ) . get ( idClon ) . getSelectedPlan ( ) ;
exists = exists || planPTRoutesComparator . haveSamePtRoutes ( clonPlan , planX ) ;
if ( exists ) break ;
}
if ( ! exists ) {
String strNewId = personX . getId ( ) . toString ( ) + strId ;
Id newId = new IdImpl ( strNewId ) ;
personX . setId ( newId ) ;
newPop . addPerson ( personX ) ;
clonsMap . get ( person . getId ( ) ) . add ( newId ) ;
}
}
fileName = null ;
strId = null ;
filePath = null ;
popX = null ;
}
String outputFile = "../playgrounds/mmoyo/output/precalculation/routed3150/allRoutes.xml" ;
String net = "../shared-svn/studies/countries/de/berlin-bvg09/pt/nullfall_berlin_brandenburg/input/network_multimodal.xml.gz" ;
System . out . println ( "writing output plan file..." + outputFile ) ;
PopulationWriter popwriter = new PopulationWriter ( newPop , loader . readNetwork ( net ) ) ;
popwriter . write ( outputFile ) ;
System . out . println ( "done" ) ;
File file = new File ( basePopfile ) ;
file . getParent ( ) ;
String ctrln = "\n" ;
try {
BufferedWriter bufferedWriter = new BufferedWriter ( new FileWriter ( file . getParent ( ) + "/agents.txt" ) ) ;
for ( Person person : newPop . getPersons ( ) . values ( ) ) {
bufferedWriter . write ( person . getId ( ) . toString ( ) + ctrln ) ;
}
bufferedWriter . close ( ) ;
} catch ( IOException e ) {
e . printStackTrace ( ) ;
}
}
}
|
[
"aaponcseku@gmail.com"
] |
aaponcseku@gmail.com
|
40332c206c304a2d147340b72c87f9b9b43a5a7d
|
b47489e86b1779013a98b18eb8430030dd7afb83
|
/HowTomcatWorks/HowTomcatWorks/tomcat/4/4.1.12/jakarta-tomcat-4.1.12-src/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ListResourceLinksAction.java
|
c7dd1a383a472eaf8a4bed796927d09719dee44c
|
[
"Apache-2.0",
"Apache-1.1",
"LicenseRef-scancode-mx4j"
] |
permissive
|
cuiyuemin365/books
|
66be7059d309745a8045426fc193439b95a288e4
|
4ffdd959b4fc894f085ee5e80031ff8f77d475e6
|
refs/heads/master
| 2023-01-09T19:30:48.718134
| 2021-04-08T07:52:00
| 2021-04-08T07:52:00
| 120,096,744
| 0
| 0
|
Apache-2.0
| 2023-01-02T21:56:51
| 2018-02-03T14:08:45
|
Java
|
UTF-8
|
Java
| false
| false
| 7,709
|
java
|
/*
* $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ListResourceLinksAction.java,v 1.4 2002/06/19 21:21:02 amyroh Exp $
* $Revision: 1.4 $
* $Date: 2002/06/19 21:21:02 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.webapp.admin.resources;
import java.io.IOException;
import java.net.URLDecoder;
import java.util.Locale;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.util.MessageResources;
import org.apache.webapp.admin.ApplicationServlet;
/**
* <p>Retrieve the set of MBean names for all currently defined resource links,
* and expose them in a request attribute named "resourceLinksForm". This action
* requires the following request parameters to be set:</p>
* <ul>
* <li><strong>forward</strong> - Global forward to which we should
* go after stashing the resourceLinks list.</li>
* </ul>
*
* @author Amy Roh
* @version $Revision: 1.4 $ $Date: 2002/06/19 21:21:02 $
* @since 4.1
*/
public class ListResourceLinksAction extends Action {
// ----------------------------------------------------- Instance Variables
/**
* The MBeanServer we will be interacting with.
*/
private MBeanServer mserver = null;
/**
* The MessageResources we will be retrieving messages from.
*/
private MessageResources resources = null;
// --------------------------------------------------------- Public Methods
/**
* Process the specified HTTP request, and create the corresponding HTTP
* response (or forward to another web component that will create it).
* Return an <code>ActionForward</code> instance describing where and how
* control should be forwarded, or <code>null</code> if the response has
* already been completed.
*
* @param mapping The ActionMapping used to select this instance
* @param actionForm The optional ActionForm bean for this request (if any)
* @param request The HTTP request we are processing
* @param response The HTTP response we are creating
*
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet exception occurs
*/
public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
// Look up the components we will be using as needed
if (mserver == null) {
mserver = ((ApplicationServlet) getServlet()).getServer();
}
if (resources == null) {
resources = getServlet().getResources();
}
HttpSession session = request.getSession();
Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY);
String resourcetype = request.getParameter("resourcetype");
String path = request.getParameter("path");
String host = request.getParameter("host");
String service = request.getParameter("service");
if (resourcetype != null) {
resourcetype = URLDecoder.decode(resourcetype);
}
if (path != null) {
path = URLDecoder.decode(path);
}
if (host != null) {
host = URLDecoder.decode(host);
}
if (service != null) {
service = URLDecoder.decode(service);
}
// Create a form bean containing the requested MBean Names
ResourceLinksForm resourceLinksForm = null;
try {
resourceLinksForm =
ResourceUtils.getResourceLinksForm(mserver, resourcetype,
path, host, service);
} catch (Exception e) {
getServlet().log(resources.getMessage
(locale,
"users.error.attribute.get", "resources"), e);
response.sendError
(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
resources.getMessage
(locale, "users.error.attribute.get", "resources"));
}
// Stash the results in request scope
request.setAttribute("resourceLinksForm", resourceLinksForm);
saveToken(request);
String forward =
URLDecoder.decode(request.getParameter("forward"));
return (mapping.findForward(forward));
}
}
|
[
"cuiyuemin@mofanghr.com"
] |
cuiyuemin@mofanghr.com
|
8cd9a6b11a2af451f0eaafc850ecfae8b03977d6
|
a6923e1e56cdbc8bc354cba3e4f699c5f132ae1a
|
/api/app-client-api/app-client-api-service/src/main/java/com/fenlibao/p2p/service/pay/ILianLianPayService.java
|
c1529533702304487e6c2e8294dd1f7641b00874
|
[] |
no_license
|
mddonly/modules
|
851b8470069aca025ea63db4b79ad281e384216f
|
22dd100304e86a17bea733a8842a33123f892312
|
refs/heads/master
| 2020-03-28T03:26:51.960201
| 2018-05-11T02:24:37
| 2018-05-11T02:24:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,252
|
java
|
package com.fenlibao.p2p.service.pay;
import java.util.Map;
import com.fenlibao.lianpay.v_1_0.vo.PayDataBean;
import com.fenlibao.p2p.model.entity.UserInfo;
import com.fenlibao.p2p.model.entity.pay.PaymentOrderEntity;
import com.fenlibao.p2p.model.vo.pay.RefundVO;
public interface ILianLianPayService {
/**
* 通过银行卡号查询银行卡信息
* @param bankCode
* @return
* @throws Throwable
*/
String queryBankCardByNo(String bankCardNo) throws Throwable;
/**
* 设置wap请求所需的参数
* @param param
* @throws Exception
*/
void setParamsForWap(Map<String, String> param) throws Exception;
/**
* 如果为测试模式测设置测试参数(放最后)
* @param param
* @throws Exception
*/
void setParamsForTest(Map<String, String> param) throws Exception;
/**
* 设置请求参数用户信息
* @param param
* @param userId
* @return
* @throws Throwable
*/
UserInfo setUserInfo(Map<String, String> param, Integer userId) throws Throwable;
/**
* 连连快捷支付回调确认
* TODO 这里可定义成一个统一的接口,不同业务实现处理
* @param data
* @throws Exception
*/
PaymentOrderEntity callbackConfirm(PayDataBean payDataBean) throws Exception;
}
|
[
"13632415004@163.com"
] |
13632415004@163.com
|
c0fe560400c693abf2b73eceec50841bb4fa2aeb
|
2bf30c31677494a379831352befde4a5e3d8ed19
|
/internalLibraries/models/src/main/java/com/emc/storageos/model/host/HostInterfaceRestRep.java
|
96b4c41e9957113e7d2d7753bf5e719010839828
|
[] |
no_license
|
dennywangdengyu/coprhd-controller
|
fed783054a4970c5f891e83d696a4e1e8364c424
|
116c905ae2728131e19631844eecf49566e46db9
|
refs/heads/master
| 2020-12-30T22:43:41.462865
| 2015-07-23T18:09:30
| 2015-07-23T18:09:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,737
|
java
|
/*
* Copyright 2015 EMC Corporation
* All Rights Reserved
*/
package com.emc.storageos.model.host;
import javax.xml.bind.annotation.XmlElement;
import com.emc.storageos.model.DataObjectRestRep;
import com.emc.storageos.model.RelatedResourceRep;
/**
* Super class of host interfaces.
* @see IpInterfaceRestRep
* @see com.emc.storageos.model.host.InitiatorRestRep
* @author elalih
*
*/
public abstract class HostInterfaceRestRep extends DataObjectRestRep {
private RelatedResourceRep host;
private String protocol;
private String registrationStatus;
public HostInterfaceRestRep() {}
public HostInterfaceRestRep(RelatedResourceRep host, String protocol) {
this.host = host;
this.protocol = protocol;
}
/**
* The host where the interface belongs.
* @valid none
*/
@XmlElement(name = "host")
public RelatedResourceRep getHost() {
return host;
}
public void setHost(RelatedResourceRep host) {
this.host = host;
}
/**
* The host interface protocol.
* @valid none
*/
@XmlElement(name = "protocol")
public String getProtocol() {
return protocol;
}
public void setProtocol(String protocol) {
this.protocol = protocol;
}
/**
* The host interface registration status.
* Only registered hosts can be used for provisioning operations.
* @valid UNREGISTERED
* @valid REGISTERED
*/
@XmlElement(name = "registration_status")
public String getRegistrationStatus() {
return registrationStatus;
}
public void setRegistrationStatus(String registrationStatus) {
this.registrationStatus = registrationStatus;
}
}
|
[
"review-coprhd@coprhd.org"
] |
review-coprhd@coprhd.org
|
d6f7f1df33232bdd58d1a01c055361c8b2fa3f46
|
dfac1eb4ac647b96f311a7cdd07dec558a209bd6
|
/src/com/zjxjwxk/leetcode/_1006_Clumsy_Factorial/Solution2.java
|
2eabf8858ed7b80fb5742bb36128f8da9ae51050
|
[] |
no_license
|
zjxjwxk/LeetCode
|
7f8e91edb23b24bbedbff6cca49c32e4e3bd78bf
|
99a8a17fa1417b066bbd204ab7170fdcb5295532
|
refs/heads/master
| 2023-08-25T18:46:11.137419
| 2023-08-15T08:10:45
| 2023-08-15T08:10:45
| 141,663,719
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 690
|
java
|
package com.zjxjwxk.leetcode._1006_Clumsy_Factorial;
/**
* 数学
* 时间复杂度O(1)
* 空间复杂度O(1)
* @author Xinkang Wu
* @date 2021/4/5 19:35
*/
public class Solution2 {
public int clumsy(int N) {
if (N == 1) {
return 1;
} else if (N == 2) {
return 2;
} else if (N == 3) {
return 6;
} else if (N == 4) {
return 7;
}
int remain = N % 4;
if (remain == 0) {
return N + 1;
} else if (remain == 1) {
return N + 2;
} else if (remain == 2) {
return N + 2;
} else {
return N - 1;
}
}
}
|
[
"zjxjwxk@gmail.com"
] |
zjxjwxk@gmail.com
|
2673998fead2278486fb23740fc4f3a84a875e6c
|
22ae815239fd5da370cec1ecb6523625594b96a0
|
/13/serverTry2/src/server/GetPage.java
|
e13c25db84128ec1f6f09ab2d90f525ffbfdabdc
|
[] |
no_license
|
HalapsikoN/SPOVM
|
16a5bab8ccf85d2170c55da28423c31486927fc8
|
e50f91312601e0331aa4eae1f31080219fc68bd0
|
refs/heads/master
| 2020-04-28T07:15:43.138194
| 2019-04-19T23:39:51
| 2019-04-19T23:39:51
| 175,085,557
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,492
|
java
|
package server;
import inputExceptionsMongo.NoHeaderEcxeption;
import inputExceptionsMongo.NoSuchElementInDBException;
import mongo.MongoWorkNote;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebServlet("/server/get")
public class GetPage extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
req.getRequestDispatcher("/WEB-INF/get.jsp").forward(req,resp);
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String header=req.getParameter("header");
MongoWorkNote mongo=new MongoWorkNote();
try {
String information=mongo.getByHeader(header);
req.setAttribute("inf", information);
req.getRequestDispatcher("/WEB-INF/getDone.jsp").forward(req,resp);
} catch (NoHeaderEcxeption ex) {
req.setAttribute("exception", ex.getMessage());
req.getRequestDispatcher("/WEB-INF/getException.jsp").forward(req,resp);
} catch (NoSuchElementInDBException ex) {
req.setAttribute("head", header);
req.getRequestDispatcher("/WEB-INF/getNoSuchElement.jsp").forward(req,resp);
}
}
}
|
[
"halapsikon@mail.ru"
] |
halapsikon@mail.ru
|
eb531e452f9ac0e93d77b014a21ab4a1406ffd77
|
fea07f0dd2555f7b51e3cdd15e96812820499aea
|
/hedera-node/src/main/java/com/hedera/services/fees/bootstrap/JsonToProtoSerde.java
|
3e49334250e00f329abfae7eb80bb1721c09a24b
|
[
"Apache-2.0"
] |
permissive
|
Vinci-zZ/hedera-services
|
e663c3dc1aae8742d92b0031727861c5fb323c97
|
afa3afb5041a908a783fc0b91c61facc532a7463
|
refs/heads/master
| 2023-02-28T03:44:11.524812
| 2021-02-06T06:26:00
| 2021-02-06T06:26:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,717
|
java
|
package com.hedera.services.fees.bootstrap;
/*-
*
* Hedera Services Node
*
* Copyright (C) 2018 - 2020 Hedera Hashgraph, LLC
*
* 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.
*
*/
import com.fasterxml.jackson.databind.ObjectMapper;
import com.hederahashgraph.api.proto.java.CurrentAndNextFeeSchedule;
import com.hederahashgraph.api.proto.java.FeeComponents;
import com.hederahashgraph.api.proto.java.FeeData;
import com.hederahashgraph.api.proto.java.FeeSchedule;
import com.hederahashgraph.api.proto.java.HederaFunctionality;
import com.hederahashgraph.api.proto.java.TimestampSeconds;
import com.hederahashgraph.api.proto.java.TransactionFeeSchedule;
import java.io.InputStream;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Map;
/**
* Provides data binding from the fee schedules JSON created by
* the Hedera product team, to the {@link CurrentAndNextFeeSchedule}
* protobuf type.
*
* @author Michael Tinker
*/
@SuppressWarnings("unchecked")
public class JsonToProtoSerde {
private static String[] FEE_SCHEDULE_KEYS = { "currentFeeSchedule", "nextFeeSchedule" };
private static final String EXPIRY_TIME_KEY = "expiryTime";
private static final String TXN_FEE_SCHEDULE_KEY = "transactionFeeSchedule";
private static final String FEE_DATA_KEY = "feeData";
private static final String HEDERA_FUNCTION_KEY = "hederaFunctionality";
private static final String[] FEE_COMPONENT_KEYS = { "nodedata", "networkdata", "servicedata" };
private static final String[] RESOURCE_KEYS =
{ "constant", "bpt", "vpt", "rbh", "sbh", "gas", "bpr", "sbpr", "min", "max" };
public static CurrentAndNextFeeSchedule loadFeeScheduleFromJson(String jsonResource) throws Exception {
CurrentAndNextFeeSchedule.Builder feeSchedules = CurrentAndNextFeeSchedule.newBuilder();
List<Map<String, Object>> rawFeeSchedules = asMapList(jsonResource);
int i = 0;
for (String rawFeeSchedule : FEE_SCHEDULE_KEYS) {
set(
CurrentAndNextFeeSchedule.Builder.class,
feeSchedules,
rawFeeSchedule,
FeeSchedule.class,
bindFeeScheduleFrom((List<Map<String, Object>>)rawFeeSchedules.get(i++).get(rawFeeSchedule)));
}
return feeSchedules.build();
}
static List<Map<String, Object>> asMapList(String jsonResource) {
ObjectMapper om = new ObjectMapper();
try (InputStream in = JsonToProtoSerde.class.getClassLoader().getResourceAsStream(jsonResource)) {
return (List<Map<String, Object>>)om.readValue(in, List.class);
} catch (Exception e) {
throw new IllegalStateException(String.format("Cannot load fee schedules '%s'!", jsonResource), e);
}
}
static FeeSchedule bindFeeScheduleFrom(List<Map<String, Object>> rawFeeSchedule) throws Exception {
FeeSchedule.Builder feeSchedule = FeeSchedule.newBuilder();
for (Map<String, Object> part : rawFeeSchedule) {
if (part.containsKey(EXPIRY_TIME_KEY)) {
long expiry = Long.parseLong(part.get(EXPIRY_TIME_KEY) + "");
feeSchedule.setExpiryTime(TimestampSeconds.newBuilder().setSeconds(expiry));
} else {
feeSchedule.addTransactionFeeSchedule(bindTxnFeeScheduleFrom(
(Map<String, Object>)part.get(TXN_FEE_SCHEDULE_KEY)));
}
}
return feeSchedule.build();
}
static TransactionFeeSchedule bindTxnFeeScheduleFrom(Map<String, Object> rawTxnFeeSchedule) throws Exception {
TransactionFeeSchedule.Builder txnFeeSchedule = TransactionFeeSchedule.newBuilder();
var key = translateClaimFunction((String)rawTxnFeeSchedule.get(HEDERA_FUNCTION_KEY));
txnFeeSchedule.setHederaFunctionality(HederaFunctionality.valueOf(key));
txnFeeSchedule.setFeeData(bindFeeDataFrom((Map<String, Object>)rawTxnFeeSchedule.get(FEE_DATA_KEY)));
return txnFeeSchedule.build();
}
private static String translateClaimFunction(String key) {
if (key.equals("CryptoAddClaim")) {
return "CryptoAddLiveHash";
} else if (key.equals("CryptoDeleteClaim")) {
return "CryptoDeleteLiveHash";
} else if (key.equals("CryptoGetClaim")) {
return "CryptoGetLiveHash";
} else {
return key;
}
}
static FeeData bindFeeDataFrom(Map<String, Object> rawFeeData) throws Exception {
FeeData.Builder feeData = FeeData.newBuilder();
for (String feeComponent : FEE_COMPONENT_KEYS) {
set(
FeeData.Builder.class,
feeData,
feeComponent,
FeeComponents.class,
bindFeeComponentsFrom((Map<String, Object>)rawFeeData.get(feeComponent)));
}
return feeData.build();
}
static FeeComponents bindFeeComponentsFrom(Map<String, Object> rawFeeComponents) throws Exception {
FeeComponents.Builder feeComponents = FeeComponents.newBuilder();
for (String resource : RESOURCE_KEYS) {
set(
FeeComponents.Builder.class,
feeComponents,
resource,
long.class,
Long.parseLong(rawFeeComponents.get(resource) + ""));
}
return feeComponents.build();
}
static <R, T> void set(Class<R> builderType, R builder, String property, Class<T> valueType, T value) throws Exception {
Method setter = builderType.getDeclaredMethod(setterName(property), valueType);
setter.invoke(builder, value);
}
static String setterName(String property) {
return "set" + property.substring(0, 1).toUpperCase() + property.substring(1);
}
}
|
[
"michael.tinker@hedera.com"
] |
michael.tinker@hedera.com
|
65e3b02341be4962477c9d4b890335e524f4c693
|
c95b26c2f7dd77f5e30e2d1cd1a45bc1d936c615
|
/azureus-core/src/main/java/org/gudy/azureus2/core3/disk/impl/access/DMWriter.java
|
2631e216c0532085ed95567557ad53fb53df1b58
|
[] |
no_license
|
ostigter/testproject3
|
b918764f5c7d4c10d3846411bd9270ca5ba2f4f2
|
2d2336ef19631148c83636c3e373f874b000a2bf
|
refs/heads/master
| 2023-07-27T08:35:59.212278
| 2023-02-22T09:10:45
| 2023-02-22T09:10:45
| 41,742,046
| 2
| 1
| null | 2023-07-07T22:07:12
| 2015-09-01T14:02:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,710
|
java
|
/*
* Created on 31-Jul-2004
* Created by Paul Gardner
* Copyright (C) Azureus Software, Inc, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
package org.gudy.azureus2.core3.disk.impl.access;
import org.gudy.azureus2.core3.disk.DiskManagerException;
import org.gudy.azureus2.core3.disk.DiskManagerWriteRequest;
import org.gudy.azureus2.core3.disk.DiskManagerWriteRequestListener;
import org.gudy.azureus2.core3.disk.impl.DiskManagerFileInfoImpl;
import org.gudy.azureus2.core3.util.DirectByteBuffer;
/**
* @author parg
*
*/
public interface DMWriter {
public void start();
public void stop();
public boolean zeroFile(DiskManagerFileInfoImpl file, long length) throws DiskManagerException;
public DiskManagerWriteRequest createWriteRequest(int pieceNumber, int offset, DirectByteBuffer data, Object user_data);
public void writeBlock(DiskManagerWriteRequest request, DiskManagerWriteRequestListener listener);
public boolean hasOutstandingWriteRequestForPiece(int piece_number);
}
|
[
"oscar.stigter@e0aef87a-ea4e-0410-81cd-4b1fdc67522b"
] |
oscar.stigter@e0aef87a-ea4e-0410-81cd-4b1fdc67522b
|
6c86a5237ca40489652407625abb19c3abac9b68
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XRENDERING-418-14-14-SPEA2-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/internal/parser/wikimodel/DefaultXWikiGeneratorListener_ESTest.java
|
17dbfdeac449ce63b8d3cd3d50be2f489f98f45c
|
[] |
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
| 610
|
java
|
/*
* This file was automatically generated by EvoSuite
* Mon Apr 06 10:20:23 UTC 2020
*/
package org.xwiki.rendering.internal.parser.wikimodel;
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 DefaultXWikiGeneratorListener_ESTest extends DefaultXWikiGeneratorListener_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
aca7c4ca5e2054ba19d5ec1656131a7f2556f388
|
7ef841751c77207651aebf81273fcc972396c836
|
/dstream/src/main/java/com/loki/dstream/stubs/SampleClass6708.java
|
e5ee7de268f457a3395c9f045b1e62f13909e0c0
|
[] |
no_license
|
SergiiGrechukha/ModuleApp
|
e28e4dd39505924f0d36b4a0c3acd76a67ed4118
|
00e22d51c8f7100e171217bcc61f440f94ab9c52
|
refs/heads/master
| 2022-05-07T13:27:37.704233
| 2019-11-22T07:11:19
| 2019-11-22T07:11:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 274
|
java
|
package com.loki.dstream.stubs;
public class SampleClass6708 {
private SampleClass6709 sampleClass;
public SampleClass6708(){
sampleClass = new SampleClass6709();
}
public String getClassName() {
return sampleClass.getClassName();
}
}
|
[
"sergey.grechukha@gmail.com"
] |
sergey.grechukha@gmail.com
|
bf6fef80ae0cdbeb0f8cdb2961434bc5a149b7d5
|
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
|
/persistence-modules/spring-data-elasticsearch/src/main/java/com/surya/spring/data/es/config/Config.java
|
0e278e901eb5d369f3b72fef4040438071ac6e28
|
[] |
no_license
|
Suryakanta97/DemoExample
|
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
|
5c6b831948e612bdc2d9d578a581df964ef89bfb
|
refs/heads/main
| 2023-08-10T17:30:32.397265
| 2021-09-22T16:18:42
| 2021-09-22T16:18:42
| 391,087,435
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,265
|
java
|
package com.surya.spring.data.es.config;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.elasticsearch.client.ClientConfiguration;
import org.springframework.data.elasticsearch.client.RestClients;
import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
@Configuration
@EnableElasticsearchRepositories(basePackages = "com.surya.spring.data.es.repository")
@ComponentScan(basePackages = { "com.surya.spring.data.es.service" })
public class Config {
@Bean
RestHighLevelClient client() {
ClientConfiguration clientConfiguration = ClientConfiguration.builder()
.connectedTo("localhost:9200")
.build();
return RestClients.create(clientConfiguration)
.rest();
}
@Bean
public ElasticsearchOperations elasticsearchTemplate() {
return new ElasticsearchRestTemplate(client());
}
}
|
[
"suryakanta97@github.com"
] |
suryakanta97@github.com
|
5aace9b616306929636f9c2c2219fc10591afca6
|
641bef5ff6933a35a573e30edef68adaad056844
|
/gmall-list/src/test/java/com/atguigu/gmall/list/GmallListApplicationTests.java
|
ed7b97fd4a28efbf90d2c0c6c7510bac6063e5a5
|
[] |
no_license
|
MangoXL/gmall
|
ed853251628a2b10bb82edff4c64b28070b263dc
|
757903d2bdf3bcf16a8099ea74ae1eff3f6e023c
|
refs/heads/master
| 2020-05-07T08:33:10.490968
| 2019-04-09T09:42:43
| 2019-04-09T09:43:49
| 180,334,749
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 342
|
java
|
package com.atguigu.gmall.list;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class GmallListApplicationTests {
@Test
public void contextLoads() {
}
}
|
[
"740017278@qq.com"
] |
740017278@qq.com
|
3b7f607e215ebb7b723883beacf45a9e508a0bf6
|
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
|
/DecompiledViberSrc/app/src/main/java/com/facebook/model/PropertyName.java
|
112a077fe6f9faf3abcfeb622c3bb757136b0999
|
[] |
no_license
|
cga2351/code
|
703f5d49dc3be45eafc4521e931f8d9d270e8a92
|
4e35fb567d359c252c2feca1e21b3a2a386f2bdb
|
refs/heads/master
| 2021-07-08T15:11:06.299852
| 2021-05-06T13:22:21
| 2021-05-06T13:22:21
| 60,314,071
| 1
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 454
|
java
|
package com.facebook.model;
import java.lang.annotation.Annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
public @interface PropertyName
{
public abstract String value();
}
/* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_dex2jar.jar
* Qualified Name: com.facebook.model.PropertyName
* JD-Core Version: 0.6.2
*/
|
[
"yu.liang@navercorp.com"
] |
yu.liang@navercorp.com
|
38824c007a55a3d444367116dd792abc6c30b16b
|
02bba687300bed41084401bf7c0db7da5ed92dae
|
/app/src/main/java/com/hengda/smart/wuda/m/bean/PayBean.java
|
84de790fe2721a4afc000dae22c712e678010cea
|
[] |
no_license
|
lliqiang/WDD_-
|
a60c92dbb42844fb222011b7659cbb9656ef0d23
|
5dee37bbc805a19f66cbd2686ef9f1be38a8d86c
|
refs/heads/master
| 2021-01-01T19:54:14.145814
| 2017-07-29T07:36:56
| 2017-07-29T07:36:56
| 98,716,379
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,329
|
java
|
package com.hengda.smart.wuda.m.bean;/**
* Created by lenovo on 2017/7/24.
*/
import java.io.Serializable;
import java.util.List;
/**
* 创建人:lenovo
* 创建时间:2017/7/24 13:39
* 类描述:
*/
public class PayBean implements Serializable {
/**
* status : 1
* data : {"discount":1,"discount_class_id":0,"youhuiquan_info":[{"youhui_id":"2","youhui_price":"20","title":null,"desc":null,"expire_time":"","item_is_valid":1}],"sum_price":62,"youhuiquan_has_valid":1}
* msg : 操作成功
*/
private int status;
/**
* discount : 1
* discount_class_id : 0
* youhuiquan_info : [{"youhui_id":"2","youhui_price":"20","title":null,"desc":null,"expire_time":"","item_is_valid":1}]
* sum_price : 62
* youhuiquan_has_valid : 1
*/
private DataBean data;
private String msg;
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public static class DataBean implements Serializable{
private int discount;
private int discount_class_id;
private double sum_price;
private int youhuiquan_has_valid;
/**
* youhui_id : 2
* youhui_price : 20
* title : null
* desc : null
* expire_time :
* item_is_valid : 1
*/
private List<YouhuiquanInfoBean> youhuiquan_info;
public int getDiscount() {
return discount;
}
public void setDiscount(int discount) {
this.discount = discount;
}
public int getDiscount_class_id() {
return discount_class_id;
}
public void setDiscount_class_id(int discount_class_id) {
this.discount_class_id = discount_class_id;
}
public double getSum_price() {
return sum_price;
}
public void setSum_price(double sum_price) {
this.sum_price = sum_price;
}
public int getYouhuiquan_has_valid() {
return youhuiquan_has_valid;
}
public void setYouhuiquan_has_valid(int youhuiquan_has_valid) {
this.youhuiquan_has_valid = youhuiquan_has_valid;
}
public List<YouhuiquanInfoBean> getYouhuiquan_info() {
return youhuiquan_info;
}
public void setYouhuiquan_info(List<YouhuiquanInfoBean> youhuiquan_info) {
this.youhuiquan_info = youhuiquan_info;
}
public static class YouhuiquanInfoBean implements Serializable{
private String youhui_id;
private String youhui_price;
private Object title;
private Object desc;
private String expire_time;
private int item_is_valid;
public String getYouhui_id() {
return youhui_id;
}
public void setYouhui_id(String youhui_id) {
this.youhui_id = youhui_id;
}
public String getYouhui_price() {
return youhui_price;
}
public void setYouhui_price(String youhui_price) {
this.youhui_price = youhui_price;
}
public Object getTitle() {
return title;
}
public void setTitle(Object title) {
this.title = title;
}
public Object getDesc() {
return desc;
}
public void setDesc(Object desc) {
this.desc = desc;
}
public String getExpire_time() {
return expire_time;
}
public void setExpire_time(String expire_time) {
this.expire_time = expire_time;
}
public int getItem_is_valid() {
return item_is_valid;
}
public void setItem_is_valid(int item_is_valid) {
this.item_is_valid = item_is_valid;
}
}
}
}
|
[
"13821062095@163.com"
] |
13821062095@163.com
|
1950e19741b5c5713d5fe71b3548fbe4223e172e
|
52019a46c8f25534afa491a5f68bf5598e68510b
|
/plugins/dnd-viewer/src/example/org/nakedobjects/nos/client/dnd/image/ImageCatalogue.java
|
62645c0002a703cabea1c4efea4c058f250961a0
|
[
"Apache-2.0"
] |
permissive
|
JavaQualitasCorpus/nakedobjects-4.0.0
|
e765b4980994be681e5562584ebcf41e8086c69a
|
37ee250d4c8da969eac76749420064ca4c918e8e
|
refs/heads/master
| 2023-08-29T13:48:01.268876
| 2020-06-02T18:07:23
| 2020-06-02T18:07:23
| 167,005,009
| 0
| 1
|
Apache-2.0
| 2022-06-10T22:44:43
| 2019-01-22T14:08:50
|
Java
|
UTF-8
|
Java
| false
| false
| 3,004
|
java
|
package org.nakedobjects.viewer.dnd.image;
import java.awt.Canvas;
import java.awt.Font;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.MediaTracker;
import java.awt.Toolkit;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File;
import org.apache.log4j.BasicConfigurator;
public class ImageCatalogue extends Frame {
private static final String DIRECTORY = "src/images/";
private String[] files;
private Image[] images;
private int HEIGHT = 60;
private int WIDTH = 120;
private static MediaTracker mt = new MediaTracker(new Canvas());
public ImageCatalogue() {
File dir = new File(DIRECTORY);
if (!dir.exists()) {
throw new RuntimeException("No directory " + dir);
}
System.out.println(dir.getAbsolutePath());
files = dir.list();
images = new Image[files.length];
for (int i = 0; i < files.length; i++) {
String file = files[i];
String url = DIRECTORY + file;
Image image = Toolkit.getDefaultToolkit().createImage(url);
if (image != null) {
mt.addImage(image, 0);
try {
mt.waitForAll();
} catch (Exception e) {
e.printStackTrace();
}
if (mt.isErrorAny()) {
System.err.println("Failed to load image from resource: " + url + " " + mt.getErrorsAny()[0]);
mt.removeImage(image);
image = null;
}
}
System.out.println("Image " + image + " loaded from " + url);
images[i] = image;
if (images[i] == null) {
System.err.println(file + " not loaded");
}
}
addWindowListener(new WindowAdapter() {
public void windowClosing(final WindowEvent e) {
dispose();
}
});
setSize(300, 300);
show();
}
public static void main(final String[] args) {
// PropertyConfigurator.configure("log4j.testing.properties");
BasicConfigurator.configure();
new ImageCatalogue();
}
public void paint(final Graphics g) {
int width = getWidth();
int height = getHeight();
int x = getInsets().left;
int y = getInsets().top;
g.setFont(new Font("Sans", 0, 9));
for (int i = 0; i < images.length; i++) {
Image image = images[i];
if (image != null) {
g.drawImage(image, x, y, 32, 32, null);
}
g.drawString(files[i], x, y + HEIGHT - 3);
x = x + WIDTH;
if (x >= width) {
x = 0;
y = y + HEIGHT;
if (y >= height) {
break;
}
}
}
}
}
// Copyright (c) Naked Objects Group Ltd.
|
[
"taibi@sonar-scheduler.rd.tut.fi"
] |
taibi@sonar-scheduler.rd.tut.fi
|
7eb97f07a475cec403fb8dce9aeb06a101811988
|
1f3c00468850bc6e7794cb70efd8dd1c73eda1b5
|
/GHServer/src/framework/tool/HttpPost.java
|
bfb02056e945e1badb9c37da5ee4a3a1bbf345c5
|
[] |
no_license
|
litcas/PRJ
|
2861f3eabe163465fb640b5259d0b946a3d3778a
|
2cceb861502d8b7b0f54e4b99c50469b3c97b63a
|
refs/heads/master
| 2021-06-27T19:32:47.168612
| 2017-09-17T05:44:31
| 2017-09-17T05:44:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,366
|
java
|
package framework.tool;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Map;
/**
* Created by Admin on 2016/9/5.
*/
public class HttpPost
{
public static String post(String actionUrl,Map<String, Object> params) throws IOException
{
String BOUNDARY = java.util.UUID.randomUUID().toString();
String PREFIX = "--", LINEND = "\r\n";
String MULTIPART_FROM_DATA = "multipart/form-data";
String CHARSET = "UTF-8";
URL uri = new URL(actionUrl);
HttpURLConnection conn = (HttpURLConnection) uri.openConnection();
conn.setConnectTimeout(5 * 1000);
conn.setReadTimeout(10 * 1000);
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);//设置不使用缓存
conn.setRequestMethod("POST");
conn.setRequestProperty("Charsert", "UTF-8");
conn.setRequestProperty("connection", "keep-alive");
conn.setRequestProperty("Content-Type",MULTIPART_FROM_DATA
+ ";boundary=" + BOUNDARY);
conn.connect();
StringBuilder sb = new StringBuilder();
for (Map.Entry<String, Object> entry : params.entrySet()) {
sb.append(PREFIX);
sb.append(BOUNDARY);
sb.append(LINEND);
sb.append("Content-Disposition: form-data; name=\""
+ entry.getKey() + "\"" + LINEND);
sb.append("Content-Type: text/plain; charset=" + CHARSET + LINEND);
sb.append("Content-Transfer-Encoding: 8bit" + LINEND);
sb.append(LINEND);
sb.append(entry.getValue());
sb.append(LINEND);
}
DataOutputStream outStream = new DataOutputStream(conn.getOutputStream());
outStream.write(sb.toString().getBytes());
outStream.flush();
InputStream in = null;
int res = conn.getResponseCode();
String sb2 = "";
if (res == 200)
{
in = conn.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String line = "";
for (line = br.readLine(); line != null; line = br.readLine())
{
sb2 = sb2 + line;
}
}
outStream.close();
conn.disconnect();
return sb2;
}
}
|
[
"393054246@qq.com"
] |
393054246@qq.com
|
6310386329866631acead36d7849caa35a2d1e0d
|
8036c74d352a082179d98dfe396ddcf48251cdf1
|
/TCC00173/src/main/java/uff/ic/tcc00173/exercicios/Lista8Ex2.java
|
8caa3314f97dff2db9ddff0e1876a1f56c610d66
|
[] |
no_license
|
nilsonld/lleme
|
085c0dd3f5a246f492fab4e64d01ebe1451ae216
|
831a2e167881f3ccb0f6730bc4ccf7382410fa33
|
refs/heads/master
| 2020-03-08T01:52:47.844201
| 2018-04-02T16:16:21
| 2018-04-02T16:16:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 277
|
java
|
package uff.ic.tcc00173.exercicios;
public class Lista8Ex2 {
public static void main(String[] args) {
}
public static float traco(float matriz[][]) {
float traco = 0;
for (int i = 0; i < matriz.length; i++)
traco += matriz[i][i];
return traco;
}
}
|
[
"lapaesleme@gmail.com"
] |
lapaesleme@gmail.com
|
11ca60b7c2b2c34dd43d8b35dec5df64cbbe08d5
|
b111bfbd2c5835a53dc0f1f25b2a330cbd14ac51
|
/docx4j-openxml-objects/src/main/java/org/docx4j/dml/chartDrawing/CTShape.java
|
dc79ce916ed9ea75af6e319efa85e824b316739e
|
[
"Apache-2.0"
] |
permissive
|
AbuDeCoder/docx4j
|
abbda615c4f370dbd0c6c428a417494bc1439940
|
127959025e7b20dfaa78f8994cf78f6ef55ed39c
|
refs/heads/master
| 2021-09-18T02:34:31.266670
| 2021-08-13T02:48:36
| 2021-08-13T02:48:36
| 252,779,966
| 1
| 0
| null | 2020-04-03T16:08:16
| 2020-04-03T16:08:15
| null |
UTF-8
|
Java
| false
| false
| 7,930
|
java
|
/*
* Copyright 2007-2008, Plutext Pty Ltd.
*
* This file is part of docx4j.
docx4j is licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package org.docx4j.dml.chartDrawing;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import org.docx4j.dml.CTShapeProperties;
import org.docx4j.dml.CTShapeStyle;
import org.docx4j.dml.CTTextBody;
import org.jvnet.jaxb2_commons.ppp.Child;
/**
* <p>Java class for CT_Shape complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="CT_Shape">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="nvSpPr" type="{http://schemas.openxmlformats.org/drawingml/2006/chartDrawing}CT_ShapeNonVisual"/>
* <element name="spPr" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_ShapeProperties"/>
* <element name="style" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_ShapeStyle" minOccurs="0"/>
* <element name="txBody" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_TextBody" minOccurs="0"/>
* </sequence>
* <attribute name="macro" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="textlink" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="fLocksText" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
* <attribute name="fPublished" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CT_Shape", propOrder = {
"nvSpPr",
"spPr",
"style",
"txBody"
})
public class CTShape implements Child
{
@XmlElement(required = true)
protected CTShapeNonVisual nvSpPr;
@XmlElement(required = true)
protected CTShapeProperties spPr;
protected CTShapeStyle style;
protected CTTextBody txBody;
@XmlAttribute(name = "macro")
protected String macro;
@XmlAttribute(name = "textlink")
protected String textlink;
@XmlAttribute(name = "fLocksText")
protected Boolean fLocksText;
@XmlAttribute(name = "fPublished")
protected Boolean fPublished;
@XmlTransient
private Object parent;
/**
* Gets the value of the nvSpPr property.
*
* @return
* possible object is
* {@link CTShapeNonVisual }
*
*/
public CTShapeNonVisual getNvSpPr() {
return nvSpPr;
}
/**
* Sets the value of the nvSpPr property.
*
* @param value
* allowed object is
* {@link CTShapeNonVisual }
*
*/
public void setNvSpPr(CTShapeNonVisual value) {
this.nvSpPr = value;
}
/**
* Gets the value of the spPr property.
*
* @return
* possible object is
* {@link CTShapeProperties }
*
*/
public CTShapeProperties getSpPr() {
return spPr;
}
/**
* Sets the value of the spPr property.
*
* @param value
* allowed object is
* {@link CTShapeProperties }
*
*/
public void setSpPr(CTShapeProperties value) {
this.spPr = value;
}
/**
* Gets the value of the style property.
*
* @return
* possible object is
* {@link CTShapeStyle }
*
*/
public CTShapeStyle getStyle() {
return style;
}
/**
* Sets the value of the style property.
*
* @param value
* allowed object is
* {@link CTShapeStyle }
*
*/
public void setStyle(CTShapeStyle value) {
this.style = value;
}
/**
* Gets the value of the txBody property.
*
* @return
* possible object is
* {@link CTTextBody }
*
*/
public CTTextBody getTxBody() {
return txBody;
}
/**
* Sets the value of the txBody property.
*
* @param value
* allowed object is
* {@link CTTextBody }
*
*/
public void setTxBody(CTTextBody value) {
this.txBody = value;
}
/**
* Gets the value of the macro property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMacro() {
return macro;
}
/**
* Sets the value of the macro property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMacro(String value) {
this.macro = value;
}
/**
* Gets the value of the textlink property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTextlink() {
return textlink;
}
/**
* Sets the value of the textlink property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTextlink(String value) {
this.textlink = value;
}
/**
* Gets the value of the fLocksText property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public boolean isFLocksText() {
if (fLocksText == null) {
return true;
} else {
return fLocksText;
}
}
/**
* Sets the value of the fLocksText property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setFLocksText(Boolean value) {
this.fLocksText = value;
}
/**
* Gets the value of the fPublished property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public boolean isFPublished() {
if (fPublished == null) {
return false;
} else {
return fPublished;
}
}
/**
* Sets the value of the fPublished property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setFPublished(Boolean value) {
this.fPublished = value;
}
/**
* Gets the parent object in the object tree representing the unmarshalled xml document.
*
* @return
* The parent object.
*/
public Object getParent() {
return this.parent;
}
public void setParent(Object parent) {
this.parent = parent;
}
/**
* This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
*
* @param parent
* The parent object in the object tree.
* @param unmarshaller
* The unmarshaller that generated the instance.
*/
public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
setParent(parent);
}
}
|
[
"jason@plutext.org"
] |
jason@plutext.org
|
b8cdcd41fec02295a839b9a0bca3423cc0dabc3c
|
0c249077623248cf98972abcc11d5a3e7e5e3b0c
|
/app/src/main/java/com/et/secondworld/bean/UpdateShopEditDataBean.java
|
1029162b410c78fc68135fef22de5832ffa59790
|
[] |
no_license
|
zhengyi321/SecondWorld
|
c8ea5dd060011abf852203a43cb483575c68bd34
|
814fa9c3491ee35a7fb05518df109497eefc06d1
|
refs/heads/master
| 2022-12-05T18:13:48.744296
| 2020-08-27T08:02:34
| 2020-08-27T08:02:34
| 290,713,867
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,033
|
java
|
package com.et.secondworld.bean;
/**
* @Author zhyan
* @Description //TODO
* @Date 2020/5/8
**/
public class UpdateShopEditDataBean {
/**
* msg : 获取数据成功
* issuccess : 1
* shopname : 小洋人
* logo : http://192.168.0.4/shop/shoplogo20200424145356725072250.jpg
* tel : 187645545454
* businesshour : null
* addr : 浙江温州
*/
private String msg;
private String issuccess;
private String logo;
private String bg;
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getIssuccess() {
return issuccess;
}
public void setIssuccess(String issuccess) {
this.issuccess = issuccess;
}
public String getLogo() {
return logo;
}
public void setLogo(String logo) {
this.logo = logo;
}
public String getBg() {
return bg;
}
public void setBg(String bg) {
this.bg = bg;
}
}
|
[
"zhengyi321@126.com"
] |
zhengyi321@126.com
|
205da5f404440bdc058f4a8bdc28054d6ecbaa13
|
80485d01adc78922888703b252dd64eed6ece2a5
|
/align-common/src/main/java/com/bop/seqAlign/framework/TransitionDelta.java
|
eba42716e290178d8a8d95843d625df55b53ef01
|
[
"Apache-2.0"
] |
permissive
|
marco-ruiz/pairwise-sequence-aligner
|
1caf3081eac0d927da143f89eb0ee074c9e791ae
|
1fc0f667ec78d27ae589287dc1135d8671a5403d
|
refs/heads/master
| 2021-11-06T18:14:10.545548
| 2021-10-23T23:08:48
| 2021-10-23T23:08:48
| 179,616,804
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,506
|
java
|
/*
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.bop.seqAlign.framework;
import com.bop.common.math.TwoDimensionalCoordinates;
/**
* @author Marco Ruiz
*/
public class TransitionDelta {
private final AlignmentMatrix source;
private final Transition previous;
private final Transition current;
// Computed
private final char symbolA, symbolB, symbolAlignment;
private final TwoDimensionalCoordinates distance;
private final int scoreContribution;
private float scoreContributionLevel = Float.NaN;
public TransitionDelta(TransitionDelta target) {
this(target.source, target.previous, target.current);
}
public TransitionDelta(AlignmentMatrix matrix, Transition previous, Transition current) {
this.source = matrix;
this.previous = previous;
this.current = current;
this.distance = current.getCoords().substract(previous.getCoords());
this.scoreContribution = getReferencedScore(current) - getReferencedScore(previous);
this.symbolA = computeSymbol(SequenceDesignator.SEQUENCE_A);
this.symbolB = computeSymbol(SequenceDesignator.SEQUENCE_B);
this.symbolAlignment = (symbolA == symbolB) ? symbolA : getScoreDifferenceSymbol();
}
/**
* Creates a value between -1 and 1 corresponding to this symbol's score contribution level (relative
* to the maximum score contribution)
*
* @return
*/
public void setMaxScoreContribution(int max) {
this.scoreContributionLevel = (max == 0) ? Float.NaN : Math.round(100.0 * scoreContribution / max) / 100.0f;
}
private int getReferencedScore(Transition transition) {
return source.getReferencedTransition(transition).getScore();
}
public int getAccumulatedScore() {
return getReferencedScore(current);
}
private char getScoreDifferenceSymbol() {
return scoreContribution > 0 ? AlignmentSolution.POSITIVE_SYMBOL : AlignmentSolution.NEGATIVE_SYMBOL;
}
private char computeSymbol(SequenceDesignator designator) {
return isCurrentSameAsPrevious(designator) ? source.getReferencedSymbol(designator, current) : AlignmentSolution.GAP_SYMBOL;
}
public boolean isCurrentSameAsPrevious(SequenceDesignator designator) {
return current.getIndex(designator) == previous.getIndex(designator) + 1;
}
public char getSymbol(SequenceDesignator designator) {
return symbolA;
}
public char getSymbolA() {
return symbolA;
}
public char getSymbolB() {
return symbolB;
}
public char getSymbolAlignment() {
return symbolAlignment;
}
public Transition getPrevious() {
return previous;
}
public Transition getCurrent() {
return current;
}
public TwoDimensionalCoordinates getDistance() {
return distance;
}
public boolean isIdentity() {
return symbolA == symbolB;
}
public boolean isPositive() {
return scoreContribution > 0;
}
public int getScoreContribution() {
return scoreContribution;
}
public float getScoreContributionLevel() {
return scoreContributionLevel;
}
}
|
[
"marco.a.ruiz@gmail.com"
] |
marco.a.ruiz@gmail.com
|
e4af1cd6e6ab9d783234f9a5e1801803723bd411
|
c1c6dc7d6806f6891e42c73ec0af7c32881aa2ec
|
/jstarcraft-ai-model/src/test/java/com/jstarcraft/ai/model/neuralnetwork/learn/AdamLearnerTestCase.java
|
07a04c782dd028b7dc20c72ebf18196d993b3952
|
[
"Apache-2.0"
] |
permissive
|
HongZhaoHua/jstarcraft-ai
|
21ead2a6c216c51dfb4f986406235029b3da165b
|
05b156623385dd817543bd1ac83943d2af0cb043
|
refs/heads/master
| 2023-04-18T04:44:51.601053
| 2023-04-11T03:14:22
| 2023-04-11T03:14:22
| 160,455,791
| 195
| 52
|
Apache-2.0
| 2022-08-06T05:14:00
| 2018-12-05T03:34:38
|
Java
|
UTF-8
|
Java
| false
| false
| 1,051
|
java
|
package com.jstarcraft.ai.model.neuralnetwork.learn;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;
import org.nd4j.linalg.learning.AdamUpdater;
import org.nd4j.linalg.learning.GradientUpdater;
import org.nd4j.linalg.learning.config.Adam;
import com.jstarcraft.ai.model.neuralnetwork.learn.AdamLearner;
import com.jstarcraft.ai.model.neuralnetwork.learn.Learner;
public class AdamLearnerTestCase extends LearnerTestCase {
@Override
protected GradientUpdater<?> getOldFunction(long[] shape) {
Adam configuration = new Adam();
GradientUpdater<?> oldFunction = new AdamUpdater(configuration);
int length = (int) (shape[0] * configuration.stateSize(shape[1]));
INDArray view = Nd4j.zeros(length);
oldFunction.setStateViewArray(view, shape, 'c', true);
return oldFunction;
}
@Override
protected Learner getNewFunction(long[] shape) {
Learner newFuction = new AdamLearner();
return newFuction;
}
}
|
[
"Birdy@LAPTOP-QRG8T75T"
] |
Birdy@LAPTOP-QRG8T75T
|
b12c4d6916d53148929c4a19c49ef38e556976b3
|
f7c2208698e21fe153283726b1c191d90f836892
|
/src/main/leetcode/tree_in_250/TreeNode.java
|
06fc873a7cae106077477ad3274ce88150af0496
|
[] |
no_license
|
clown14/Leetcode
|
1d11d30be52302ed34b3efc802d1f62176ca0330
|
98a241a2f8c743284523db3a41fa07e18050d933
|
refs/heads/master
| 2021-07-10T12:59:43.824801
| 2020-10-16T11:27:53
| 2020-10-16T11:27:53
| 207,846,503
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 231
|
java
|
package main.leetcode.tree_in_250;
/**
* @program: Leetcode
* @author: onion
* @create: 2019-09-14 20:42
**/
public class TreeNode {
int val;
TreeNode left;
TreeNode right;
TreeNode(int x) { val = x; }
}
|
[
"785613198@qq.com"
] |
785613198@qq.com
|
dabc1581d17f724eb68420eba17307cee5e890ad
|
d730308970df56fba9be1f2ff81bcc5814b9c787
|
/ContabilidadGUI/src/com/trascender/contabilidad/gui/ayuda/AcercaDe.java
|
5d7bdbef234535921393559507b73627185f5fc1
|
[] |
no_license
|
munivictoria/sgmdv
|
dda1285de24477e75986d655c9fc4d805ef47a4e
|
9da300b2c90cb3ec7f7c3af47509db884f71ab05
|
refs/heads/master
| 2021-01-18T21:16:59.795064
| 2016-05-16T13:36:11
| 2016-05-16T13:36:11
| 28,036,850
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,705
|
java
|
package com.trascender.contabilidad.gui.ayuda;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JDialog;
import javax.swing.JFrame;
import com.trascender.gui.framework.abmStandard.ABMController;
import com.trascender.gui.framework.model.TAbstractABMModel;
@SuppressWarnings("unchecked")
public class AcercaDe extends ABMController {
private AcercaDeView view;
public AcercaDe(JDialog owner) {
this.view = new AcercaDeView(owner);
this.init();
}
public AcercaDe(JFrame owner) {
this.view = new AcercaDeView(owner);
this.init();
}
@Override
protected void init() {
super.init();
this.setListeners();
this.getView().getPnlPie().getBtnAceptar().setVisible(false);
this.getView().getTaProgamadores().setEditable(false);
this.getView().getSpProgramadores().setVisible(false);
}
private void setListeners() {
this.getView().getPnlCabecera().getLblImagen().addMouseListener(new LblImagenListener(this));
}
@Override
protected void actualizarABMModel() {
}
@Override
protected void actualizarView() {
}
@Override
protected TAbstractABMModel getAbmModel() {
return null;
}
@Override
protected AcercaDeView getView() {
return view;
}
}
class LblImagenListener extends MouseAdapter {
private AcercaDe controller;
public LblImagenListener(AcercaDe controller) {
this.controller = controller;
}
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2 ) {
if (this.controller.getView().getSpProgramadores().isVisible()) {
this.controller.getView().getSpProgramadores().setVisible(false);
} else {
this.controller.getView().getSpProgramadores().setVisible(true);
}
}
}
}
|
[
"ferna@fernando-notebook.(none)"
] |
ferna@fernando-notebook.(none)
|
689dce32cefc7662423f92ea6e9ad0ee83118fa4
|
4655160f0a688cd237014104dbd392fe2d8fae59
|
/src/main/java/hh/learnj/designpattern/mvc/step2/StudentView.java
|
7e7c01dae7e6778fe39ce91c879d905ef64b45c0
|
[] |
no_license
|
hunny/learnj
|
420d110ca0b59cd0468e06bed06e9dc59fe5b7e1
|
b0c837dcd64e3d310b9cb06b82116f3e5bd963d9
|
refs/heads/master
| 2021-04-22T12:13:14.212992
| 2017-06-29T03:42:08
| 2017-06-29T03:42:08
| 44,419,982
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 287
|
java
|
package hh.learnj.designpattern.mvc.step2;
public class StudentView {
public void printStudentDetails(String studentName, String studentRollNo) {
System.out.println("Student: ");
System.out.println("Name: " + studentName);
System.out.println("Roll No: " + studentRollNo);
}
}
|
[
"huxiong888@163.com"
] |
huxiong888@163.com
|
7fb3e35403783c0ed1a1ef066b67fc61a0d9a1b1
|
6063b28a3cc691b4c8a05c7364a8729ea9759f49
|
/src/main/java/com/alipay/api/domain/AlipayEcoMycarDataExternalQueryModel.java
|
ed2bba167318ccf66ecb114d08e41aa431309b2f
|
[] |
no_license
|
citi123/test-obj
|
f68b69c5bbf0dad4dcbfc4ff078645caa98e9084
|
83ee779f010fd1f3f42436d073c6a602407a0222
|
refs/heads/master
| 2022-10-29T14:02:02.200643
| 2019-07-01T07:20:05
| 2019-07-01T07:20:05
| 127,399,103
| 0
| 0
| null | 2022-10-12T19:51:52
| 2018-03-30T07:52:54
|
Java
|
UTF-8
|
Java
| false
| false
| 1,425
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 行业平台外部查询请求
*
* @author auto create
* @since 1.0, 2018-03-06 20:18:29
*/
public class AlipayEcoMycarDataExternalQueryModel extends AlipayObject {
private static final long serialVersionUID = 2366681155937743296L;
/**
* external_system_name
*/
@ApiField("external_system_name")
private String externalSystemName;
/**
* is_transfer_uid
*/
@ApiField("is_transfer_uid")
private Boolean isTransferUid;
/**
* operate_type
*/
@ApiField("operate_type")
private String operateType;
/**
* query_condition
*/
@ApiField("query_condition")
private String queryCondition;
public String getExternalSystemName() {
return this.externalSystemName;
}
public void setExternalSystemName(String externalSystemName) {
this.externalSystemName = externalSystemName;
}
public Boolean getIsTransferUid() {
return this.isTransferUid;
}
public void setIsTransferUid(Boolean isTransferUid) {
this.isTransferUid = isTransferUid;
}
public String getOperateType() {
return this.operateType;
}
public void setOperateType(String operateType) {
this.operateType = operateType;
}
public String getQueryCondition() {
return this.queryCondition;
}
public void setQueryCondition(String queryCondition) {
this.queryCondition = queryCondition;
}
}
|
[
"tao.chen@guanaitong.com"
] |
tao.chen@guanaitong.com
|
686356596174a8eaf22b389449f35d9aae04d13c
|
5e7f63a97954d5f830de4d7eab0bc68bd43cc3f0
|
/cloud-consumer-feign-order80/src/main/java/com/atguigu/springcloud/service/PaymentFeignService.java
|
6856f09e7f627e6b006c142b7dd695cd6a2b7fd0
|
[] |
no_license
|
Ch3nKaiM1ng/cloud2020
|
3edd9255698582f3b7b53f0ff3e08de32f142a28
|
4576406db6009bd0db19af6cd1b0c8f170d382e2
|
refs/heads/master
| 2023-01-03T15:36:41.380873
| 2020-10-26T06:27:45
| 2020-10-26T06:27:45
| 307,279,877
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 697
|
java
|
package com.atguigu.springcloud.service;
import com.atguigu.springcloud.entities.CommonResult;
import com.atguigu.springcloud.entities.Payment;
import feign.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFeignService {
@GetMapping(value = "/payment/get/{id}")
public CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);
@GetMapping(value = "/payment/feign/timeout")
public String paymentFeignTimeOut();
}
|
[
"lbi.goog@gmail.com"
] |
lbi.goog@gmail.com
|
3312ae7b768bdf7ddb4006f7481e667c28adf05d
|
7f20b1bddf9f48108a43a9922433b141fac66a6d
|
/csplugins/trunk/ucsd/pwang/cyprovision/org.eclipse.equinox.p2.ui2.sdk/src/org/eclipse/equinox/internal/p2/ui2/sdk/PreloadingRepositoryHandler.java
|
23b45069aaabf89bfe51ed70c641a7687ed079ea
|
[] |
no_license
|
ahdahddl/cytoscape
|
bf783d44cddda313a5b3563ea746b07f38173022
|
a3df8f63dba4ec49942027c91ecac6efa920c195
|
refs/heads/master
| 2020-06-26T16:48:19.791722
| 2013-08-28T04:08:31
| 2013-08-28T04:08:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,746
|
java
|
/*******************************************************************************
* Copyright (c) 2008 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.equinox.internal.p2.ui2.sdk;
import javax.swing.JOptionPane;
import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.jobs.*;
import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
import org.eclipse.equinox.internal.provisional.p2.ui2.QueryableMetadataRepositoryManager;
import org.eclipse.equinox.internal.provisional.p2.ui2.policy.Policy;
/**
* PreloadingRepositoryHandler provides background loading of
* repositories before executing the provisioning handler.
*
* @since 3.5
*/
abstract class PreloadingRepositoryHandler { //extends AbstractHandler {
Job loadJob = null;
/**
* The constructor.
*/
public PreloadingRepositoryHandler() {
// constructor
}
/**
* Execute the command.
*/
//public Object execute(ExecutionEvent event) {
public Object execute() {
try {
final String profileId = ProvSDKUIActivator.getSelfProfileId();
Runnable newThread = new Runnable() {
public void run() {
doExecuteAndLoad(profileId, preloadRepositories());
}
};
newThread.run();
//BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
// public void run() {
// doExecuteAndLoad(profileId, preloadRepositories());
// }
//});
} catch (ProvisionException e) {
JOptionPane.showInternalMessageDialog(null, "Error", "Can not launch UI", JOptionPane.ERROR_MESSAGE);
//MessageDialog.openInformation(null, ProvSDKMessages.Handler_SDKUpdateUIMessageTitle, ProvSDKMessages.Handler_CannotLaunchUI);
}
return null;
}
void doExecuteAndLoad(final String profileId, boolean preloadRepositories) {
final QueryableMetadataRepositoryManager queryableManager = new QueryableMetadataRepositoryManager(Policy.getDefault(), false);
if (preloadRepositories) {
if (loadJob == null) {
loadJob = new Job(ProvSDKMessages.InstallNewSoftwareHandler_LoadRepositoryJobLabel) {
protected IStatus run(IProgressMonitor monitor) {
queryableManager.loadAll(monitor);
return Status.OK_STATUS;
}
};
loadJob.addJobChangeListener(new JobChangeAdapter() {
public void done(IJobChangeEvent event) {
loadJob = null;
Runnable newThread = new Runnable() {
public void run() {
doExecute(profileId, queryableManager);
}
};
newThread.run();
//if (PlatformUI.isWorkbenchRunning())
// if (event.getResult().isOK()) {
// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
// public void run() {
// doExecute(profileId, queryableManager);
// }
// });
// }
}
});
loadJob.setUser(true);
loadJob.schedule();
}
return;
}
doExecute(profileId, queryableManager);
}
protected abstract void doExecute(String profileId, QueryableMetadataRepositoryManager manager);
protected boolean preloadRepositories() {
return true;
}
/**
* Return a shell appropriate for parenting dialogs of this handler.
* @return a Shell
*/
//protected Shell getShell() {
// return null;//ProvUI.getDefaultParentShell();
//}
}
|
[
"pwang@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] |
pwang@0ecc0d97-ab19-0410-9704-bfe1a75892f5
|
cc93d51eb35d7d82edddd9757a5bc5ccf67e605f
|
39390e1c0bf53d7f2e44b5242f1fb2b47300aaf7
|
/trunk/EZMIS/jteap-sb/com/jteap/sb/sbydgl/util/CalculateYdtzdbh.java
|
68cdbee4575557518c6be0ccc1602debb0ba57d2
|
[] |
no_license
|
BGCX067/ezmis-svn-to-git
|
3e061173c86055de6a1c0204271b3d3276cea7cf
|
24b15ab52a8d750a0ce782a6b64226583c859e03
|
refs/heads/master
| 2021-01-11T11:08:51.702990
| 2015-12-28T14:08:08
| 2015-12-28T14:08:08
| 48,874,376
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,899
|
java
|
package com.jteap.sb.sbydgl.util;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.sql.DataSource;
import com.jteap.core.utils.StringUtil;
import com.jteap.core.web.SpringContextUtil;
import com.jteap.form.eform.util.CalculateFormula;
import com.jteap.form.eform.util.EFormExpContext;
/**
* 异动通知单-异动通知单编号创建时计算公式
* @author caofei
*
*/
public class CalculateYdtzdbh implements CalculateFormula {
public String calculate(EFormExpContext context) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
String date = sdf.format(new Date());
String ydbgbhTmp = "TZ" + date;
String retValue = "";
Connection conn = null;
DataSource dataSource = (DataSource) SpringContextUtil.getBean("dataSource");
try {
conn = dataSource.getConnection();
String sql = "select max(ydbh) from tb_sb_sbydgl_ydxx where ydbh like '"+ydbgbhTmp+"%'";
Statement st = conn.createStatement();
ResultSet rs = st.executeQuery(sql);
while (rs.next()) {
String ydbgbhNow = rs.getString(1);
if (StringUtil.isNotEmpty(ydbgbhNow)) {
ydbgbhNow = ydbgbhNow.trim().substring(10);
Long lnYdbgbh = Long.parseLong(ydbgbhNow);
lnYdbgbh += 1;
String ydbgbh = lnYdbgbh.toString();
int zeroCount = ydbgbhNow.length() - ydbgbh.length();
for (int i = 0; i < zeroCount; i++) {
ydbgbh = "0" + ydbgbh;
}
retValue = ydbgbhTmp + ydbgbh;
return retValue;
}
}
retValue = ydbgbhTmp + "01";
} catch (Exception e) {
e.printStackTrace();
} finally {
if (conn != null) {
try {
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
return retValue;
}
}
|
[
"you@example.com"
] |
you@example.com
|
d4ff7d4ef71643ac3520d43bd6f46e121e721221
|
a47f5306c4795d85bf7100e646b26b614c32ea71
|
/sphairas-libs/library/src/org/thespheres/betula/assess/Grade.java
|
6341c8ca90991df9b957200d5a87acb76ece60cf
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
sphairas/sphairas-desktop
|
65aaa0cd1955f541d3edcaf79442e645724e891b
|
f47c8d4ea62c1fc2876c0ffa44e5925bfaebc316
|
refs/heads/master
| 2023-01-21T12:02:04.146623
| 2020-10-22T18:26:52
| 2020-10-22T18:26:52
| 243,803,115
| 2
| 1
|
Apache-2.0
| 2022-12-06T00:34:25
| 2020-02-28T16:11:33
|
Java
|
UTF-8
|
Java
| false
| false
| 921
|
java
|
/*
* Grade.java
*
* Created on 27. April 2007, 19:41
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package org.thespheres.betula.assess;
import java.beans.PropertyChangeListener;
import org.thespheres.betula.Tag;
/**
*
* @author Boris Heithecker
*/
public interface Grade extends Tag {
public Grade getNextLower();
public Grade getNextHigher();
@Override
public String toString();
public interface Cookie<T> extends Grade {
public T getCookie();
public void setCookie(T t);
public Class<T> getCookieClass();
public void addPropertyChangeListener(PropertyChangeListener l);
public void removePropertyChangeListener(PropertyChangeListener l);
}
public interface Biasable extends Grade {
public Grade getUnbiased();
}
}
|
[
"boris.heithecker@gmx.net"
] |
boris.heithecker@gmx.net
|
eae4cad7f940be60a6ef60325ae86e899caeb45d
|
59f95845e9b7267a68015389939f9aa4b8fe9672
|
/telco/custom/telcotrail/telcotrailstorefront/web/src/de/hybris/telcotrail/storefront/forms/PaymentSubscriptionsForm.java
|
f8a4012bbb5ed117c561b90cc082e8d898035ec7
|
[] |
no_license
|
vkscorpio3/serg_project
|
0dae0446c157ee674365a164c7b64c94756788c7
|
09dbb7206bed0acd51048d9dda6d34a942cf9709
|
refs/heads/master
| 2021-01-22T12:25:22.724659
| 2016-06-28T18:57:28
| 2016-06-28T18:57:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 982
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.telcotrail.storefront.forms;
import java.util.List;
public class PaymentSubscriptionsForm
{
List<String> subscriptionsToChange;
String newPaymentMethodId;
public List<String> getSubscriptionsToChange()
{
return subscriptionsToChange;
}
public void setSubscriptionsToChange(final List<String> subscriptionsToChange)
{
this.subscriptionsToChange = subscriptionsToChange;
}
public String getNewPaymentMethodId()
{
return newPaymentMethodId;
}
public void setNewPaymentMethodId(final String newPaymentMethodId)
{
this.newPaymentMethodId = newPaymentMethodId;
}
}
|
[
"sergii_tyhchenko@epam.com"
] |
sergii_tyhchenko@epam.com
|
e6c28893bcc157f3212a07dc9be80c45caac654a
|
80c668f5ec920e99762ea3297aabefa96f3c7668
|
/src/effectivejava/chapter4/Item20/hierarchy/Circle.java
|
dd6e3a5441ffe1ad9ccf57c9db6db9fb9a04df81
|
[] |
no_license
|
stefanofiorenza/learning-java
|
c2f7eb48700b13f502814fffd45caa5f162859d0
|
43ec7c38b4298e836c8b2840db2e8c2e5a7adc1a
|
refs/heads/master
| 2023-02-20T03:42:52.471854
| 2019-12-28T15:21:10
| 2019-12-28T15:21:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 216
|
java
|
package effectivejava.chapter4.Item20.hierarchy;
class Circle extends Figure {
final double radius;
Circle(double radius) {
this.radius = radius;
}
double area() {
return Math.PI * (radius * radius);
}
}
|
[
"vonzhou@163.com"
] |
vonzhou@163.com
|
20432bba354037a1d8994fa03e2dfdcf09f6182a
|
f11e4e1538589f1f56184745e5af7f7ba06a306b
|
/TxMgmt-Proj01-SpringAOP-Declarative/src/main/java/com/nt/test/TxMgmrTest.java
|
22de0b3c6357ddb0e50d285b34d3390566278825
|
[] |
no_license
|
varunraj2297/SpringFrameWorkWS
|
0473f140f7fd56a92402d69c9274a4c585ca51e8
|
16f54fa282710983e6714abb7dfe07c7f953d0de
|
refs/heads/master
| 2022-12-25T04:20:57.253135
| 2020-03-03T07:19:15
| 2020-03-03T07:19:15
| 176,875,084
| 0
| 0
| null | 2022-11-24T08:37:32
| 2019-03-21T05:19:19
|
Java
|
UTF-8
|
Java
| false
| false
| 751
|
java
|
package com.nt.test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.nt.service.BankService;
public class TxMgmrTest {
public static void main(String[] args) {
ApplicationContext ctx = null;
BankService proxy = null;
ctx = new ClassPathXmlApplicationContext("com/nt/cfgs/applicationContext.xml");
proxy = ctx.getBean("tpfb", BankService.class);
try {
System.out.println(proxy.transferMoney(121, 103, 500));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
((AbstractApplicationContext) ctx).close();
}
}
|
[
"varunraj2297@gmail.com"
] |
varunraj2297@gmail.com
|
3a7366cfadb75aad3051bdcaa24e0e421c5eb2a4
|
0d23678e1154b4a25090745c96cfc015cc31b21f
|
/core/src/main/java/com/gm/gmrxjavaretrofit/base/BaseView.java
|
62a42ab01704b61c7f451a0691706651ca818a9c
|
[
"Apache-2.0"
] |
permissive
|
goutham106/GmRxJavaRetrofit
|
d09074b896346187f68591ac371f2065cdd6af96
|
fae9af3305beca8ffce013e0e73fd1f2e1ebde7a
|
refs/heads/master
| 2020-04-06T04:12:03.512866
| 2017-04-12T06:32:20
| 2017-04-12T06:32:20
| 83,011,929
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 305
|
java
|
package com.gm.gmrxjavaretrofit.base;
/**
* Name : Gowtham
* Created on : 20/10/2016.
* Email : goutham.gm11@gmail.com
* GitHub : https://github.com/goutham106
*/
public interface BaseView {
void showMessage(String message);
void showOfflineMessage(boolean isCritical);
}
|
[
"goutham.gm11@gmail.com"
] |
goutham.gm11@gmail.com
|
3ded1947a122446c308fc69ba6b9f37da6f01196
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/18/18_758b2d1a5b38f3003f65846d5c2e8705db3bf609/PrdConfActionForm/18_758b2d1a5b38f3003f65846d5c2e8705db3bf609_PrdConfActionForm_t.java
|
c21c936533350e1df21d8f088479529318df5f79
|
[] |
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
| 2,428
|
java
|
package org.mifos.application.productdefinition.struts.actionforms;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.mifos.application.productdefinition.util.helpers.ProductDefinitionConstants;
import org.mifos.application.util.helpers.Methods;
import org.mifos.framework.struts.actionforms.BaseActionForm;
import org.mifos.framework.util.helpers.StringUtils;
public class PrdConfActionForm extends BaseActionForm {
private String productTypeId;
private String latenessDays;
private String dormancyDays;
public String getDormancyDays() {
return dormancyDays;
}
public void setDormancyDays(String dormancyDays) {
this.dormancyDays = dormancyDays;
}
public String getLatenessDays() {
return latenessDays;
}
public void setLatenessDays(String latenessDays) {
this.latenessDays = latenessDays;
}
public String getProductTypeId() {
return productTypeId;
}
public void setProductTypeId(String productTypeId) {
this.productTypeId = productTypeId;
}
@Override
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
String method = request.getParameter("method");
if (method.equals(Methods.update.toString())) {
if (StringUtils.isNullOrEmpty(getLatenessDays()))
addError(errors, "latenessDays",
ProductDefinitionConstants.ERROR_MANDATORY,
ProductDefinitionConstants.LATENESSDAYS);
else if (getIntegerValue(getLatenessDays()) > 32767)
addError(errors, "latenessDays",
ProductDefinitionConstants.ERROR_MAX_DAYS,
ProductDefinitionConstants.LATENESSDAYS,
ProductDefinitionConstants.MAX_DAYS);
if (StringUtils.isNullOrEmpty(getDormancyDays()))
addError(errors, "dormancyDays",
ProductDefinitionConstants.ERROR_MANDATORY,
ProductDefinitionConstants.DORMANCYDAYS);
else if (getIntegerValue(getDormancyDays()) > 32767)
addError(errors, "dormancyDays",
ProductDefinitionConstants.ERROR_MAX_DAYS,
ProductDefinitionConstants.DORMANCYDAYS,
ProductDefinitionConstants.MAX_DAYS);
}
if (!method.equals(Methods.validate.toString()))
request.setAttribute("methodCalled", method);
return errors;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
cb6598a452f2a88b2a2c5ebf90da7b950f3ef595
|
82428498091f5b253a789f9b4caad1d58fbf8e78
|
/src/day47_Abstraction/Abstract_Vs_NonAbstract2.java
|
3df776c4764bd971c2a8246872418861199acc5d
|
[] |
no_license
|
Huri123/Spring2020B18_Java
|
c7136b967f4c45fe0b950ea744d457a6c5a1bdc2
|
424d3733cc9ecfd3bc288d96634e2b041a5cbdb8
|
refs/heads/master
| 2022-11-27T18:53:34.570757
| 2020-08-10T02:59:55
| 2020-08-10T02:59:55
| 286,362,312
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 480
|
java
|
package day47_Abstraction;
abstract class A{
public abstract void method1();
public void method2(){}
}
public class Abstract_Vs_NonAbstract2 extends A {
//2 methods
@Override
public void method1() {
} //MANDATORY to override the abstract method of A
}
abstract class B extends A { //optional override the abstract method of A
//we have here one abstract & one instance methods
}
class C extends B {
@Override
public void method1() {
}
}
|
[
"hurioruc2019@gmail.com"
] |
hurioruc2019@gmail.com
|
84e84dcf89e98761eeeccf12aaaec73d7d4b9f75
|
82c73b14ca77a4e36976aab39d3a406faad399d1
|
/app/src/main/java/com/merrichat/net/model/HisXiHuanModel.java
|
12200c97295b1c068245934ffd3be39331fcf7f1
|
[] |
no_license
|
AndroidDeveloperRaj/aaaaa
|
ab85835b3155ebe8701085560c550a676098736d
|
e6733ab804168065926f41b7e8723e0d92cd1682
|
refs/heads/master
| 2020-03-25T11:19:48.899989
| 2018-05-10T05:53:07
| 2018-05-10T05:53:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 304
|
java
|
package com.merrichat.net.model;
/**
* Created by AMSSY1 on 2017/11/16.
*/
public class HisXiHuanModel {
private final String headerUrl;
public HisXiHuanModel(String headerUrl) {
this.headerUrl = headerUrl;
}
public String getHeaderUrl() {
return headerUrl;
}
}
|
[
"309672235@qq.com"
] |
309672235@qq.com
|
260b5322ccadc5c5bf5c8a0c034c63ec99b23f12
|
2a295fcb6b47f9ad8d8e9f824213b2363cfffaed
|
/bizcore/WEB-INF/retailscm_core_src/com/doublechaintech/retailscm/page/PageGridViewGenerator.java
|
f0516edc13f45ee4cba94d128112900fc69e682b
|
[] |
no_license
|
qiqilie/scm-biz-suite
|
c2e2ed8d80612b5056a9d8d829decbbd20a08a8b
|
60f9d679d7f8ffc2ab48ada5ff91b627c62007b1
|
refs/heads/master
| 2023-09-04T20:41:26.012049
| 2021-11-20T18:02:36
| 2021-11-20T18:02:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,496
|
java
|
package com.doublechaintech.retailscm.page;
import com.doublechaintech.retailscm.AccessKey;
import com.doublechaintech.retailscm.BaseGridViewGenerator;
public class PageGridViewGenerator extends BaseGridViewGenerator{
private static final long serialVersionUID = 1L;
protected void throwExceptionIfListNotFount(String listName) {
String message=String.format("List '%s' is not found for Page", listName);
throw new IllegalArgumentException(message);
}
protected String [] getHeaderKeys(String listName) {
if(Page.SLIDE_LIST.equals(listName)){
return new String[]{"id","name","display_order","image_url","video_url","link_to_url","page","version"};
}
if(Page.UI_ACTION_LIST.equals(listName)){
return new String[]{"id","code","icon","title","display_order","brief","image_url","link_to_url","extra_data","page","version"};
}
if(Page.SECTION_LIST.equals(listName)){
return new String[]{"id","title","brief","icon","display_order","view_group","link_to_url","page","version"};
}
throwExceptionIfListNotFount(listName);
return new String[]{}; // place holder, code will never go here!!!
}
protected String getObjectKey(String listName) {
if(Page.SLIDE_LIST.equals(listName)){
return "slide";
}
if(Page.UI_ACTION_LIST.equals(listName)){
return "ui_action";
}
if(Page.SECTION_LIST.equals(listName)){
return "section";
}
throwExceptionIfListNotFount(listName);
return ""; // place holder, code will never go here!!!
}
}
|
[
"zhangxilai@doublechaintech.com"
] |
zhangxilai@doublechaintech.com
|
9cd0cb464ef21c598c91d11288c9280b0c602076
|
f280a12a0a077feb3ccc95ff58b7a870422dbb12
|
/Classwork/Classwork 12/FigurasGeometricasCL/src/org/bonilla/bl/Rectangulo.java
|
1f16d36b365a2f1f36b5f0e5c5692c43a328303d
|
[
"MIT"
] |
permissive
|
Cenfotec/ObjectOrientedProgramming
|
1946e0fd47238f31a1f43f3d0d9b01d88efb5426
|
90f36021ee99497fd037b86e9b418e2b2ded9ae3
|
refs/heads/master
| 2020-03-28T03:05:32.934068
| 2018-11-29T02:23:31
| 2018-11-29T02:23:31
| 147,619,514
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 786
|
java
|
package org.bonilla.bl;
public class Rectangulo extends Figura {
private double base;
private double altura;
public Rectangulo(double base, double altura, String tipo) {
super(tipo);
this.base = base;
this.altura = altura;
}
@Override
public void calcularArea() {
area = base*altura;
}
public double getBase() {
return base;
}
public void setBase(double base) {
this.base = base;
}
public double getAltura() {
return altura;
}
public void setAltura(double altura) {
this.altura = altura;
}
@Override
public String toString() {
return super.toString() +
"\n| Base: " + base +
"\n| Altura: " + altura;
}
}
|
[
"pbonilla29@hotmail.com"
] |
pbonilla29@hotmail.com
|
410695e077417b480c4477804a6dc34c6469d666
|
84ae8a8d2b92a4fb8837b75c74e69b0d48c9daad
|
/src/com/syt/health/kitchen/ImageDetailFragment.java
|
96aa67c0151b8bf8e6aa6d934b62924c92238ae2
|
[] |
no_license
|
winglight/kitchenandroid
|
4a3824c0de9b563e360c58a13a5f8777aec9a4e6
|
ae6dc06b68a05619e8abd2174930811245134d69
|
refs/heads/master
| 2020-05-17T02:33:21.499315
| 2014-04-03T08:50:26
| 2014-04-03T08:50:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,881
|
java
|
/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.syt.health.kitchen;
import com.syt.health.kitchen.utils.Utils;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
/**
* This fragment will populate the children of the ViewPager from {@link ImageDetailActivity}.
*/
public class ImageDetailFragment extends Fragment {
private static final String IMAGE_DATA_EXTRA = "extra_image_data";
private static final String INDEX = "index";
private static final String TAG = "ImageDetailFragment";
private int mImageRes;
private ImageView mImageView;
private int index;
/**
* Factory method to generate a new instance of the fragment given an image number.
*
* @param imageUrl The image url to load
* @return A new instance of ImageDetailFragment with imageNum extras
*/
public static ImageDetailFragment newInstance(int imageUrl,int index) {
final ImageDetailFragment f = new ImageDetailFragment();
final Bundle args = new Bundle();
args.putInt(IMAGE_DATA_EXTRA, imageUrl);
args.putInt(INDEX, index);
f.setArguments(args);
return f;
}
/**
* Empty constructor as per the Fragment documentation
*/
public ImageDetailFragment() {}
/**
* Populate image using a url from extras, use the convenience factory method
* {@link ImageDetailFragment#newInstance(String)} to create this fragment.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mImageRes = getArguments() != null ? getArguments().getInt(IMAGE_DATA_EXTRA) : null;
index = getArguments() !=null?getArguments().getInt(INDEX):0;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate and locate the main ImageView
final View v = inflater.inflate(R.layout.image_detail_fragment, container, false);
mImageView = (ImageView) v.findViewById(R.id.imageView);
LinearLayout layout = (LinearLayout)v.findViewById(R.id.point_layout);
for (int i = 0; i < 8; i++) {
ImageView iv = new ImageView(getActivity());
iv.setPadding(10, 0, 0, 0);
if(i==index){
iv.setImageResource(R.drawable.page_indicator_focused);
}else{
iv.setImageResource(R.drawable.page_indicator_unfocused);
}
layout.addView(iv);
}
return v;
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
try{
mImageView.setImageBitmap(Utils.getBitmap(getActivity(), mImageRes).get());
}catch(RuntimeException re){
Log.e(TAG, "RuntimeException");
}catch(OutOfMemoryError oe){
Log.e(TAG, "OutOfMemoryError");
}
}
@Override
public void onDestroy() {
super.onDestroy();
if (mImageView != null) {
// Cancel any pending image work
mImageView.setImageDrawable(null);
}
}
}
|
[
"wing_light@hotmail.com"
] |
wing_light@hotmail.com
|
241afaac5384339f1f08d6382332ac610008a743
|
4c214a6fdbc4334d5f386f48529f644398e09a1e
|
/Chapter08/SQLServer/Maven/Multiset/NestedMultiset/src/main/java/com/classicmodels/pojo/SimpleOffice.java
|
fc865b8e46df5029d27b51058f49c609624c4432
|
[
"MIT"
] |
permissive
|
PacktPublishing/jOOQ-Masterclass
|
3dfcebe369f6b080b6df987eb1536673f6f2073b
|
410b7c63c5b018a6f6ae40285de12d2c591d4a9f
|
refs/heads/master
| 2023-01-23T00:50:14.726939
| 2023-01-18T10:13:15
| 2023-01-18T10:13:15
| 295,348,949
| 27
| 17
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,232
|
java
|
package com.classicmodels.pojo;
import java.io.Serializable;
import java.util.List;
import java.util.Objects;
public class SimpleOffice implements Serializable {
private static final long serialVersionUID = 1;
private String officeCode;
private String officeCity;
private String officeCountry;
private List<SimpleDepartment> departments;
private List<SimpleEmployee> employees;
private List<SimpleManager> managers;
public SimpleOffice(String officeCode, String officeCity, String officeCountry, List<SimpleDepartment> departments, List<SimpleEmployee> employees, List<SimpleManager> managers) {
this.officeCode = officeCode;
this.officeCity = officeCity;
this.officeCountry = officeCountry;
this.departments = departments;
this.employees = employees;
this.managers = managers;
}
public String getOfficeCode() {
return officeCode;
}
public void setOfficeCode(String officeCode) {
this.officeCode = officeCode;
}
public String getOfficeCity() {
return officeCity;
}
public void setOfficeCity(String officeCity) {
this.officeCity = officeCity;
}
public String getOfficeCountry() {
return officeCountry;
}
public void setOfficeCountry(String officeCountry) {
this.officeCountry = officeCountry;
}
public List<SimpleDepartment> getDepartments() {
return departments;
}
public void setDepartments(List<SimpleDepartment> departments) {
this.departments = departments;
}
public List<SimpleEmployee> getEmployees() {
return employees;
}
public void setEmployees(List<SimpleEmployee> employees) {
this.employees = employees;
}
public List<SimpleManager> getManagers() {
return managers;
}
public void setManagers(List<SimpleManager> managers) {
this.managers = managers;
}
@Override
public int hashCode() {
int hash = 5;
hash = 67 * hash + Objects.hashCode(this.officeCode);
hash = 67 * hash + Objects.hashCode(this.officeCity);
hash = 67 * hash + Objects.hashCode(this.officeCountry);
return hash;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final SimpleOffice other = (SimpleOffice) obj;
if (!Objects.equals(this.officeCode, other.officeCode)) {
return false;
}
if (!Objects.equals(this.officeCity, other.officeCity)) {
return false;
}
if (!Objects.equals(this.officeCountry, other.officeCountry)) {
return false;
}
return true;
}
@Override
public String toString() {
return "SimpleOffice{" + "officeCode=" + officeCode + ", officeCity=" + officeCity
+ ", officeCountry=" + officeCountry + ", departments=" + departments
+ ", employees=" + employees + ", managers=" + managers + '}';
}
}
|
[
"leoprivacy@yahoo.com"
] |
leoprivacy@yahoo.com
|
42adbdf88c28e439152ff4834edb07f46960b202
|
8fa221482da055f4c8105b590617a27595826cc3
|
/sources/com/google/android/gms/games/internal/api/zzbt.java
|
573f57b5293c8e85e577c64848d4ad00878471db
|
[] |
no_license
|
TehVenomm/sauceCodeProject
|
4ed2f12393e67508986aded101fa2db772bd5c6b
|
0b4e49a98d14b99e7d144a20e4c9ead408694d78
|
refs/heads/master
| 2023-03-15T16:36:41.544529
| 2018-10-08T03:44:58
| 2018-10-08T03:44:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,898
|
java
|
package com.google.android.gms.games.internal.api;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.PendingResult;
import com.google.android.gms.games.Games;
import com.google.android.gms.games.internal.GamesClientImpl;
import com.google.android.gms.games.request.GameRequest;
import com.google.android.gms.games.request.OnRequestReceivedListener;
import com.google.android.gms.games.request.Requests;
import com.google.android.gms.games.request.Requests.LoadRequestsResult;
import com.google.android.gms.games.request.Requests.UpdateRequestsResult;
import java.util.ArrayList;
import java.util.List;
public final class zzbt implements Requests {
public final PendingResult<UpdateRequestsResult> acceptRequest(GoogleApiClient googleApiClient, String str) {
List arrayList = new ArrayList();
arrayList.add(str);
return acceptRequests(googleApiClient, arrayList);
}
public final PendingResult<UpdateRequestsResult> acceptRequests(GoogleApiClient googleApiClient, List<String> list) {
return googleApiClient.zze(new zzbu(this, googleApiClient, list == null ? null : (String[]) list.toArray(new String[list.size()])));
}
public final PendingResult<UpdateRequestsResult> dismissRequest(GoogleApiClient googleApiClient, String str) {
List arrayList = new ArrayList();
arrayList.add(str);
return dismissRequests(googleApiClient, arrayList);
}
public final PendingResult<UpdateRequestsResult> dismissRequests(GoogleApiClient googleApiClient, List<String> list) {
return googleApiClient.zze(new zzbv(this, googleApiClient, list == null ? null : (String[]) list.toArray(new String[list.size()])));
}
public final ArrayList<GameRequest> getGameRequestsFromBundle(Bundle bundle) {
if (bundle == null || !bundle.containsKey(Requests.EXTRA_REQUESTS)) {
return new ArrayList();
}
ArrayList arrayList = (ArrayList) bundle.get(Requests.EXTRA_REQUESTS);
ArrayList<GameRequest> arrayList2 = new ArrayList();
int size = arrayList.size();
for (int i = 0; i < size; i++) {
arrayList2.add((GameRequest) arrayList.get(i));
}
return arrayList2;
}
public final ArrayList<GameRequest> getGameRequestsFromInboxResponse(Intent intent) {
return intent == null ? new ArrayList() : getGameRequestsFromBundle(intent.getExtras());
}
public final Intent getInboxIntent(GoogleApiClient googleApiClient) {
return Games.zzf(googleApiClient).zzaqk();
}
public final int getMaxLifetimeDays(GoogleApiClient googleApiClient) {
return Games.zzf(googleApiClient).zzaqm();
}
public final int getMaxPayloadSize(GoogleApiClient googleApiClient) {
return Games.zzf(googleApiClient).zzaql();
}
public final Intent getSendIntent(GoogleApiClient googleApiClient, int i, byte[] bArr, int i2, Bitmap bitmap, String str) {
return Games.zzf(googleApiClient).zza(i, bArr, i2, bitmap, str);
}
public final PendingResult<LoadRequestsResult> loadRequests(GoogleApiClient googleApiClient, int i, int i2, int i3) {
return googleApiClient.zzd(new zzbw(this, googleApiClient, i, i2, i3));
}
public final void registerRequestListener(GoogleApiClient googleApiClient, OnRequestReceivedListener onRequestReceivedListener) {
GamesClientImpl zza = Games.zza(googleApiClient, false);
if (zza != null) {
zza.zzd(googleApiClient.zzp(onRequestReceivedListener));
}
}
public final void unregisterRequestListener(GoogleApiClient googleApiClient) {
GamesClientImpl zza = Games.zza(googleApiClient, false);
if (zza != null) {
zza.zzaqf();
}
}
}
|
[
"gabrielbrazs@gmail.com"
] |
gabrielbrazs@gmail.com
|
347b759be96a24e6d635776c9ceb27664319b28d
|
4b0d06526173850f1189a5a4f2fa3ea25697dac7
|
/src/com/xu/tree/Node.java
|
2b787f97d20d5523f7de47d51f330d3397836bb8
|
[
"Apache-2.0"
] |
permissive
|
XuDeveloper/AlgorthimLearning
|
f787ab3263e2ef769ca61715cb156c23c58623f4
|
dc0223dcf78c652edf0bbc709ada874f0d18ba79
|
refs/heads/master
| 2020-03-24T01:05:33.552434
| 2019-10-20T02:56:57
| 2019-10-20T02:56:57
| 142,321,841
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 256
|
java
|
package com.xu.tree;
import java.util.List;
public class Node {
public int val;
public List<Node> children;
public Node() {
}
public Node(int _val, List<Node> _children) {
val = _val;
children = _children;
}
}
|
[
"280745397@qq.com"
] |
280745397@qq.com
|
c6e5de4a17fd08156156096b32427e10496c9156
|
c791d2fb2f4ad301f0cf23f72531c96f29fa21c1
|
/src/main/java/com/crecc/sale/domain/SaledLock.java
|
28274b2005d478958ecdcf09b589000e681ad350
|
[] |
no_license
|
wxyBUPT/crecc.backend
|
52d4a15b37ca6aed50fe405d291b448f75aab332
|
5ca621ee6ca80b5a63c2c38e638a8946d6560a93
|
refs/heads/master
| 2020-04-09T17:37:46.639152
| 2018-12-12T08:56:37
| 2018-12-12T08:56:37
| 160,486,111
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,111
|
java
|
package com.crecc.sale.domain;
import javax.persistence.*;
/**
* Created by xiyuanbupt on 2018/11/25.
*/
@Entity
@Table(name = "saled_lock")
public class SaledLock {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
/**
* 加密锁锁号码
*/
@Column(nullable = false, unique = true)
private Integer num;
@ManyToOne(cascade = CascadeType.ALL)
@PrimaryKeyJoinColumn
private OutStock outStock;
public SaledLock() {
}
@Override
public String toString() {
return "SaledLock{" +
"id=" + id +
", num=" + num +
", outStock=" + outStock+
'}';
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getNum() {
return num;
}
public void setNum(Integer num) {
this.num = num;
}
public OutStock getOutStockDO(){
return outStock;
}
public void setOutStockDO(OutStock outStock) {
this.outStock = outStock;
}
}
|
[
"746451950@qq.com"
] |
746451950@qq.com
|
2c7c48339faad6f154f985ba2cd62bd7ceda52fc
|
99bf321e42bc123b603f5733f65d2b238bd2aa1a
|
/src/main/java/business/demo2/HttpHandler.java
|
42328b123f77dd129dd346a6981e04318841f193
|
[] |
no_license
|
sanguolingzi/nettyDemo
|
910f740c041de848dd635c08afccce2c4f18dfb5
|
019b6258387b7c7b1c735ed7665487c4bfed84fe
|
refs/heads/master
| 2020-04-01T13:15:43.179306
| 2018-12-29T03:57:09
| 2018-12-29T03:57:09
| 153,244,484
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,558
|
java
|
package business.demo2;
import business.test.kryoProtocal.KryoUtil;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.handler.timeout.IdleState;
import io.netty.handler.timeout.IdleStateEvent;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
public class HttpHandler extends ChannelInboundHandlerAdapter {
private Map<String,ChannelHandlerContext> clientMap;
public HttpHandler(Map<String,ChannelHandlerContext> clientMap) {
super();
this.clientMap = clientMap;
}
@Override
public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
super.channelRegistered(ctx);
System.out.println("---- channelRegistered---"+ctx.channel().id());
if(!clientMap.containsKey(ctx.channel().id().toString())){
clientMap.put(ctx.channel().id().toString(),ctx);
}
}
@Override
public void channelUnregistered(ChannelHandlerContext ctx) throws Exception {
super.channelUnregistered(ctx);
System.out.println("---- channelUnregistered---");
}
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
super.channelInactive(ctx);
System.out.println("---- channelInactive---");
}
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
System.out.println("---- userEventTriggered---"+ctx.channel().id());
super.userEventTriggered(ctx, evt);
}
@Override
public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception {
super.channelWritabilityChanged(ctx);
System.out.println("---- channelWritabilityChanged---");
}
@Override
public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
super.handlerAdded(ctx);
System.out.println("---- handlerAdded---"+ctx.channel().id());
}
@Override
public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
super.handlerRemoved(ctx);
System.out.println("---- handlerRemoved---");
}
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
System.out.println("server channelActive");
}
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
System.out.println("----"+msg.getClass().getSimpleName());
System.out.println("server 收到消息!:"+KryoUtil.parseSerializable((byte[])msg));
ctx.channel().writeAndFlush("你好客户端 这是服务端发送的消息:"+KryoUtil.doSerializable(LocalDateTime.now()));
//System.out.println("输入回复...");
//java.util.Scanner scanner = new java.util.Scanner(System.in);
//ctx.channel().writeAndFlush(scanner.next());
//if(msg.equals("关闭连接")){
// //结束此次连接
// ctx.close();
//}
}
@Override
public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
System.out.println("server channelReadComplete!");
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
System.out.println("exceptionCaught");
if(null != cause){
cause.printStackTrace();
}
if(null != ctx){
clientMap.remove(ctx.channel().id().toString());
ctx.close();
}
}
}
|
[
"191048141@qq.com"
] |
191048141@qq.com
|
060f4e31926183e3eb3a62ae821dae60c9fef8e1
|
78795d448eb4349d9156bd851228a1271d99f35f
|
/jcohy-study-java/src/main/java/com/jcohy/study/java9/MyInterfaceTest.java
|
a2c410d5c3fab1fd651619ec1be4068f905987de
|
[
"Apache-2.0"
] |
permissive
|
jiachao23/jcohy-study-sample
|
2d171dedeb17332aa43d0dcc5733a40ebd45b7bb
|
3a51d3ed16d6e4b85131fe241ce15982684fe0b9
|
refs/heads/master
| 2023-03-05T20:25:01.629210
| 2022-02-07T02:54:02
| 2022-02-07T02:54:02
| 143,955,196
| 15
| 1
|
Apache-2.0
| 2023-02-22T07:29:15
| 2018-08-08T03:17:01
|
Java
|
UTF-8
|
Java
| false
| false
| 713
|
java
|
//package com.jcohy.study.java9;
//
///**
// * Copyright: Copyright (c) 2019 www.xuanwuai.cn
// *
// * @author jiac
// * @version v1.0.0
// * @Description: TODO 请添加该类的功能描述
// * @date 2019/10/31 14:12
// * <p>
// * Modification History:
// * Date Author Version Description
// * ----------------------------------------------------------------------------------*
// * 2019/10/31 jiac v1.0.0 修改原因
// */
//
//
//public class MyInterfaceTest {
// public static void main(String[] args) {
// MyInterfaceImpl impl = new MyInterfaceImpl();
// impl.methodDefault1();
// // impl.init();//不能调用
// }
//}
|
[
"jia_chao23@126.com"
] |
jia_chao23@126.com
|
3ed2da00349a9d7e6647ea38c0c705b565aca3cb
|
a78cbb3413a46c8b75ed2d313b46fdd76fff091f
|
/src/mobius.esc/escjava/branches/JMLb/ESCTools/Escjava/test/junittests/ModChecksMaps.java
|
e0fe84e5fa7028dee99b022f8f28633d40c42ef6
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
wellitongb/Mobius
|
806258d483bd9b893312d7565661dadbf3f92cda
|
4b16bae446ef5b91b65fd248a1d22ffd7db94771
|
refs/heads/master
| 2021-01-16T22:25:14.294886
| 2013-02-18T20:25:24
| 2013-02-18T20:25:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,428
|
java
|
// Tests recursive use of maps
public class ModChecksMaps {
//@ non_null
public MCMList list = new MCMList();
//@ modifies list.links;
public void mm() {
//@ assume list.next != null;
//@ assume list.next.next != null;
//@ assume list.next != list.next.next;
//@ assume list != list.next.next;
//@ assume list != list.next;
list.next.next.next = new MCMList();
list.next.next = new MCMList();
list.next = new MCMList();
}
//@ modifies list.values;
public void m() {
list.value = 0;
//@ assume list.next != null;
list.next.value = 1;
//@ assume list.next.next != null;
list.next.next.value = 2;
}
//@ modifies list.values;
public void ma() {
list.array[0] = 0;
//@ assume list.next != null;
list.next.array[0] = 0;
//@ assume list.next.next != null;
list.next.next.array[0] = 0;
list.array[1] = 0; // WARNING
}
//@ modifies list.values;
public void mloop() {
MCMList it = list;
while (it != null) {
it.value ++;
it = it.next;
}
}
}
class MCMList {
//@ public model Object values;
//@ public model Object links;
public int value; //@ in values;
//@ non_null
public int[] array = new int[20]; //@ in values;
//@ maps array[0] \into values;
//@ public invariant array.length > 10;
public MCMList next; //@ in links;
//@ maps next.links \into links;
//@ maps next.values \into values;
//@ modifies \nothing;
public MCMList();
}
|
[
"nobody@c6399e9c-662f-4285-9817-23cccad57800"
] |
nobody@c6399e9c-662f-4285-9817-23cccad57800
|
ba6113a1e3861af18620fc4d34a9d012f2f44131
|
dd76d0b680549acb07278b2ecd387cb05ec84d64
|
/divestory-Fernflower/com/google/android/gms/location/LocationSettingsStatusCodes.java
|
f722f8eb89434cbedfaad38a491386bd04acbbaa
|
[] |
no_license
|
ryangardner/excursion-decompiling
|
43c99a799ce75a417e636da85bddd5d1d9a9109c
|
4b6d11d6f118cdab31328c877c268f3d56b95c58
|
refs/heads/master
| 2023-07-02T13:32:30.872241
| 2021-08-09T19:33:37
| 2021-08-09T19:33:37
| 299,657,052
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 286
|
java
|
package com.google.android.gms.location;
import com.google.android.gms.common.api.CommonStatusCodes;
public class LocationSettingsStatusCodes extends CommonStatusCodes {
public static final int SETTINGS_CHANGE_UNAVAILABLE = 8502;
private LocationSettingsStatusCodes() {
}
}
|
[
"ryan.gardner@coxautoinc.com"
] |
ryan.gardner@coxautoinc.com
|
255dc16c36f7392bb26cf113437df9e5958d7fe8
|
0f0e465c69d3278242d2c172866c7dad3105df52
|
/msg/src/css_base/com/css/util/ZipCore.java
|
5ab8627a16e14b18dc4a68641e5c46fe94ffb273
|
[] |
no_license
|
MrLiu1227/pushlet
|
5b501d7da5774b1ee22a6735e071721de878cef6
|
96d02ef53c7ab89574bf9f75f369d7c879a9ab22
|
refs/heads/master
| 2020-05-24T14:43:36.670889
| 2019-07-06T02:42:43
| 2019-07-06T02:42:43
| 187,314,418
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,653
|
java
|
package com.css.util;
import java.io.File;
import java.io.FileOutputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
/**
* Created by vicegle on 16-4-22.
*/
public class ZipCore {
private File zipfile = null;
private ZipOutputStream zipout = null;
private FileOutputStream outstream = null;
private byte[] buffer = new byte[1024];
public ZipCore(String zipfilename) {
try {
if (StringHelper.isEmpty(zipfilename)) {
zipfilename = UuidUtil.getUuid() + ".zip";
}
zipfile = new File(zipfilename);
outstream = new FileOutputStream(zipfile);
zipout = new ZipOutputStream(outstream);
} catch (Exception e) {
}
}
public boolean zipStream(String name, byte[] context) {
boolean result = true;
try {
ZipEntry entry = new ZipEntry(name);
zipout.putNextEntry(entry);
if (context != null) {
zipout.write( context );
}
} catch (Exception e) {
result = false;
e.printStackTrace();
}
return result;
}
public File compelte() {
try {
if( zipout != null )
{
zipout.flush();
zipout.finish();
}
if (outstream != null) {
outstream.flush();
}
FileUtil.close( zipout);
FileUtil.close( outstream );
return zipfile;
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
}
|
[
"you@example.com"
] |
you@example.com
|
b1aecf3126c5d3aa3599258f2d4d6fd47f77d321
|
85986e4d862e6fd257eb1c3db6f6b9c82bc6c4d5
|
/prjClienteSIC/src/main/java/ec/com/smx/sic/cliente/mdl/dto/id/TransporteID.java
|
525ee6b994a94c434ebb92e36104c3f214787ddb
|
[] |
no_license
|
SebasBenalcazarS/RepoAngularJS
|
1d60d0dec454fe4f1b1a8c434b656d55166f066f
|
5c3e1d5bb4a624e30cba0d518ff0b0cda14aa92c
|
refs/heads/master
| 2016-08-03T23:21:26.639859
| 2015-08-19T16:05:00
| 2015-08-19T16:05:00
| 40,517,374
| 1
| 0
| null | null | null | null |
WINDOWS-1250
|
Java
| false
| false
| 1,343
|
java
|
/**
*
*/
package ec.com.smx.sic.cliente.mdl.dto.id;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import ec.com.kruger.utilitario.dao.commons.annotations.SequenceDataBaseValue;
import ec.com.smx.sic.cliente.persistencia.secuencia.DescriptorSecuenciasSIC;
/**
* @author fmunoz
*
*/
@SuppressWarnings("serial")
@Embeddable
public class TransporteID implements Serializable{
/**
* Código de la compania
*
*/
@Column(name="CODIGOCOMPANIA", nullable = false)
private Integer codigoCompania;
/**
* Código del grupo alcance
*/
@Column(name = "CODIGOTRANSPORTE", nullable = false)
@SequenceDataBaseValue (descriptorClass=DescriptorSecuenciasSIC.class , name = "SCSADSTRA")
private Integer codigoTransporte;
/**
* @return the codigoCompania
*/
public Integer getCodigoCompania() {
return codigoCompania;
}
/**
* @param codigoCompania the codigoCompania to set
*/
public void setCodigoCompania(Integer codigoCompania) {
this.codigoCompania = codigoCompania;
}
/**
* @return the codigoTransporte
*/
public Integer getCodigoTransporte() {
return codigoTransporte;
}
/**
* @param codigoTransporte the codigoTransporte to set
*/
public void setCodigoTransporte(Integer codigoTransporte) {
this.codigoTransporte = codigoTransporte;
}
}
|
[
"nbenalcazar@kruger.com.ec"
] |
nbenalcazar@kruger.com.ec
|
7a46e95ec001308f667c28d91f0674508bc6c5e8
|
083c8f766ca7c409bdba73027e3f2a2ca68b9a3c
|
/ashesJSuite/benchmarks/gj/executionInput/soot/jimple/parser/node/PBaseType.java
|
3fe7daff09d4e8373ed2553721cc488a4cb5c820
|
[] |
no_license
|
petablox/petablox-bench
|
08fe7cdd27219e44aeb269e934e9605756c57d8e
|
7d2671cc50d775c1c70a3df381b8cc161ced3c16
|
refs/heads/master
| 2021-09-22T20:37:52.437177
| 2018-09-16T00:41:52
| 2018-09-16T00:41:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 164
|
java
|
/* This file was generated by SableCC (http://www.sable.mcgill.ca/sablecc/). */
package soot.jimple.parser.node;
public abstract class PBaseType extends Node
{
}
|
[
"aditya@fir10.gtisc.gatech.edu"
] |
aditya@fir10.gtisc.gatech.edu
|
922f90c4e9008473d60e30aca4aa4b615d827d0b
|
96337505231af6e7c10a86ac20c0ec33e9efc426
|
/org.archstudio.xadl3.gexf/src/net/gexf_1_2/gexf/IdtypeType.java
|
4a64f9db6bb3eb9beaca1a55fc864604b68ea0f4
|
[] |
no_license
|
azurewer/ArchStudio5
|
d39f9e12d1ea5695fe5396db04ab0b1f0f7ba509
|
f82608599dae1a1eed3341b876eb3ea995c12730
|
refs/heads/master
| 2021-01-20T07:13:38.814265
| 2017-05-17T08:22:59
| 2017-05-17T08:22:59
| 89,980,306
| 0
| 0
| null | 2017-05-02T01:52:16
| 2017-05-02T01:52:15
| null |
UTF-8
|
Java
| false
| false
| 4,700
|
java
|
/**
*/
package net.gexf_1_2.gexf;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>Idtype Type</b></em>', and
* utility methods for working with them. <!-- end-user-doc -->
*
* @see net.gexf_1_2.gexf.GexfPackage#getIdtypeType()
* @model extendedMetaData="name='idtype-type'"
* @generated
*/
public enum IdtypeType implements Enumerator {
/**
* The '<em><b>Integer</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #INTEGER_VALUE
* @generated
* @ordered
*/
INTEGER(0, "integer", "integer"),
/**
* The '<em><b>String</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #STRING_VALUE
* @generated
* @ordered
*/
STRING(1, "string", "string");
/**
* The '<em><b>Integer</b></em>' literal value. <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Integer</b></em>' literal object isn't clear, there really should be more of a
* description here...
* </p>
* <!-- end-user-doc -->
*
* @see #INTEGER
* @model name="integer"
* @generated
* @ordered
*/
public static final int INTEGER_VALUE = 0;
/**
* The '<em><b>String</b></em>' literal value. <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>String</b></em>' literal object isn't clear, there really should be more of a
* description here...
* </p>
* <!-- end-user-doc -->
*
* @see #STRING
* @model name="string"
* @generated
* @ordered
*/
public static final int STRING_VALUE = 1;
/**
* An array of all the '<em><b>Idtype Type</b></em>' enumerators. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
private static final IdtypeType[] VALUES_ARRAY = new IdtypeType[] { INTEGER, STRING, };
/**
* A public read-only list of all the '<em><b>Idtype Type</b></em>' enumerators. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @generated
*/
public static final List<IdtypeType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Idtype Type</b></em>' literal with the specified literal value. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @param literal the literal.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static IdtypeType get(String literal) {
for (IdtypeType result : VALUES_ARRAY) {
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Idtype Type</b></em>' literal with the specified name. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @param name the name.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static IdtypeType getByName(String name) {
for (IdtypeType result : VALUES_ARRAY) {
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Idtype Type</b></em>' literal with the specified integer value. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @param value the integer value.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static IdtypeType get(int value) {
switch (value) {
case INTEGER_VALUE:
return INTEGER;
case STRING_VALUE:
return STRING;
}
return null;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
private final int value;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
private final String name;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
private final String literal;
/**
* Only this class can construct instances. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
private IdtypeType(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public String getName() {
return name;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @generated
*/
@Override
public String toString() {
return literal;
}
} // IdtypeType
|
[
"sahendrickson@gmail.com"
] |
sahendrickson@gmail.com
|
9af30ab57a73cccb1a9d87fc7e2a52c19f40c9a7
|
712453a48b3ac198460d7143fec3d1e7abf812c2
|
/bpm-worker/src/main/java/eu/opertusmundi/bpm/worker/subscriptions/FooTaskService.java
|
0b6d2a24be28666b9c31c90056261c0fb87ba077
|
[
"Apache-2.0"
] |
permissive
|
OpertusMundi/api-gateway-interim
|
1c2cdde9f684042c4e69bdfb23474b791520a30b
|
6d95a5ac01e30f7bf431c31db2ffc6d790dab081
|
refs/heads/master
| 2023-02-17T06:07:16.964937
| 2021-01-15T12:08:01
| 2021-01-15T12:08:01
| 302,048,239
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,057
|
java
|
package eu.opertusmundi.bpm.worker.subscriptions;
import java.util.Collections;
import java.util.Map;
import org.camunda.bpm.client.task.ExternalTask;
import org.camunda.bpm.client.task.ExternalTaskService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
/**
* A service for subscribing and processing `foo` tasks
*/
@Service
public class FooTaskService extends AbstractTaskService {
private static final Logger logger = LoggerFactory.getLogger(FooTaskService.class);
@Value("${opertusmundi.bpm.worker.tasks.foo.lock-duration:15000}")
private Long lockDurationMillis;
@Override
public String getTopicName() {
return "foo";
}
@Override
protected long getLockDuration() {
return this.lockDurationMillis;
}
@Override
public void execute(ExternalTask externalTask, ExternalTaskService externalTaskService) {
final String taskId = externalTask.getId();
logger.info("Received task {}", taskId);
// Report failure if something is wrong
final String name1 = (String) externalTask.getVariable("name1");
if (name1 == null || name1.isEmpty()) {
logger.error("Expected name1 to be non empty!");
final int retryCount = 0;
final long retryTimeout = 2000L;
externalTaskService.handleFailure(externalTask, "name1 is empty!", null, retryCount, retryTimeout);
return;
}
// Simulate some processing
logger.debug("Processing task {}: {}", taskId, externalTask);
try {
Thread.sleep(2000L);
} catch (final InterruptedException e) {
e.printStackTrace();
}
// Complete successfully
final Map<String, Object> outputVariables = Collections.singletonMap("score", 0.94051);
externalTaskService.complete(externalTask, outputVariables);
logger.info("Completed task {}", taskId);
}
}
|
[
"yannis.kouvaras@kupa.gr"
] |
yannis.kouvaras@kupa.gr
|
88ea7e4d88e349a608e426a0f59058cb455bed1c
|
2d213e892095854e531bfab810335a01fe92d1ba
|
/Exercise/src/project/bookrental/management/SeperateBookDTO.java
|
c2e51867a1d60f5e211011d6d9e265fe370bb030
|
[] |
no_license
|
minsung8/java_exercise
|
9f4549ef06b36ad2804ca5a2d0e4d7d616745328
|
613c832da5e64e9e772757d845830ceac10de607
|
refs/heads/master
| 2022-11-27T10:33:23.971346
| 2020-08-10T08:45:20
| 2020-08-10T08:45:20
| 281,330,481
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,190
|
java
|
package project.bookrental.management;
import java.io.Serializable;
public class SeperateBookDTO implements Serializable{
/**
*
*/
private static final long serialVersionUID = 6724111105404635400L;
String bookid;
boolean isRent;
BookDTO bookdto;
public SeperateBookDTO () {}
public SeperateBookDTO (String bookid, BookDTO bookdto) {
this.bookid = bookid;
this.bookdto = bookdto;
}
public String getBookid() {
return bookid;
}
public void setBookid(String bookid) {
this.bookid = bookid;
}
public boolean isRent() {
return isRent;
}
public void setRent(boolean isRent) {
this.isRent = isRent;
}
public BookDTO getBookdto() {
return bookdto;
}
public void setBookdto(BookDTO bookdto) {
this.bookdto = bookdto;
}
@Override
public String toString() {
return bookdto.getIsbn() + " " + bookid + " " + bookdto.getBookname() + " " + bookdto.getAuthor() +
" " + bookdto.getPublisher();
}
public String toString2() {
return bookid + " " + bookdto.getIsbn() + " " + bookdto.getBookname() + " " + bookdto.getAuthor() +
" " + bookdto.getPublisher();
}
}
|
[
"alstjddl8@naver.com"
] |
alstjddl8@naver.com
|
ff1aec6a05eb8c16413c71012f839e4a3f2def9e
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/2/org/apache/commons/math3/optimization/direct/CMAESOptimizer_getPopulationSize_464.java
|
55db0f056458e7527eb50fa1da5e43a2ce8c28d1
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 2,629
|
java
|
org apach common math3 optim direct
implement activ covari matrix adapt evolut strategi cma
linear convex smooth global function minim
cma evolut strategi cma reliabl stochast optim method
appli deriv base method quasi newton bfg
conjug gradient fail due rug search landscap nois local
optima outlier object function
quasi newton method cma learn appli variabl metric
underli search space unlik quasi newton method
cma estim gradient make consider
reliabl term find good close optim solut
gener smooth object function cma roughli ten time
slower bfg count object function evalu gradient provid
math math variabl deriv free simplex
direct search method nelder mead faster
reliabl cma
cma suit separ
badli condit problem observ advantag cma compar
convent evolut strategi
math math function evalu difficult problem complet
optim singl run expect roughli
math math math math
function evalu
implement translat adapt matlab version
cma algorithm implement modul code cmae version
inform refer link
href http www lri hansen cmae matlab code
href http www lri hansen cmaesintro html introduct cma
href http wikipedia org wiki cma wikipedia
version
deprec remov
cmae optim cmaesoptim
popul size
popul size getpopulations
lambda
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
e9cdf98c56008fce0e589614546578d961b79ad1
|
eff5c7ef798de26b8073d9cd5c9f0707e9404458
|
/src/main/java/com/example/unittesting/web/ItemController.java
|
d8ddeda3d2dbe064729bb7e6868604620de3a8bc
|
[] |
no_license
|
AndreeaNenciuCrasi/unit-testing
|
16aea2c0ab311416d3e87b2261e8fc07da8d90fa
|
195dfc4487d1ef93dfdec8b06941e38e3c8eaaae
|
refs/heads/master
| 2023-04-09T15:33:51.152262
| 2021-04-19T10:37:47
| 2021-04-19T10:37:47
| 355,210,367
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 874
|
java
|
package com.example.unittesting.web;
import com.example.unittesting.business.ItemBusinessService;
import com.example.unittesting.model.Item;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
public class ItemController {
@Autowired
private ItemBusinessService businessService;
@GetMapping("/dummy-item")
public Item dummyItem(){
return new Item(1, "Ball", 10, 100);
}
@GetMapping("/item-from-business-service")
public Item itemFromBusinessService(){
return businessService.retreiveHardcodedItem();
}
@GetMapping("/all-items-from-database")
public List<Item> retrieveAllItems(){
return businessService.retrieveAllItems();
}
}
|
[
"aanicaa@yahoo.com"
] |
aanicaa@yahoo.com
|
faa142a9c1d0fb1da9a6d7d0e025883754086ca7
|
e124c06aa37b93502a84f8931e1e792539883b9d
|
/ihm-src-0.3/dev/src/org/icehockeymanager/ihm/game/ai/events/AIWeeklyEvent.java
|
fefbc906197d8f46deac1722a346e53cbfdddeb6
|
[] |
no_license
|
m-shayanshafi/FactRepositoryProjects
|
12d7b65505c1e0a8e0ec3577cf937a1e3d17c417
|
1d45d667b454064107d78213e8cd3ec795827b41
|
refs/heads/master
| 2020-06-13T12:04:53.891793
| 2016-12-02T11:30:49
| 2016-12-02T11:30:49
| 75,389,381
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,447
|
java
|
/*************************************************************
*
* Ice Hockey Manager
* ==================
*
* Copyright (C) by the IHM Team (see doc/credits.txt)
*
* This program is released under the GPL (see doc/gpl.txt)
*
* Further informations: http://www.icehockeymanager.org
*
*************************************************************/
package org.icehockeymanager.ihm.game.ai.events;
import java.util.*;
import org.icehockeymanager.ihm.game.scheduler.events.*;
import org.icehockeymanager.ihm.game.sponsoring.Sponsoring;
import org.icehockeymanager.ihm.game.training.*;
import org.icehockeymanager.ihm.game.transfers.*;
/**
* Weekly jobs for "Computer Players"
*
* @author Bernhard von Gunten
* @created September, 2004
*/
public class AIWeeklyEvent extends SchedulerInternalEvent {
static final long serialVersionUID = -7486093274498482115L;
/**
* Constructor for the Weekly Computer Player Events
*
* @param source
* Owner of the event
* @param day
* Day of the event
*/
public AIWeeklyEvent(Object source, Calendar day) {
super(source, day, "events.ai.weekly");
}
/** Plays the event */
public void play() {
super.play();
Training.aiGenerateTrainingPlans();
Transfers.aiExtendContracts();
Transfers.aiPlacePlayersOnTransferList();
Transfers.aiTransferPlayers();
Sponsoring.aiChooseSponsoringContracts();
}
}
|
[
"mshayanshafi@gmail.com"
] |
mshayanshafi@gmail.com
|
e65430f4b268de8565d12a8c8c62bda08e407532
|
cafb845365f71abb69c0b4f5a4aaa308f32b8a2e
|
/spring-social-canvas/src/main/java/org/springframework/social/canvas/config/MainConfig.java
|
364731535785db58a7baa84c4dda06b74e5aa67c
|
[] |
no_license
|
RaazTripathi/spring-social-samples
|
ae70cdf720dac123866be0f8379ed6d5e9fa3ae6
|
2171f4ee176f94620c1e93681f44e296677080e7
|
refs/heads/master
| 2021-01-17T21:10:20.843032
| 2013-12-05T09:37:49
| 2013-12-05T09:37:49
| 14,428,213
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,480
|
java
|
/*
* Copyright 2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.social.canvas.config;
import javax.sql.DataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScan.Filter;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.io.ClassPathResource;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseFactory;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
import org.springframework.jdbc.datasource.init.DatabasePopulator;
import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
import org.springframework.social.connect.jdbc.JdbcUsersConnectionRepository;
/**
* Main configuration class for the application.
* Turns on @Component scanning, loads externalized application.properties, and sets up the database.
* @author Keith Donald
*/
@Configuration
@ComponentScan(basePackages = "org.springframework.social.canvas", excludeFilters = { @Filter(Configuration.class) })
@PropertySource("classpath:org/springframework/social/canvas/config/application.properties")
public class MainConfig {
@Bean(destroyMethod = "shutdown")
public DataSource dataSource() {
EmbeddedDatabaseFactory factory = new EmbeddedDatabaseFactory();
factory.setDatabaseName("spring-social-canvas");
factory.setDatabaseType(EmbeddedDatabaseType.H2);
factory.setDatabasePopulator(databasePopulator());
return factory.getDatabase();
}
// internal helpers
private DatabasePopulator databasePopulator() {
ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
populator.addScript(new ClassPathResource("JdbcUsersConnectionRepository.sql", JdbcUsersConnectionRepository.class));
return populator;
}
}
|
[
"cwalls@vmware.com"
] |
cwalls@vmware.com
|
8573e90d5bd097864993e0cb43b46bd46a8f09b1
|
958b13739d7da564749737cb848200da5bd476eb
|
/src/main/java/com/alipay/api/domain/InvoiceOrderDTO.java
|
e832defda906b330b606f7216c9184986dc18c95
|
[
"Apache-2.0"
] |
permissive
|
anywhere/alipay-sdk-java-all
|
0a181c934ca84654d6d2f25f199bf4215c167bd2
|
649e6ff0633ebfca93a071ff575bacad4311cdd4
|
refs/heads/master
| 2023-02-13T02:09:28.859092
| 2021-01-14T03:17:27
| 2021-01-14T03:17:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,339
|
java
|
package com.alipay.api.domain;
import java.util.Date;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 发票入驻订单
*
* @author auto create
* @since 1.0, 2020-06-18 20:19:42
*/
public class InvoiceOrderDTO extends AlipayObject {
private static final long serialVersionUID = 1416843197487387229L;
/**
* 商品code
*/
@ApiField("article_code")
private String articleCode;
/**
* 商品原价,单位元,最多2位小数
*/
@ApiField("article_fee")
private String articleFee;
/**
* 商品ID
*/
@ApiField("article_id")
private String articleId;
/**
* 商品名称
*/
@ApiField("article_name")
private String articleName;
/**
* 订购时间,格式yyyy-MM-dd HH:mm:ss
*/
@ApiField("buy_date")
private Date buyDate;
/**
* 拓展字段,json格式
*/
@ApiField("ext_json")
private String extJson;
/**
* 实付总金额,单位元,最多2位小数
*/
@ApiField("fact_total_fee")
private String factTotalFee;
/**
* 商品规格CODE
*/
@ApiField("item_code")
private String itemCode;
/**
* 商品规格ID
*/
@ApiField("item_id")
private String itemId;
/**
* 商品规格名称
*/
@ApiField("item_name")
private String itemName;
/**
* 服务市场订单号
*/
@ApiField("order_id")
private String orderId;
/**
* 订购类型,可选值: 新订购:new, 续费:renew,线下转线上:online
*/
@ApiField("order_type")
private String orderType;
public String getArticleCode() {
return this.articleCode;
}
public void setArticleCode(String articleCode) {
this.articleCode = articleCode;
}
public String getArticleFee() {
return this.articleFee;
}
public void setArticleFee(String articleFee) {
this.articleFee = articleFee;
}
public String getArticleId() {
return this.articleId;
}
public void setArticleId(String articleId) {
this.articleId = articleId;
}
public String getArticleName() {
return this.articleName;
}
public void setArticleName(String articleName) {
this.articleName = articleName;
}
public Date getBuyDate() {
return this.buyDate;
}
public void setBuyDate(Date buyDate) {
this.buyDate = buyDate;
}
public String getExtJson() {
return this.extJson;
}
public void setExtJson(String extJson) {
this.extJson = extJson;
}
public String getFactTotalFee() {
return this.factTotalFee;
}
public void setFactTotalFee(String factTotalFee) {
this.factTotalFee = factTotalFee;
}
public String getItemCode() {
return this.itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public String getItemId() {
return this.itemId;
}
public void setItemId(String itemId) {
this.itemId = itemId;
}
public String getItemName() {
return this.itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getOrderId() {
return this.orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getOrderType() {
return this.orderType;
}
public void setOrderType(String orderType) {
this.orderType = orderType;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
255a538f603e14cddc3a7251538a262840273475
|
57ff506386ef116803f34b43de62d79c21f2e7f5
|
/api/src/test/java/org/weso/snoicd/archTest/LayerDependencyTest.java
|
650c612d2dc8a8ed60fbc0ef767c836ea72ab167
|
[
"MIT"
] |
permissive
|
hpintado/snoicd-codex
|
cce73982e38f62c05f18cb5d674250cd05af3228
|
e1246473dfe4964e4fb4c61c5854a5c2ec2aecef
|
refs/heads/master
| 2020-04-28T03:53:52.133984
| 2019-03-07T08:59:48
| 2019-03-07T08:59:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,985
|
java
|
/*
* This source file is part of the snoicd open source project.
*
* Copyright (c) 2019 willy and the snoicd project authors.
* Licensed under GNU General Public License v3.0.
*
* See /LICENSE for license information.
*
*/
package org.weso.snoicd.archTest;
import org.junit.runner.RunWith;
import com.tngtech.archunit.junit.AnalyzeClasses;
import com.tngtech.archunit.junit.ArchTest;
import com.tngtech.archunit.junit.ArchUnitRunner;
import com.tngtech.archunit.lang.ArchRule;
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.classes;
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;
/**
* Instance of InterfaceRulesTest.java
*
* @author
* @version
*/
@RunWith(ArchUnitRunner.class)
@AnalyzeClasses(packages = "org.weso.snoicd")
public class LayerDependencyTest {
@ArchTest
public static final ArchRule services_should_not_access_controllers =
noClasses().that().resideInAPackage("..services..")
.should().accessClassesThat().resideInAPackage("..controllers..");
@ArchTest
public static final ArchRule persistence_should_not_access_services =
noClasses().that().resideInAPackage("..repositories..")
.should().accessClassesThat().resideInAPackage("..services..");
@ArchTest
public static final ArchRule services_should_only_be_accessed_by_controllers_or_other_services =
classes().that().resideInAPackage("..services..")
.should().onlyBeAccessed().byAnyPackage("..controllers..", "..services..", "..search..");
@ArchTest
public static final ArchRule services_should_only_access_persistence_or_other_services =
classes().that().resideInAPackage("..services..")
.should().onlyAccessClassesThat().resideInAnyPackage("..services..", "..repositories..", "java..");
@ArchTest
public static final ArchRule services_should_not_depend_on_controllers =
noClasses().that().resideInAPackage("..services..")
.should().dependOnClassesThat().resideInAPackage("..controllers..");
@ArchTest
public static final ArchRule persistence_should_not_depend_on_services =
noClasses().that().resideInAPackage("..repositories..")
.should().dependOnClassesThat().resideInAPackage("..services..");
@ArchTest
public static final ArchRule services_should_only_be_depended_on_by_controllers_or_other_services =
classes().that().resideInAPackage("..services..")
.should().onlyHaveDependentClassesThat().resideInAnyPackage("..controllers..", "..services..", "..search..");
@ArchTest
public static final ArchRule services_should_only_depend_on_persistence_or_other_services =
classes().that().resideInAPackage("..services..")
.should().onlyDependOnClassesThat().resideInAnyPackage("..services..", "..repositories..", "java..");
}
|
[
"colunga91@gmail.com"
] |
colunga91@gmail.com
|
6d96b3540dcd585b7728a94b77eb8686862b3eea
|
cc953f667e11f32d4119ac827d9378ed477b7706
|
/backend-servers/product-server/src/main/java/com/stosz/product/mapper/AttributeValueBulider.java
|
8520b724212ed84fc133fc15627b0f1840fbca5f
|
[] |
no_license
|
ttggaa/erp
|
e20ed03ecf6965da95c9fc472d505ae8ef4f3902
|
167f5d60d085d016b08452083f172df654a7c5c5
|
refs/heads/master
| 2020-04-22T12:03:43.913915
| 2018-12-05T16:16:11
| 2018-12-05T16:16:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,882
|
java
|
package com.stosz.product.mapper;
import com.stosz.plat.mapper.AbstractBuilder;
import com.stosz.product.ext.model.AttributeValue;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.jdbc.SQL;
public class AttributeValueBulider extends AbstractBuilder<AttributeValue> {
@Override
public void buildSelectOther(SQL sql) {
}
@Override
public void buildJoin(SQL sql) {
}
@Override
public void buildWhere(SQL sql, AttributeValue param) {
eq(sql, "version", "version", param.getVersion());
eq(sql, "attribute_id", "attributeId", param.getAttributeId());
}
public String countByTitleAttId(AttributeValue param){
SQL sql = new SQL();
sql.SELECT(" COUNT(1) ");
sql.FROM(getTableName());
countWhere(sql,param);
return sql.toString();
}
private void countWhere(SQL sql, AttributeValue param) {
eq(sql, "attribute_id", "attributeId", param.getAttributeId());
eq(sql, "title", "title", param.getTitle());
neq(sql, "id", "id", param.getId());
}
public void neq(SQL sql, String column, String field, Object value) {
if (notEmpty(value)) {
sql.WHERE(String.format("%s!=#{%s}", column, field));
}
}
/******************************************************属性值的查询(version字段)*******************************************************/
//select id , attribute_id, title from attribute_value where title = #{title} and attribute_id = #{attributeId}
public String getByTitleAndAttribute(@Param("version") Integer version,
@Param("title") String title, @Param("attributeId") Integer attributeId){
SQL sql = new SQL();
sql.SELECT(" id , attribute_id, title ");
sql.FROM(getTableName());
getByTitleAndAttributeWhere(sql,version,title,attributeId);
return sql.toString();
}
public void getByTitleAndAttributeWhere(SQL sql,Integer version ,String title,Integer attributeId) {
eq(sql, "version", "version", version);
eq(sql, "title", "title", title);
eq(sql, "attribute_id", "attributeId", attributeId);
}
public String findByAttributeValue(AttributeValue param){
SQL sql = new SQL();
sql.SELECT(" av.*, IF(rel.id IS NULL,FALSE,TRUE) bindIs ");
sql.FROM(" attribute_value av ");
sql.LEFT_OUTER_JOIN(" product_attribute_value_rel rel ON av.id = rel.attribute_value_id AND rel.product_id = "+param.getProductId()+"");
findByAttributeValueWhere(sql,param);
sql.ORDER_BY(" bindIs DESC ");
return sql.toString();
}
public void findByAttributeValueWhere(SQL sql,AttributeValue param){
eq(sql, "av.version", "version", param.getVersion());
eq(sql, "av.attribute_id", "attributeId", param.getAttributeId());
if(param.getBindIs() != null){
StringBuilder sb = new StringBuilder();
if(param.getBindIs()){
sb.append(" rel.id IS NOT NULL ");
}else{
sb.append(" rel.id IS NULL ");
}
sql.WHERE(sb.toString());
}
}
}
|
[
"714106661@qq.com"
] |
714106661@qq.com
|
6f5d2e5087ebdf284f701ace4d037b94a09fa7db
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/14_omjstate-uk.me.jockmacmad.jstate.state.Transition-1.0-6/uk/me/jockmacmad/jstate/state/Transition_ESTest.java
|
2b327f8956d13fe64e0e3ad2b1bc665e2e2c8666
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 655
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri Oct 25 20:55:44 GMT 2019
*/
package uk.me.jockmacmad.jstate.state;
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(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class Transition_ESTest extends Transition_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
ae7b6f077cf2a11345336b21b1109be072d474e5
|
3ae5ac1df008b3b49260631b4457e7554cfd0e27
|
/杭电oj/src/数论/zoj3609.java
|
87ac6b5f153dd9671abfede6ab54d9dba746abd1
|
[] |
no_license
|
javasmall/oj-problem-java
|
64d69115272f4311e102137afed5a0be1ab128c0
|
5bc853cfcd4465a80f379f7c844b0921ad3f42a0
|
refs/heads/master
| 2020-05-20T23:32:22.639543
| 2020-01-03T01:37:57
| 2020-01-03T01:37:57
| 185,802,615
| 10
| 4
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,541
|
java
|
package 数论;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
/*
* 拓展欧几里得
*/
public class zoj3609 {
static long x=0;static long y=0;
public static void main(String[] args) throws IOException {
// TODO 自动生成的方法存根
StreamTokenizer in=new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
in.nextToken(); int t =(int)in.nval;
for(int i=0;i<t;i++)
{
in.nextToken();
long a=(long)in.nval;
in.nextToken();
long b=(long)in.nval;
long q=tgcd(a,b);
// long x1=x;
if(1%q!=0) {out.println("Not Exist");}//gcd要和要求相等(这里等于1)
else {
while(x<=0){//x*a+y*b=1 要求x>0这样并且要求x最小,那么这样操作就相当于+ab-ab操作。刚开始还没明白
x+=b;
y-=a;
}
out.println(x);}//
out.flush();
}
}
static long tgcd(long a,long b)
{
if(b==0) {x=1;y=0;return a;}
long ans=tgcd(b,a%b);
long team=x;
x=y;
y=team-a/b*y;
// System.out.println(x);
return ans;
}
}
|
[
"1315426911@qq.com"
] |
1315426911@qq.com
|
c213aafcc385be2f68a7f9934819bf2caa451e22
|
97b46ff38b675d934948ff3731cf1607a1cc0fc9
|
/DataPack/dist/game/data/scripts/handlers/effecthandlers/Petrification.java
|
564983a6fece8557df9f8460bc59043414ddc3e1
|
[] |
no_license
|
l2brutal/pk-elfo_H5
|
a6703d734111e687ad2f1b2ebae769e071a911a4
|
766fa2a92cb3dcde5da6e68a7f3d41603b9c037e
|
refs/heads/master
| 2020-12-28T13:33:46.142303
| 2016-01-20T09:53:10
| 2016-01-20T09:53:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,156
|
java
|
package handlers.effecthandlers;
import pk.elfo.gameserver.model.effects.AbnormalEffect;
import pk.elfo.gameserver.model.effects.EffectFlag;
import pk.elfo.gameserver.model.effects.EffectTemplate;
import pk.elfo.gameserver.model.effects.L2Effect;
import pk.elfo.gameserver.model.effects.L2EffectType;
import pk.elfo.gameserver.model.stats.Env;
/**
* Projeto PkElfo
*/
public class Petrification extends L2Effect
{
public Petrification(Env env, EffectTemplate template)
{
super(env, template);
}
@Override
public L2EffectType getEffectType()
{
return L2EffectType.PETRIFICATION;
}
@Override
public boolean onStart()
{
getEffected().startAbnormalEffect(AbnormalEffect.HOLD_2);
getEffected().startParalyze();
return super.onStart();
}
@Override
public void onExit()
{
getEffected().stopAbnormalEffect(AbnormalEffect.HOLD_2);
getEffected().stopParalyze(false);
super.onExit();
}
@Override
public boolean onActionTime()
{
return false;
}
@Override
public int getEffectFlags()
{
return EffectFlag.PARALYZED.getMask() | EffectFlag.INVUL.getMask();
}
}
|
[
"PkElfo@13720c4f-9a1f-4619-977f-b36a0ac534ba"
] |
PkElfo@13720c4f-9a1f-4619-977f-b36a0ac534ba
|
19e5c9fc218443d9960df463021dc31ec19612a8
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/digits/313d572e1f050451c688b97510efa105685fa275a8442f9119ce9b3f85f46e234cdf03593568e19798aed6b79c66f45c97be937d09b6ff9544f0f59162538575/000/mutations/2288/digits_313d572e_000.java
|
0fdd804c8c018a522efb74a34174a24f6a0efb15
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,756
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class digits_313d572e_000 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
digits_313d572e_000 mainClass = new digits_313d572e_000 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj given = new IntObj (), digit10 = new IntObj (), digit9 =
new IntObj (), digit8 = new IntObj (), digit7 = new IntObj (), digit6 =
new IntObj (), digit5 = new IntObj (), digit4 = new IntObj (), digit3 =
new IntObj (), digit2 = new IntObj (), digit1 = new IntObj ();
output += (String.format ("\nEnter an interger > "));
given.value = scanner.nextInt ();
if (given.value >= 1 && given.value < 10) {
digit10.value = given.value % 10;
output +=
(String.format
("\n%d\nThat's all, have a nice day!\n", digit10.value));
}
if (given.value >= 10 && given.value < 100) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
output +=
(String.format
("\n%d\n%d\nThat's all, have a nice day!\n", digit10.value,
digit9.value));
}
if (given.value >= 100 && given.value < 1000) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
output +=
(String.format ("\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, digit8.value));
}
if (given.value >= 1000 && given.value < 10000) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
digit7.value = (given.value / 1000) % 10;
output +=
(String.format ("\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, ((given.value) / 1000) % 10,
digit7.value));
}
if (given.value >= 10000 && given.value < 100000) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
digit7.value = (given.value / 1000) % 10;
digit6.value = (given.value / 10000) % 10;
output +=
(String.format
("\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, digit8.value, digit7.value,
digit6.value));
}
if (given.value >= 100000 && given.value < 1000000) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
digit7.value = (given.value / 1000) % 10;
digit6.value = (given.value / 10000) % 10;
digit5.value = (given.value / 100000) % 10;
output +=
(String.format
("\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, digit8.value, digit7.value,
digit6.value, digit5.value));
}
if (given.value >= 1000000 && given.value < 10000000) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
digit7.value = (given.value / 1000) % 10;
digit6.value = (given.value / 10000) % 10;
digit5.value = (given.value / 100000) % 10;
digit4.value = (given.value / 1000000) % 10;
output +=
(String.format
("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, digit8.value, digit7.value,
digit6.value, digit5.value, digit4.value));
}
if (given.value >= 10000000 && given.value < 100000000) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
digit7.value = (given.value / 1000) % 10;
digit6.value = (given.value / 10000) % 10;
digit5.value = (given.value / 100000) % 10;
digit4.value = (given.value / 1000000) % 10;
digit3.value = (given.value / 10000000) % 10;
output +=
(String.format
("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, digit8.value, digit7.value,
digit6.value, digit5.value, digit4.value, digit3.value));
}
if (given.value >= 100000000 && given.value < 1000000000) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
digit7.value = (given.value / 1000) % 10;
digit6.value = (given.value / 10000) % 10;
digit5.value = (given.value / 100000) % 10;
digit4.value = (given.value / 1000000) % 10;
digit3.value = (given.value / 10000000) % 10;
digit2.value = (given.value / 100000000) % 10;
output +=
(String.format
("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, digit8.value, digit7.value,
digit6.value, digit5.value, digit4.value, digit3.value,
digit2.value));
}
if (given.value >= 1000000000 && given.value < 10000000000L) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
digit7.value = (given.value / 1000) % 10;
digit6.value = (given.value / 10000) % 10;
digit5.value = (given.value / 100000) % 10;
digit4.value = (given.value / 1000000) % 10;
digit3.value = (given.value / 10000000) % 10;
digit2.value = (given.value / 100000000) % 10;
digit1.value = (given.value / 1000000000) % 10;
output +=
(String.format
("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, digit8.value, digit7.value,
digit6.value, digit5.value, digit4.value, digit3.value,
digit2.value, digit1.value));
}
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
ad2b56baa681b03b2b74c59d48671bd174f7ec85
|
a5a7c6814a41bc3d74c59072eb739cad8a714b33
|
/src/main/src/com/sun/org/apache/xalan/internal/xsltc/compiler/TopLevelElement.java
|
c9aa78b87f2e96566778d55478ff1cf73e35f88d
|
[
"Apache-2.0"
] |
permissive
|
as543343879/myReadBook
|
3dcbbf739c184a84b32232373708c73db482f352
|
5f3af76e58357a0b2b78cc7e760c1676fe19414b
|
refs/heads/master
| 2023-09-01T16:09:21.287327
| 2023-08-23T06:44:46
| 2023-08-23T06:44:46
| 139,959,385
| 3
| 3
|
Apache-2.0
| 2023-06-14T22:31:32
| 2018-07-06T08:54:15
|
Java
|
UTF-8
|
Java
| false
| false
| 3,398
|
java
|
/*
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* Copyright 2001-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 implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: TopLevelElement.java,v 1.5 2005/09/28 13:48:17 pvedula Exp $
*/
package com.sun.org.apache.xalan.internal.xsltc.compiler;
import java.util.Vector;
import com.sun.org.apache.bcel.internal.generic.InstructionList;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
class TopLevelElement extends SyntaxTreeNode {
/*
* List of dependencies with other variables, parameters or
* keys defined at the top level.
*/
protected Vector _dependencies = null;
/**
* Type check all the children of this node.
*/
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
return typeCheckContents(stable);
}
/**
* Translate this node into JVM bytecodes.
*/
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
ErrorMsg msg = new ErrorMsg(ErrorMsg.NOT_IMPLEMENTED_ERR,
getClass(), this);
getParser().reportError(FATAL, msg);
}
/**
* Translate this node into a fresh instruction list.
* The original instruction list is saved and restored.
*/
public InstructionList compile(ClassGenerator classGen,
MethodGenerator methodGen) {
final InstructionList result, save = methodGen.getInstructionList();
methodGen.setInstructionList(result = new InstructionList());
translate(classGen, methodGen);
methodGen.setInstructionList(save);
return result;
}
public void display(int indent) {
indent(indent);
Util.println("TopLevelElement");
displayContents(indent + IndentIncrement);
}
/**
* Add a dependency with other top-level elements like
* variables, parameters or keys.
*/
public void addDependency(TopLevelElement other) {
if (_dependencies == null) {
_dependencies = new Vector();
}
if (!_dependencies.contains(other)) {
_dependencies.addElement(other);
}
}
/**
* Get the list of dependencies with other top-level elements
* like variables, parameteres or keys.
*/
public Vector getDependencies() {
return _dependencies;
}
}
|
[
"543343879@qq.com"
] |
543343879@qq.com
|
7b9f19c7bf42fa169cd530b7f0523fba660e7008
|
333399633f4ce2c422f86ee0651b3803bfe4d232
|
/jmemstore/src/test/java/org/gridkit/offheap/jmemstore/RandomIdentityMappingTester.java
|
b9922861cebc1998ac9e0e4391c5e2f6dc8c8d8d
|
[] |
no_license
|
aragozin/JMemStore
|
df26091c62a1df42eb3823d0179d1bacd770d845
|
618021d4d72ef85ebf3dda03259f30d02ef89126
|
refs/heads/master
| 2020-04-12T09:51:28.110450
| 2011-08-25T19:56:09
| 2011-08-25T19:56:09
| 2,269,403
| 14
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,071
|
java
|
/**
* Copyright 2011 Alexey Ragozin
*
* 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.gridkit.offheap.jmemstore;
import java.util.Random;
import org.gridkit.offheap.jmemstore.ByteChunk;
import org.gridkit.offheap.jmemstore.IdentityMapping;
import org.gridkit.offheap.jmemstore.IdentityMappingHashTable;
import org.junit.Assert;
import org.junit.Ignore;
/**
* @author Alexey Ragozin (alexey.ragozin@gmail.com)
*/
@Ignore
public class RandomIdentityMappingTester {
public Random rnd = new Random(0);
private Random rnd2 = new Random();
public int variety = 1000;
public int populationPhase = 10000;
public int mainPhase = 50000;
public int removalPhase = 20000;
public void start(IdentityMapping mapping) {
try {
SimpleIdentityMapping refMap = new SimpleIdentityMapping();
int n = 0;
// population
while(n < populationPhase) {
if (probability(0.8)) {
ByteChunk key = randomBytes(nextKey());
if (key.toString().equals("[8ea5456f.c07d6f79.8bbbade2.30]")) {
System.out.println("++" + key + " at " + refMap.cardinality(key));
}
int id = mapping.map(key);
if (key.toString().equals("[8bea12ce.b9527aae.11377490.f1]")) {
new String(); // ((IdentityMappingHashTable)mapping)._debug_dump();
}
refMap.map(key, id);
}
else {
while(true) {
ByteChunk key = randomBytes(nextKey());
if (key.toString().equals("[8bea12ce.b9527aae.11377490.f1]")) {
new String();
}
int id = refMap.getIdByChunk(key);
if (id == IdentityMapping.UNMAPPED) {
continue;
}
if (key.toString().equals("[8ea5456f.c07d6f79.8bbbade2.30]")) {
System.out.println("--" + key + " at " + refMap.cardinality(key));
}
if (probability(0.5)) {
mapping.unmap(id);
refMap.unmap(id);
}
else {
mapping.unmap(key);
refMap.unmap(key);
}
break;
}
}
++n;
if (n % 100 == 0) {
compare(mapping, refMap);
}
Assert.assertEquals(refMap.size(), mapping.size());
}
n = 0;
// population
while(n < mainPhase) {
if (probability(0.5)) {
ByteChunk key = randomBytes(nextKey());
if (key.toString().equals("[8ea5456f.c07d6f79.8bbbade2.30]")) {
System.out.println("++" + key + " at " + refMap.cardinality(key));
}
int id = mapping.map(key);
refMap.map(key, id);
Assert.assertEquals(refMap.size(), mapping.size());
}
else {
while(true) {
ByteChunk key = randomBytes(nextKey());
int id = refMap.getIdByChunk(key);
if (id == IdentityMapping.UNMAPPED) {
continue;
}
if (key.toString().equals("[8ea5456f.c07d6f79.8bbbade2.30]")) {
System.out.println("--" + key + " at " + refMap.cardinality(id));
}
if (probability(0.5)) {
mapping.unmap(id);
refMap.unmap(id);
if (refMap.size() != mapping.size()) {
Assert.assertEquals(refMap.size(), mapping.size());
}
}
else {
mapping.unmap(key);
refMap.unmap(key);
Assert.assertEquals(refMap.size(), mapping.size());
}
break;
}
}
++n;
if (n % 100 == 0) {
compare(mapping, refMap);
}
Assert.assertEquals(refMap.size(), mapping.size());
}
n = 0;
// removal phase
while(n < removalPhase) {
if (refMap.size() == 0) {
break;
}
if (probability(0.2)) {
ByteChunk key = randomBytes(nextKey());
int id = mapping.map(key);
refMap.map(key, id);
}
else {
while(true) {
ByteChunk key;
int id;
if (probability(0.8)) {
key = randomBytes(nextKey());
id = refMap.getIdByChunk(key);
if (id == IdentityMapping.UNMAPPED) {
continue;
}
}
else {
id = refMap.getValidId();
key = refMap.getChunkById(id);
}
if (probability(0.5)) {
mapping.unmap(id);
refMap.unmap(id);
}
else {
mapping.unmap(key);
refMap.unmap(key);
}
break;
}
}
++n;
if (n % 100 == 0) {
compare(mapping, refMap);
}
Assert.assertEquals(refMap.size(), mapping.size());
}
compare(mapping, refMap);
}
catch(RuntimeException e) {
((IdentityMappingHashTable)mapping)._debug_dump();
throw e;
}
catch(AssertionError e) {
((IdentityMappingHashTable)mapping)._debug_dump();
throw e;
}
}
public boolean probability(double x) {
return rnd.nextDouble() < x;
}
public int nextKey() {
return rnd.nextInt(variety);
}
public ByteChunk randomBytes(int n) {
rnd2.setSeed(n);
int len = 8 + rnd2.nextInt(8);
byte[] chunk = new byte[len];
rnd2.nextBytes(chunk);
return new ByteChunk(chunk);
}
public void compare(IdentityMapping mapping, SimpleIdentityMapping refMapping) {
for(int i = 0; i != variety; ++i) {
ByteChunk key = randomBytes(i);
int id = refMapping.getIdByChunk(key);
Assert.assertEquals(id, mapping.getIdByChunk(key));
if (id != IdentityMapping.UNMAPPED) {
Assert.assertEquals(key.toString(), String.valueOf(mapping.getChunkById(id)));
}
}
Assert.assertEquals(mapping.size(), refMapping.size());
}
}
|
[
"alexey.ragozin@gmail.com"
] |
alexey.ragozin@gmail.com
|
1598746175abb8db3a7c2f643cb72f6ff1d6c842
|
f7ee4dd643bb90f34c5a1d83f79d79e2168868b8
|
/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/ONetworkProtocolHttpDb.java
|
fbe0157889379e7f67d44f0adca9c0e947af67b5
|
[
"Apache-2.0"
] |
permissive
|
Spaceghost/OrientDB
|
0fa11226077c8b7f62303803f50ed7eac5734f2c
|
f1ec2f096f0939fc4a92c5d1e8b6a6f4a8e39811
|
refs/heads/master
| 2020-07-04T04:10:58.338784
| 2011-12-18T00:39:19
| 2011-12-18T00:39:19
| 3,003,611
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,957
|
java
|
/*
* Copyright 1999-2010 Luca Garulli (l.garulli--at--orientechnologies.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.orientechnologies.orient.server.network.protocol.http;
import java.io.IOException;
import java.net.Socket;
import com.orientechnologies.orient.core.OConstants;
import com.orientechnologies.orient.core.config.OContextConfiguration;
import com.orientechnologies.orient.server.OClientConnection;
import com.orientechnologies.orient.server.network.protocol.http.command.delete.OServerCommandDeleteClass;
import com.orientechnologies.orient.server.network.protocol.http.command.delete.OServerCommandDeleteDatabase;
import com.orientechnologies.orient.server.network.protocol.http.command.delete.OServerCommandDeleteDocument;
import com.orientechnologies.orient.server.network.protocol.http.command.delete.OServerCommandDeleteProperty;
import com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetClass;
import com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetCluster;
import com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetConnect;
import com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetDatabase;
import com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetDictionary;
import com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetDisconnect;
import com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetDocument;
import com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetServer;
import com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetStaticContent;
import com.orientechnologies.orient.server.network.protocol.http.command.options.OServerCommandOptions;
import com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostClass;
import com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand;
import com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostDatabase;
import com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostDocument;
import com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostProperty;
import com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostQuery;
import com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio;
import com.orientechnologies.orient.server.network.protocol.http.command.put.OServerCommandPutDocument;
public class ONetworkProtocolHttpDb extends ONetworkProtocolHttpAbstract {
private static final String ORIENT_SERVER_DB = "OrientDB Server v." + OConstants.ORIENT_VERSION;
@Override
public void config(final Socket iSocket, final OClientConnection iConnection, final OContextConfiguration iConfiguration)
throws IOException {
setName("HTTP-DB");
data.serverInfo = ORIENT_SERVER_DB;
registerCommand(new OServerCommandGetConnect());
registerCommand(new OServerCommandGetDisconnect());
registerCommand(new OServerCommandGetClass());
registerCommand(new OServerCommandGetCluster());
registerCommand(new OServerCommandGetDatabase());
registerCommand(new OServerCommandGetDictionary());
registerCommand(new OServerCommandGetDocument());
registerCommand(new OServerCommandPostQuery());
registerCommand(new OServerCommandGetServer());
registerCommand(new OServerCommandGetStaticContent());
registerCommand(new OServerCommandPostClass());
registerCommand(new OServerCommandPostCommand());
registerCommand(new OServerCommandPostDatabase());
registerCommand(new OServerCommandPostDocument());
registerCommand(new OServerCommandPostProperty());
registerCommand(new OServerCommandPostStudio());
registerCommand(new OServerCommandPutDocument());
registerCommand(new OServerCommandDeleteClass());
registerCommand(new OServerCommandDeleteDatabase());
registerCommand(new OServerCommandDeleteDocument());
registerCommand(new OServerCommandDeleteProperty());
registerCommand(new OServerCommandOptions());
super.config(iSocket, iConnection, iConfiguration);
}
}
|
[
"l.garulli@gmail.com"
] |
l.garulli@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.