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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
252be04e01fbe60eba039b3b5d35508b39977ca1
|
eca4a253fe0eba19f60d28363b10c433c57ab7a1
|
/apps/jacob.missioncontrol/java/jacob/event/data/Sub_sp_oneTableRecord.java
|
d36c1b471320ec36b4d911e87002caeede168f84
|
[] |
no_license
|
freegroup/Open-jACOB
|
632f20575092516f449591bf6f251772f599e5fc
|
84f0a6af83876bd21c453132ca6f98a46609f1f4
|
refs/heads/master
| 2021-01-10T11:08:03.604819
| 2015-05-25T10:25:49
| 2015-05-25T10:25:49
| 36,183,560
| 0
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 2,209
|
java
|
/*
* Created on 09.08.2004
*
* To change the template for this generated file go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
package jacob.event.data;
import de.tif.jacob.core.data.IDataTableRecord;
import de.tif.jacob.core.data.IDataTransaction;
import de.tif.jacob.core.data.event.DataTableRecordEventHandler;
import de.tif.jacob.core.exception.UserException;
/**
*
* @author andreas
*/
public class Sub_sp_oneTableRecord extends DataTableRecordEventHandler
{
/*
* (non-Javadoc)
*
* @see de.tif.jacob.core.data.event.DataTableRecordEventHandler#afterCommitAction(de.tif.jacob.core.data.IDataTableRecord)
*/
public void afterCommitAction(IDataTableRecord tableRecord) throws Exception
{
}
/*
* (non-Javadoc)
*
* @see de.tif.jacob.core.data.event.DataTableRecordEventHandler#afterDeleteAction(de.tif.jacob.core.data.IDataTableRecord,
* de.tif.jacob.core.data.IDataTransaction)
*/
public void afterDeleteAction(IDataTableRecord tableRecord, IDataTransaction transaction) throws Exception
{
}
/*
* (non-Javadoc)
*
* @see de.tif.jacob.core.data.event.DataTableRecordEventHandler#afterNewAction(de.tif.jacob.core.data.IDataTableRecord,
* de.tif.jacob.core.data.IDataTransaction)
*/
public void afterNewAction(IDataTableRecord tableRecord, IDataTransaction transaction) throws Exception
{
}
/*
* (non-Javadoc)
*
* @see de.tif.jacob.core.data.event.DataTableRecordEventHandler#beforeCommitAction(de.tif.jacob.core.data.IDataTableRecord,
* de.tif.jacob.core.data.IDataTransaction)
*/
public void beforeCommitAction(IDataTableRecord tableRecord, IDataTransaction transaction) throws Exception
{
if (!tableRecord.isDeleted())
{
IDataTableRecord mainSupplier = tableRecord.getAccessor().getTable("main_supplier").getSelectedRecord();
if (tableRecord.hasNullValue("main_supplier_key") && mainSupplier == null)
{
throw new UserException("Bitte wählen Sie zuerst einen Mainsupplier aus");
}
if (mainSupplier != null)
tableRecord.setValue(transaction, "main_supplier_key", mainSupplier.getValue("pkey"));
}
}
}
|
[
"a.herz@freegroup.de"
] |
a.herz@freegroup.de
|
890ce32f15a15ad8ee026272b02009020eabd2a7
|
0c359e241cce729ce777db41d3a4feefa48c30c0
|
/src/main/java/com/controllerface/cmdr_j/classes/recipes/hullreinforcement/advanced/HullReinforcement_Advanced_2.java
|
66931e13c71eb9cd96864230f67966a56c3f9419
|
[] |
no_license
|
controllerface/CMDR-J
|
760cafe4b89fc86715ee7941d66eaaf7978cf067
|
9fc70e1ae2f2119e3dc93bbc9a26544526beb56a
|
refs/heads/main
| 2022-09-29T02:43:58.308231
| 2022-09-12T02:09:01
| 2022-09-12T02:09:01
| 128,938,494
| 1
| 1
| null | 2021-11-21T01:42:20
| 2018-04-10T13:37:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,192
|
java
|
package com.controllerface.cmdr_j.classes.recipes.hullreinforcement.advanced;
import com.controllerface.cmdr_j.classes.data.ItemEffects;
import com.controllerface.cmdr_j.classes.data.CostData;
import com.controllerface.cmdr_j.classes.data.ItemEffectData;
import com.controllerface.cmdr_j.classes.recipes.AbstractModificationRecipe;
import com.controllerface.cmdr_j.enums.costs.materials.Material;
import com.controllerface.cmdr_j.enums.equipment.modules.stats.ItemEffect;
import com.controllerface.cmdr_j.enums.equipment.modules.stats.ItemGrade;
public class HullReinforcement_Advanced_2 extends AbstractModificationRecipe
{
public HullReinforcement_Advanced_2()
{
super(HullReinforcement_Advanced_2.class.getSimpleName(), ItemGrade.GRADE_2,
new ItemEffects
(
new ItemEffectData(ItemEffect.DefenceModifierHealthAddition_Percent, -8d),
new ItemEffectData(ItemEffect.DefenceModifierHealthMultiplier, 12d),
new ItemEffectData(ItemEffect.Mass_Percent, -12d)
),
new CostData(Material.CONDUCTIVECOMPONENTS, 1),
new CostData(Material.IRON, 1));
}
}
|
[
"controll.face@gmail.com"
] |
controll.face@gmail.com
|
74f9c6274250d8414be0875fd31142bb38c7e4be
|
2b4f4b41e8a28a5024d41223b2876c87ee1eaa1a
|
/Eis-portlet/docroot/WEB-INF/service/com/idetronic/eis/model/KpiModel.java
|
4cec6bb096fd6ec4bead49fbf287e2d56107c463
|
[] |
no_license
|
merbauraya/lportal6.2
|
48bb99e5b6b937fce6e20e5c76303c4982bcad02
|
e7446107fd793a8ab557b4748f3214a83dbe6ce6
|
refs/heads/master
| 2021-01-21T19:51:52.682108
| 2017-08-08T14:42:38
| 2017-08-08T14:42:38
| 92,167,957
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,339
|
java
|
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* 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.
*/
package com.idetronic.eis.model;
import com.liferay.portal.kernel.bean.AutoEscape;
import com.liferay.portal.model.BaseModel;
import com.liferay.portal.model.CacheModel;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.expando.model.ExpandoBridge;
import java.io.Serializable;
/**
* The base model interface for the Kpi service. Represents a row in the "eis_Kpi" database table, with each column mapped to a property of this class.
*
* <p>
* This interface and its corresponding implementation {@link com.idetronic.eis.model.impl.KpiModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link com.idetronic.eis.model.impl.KpiImpl}.
* </p>
*
* @author Mazlan Mat
* @see Kpi
* @see com.idetronic.eis.model.impl.KpiImpl
* @see com.idetronic.eis.model.impl.KpiModelImpl
* @generated
*/
public interface KpiModel extends BaseModel<Kpi> {
/*
* NOTE FOR DEVELOPERS:
*
* Never modify or reference this interface directly. All methods that expect a kpi model instance should use the {@link Kpi} interface instead.
*/
/**
* Returns the primary key of this kpi.
*
* @return the primary key of this kpi
*/
public long getPrimaryKey();
/**
* Sets the primary key of this kpi.
*
* @param primaryKey the primary key of this kpi
*/
public void setPrimaryKey(long primaryKey);
/**
* Returns the ID of this kpi.
*
* @return the ID of this kpi
*/
public long getId();
/**
* Sets the ID of this kpi.
*
* @param id the ID of this kpi
*/
public void setId(long id);
/**
* Returns the key of this kpi.
*
* @return the key of this kpi
*/
@AutoEscape
public String getKey();
/**
* Sets the key of this kpi.
*
* @param key the key of this kpi
*/
public void setKey(String key);
/**
* Returns the kpi type of this kpi.
*
* @return the kpi type of this kpi
*/
public int getKpiType();
/**
* Sets the kpi type of this kpi.
*
* @param kpiType the kpi type of this kpi
*/
public void setKpiType(int kpiType);
/**
* Returns the value of this kpi.
*
* @return the value of this kpi
*/
public int getValue();
/**
* Sets the value of this kpi.
*
* @param value the value of this kpi
*/
public void setValue(int value);
/**
* Returns the description of this kpi.
*
* @return the description of this kpi
*/
@AutoEscape
public String getDescription();
/**
* Sets the description of this kpi.
*
* @param description the description of this kpi
*/
public void setDescription(String description);
@Override
public boolean isNew();
@Override
public void setNew(boolean n);
@Override
public boolean isCachedModel();
@Override
public void setCachedModel(boolean cachedModel);
@Override
public boolean isEscapedModel();
@Override
public Serializable getPrimaryKeyObj();
@Override
public void setPrimaryKeyObj(Serializable primaryKeyObj);
@Override
public ExpandoBridge getExpandoBridge();
@Override
public void setExpandoBridgeAttributes(BaseModel<?> baseModel);
@Override
public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge);
@Override
public void setExpandoBridgeAttributes(ServiceContext serviceContext);
@Override
public Object clone();
@Override
public int compareTo(com.idetronic.eis.model.Kpi kpi);
@Override
public int hashCode();
@Override
public CacheModel<com.idetronic.eis.model.Kpi> toCacheModel();
@Override
public com.idetronic.eis.model.Kpi toEscapedModel();
@Override
public com.idetronic.eis.model.Kpi toUnescapedModel();
@Override
public String toString();
@Override
public String toXmlString();
}
|
[
"mazlan.mat@gmail.com"
] |
mazlan.mat@gmail.com
|
0aa2cfbdf24c2442d304c8f08b61b856718501c5
|
83e81c25b1f74f88ed0f723afc5d3f83e7d05da8
|
/packages/SystemUI/plugin/src/com/android/systemui/plugins/DozeServicePlugin.java
|
468a9e0dd018d20042fe50dc151710ae4b53732b
|
[
"Apache-2.0",
"LicenseRef-scancode-unicode"
] |
permissive
|
Ankits-lab/frameworks_base
|
8a63f39a79965c87a84e80550926327dcafb40b7
|
150a9240e5a11cd5ebc9bb0832ce30e9c23f376a
|
refs/heads/main
| 2023-02-06T03:57:44.893590
| 2020-11-14T09:13:40
| 2020-11-14T09:13:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 581
|
java
|
package com.android.systemui.plugins;
import com.android.systemui.plugins.annotations.ProvidesInterface;
@ProvidesInterface(action = DozeServicePlugin.ACTION, version = DozeServicePlugin.VERSION)
public interface DozeServicePlugin extends Plugin {
String ACTION = "com.android.systemui.action.PLUGIN_DOZE";
int VERSION = 1;
public interface RequestDoze {
void onRequestShowDoze();
void onRequestHideDoze();
}
void onDreamingStarted();
void onDreamingStopped();
void setDozeRequester(RequestDoze requester);
}
|
[
"keneankit01@gmail.com"
] |
keneankit01@gmail.com
|
c57a8edff60e04a97ea3434b1196698d4f2f5874
|
ae2f39269b3bc7df1981ba21a58027c540763f4a
|
/example-thymeleaf/src/main/java/com/dicka/examplethymeleaf/repository/VendorRepository.java
|
ee7f36fc614b142e2e4cb134fce77ceafbd339a2
|
[] |
no_license
|
dickanirwansyah/spring-boot-course
|
50599fea1302476ddd7404616420b9853842cbf8
|
c496b89632226124360fb5064d3384e9ba893229
|
refs/heads/master
| 2023-04-27T04:46:42.645056
| 2020-05-11T11:28:52
| 2020-05-11T11:28:52
| 228,291,205
| 0
| 1
| null | 2023-04-14T17:54:55
| 2019-12-16T03:00:50
|
Java
|
UTF-8
|
Java
| false
| false
| 270
|
java
|
package com.dicka.examplethymeleaf.repository;
import com.dicka.examplethymeleaf.model.Vendor;
import org.springframework.data.jpa.repository.JpaRepository;
public interface VendorRepository extends JpaRepository<Vendor, Long> {
Vendor findVendorById(Long id);
}
|
[
"dickanirwansyah@gmail.com"
] |
dickanirwansyah@gmail.com
|
7c155866bf6bc8d8395551a5d295716932eeeb57
|
c67f25ca1b8385860b895b6aff47d91e0218e113
|
/src/main/java/br/com/swconsultoria/efd/icms/registros/bloco1/Registro1255.java
|
17113ee3498d80bc7db5630c9fec5be8738208d9
|
[
"MIT"
] |
permissive
|
wdpimenta/Java-Efd-Icms
|
db32b4c79fc47334a77126e580cf638b109524ae
|
25f05bfdc7835aed9ac33f21dcc2a73dc1863199
|
refs/heads/master
| 2023-02-17T04:41:50.393369
| 2021-01-13T20:30:04
| 2021-01-13T20:30:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,843
|
java
|
/**
*
*/
package br.com.swconsultoria.efd.icms.registros.bloco1;
/**
* @author Samuel Oliveira
*/
public class Registro1255 {
private final String reg = "1255";
private String cod_mot_rest_compl;
private String vl_credito_icms_op_mot;
private String vl_icms_st_rest_mot;
private String vl_fcp_st_rest_mot;
private String vl_icms_st_compl_mot;
private String vl_fcp_st_compl_mot;
public String getCod_mot_rest_compl() {
return cod_mot_rest_compl;
}
public void setCod_mot_rest_compl(String cod_mot_rest_compl) {
this.cod_mot_rest_compl = cod_mot_rest_compl;
}
public String getVl_credito_icms_op_mot() {
return vl_credito_icms_op_mot;
}
public void setVl_credito_icms_op_mot(String vl_credito_icms_op_mot) {
this.vl_credito_icms_op_mot = vl_credito_icms_op_mot;
}
public String getVl_icms_st_rest_mot() {
return vl_icms_st_rest_mot;
}
public void setVl_icms_st_rest_mot(String vl_icms_st_rest_mot) {
this.vl_icms_st_rest_mot = vl_icms_st_rest_mot;
}
public String getVl_fcp_st_rest_mot() {
return vl_fcp_st_rest_mot;
}
public void setVl_fcp_st_rest_mot(String vl_fcp_st_rest_mot) {
this.vl_fcp_st_rest_mot = vl_fcp_st_rest_mot;
}
public String getVl_icms_st_compl_mot() {
return vl_icms_st_compl_mot;
}
public void setVl_icms_st_compl_mot(String vl_icms_st_compl_mot) {
this.vl_icms_st_compl_mot = vl_icms_st_compl_mot;
}
public String getVl_fcp_st_compl_mot() {
return vl_fcp_st_compl_mot;
}
public void setVl_fcp_st_compl_mot(String vl_fcp_st_compl_mot) {
this.vl_fcp_st_compl_mot = vl_fcp_st_compl_mot;
}
/**
* @return the reg
*/
public String getReg() {
return reg;
}
}
|
[
"samuk.exe@hotmail.com"
] |
samuk.exe@hotmail.com
|
847454a73f3fe24aaf8daceeb54c921db1f7dd35
|
c8688db388a2c5ac494447bac90d44b34fa4132c
|
/sources/com/google/android/gms/internal/measurement/zzpe.java
|
7bedd3fb0edb7f35b36abc43c37362380c70ab74
|
[] |
no_license
|
mred312/apk-source
|
98dacfda41848e508a0c9db2c395fec1ae33afa1
|
d3ca7c46cb8bf701703468ddc88f25ba4fb9d975
|
refs/heads/master
| 2023-03-06T05:53:50.863721
| 2021-02-23T13:34:20
| 2021-02-23T13:34:20
| 341,481,669
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 507
|
java
|
package com.google.android.gms.internal.measurement;
/* compiled from: com.google.android.gms:play-services-measurement-impl@@17.6.0 */
public final class zzpe implements zzpb {
/* renamed from: a */
private static final zzdh<Boolean> f17901a = new zzdm(zzde.zza("com.google.android.gms.measurement")).zza("measurement.client.string_reader", true);
public final boolean zza() {
return true;
}
public final boolean zzb() {
return f17901a.zzc().booleanValue();
}
}
|
[
"mred312@gmail.com"
] |
mred312@gmail.com
|
6daf4f2e01b3ffe23ce7e06e1ba824d02a0dee75
|
6c416723727ed6dbf5a046cc63a0f9931169e9cf
|
/app/src/main/java/com/love/novalue/adapter/NinePhotoAdapter.java
|
375785c267fe674862f23b101865c4592dddf52c
|
[] |
no_license
|
payencai/SuperLove
|
bdcf445a488d1c5a2e121eadfb443eb50658b193
|
31813447abd11a5b84aa3eb87ee0a030108f87a9
|
refs/heads/master
| 2020-08-08T08:22:05.745291
| 2019-10-09T16:04:41
| 2019-10-09T16:04:41
| 209,537,592
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,658
|
java
|
package com.love.novalue.adapter;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.jaeger.ninegridimageview.NineGridImageViewAdapter;
import com.love.novalue.R;
import com.love.novalue.tools.PhotoUtil;
import com.love.novalue.ui.SeePhotoActivity;
import com.maning.imagebrowserlibrary.ImageEngine;
import com.maning.imagebrowserlibrary.MNImageBrowser;
import com.maning.imagebrowserlibrary.listeners.OnClickListener;
import com.maning.imagebrowserlibrary.listeners.OnLongClickListener;
import com.maning.imagebrowserlibrary.listeners.OnPageChangeListener;
import com.maning.imagebrowserlibrary.model.ImageBrowserConfig;
import java.util.ArrayList;
import java.util.List;
public class NinePhotoAdapter extends NineGridImageViewAdapter<String> {
private OnPhotoItemClickListener onPhotoItemClickListener;
private List<ImageView> imageViews=new ArrayList<>();
public OnPhotoItemClickListener getOnPhotoItemClickListener() {
return onPhotoItemClickListener;
}
public void setOnPhotoItemClickListener(OnPhotoItemClickListener onPhotoItemClickListener) {
this.onPhotoItemClickListener = onPhotoItemClickListener;
}
public interface OnPhotoItemClickListener{
void onClick(int pos,ImageView imageView);
}
@Override
protected ImageView generateImageView(Context context) {
return super.generateImageView(context);
}
@Override
protected void onItemImageClick(Context context, int index, List<String> list) {
ArrayList<String> photoList=new ArrayList<>();
photoList.addAll(list);
//context.startActivity(new Intent(context, SeePhotoActivity.class));
MNImageBrowser.with(context)
//必须-当前位置
.setCurrentPosition(index)
//必须-图片加载用户自己去选择
.setImageEngine(new ImageEngine() {
@Override
public void loadImage(Context context, String url, ImageView imageView, View progressView) {
Glide.with(context).load(url).into(imageView);
}
})
.setIndicatorType(ImageBrowserConfig.IndicatorType.Indicator_Circle)
//必须(setImageList和setImageUrl二选一,会覆盖)-图片集合
.setImageList(photoList)
//必须(setImageList和setImageUrl二选一,会覆盖)-设置单张图片
//非必须-图片切换动画
.setTransformType(transformType)
//非必须-指示器样式(默认文本样式:两种模式)
//设置隐藏指示器
.setIndicatorHide(false)
//设置自定义遮盖层,定制自己想要的效果,当设置遮盖层后,原本的指示器会被隐藏
//非必须-屏幕方向:横屏,竖屏,Both(默认:横竖屏都支持)
.setScreenOrientationType(screenOrientationType)
//非必须-图片单击监听
.setOnClickListener(new OnClickListener() {
@Override
public void onClick(FragmentActivity activity, ImageView view, int position, String url) {
//单击监听
}
})
//非必须-图片长按监听
.setOnLongClickListener(new OnLongClickListener() {
@Override
public void onLongClick(FragmentActivity activity, ImageView imageView, int position, String url) {
//长按监听
}
})
.setFullScreenMode(true)
//手势下拉缩小效果是否开启
.setOpenPullDownGestureEffect(true).show(generateImageView(context));
//onPhotoItemClickListener.onClick(index,generateImageView(context));
}
@Override
protected void onDisplayImage(Context context, ImageView imageView, String s) {
PhotoUtil.loadPic(context,s,imageView,20);
}
public ImageBrowserConfig.TransformType transformType = ImageBrowserConfig.TransformType.Transform_Default;
public ImageBrowserConfig.IndicatorType indicatorType = ImageBrowserConfig.IndicatorType.Indicator_Number;
public ImageBrowserConfig.ScreenOrientationType screenOrientationType = ImageBrowserConfig.ScreenOrientationType.Screenorientation_Default;
}
|
[
"payencai@sina.com"
] |
payencai@sina.com
|
51a19c8dd6b1392f702f009dceff135a95e3295c
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/playstore_apps/de_number26_android/source/de/number26/machete/android/refactor/a/b/b.java
|
6f8ec4ebdd2e5e336718f11477d2a5d5ce0d634a
|
[
"Apache-2.0"
] |
permissive
|
iantal/AndroidPermissions
|
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
|
d623b732734243590b5f004d167e542e2e2ae249
|
refs/heads/master
| 2023-07-19T01:29:26.689186
| 2019-09-30T19:01:42
| 2019-09-30T19:01:42
| 107,239,248
| 0
| 0
|
Apache-2.0
| 2023-07-16T07:41:38
| 2017-10-17T08:22:57
| null |
UTF-8
|
Java
| false
| false
| 1,332
|
java
|
package de.number26.machete.android.refactor.a.b;
import android.annotation.SuppressLint;
import f.d.b.j;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.joda.time.DateTime;
import org.joda.time.Days;
import org.joda.time.Interval;
import org.joda.time.ReadableInstant;
import org.joda.time.ReadablePeriod;
public final class b
{
@SuppressLint({"SimpleDateFormat"})
public static final String a(Date paramDate, String paramString)
{
j.b(paramDate, "$receiver");
j.b(paramString, "pattern");
SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat();
localSimpleDateFormat.applyLocalizedPattern(paramString);
paramDate = localSimpleDateFormat.format(paramDate);
j.a(paramDate, "simpleDateFormat.format(this)");
return paramDate;
}
public static final boolean a(Date paramDate)
{
j.b(paramDate, "$receiver");
return paramDate.getTime() < System.currentTimeMillis();
}
public static final boolean b(Date paramDate)
{
j.b(paramDate, "$receiver");
return new Interval((ReadableInstant)DateTime.now().withTimeAtStartOfDay(), (ReadablePeriod)Days.ONE).contains(paramDate.getTime());
}
public static final boolean c(Date paramDate)
{
j.b(paramDate, "$receiver");
return paramDate.getTime() > System.currentTimeMillis();
}
}
|
[
"antal.micky@yahoo.com"
] |
antal.micky@yahoo.com
|
235242f4d22d99dbf95b5fc736830c0c72207aef
|
2f5cd5ba8a78edcddf99c7e3c9c19829f9dbd214
|
/java/playgrounds/.svn/pristine/23/235242f4d22d99dbf95b5fc736830c0c72207aef.svn-base
|
2779fc76cdbcc664ff3140bcc338e8196850f659
|
[] |
no_license
|
HTplex/Storage
|
5ff1f23dfe8c05a0a8fe5354bb6bbc57cfcd5789
|
e94faac57b42d6f39c311f84bd4ccb32c52c2d30
|
refs/heads/master
| 2021-01-10T17:43:20.686441
| 2016-04-05T08:56:57
| 2016-04-05T08:56:57
| 55,478,274
| 1
| 1
| null | 2020-10-28T20:35:29
| 2016-04-05T07:43:17
|
Java
|
UTF-8
|
Java
| false
| false
| 2,094
|
/*
* *********************************************************************** *
* project: org.matsim.* *
* *
* *********************************************************************** *
* *
* copyright : (C) 2015 by the members listed in the COPYING, *
* LICENSE and WARRANTY file. *
* email : info at matsim dot org *
* *
* *********************************************************************** *
* *
* 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. *
* See also COPYING, LICENSE and WARRANTY file *
* *
* *********************************************************************** *
*/
package playground.boescpa.converters.osm.tools;
import org.matsim.api.core.v01.Scenario;
import org.matsim.core.config.ConfigUtils;
import org.matsim.core.scenario.ScenarioUtils;
/**
* Provides different useful functions for the OSM-converter-framework.
*
* @author boescpa
*/
public class OsmUtils {
public static Scenario getEmptyPTScenario() {
final Scenario scenario = getEmptyScenario();
scenario.getConfig().scenario().setUseTransit(true);
scenario.getConfig().scenario().setUseVehicles(true);
return scenario;
}
public static Scenario getEmptyScenario() {
return ScenarioUtils.createScenario(ConfigUtils.createConfig());
}
}
|
[
"htplex@gmail.com"
] |
htplex@gmail.com
|
|
e66cc65f6fd66bc9805a50ba16d339650a127aea
|
6ab29844307729a81cfd92fcf69baf121e47edc2
|
/BashSoftGeorge777/src/exceptions/InvalidFilterException.java
|
062ac46de0dea08aa9ba6e44ee8241a97523eac0
|
[
"MIT"
] |
permissive
|
GeorgeK95/JavaOOPBasics
|
c91f277502fa3343da3156382efc7bc2442dbe41
|
20103f4babdeebb0bdd487a45362e2be63ce38e5
|
refs/heads/master
| 2021-05-08T02:43:51.631543
| 2017-11-13T09:38:32
| 2017-11-13T09:38:32
| 108,131,102
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 280
|
java
|
package exceptions;
/**
* Created by George-Lenovo on 6/29/2017.
*/
public class InvalidFilterException extends RuntimeException {
private static final String INVALID_FILTER = "Invalid filter.";
public InvalidFilterException() {
super(INVALID_FILTER);
}
}
|
[
"george_it@abv.bg"
] |
george_it@abv.bg
|
421b22d2b4e855b892eac5bb1a74c51665a966e6
|
a98021b825f3c004421330cdfdc0f1a27d5c2317
|
/ejb/ejb-interceptor/ejb-interceptor-example/ejb-interceptor-example-ejb/src/main/java/info/ejava/examples/ejb/interceptor/bo/PreNormalizedCheck.java
|
20328651dd3f51e71fc539679720aa15c6432d18
|
[] |
no_license
|
ejavaguy/ejava-student
|
78e9c9a11250ed7bc0f32a5cc8cd1bc80dbc919a
|
0dc378dcf4a7f56a1f40ec2c9cee0ec269d6e87f
|
refs/heads/master
| 2022-11-30T18:37:18.070284
| 2019-08-22T11:03:56
| 2019-08-22T11:03:56
| 19,055,611
| 5
| 7
| null | 2022-11-24T09:36:48
| 2014-04-23T03:27:01
|
Java
|
UTF-8
|
Java
| false
| false
| 177
|
java
|
package info.ejava.examples.ejb.interceptor.bo;
/**
* Defines a group of validation that can be done prior to data normalization.
*/
public interface PreNormalizedCheck {
}
|
[
"ejavaguy@gmail.com"
] |
ejavaguy@gmail.com
|
eea76ac59d05f4f982ddc337e4624a33b5719a89
|
57186940fb821d566e35d3390a10496d79f659d6
|
/authentication/src/main/java/com/airhacks/ping/boundary/PingResource.java
|
797510ec8cbd60ec08188e8438b7705b8083a5ac
|
[] |
no_license
|
altuga/airhacks_fibers
|
305654fd37476fcd7fc6b740cbea8b4bbc96041a
|
29d899116073451632731ddbad11ae79edcdf157
|
refs/heads/master
| 2020-10-01T23:43:28.915163
| 2019-12-12T16:13:53
| 2019-12-12T16:13:53
| 227,649,373
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 873
|
java
|
package com.airhacks.ping.boundary;
import javax.inject.Inject;
import javax.json.Json;
import javax.json.JsonObject;
import javax.security.enterprise.SecurityContext;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;
import static javax.ws.rs.core.Response.Status.UNAUTHORIZED;
/**
*
* @author airhacks.com
*/
@Path("ping")
public class PingResource {
@Inject
SecurityContext securityContext;
@GET
public Response ping() {
if (securityContext.getCallerPrincipal() != null) {
String userName = securityContext.getCallerPrincipal().getName();
JsonObject result = Json.createObjectBuilder()
.add("user", userName)
.build();
return Response.ok(result).build();
}
return Response.status(UNAUTHORIZED).build();
}
}
|
[
"abien@adam-bien.com"
] |
abien@adam-bien.com
|
6b9cdbba4ed4f7a23f06bb4a14608aa654bca295
|
462c6815dadc83b1bd406fba29ab0c905cf4bc05
|
/src/bee/generated/client/ImagingSettingsExtension.java
|
f759ff97dd089c25e3552cab5ad4a768c20f5b63
|
[] |
no_license
|
francoisperron/learning-soap-onvif
|
ab89b38d770547c0b9ad17a45865c7b8adea5d09
|
6a0ed9167ad8c2369993da21a5d115a309f42e16
|
refs/heads/master
| 2020-05-14T23:53:35.084374
| 2019-04-18T02:33:17
| 2019-04-18T02:33:17
| 182,002,749
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,869
|
java
|
package bee.generated.client;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* <p>Java class for ImagingSettingsExtension complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ImagingSettingsExtension">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ImagingSettingsExtension", propOrder = {
"any"
})
public class ImagingSettingsExtension {
@XmlAnyElement(lax = true)
protected List<Object> any;
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
}
|
[
"fperron@gmail.com"
] |
fperron@gmail.com
|
509b2eb759fdf162e8ce198b0da94fc5086035b6
|
7e965ea8ef5ae65694a733106fdf2b8dcbff78fb
|
/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transforms/TimeZoneSwap.java
|
485ea68c4646736ca6514051d448e0889c0da49b
|
[
"Apache-2.0"
] |
permissive
|
robledokari/juneau
|
ff8c94fc1f5e2655d744a08921b4ffb4e6e0fe71
|
62954378a5422ea5abbfd15277c12c220aef21e5
|
refs/heads/master
| 2020-08-07T11:31:10.015635
| 2019-10-07T16:45:44
| 2019-10-07T16:45:44
| 213,432,027
| 0
| 0
|
Apache-2.0
| 2019-10-07T16:24:48
| 2019-10-07T16:24:48
| null |
UTF-8
|
Java
| false
| false
| 2,072
|
java
|
// ***************************************************************************************************************************
// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
// * with the License. You may obtain a copy of the License at *
// * *
// * http://www.apache.org/licenses/LICENSE-2.0 *
// * *
// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
// * specific language governing permissions and limitations under the License. *
// ***************************************************************************************************************************
package org.apache.juneau.transforms;
import java.util.*;
import org.apache.juneau.*;
import org.apache.juneau.transform.*;
/**
* Transforms {@link TimeZone} objects to and from {@link String Strings}.
*/
public class TimeZoneSwap extends StringSwap<TimeZone> {
@Override /* PojoSwap */
public String swap(BeanSession session, TimeZone o) throws Exception {
return o.getID();
}
@Override /* PojoSwap */
public TimeZone unswap(BeanSession session, String o, ClassMeta<?> hint) throws Exception {
return TimeZone.getTimeZone(o);
}
}
|
[
"jamesbognar@apache.org"
] |
jamesbognar@apache.org
|
fc8f6dc3398a2c8fa6d670dba6ba7a8ae7b3f176
|
fa921a22613a282a67233e120a599b4f961d8be6
|
/server/implementation/src/main/java/io/smallrye/graphql/execution/GraphQLVariables.java
|
c857e8bda5d54b27650814df6f0616933bb12dba
|
[
"Apache-2.0"
] |
permissive
|
gitter-badger/smallrye-graphql
|
ab4bcb44224a757245fab6b6f2bd3314a1b64457
|
221158cdd533fead1fe124703455128a46ee5842
|
refs/heads/master
| 2022-06-04T03:10:24.716224
| 2020-05-06T09:58:38
| 2020-05-06T09:58:38
| 261,730,884
| 0
| 0
|
Apache-2.0
| 2020-05-06T10:54:56
| 2020-05-06T10:54:55
| null |
UTF-8
|
Java
| false
| false
| 3,516
|
java
|
package io.smallrye.graphql.execution;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import javax.json.JsonArray;
import javax.json.JsonNumber;
import javax.json.JsonObject;
import javax.json.JsonString;
import javax.json.JsonValue;
import org.jboss.logging.Logger;
/**
* The variables on the GraphQL Operation
*
* @author Phillip Kruger (phillip.kruger@redhat.com)
*/
public class GraphQLVariables {
private static final Logger LOG = Logger.getLogger(GraphQLVariables.class.getName());
public Optional<Map<String, Object>> getVariables(JsonObject jsonInput) {
if (!jsonInput.containsKey(VARIABLES)
|| jsonInput.get(VARIABLES) == null
|| jsonInput.get(VARIABLES).getValueType().equals(JsonValue.ValueType.NULL)) {
return Optional.empty();
}
JsonValue.ValueType valueType = jsonInput.get(VARIABLES).getValueType();
if (valueType.equals(JsonValue.ValueType.STRING)) {
String stringVars = jsonInput.getString(VARIABLES);
LOG.warn("We got a String as input for Variables, not sure what to do with that [" + stringVars + "]");
return Optional.empty();
} else {
JsonValue jvariables = jsonInput.get(VARIABLES);
return getVariables(jvariables);
}
}
private Optional<Map<String, Object>> getVariables(JsonValue jsonValue) {
if (null != jsonValue
&& !JsonValue.NULL.equals(jsonValue)
&& !JsonValue.EMPTY_JSON_OBJECT.equals(jsonValue)
&& !JsonValue.EMPTY_JSON_ARRAY.equals(jsonValue)) {
return Optional.of(toMap(jsonValue.asJsonObject()));
}
return Optional.empty();
}
private Map<String, Object> toMap(JsonObject jo) {
Map<String, Object> ro = new HashMap<>();
if (jo != null) {
Set<Map.Entry<String, JsonValue>> entrySet = jo.entrySet();
for (Map.Entry<String, JsonValue> es : entrySet) {
ro.put(es.getKey(), toObject(es.getValue()));
}
}
return ro;
}
private Object toObject(JsonValue jsonValue) {
Object ret = null;
JsonValue.ValueType typ = jsonValue.getValueType();
if (null != typ)
switch (typ) {
case NUMBER:
ret = ((JsonNumber) jsonValue).bigDecimalValue();
break;
case STRING:
ret = ((JsonString) jsonValue).getString();
break;
case FALSE:
ret = Boolean.FALSE;
break;
case TRUE:
ret = Boolean.TRUE;
break;
case ARRAY:
JsonArray arr = (JsonArray) jsonValue;
List<Object> vals = new ArrayList<>();
int sz = arr.size();
for (int i = 0; i < sz; i++) {
JsonValue v = arr.get(i);
vals.add(toObject(v));
}
ret = vals;
break;
case OBJECT:
ret = toMap((JsonObject) jsonValue);
break;
default:
break;
}
return ret;
}
private static final String VARIABLES = "variables";
}
|
[
"phillip.kruger@gmail.com"
] |
phillip.kruger@gmail.com
|
38d399776de04eab5c97d77912d7f14668a0445d
|
de5373a5b728a65f8826904cea37c25d3c3f6200
|
/src/java/com/bds/ws/services/IbClavesOperacionesEspecialesWs.java
|
d2902bcb864ba6a8b734114c30e70bddc186de9b
|
[] |
no_license
|
duna05/ibdsws
|
960fd123a4df66c8fb5f68ee7495d363581fda39
|
abfa12fdadccf171d65b0be835cdd2471004959f
|
refs/heads/master
| 2020-05-22T00:45:15.948298
| 2019-05-11T20:48:47
| 2019-05-11T20:48:47
| 186,178,839
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,792
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.bds.ws.services;
import com.bds.ws.dao.IbClavesOperacionesEspecialesDAO;
import com.bds.ws.dto.UtilDTO;
import javax.ejb.EJB;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
/**
*
* @author ledwin.belen
*/
@WebService(serviceName = "IbClavesOperacionesEspecialesWs")
public class IbClavesOperacionesEspecialesWs {
@EJB
IbClavesOperacionesEspecialesDAO ibClavesOperacionesEspecialesDAO;
/**
* Métod para validar la clave de operaciones especiales porporcionada por
* el usuario
*
* @param idUsuario
* @param claveOP
* @param idCanal
* @param codigoCanal
* @return
*/
@WebMethod(operationName = "validarClaveOP")
public UtilDTO validarClaveOP(
@WebParam(name = "idUsuario") String idUsuario,
@WebParam(name = "claveOP") String claveOP,
@WebParam(name = "idCanal") String idCanal,
@WebParam(name = "codigoCanal") String codigoCanal) {
return ibClavesOperacionesEspecialesDAO.validarClaveOP(idUsuario, claveOP, idCanal, codigoCanal);
}
/**
* Método para crear o modificar la clave de operaciones especiales
*
* @param idUsuario
* @param claveOP
* @param idUsuarioCarga
* @param sw
* @param idCanal
* @param codigoCanal
* @return
*/
@WebMethod(operationName = "insertarActualizarClaveOP")
public UtilDTO insertarActualizarClaveOP(
@WebParam(name = "idUsuario") String idUsuario,
@WebParam(name = "claveOP") String claveOP,
@WebParam(name = "idUsuarioCarga") String idUsuarioCarga,
@WebParam(name = "sw") boolean sw,
@WebParam(name = "idCanal") String idCanal,
@WebParam(name = "codigoCanal") String codigoCanal) {
return ibClavesOperacionesEspecialesDAO.insertarActualizarClaveOP(idUsuario, claveOP, idUsuarioCarga, sw, idCanal, codigoCanal);
}
/**
* Valida que el usuario tenga un registro de las claves de operaciones especiales
* @param idUsuario
* @param idCanal
* @param codigoCanal
* @return
*/
@WebMethod(operationName = "validarExisteClaveOperacionesEspeciales")
public boolean validarExisteClaveOperacionesEspeciales(
@WebParam(name = "idUsuario") String idUsuario,
@WebParam(name = "idCanal") String idCanal,
@WebParam(name = "codigoCanal") String codigoCanal) {
return ibClavesOperacionesEspecialesDAO.validarExisteClaveOperacionesEspeciales(idUsuario, idCanal, codigoCanal);
}
}
|
[
"audra.zapata@delsur.com.ve"
] |
audra.zapata@delsur.com.ve
|
46f5bedc0b4765a1cf40a9f7b2588b28bb2df978
|
de7b67d4f8aa124f09fc133be5295a0c18d80171
|
/workspace_language_implementatin_patterns/llp/src/main/java/IR/Homo/AST.java
|
cf589f4ef50e62f3456fc0adb57ae250b3fb2348
|
[] |
no_license
|
lin-lee/eclipse_workspace_test
|
adce936e4ae8df97f7f28965a6728540d63224c7
|
37507f78bc942afb11490c49942cdfc6ef3dfef8
|
refs/heads/master
| 2021-05-09T10:02:55.854906
| 2018-01-31T07:19:02
| 2018-01-31T07:19:02
| 119,460,523
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,204
|
java
|
package IR.Homo;
import java.util.ArrayList;
import java.util.List;
public class AST {
protected Token token; //From whick token did we create node?
protected List<AST> children; //normalized list of children
public AST(){ //for making nil-rooted nodes
;
}
public AST(Token token){
this.token = token;
}
/** Create node from token type; used mainly for imaginary tokens */
public AST(int tokenType){
this.token = new Token(tokenType);
}
public int getNodeType(){
return token.type;
}
public void addChild(AST t){
if(children == null)
children = new ArrayList<AST>();
children.add(t);
}
public boolean isNil(){
return token==null;
}
@Override
public String toString(){
return token!=null ? token.toString() : "nil";
}
public String toStringTree(){
if(children==null || children.size()==0)
return this.toString();
StringBuilder buf = new StringBuilder();
if(!isNil()){
buf.append("(")
.append(this.toString())
.append(" ");
}
for(int i=0; i<children.size(); i++){
AST t = children.get(i);
if(i>0)
buf.append(" ");
buf.append(t.toStringTree());
}
if(!isNil())
buf.append(")");
return buf.toString();
}
}
|
[
"lilin@lvmama.com"
] |
lilin@lvmama.com
|
03004e016cab87dc4c894c5a6b48003b25aba791
|
77fb90c41fd2844cc4350400d786df99e14fa4ca
|
/com/coremedia/iso/boxes/ItemDataBox.java
|
f85f02167b14a56fee491ed5492057994f4394e2
|
[] |
no_license
|
highnes7/umaang_decompiled
|
341193b25351188d69b4413ebe7f0cde6525c8fb
|
bcfd90dffe81db012599278928cdcc6207632c56
|
refs/heads/master
| 2020-06-19T07:47:18.630455
| 2019-07-12T17:16:13
| 2019-07-12T17:16:13
| 196,615,053
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,164
|
java
|
package com.coremedia.iso.boxes;
import f.h.a.Message;
import java.nio.ByteBuffer;
import org.aspectj.lang.JoinPoint;
public class ItemDataBox
extends Message
{
public static final String TYPE = "idat";
public ByteBuffer data = ByteBuffer.allocate(0);
static {}
public ItemDataBox()
{
super("idat");
}
public void _parseDetails(ByteBuffer paramByteBuffer)
{
data = paramByteBuffer.slice();
int i = paramByteBuffer.position();
paramByteBuffer.position(paramByteBuffer.remaining() + i);
}
public void getContent(ByteBuffer paramByteBuffer)
{
paramByteBuffer.put(data);
}
public long getContentSize()
{
return data.limit();
}
public ByteBuffer getData()
{
JoinPoint localJoinPoint = org.aspectj.runtime.reflect.Factory.makeJP(ajc$tjp_0, this, this);
f.h.a.Factory.aspectOf().before(localJoinPoint);
return data;
}
public void setData(ByteBuffer paramByteBuffer)
{
JoinPoint localJoinPoint = org.aspectj.runtime.reflect.Factory.makeJP(ajc$tjp_1, this, this, paramByteBuffer);
f.h.a.Factory.aspectOf().before(localJoinPoint);
data = paramByteBuffer;
}
}
|
[
"highnes.7@gmail.com"
] |
highnes.7@gmail.com
|
c07e714b00dfeabd96ac94e3b8a1117c552487cb
|
7016cec54fb7140fd93ed805514b74201f721ccd
|
/src/java/com/echothree/model/control/customer/common/transfer/CustomerTypeShippingMethodTransfer.java
|
0ccf30df44e69efa2b607d460e913548f9feadf1
|
[
"MIT",
"Apache-1.1",
"Apache-2.0"
] |
permissive
|
echothreellc/echothree
|
62fa6e88ef6449406d3035de7642ed92ffb2831b
|
bfe6152b1a40075ec65af0880dda135350a50eaf
|
refs/heads/master
| 2023-09-01T08:58:01.429249
| 2023-08-21T11:44:08
| 2023-08-21T11:44:08
| 154,900,256
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,716
|
java
|
// --------------------------------------------------------------------------------
// Copyright 2002-2023 Echo Three, 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.
// --------------------------------------------------------------------------------
package com.echothree.model.control.customer.common.transfer;
import com.echothree.model.control.shipping.common.transfer.ShippingMethodTransfer;
import com.echothree.util.common.transfer.BaseTransfer;
public class CustomerTypeShippingMethodTransfer
extends BaseTransfer {
private CustomerTypeTransfer customerType;
private ShippingMethodTransfer shippingMethod;
private Integer defaultSelectionPriority;
private Boolean isDefault;
private Integer sortOrder;
/** Creates a new instance of CustomerTypeShippingMethodTransfer */
public CustomerTypeShippingMethodTransfer(CustomerTypeTransfer customerType, ShippingMethodTransfer shippingMethod, Integer defaultSelectionPriority,
Boolean isDefault, Integer sortOrder) {
this.customerType = customerType;
this.shippingMethod = shippingMethod;
this.defaultSelectionPriority = defaultSelectionPriority;
this.isDefault = isDefault;
this.sortOrder = sortOrder;
}
/**
* Returns the customerType.
* @return the customerType
*/
public CustomerTypeTransfer getCustomerType() {
return customerType;
}
/**
* Sets the customerType.
* @param customerType the customerType to set
*/
public void setCustomerType(CustomerTypeTransfer customerType) {
this.customerType = customerType;
}
/**
* Returns the shippingMethod.
* @return the shippingMethod
*/
public ShippingMethodTransfer getShippingMethod() {
return shippingMethod;
}
/**
* Sets the shippingMethod.
* @param shippingMethod the shippingMethod to set
*/
public void setShippingMethod(ShippingMethodTransfer shippingMethod) {
this.shippingMethod = shippingMethod;
}
/**
* Returns the defaultSelectionPriority.
* @return the defaultSelectionPriority
*/
public Integer getDefaultSelectionPriority() {
return defaultSelectionPriority;
}
/**
* Sets the defaultSelectionPriority.
* @param defaultSelectionPriority the defaultSelectionPriority to set
*/
public void setDefaultSelectionPriority(Integer defaultSelectionPriority) {
this.defaultSelectionPriority = defaultSelectionPriority;
}
/**
* Returns the isDefault.
* @return the isDefault
*/
public Boolean getIsDefault() {
return isDefault;
}
/**
* Sets the isDefault.
* @param isDefault the isDefault to set
*/
public void setIsDefault(Boolean isDefault) {
this.isDefault = isDefault;
}
/**
* Returns the sortOrder.
* @return the sortOrder
*/
public Integer getSortOrder() {
return sortOrder;
}
/**
* Sets the sortOrder.
* @param sortOrder the sortOrder to set
*/
public void setSortOrder(Integer sortOrder) {
this.sortOrder = sortOrder;
}
}
|
[
"rich@echothree.com"
] |
rich@echothree.com
|
c3acb74e9c51a2b07f18babb1ae36a53f630edc0
|
3efa417c5668b2e7d1c377c41d976ed31fd26fdc
|
/src/br/com/mind5/stats/statsOwnerStore/ownerStoreMonthSearch/model/checker/SowotarchCheckExistMonth.java
|
1a2477c40a83a676a2ac2e0fec09ff5c2fccac09
|
[] |
no_license
|
grazianiborcai/Agenda_WS
|
4b2656716cc49a413636933665d6ad8b821394ef
|
e8815a951f76d498eb3379394a54d2aa1655f779
|
refs/heads/master
| 2023-05-24T19:39:22.215816
| 2023-05-15T15:15:15
| 2023-05-15T15:15:15
| 109,902,084
| 0
| 0
| null | 2022-06-29T19:44:56
| 2017-11-07T23:14:21
|
Java
|
UTF-8
|
Java
| false
| false
| 1,235
|
java
|
package br.com.mind5.stats.statsOwnerStore.ownerStoreMonthSearch.model.checker;
import br.com.mind5.common.SystemCode;
import br.com.mind5.model.action.ActionStd;
import br.com.mind5.model.checker.ModelCheckerOption;
import br.com.mind5.model.checker.ModelCheckerTemplateAction;
import br.com.mind5.model.decisionTree.DeciTreeOption;
import br.com.mind5.stats.statsOwnerStore.ownerStoreMonthSearch.info.SowotarchInfo;
import br.com.mind5.stats.statsOwnerStore.ownerStoreMonthSearch.model.decisionTree.SowotarchRootSelectMonth;
public final class SowotarchCheckExistMonth extends ModelCheckerTemplateAction<SowotarchInfo, SowotarchInfo> {
public SowotarchCheckExistMonth(ModelCheckerOption option) {
super(option, SowotarchInfo.class);
}
@Override protected ActionStd<SowotarchInfo> buildActionHook(DeciTreeOption<SowotarchInfo> option) {
ActionStd<SowotarchInfo> select = new SowotarchRootSelectMonth(option).toAction();
return select;
}
@Override protected int getCodMsgOnResultTrueHook() {
return SystemCode.STAT_OWN_STR_MTH_SRCH_ALREADY_EXIST;
}
@Override protected int getCodMsgOnResultFalseHook() {
return SystemCode.STAT_OWN_STR_MTH_SRCH_NOT_FOUND;
}
}
|
[
"mmaciel@mind5.com.br"
] |
mmaciel@mind5.com.br
|
0855f52f1b075f632e1652ee5d7ae51a132d4fdc
|
a43d4202628ecb52e806d09f0f3dc1f5bab3ef4f
|
/src/main/java/pnc/mesadmin/entity/PrintScriptOutInfo.java
|
b52fe4773e9c16f24aab715a8b078e0d660245db
|
[] |
no_license
|
pnc-mes/base
|
b88583929e53670340a704f848e4e9e2027f1334
|
162135b8752b4edc397b218ffd26664929f6920d
|
refs/heads/main
| 2023-01-07T22:06:10.794300
| 2020-10-27T07:47:20
| 2020-10-27T07:47:20
| 307,621,190
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,172
|
java
|
package pnc.mesadmin.entity;
import java.util.Date;
/**
* 公司名称:驭航信息技术(上海)有限公司
* 系统名称:PNC-MES管理系统
* 子系统名称:脚本输出参数信息表
* 创建人:潘俊峰
* 创建时间:2018-12-07
* 修改人:
* 修改时间:
*/
public class PrintScriptOutInfo {
private int ruid;
private String guid;
private String printTGd;
private String fieldCode;
private String fieldName;
private String creator;
private Date createTime;
private String lastModifyMan;
private Date lastModifyTime;
private String remark;
public int getRuid() {
return ruid;
}
public void setRuid(int ruid) {
this.ruid = ruid;
}
public String getGuid() {
return guid;
}
public void setGuid(String guid) {
this.guid = guid;
}
public String getPrintTGd() {
return printTGd;
}
public void setPrintTGd(String printTGd) {
this.printTGd = printTGd;
}
public String getFieldCode() {
return fieldCode;
}
public void setFieldCode(String fieldCode) {
this.fieldCode = fieldCode;
}
public String getFieldName() {
return fieldName;
}
public void setFieldName(String fieldName) {
this.fieldName = fieldName;
}
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getLastModifyMan() {
return lastModifyMan;
}
public void setLastModifyMan(String lastModifyMan) {
this.lastModifyMan = lastModifyMan;
}
public Date getLastModifyTime() {
return lastModifyTime;
}
public void setLastModifyTime(Date lastModifyTime) {
this.lastModifyTime = lastModifyTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
|
[
"95887577@qq.com"
] |
95887577@qq.com
|
7280e600038d4c9cc2b6a0dabc797fbffe3b3f3a
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/18/18_3bce4ff391b6c8867f6e52c5448fb025a3a2bf10/Conversation/18_3bce4ff391b6c8867f6e52c5448fb025a3a2bf10_Conversation_s.java
|
d3aec9dd38542f40b93d29baa8a1210ac30fcba3
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,629
|
java
|
package de.geotweeter;
import android.os.AsyncTask;
import de.geotweeter.activities.TimelineActivity;
import de.geotweeter.apiconn.TwitterApiAccess;
import de.geotweeter.timelineelements.TimelineElement;
import de.geotweeter.timelineelements.Tweet;
public class Conversation {
private TimelineElementAdapter tea;
private TwitterApiAccess api;
private boolean backwards;
public Conversation(TimelineElementAdapter tea, Account current_account, boolean backwards, boolean onStack) {
this.tea = tea;
this.backwards = backwards;
api = current_account.getApi();
if (onStack) {
current_account.pushTimeline(tea);
}
new LoadConversationTask().execute(tea.getItem(0));
}
private class LoadConversationTask extends AsyncTask<TimelineElement, TimelineElement, Void> {
@Override
protected Void doInBackground(TimelineElement... params) {
TimelineElement current_element = params[0];
if (current_element.getClass() != Tweet.class) {
throw new ClassCastException("Conversation should be based on a tweet");
}
Tweet current = (Tweet) current_element;
while (current.in_reply_to_status_id != 0) {
long predecessor_id = current.in_reply_to_status_id;
current = (Tweet) TimelineActivity.availableTweets.get(predecessor_id);
if (current == null) {
current = api.getTweet(predecessor_id);
}
publishProgress(current);
}
return null;
}
protected void onProgressUpdate(TimelineElement... params) {
if (backwards) {
tea.add(params[0]);
} else {
tea.addAsFirst(params[0]);
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
80e01f9907ee86300065f53ecb95550bdf8f8bb3
|
10378c580b62125a184f74f595d2c37be90a5769
|
/net/optifine/shaders/config/ShaderOptionSwitchConst.java
|
25a10e5e63d06d9992685be3cadd08862984efc0
|
[] |
no_license
|
ClientPlayground/Melon-Client
|
4299d7f3e8f2446ae9f225c0d7fcc770d4d48ecb
|
afc9b11493e15745b78dec1c2b62bb9e01573c3d
|
refs/heads/beta-v2
| 2023-04-05T20:17:00.521159
| 2021-03-14T19:13:31
| 2021-03-14T19:13:31
| 347,509,882
| 33
| 19
| null | 2021-03-14T19:13:32
| 2021-03-14T00:27:40
| null |
UTF-8
|
Java
| false
| false
| 1,443
|
java
|
package net.optifine.shaders.config;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import net.optifine.util.StrUtils;
public class ShaderOptionSwitchConst extends ShaderOptionSwitch {
private static final Pattern PATTERN_CONST = Pattern.compile("^\\s*const\\s*bool\\s*([A-Za-z0-9_]+)\\s*=\\s*(true|false)\\s*;\\s*(//.*)?$");
public ShaderOptionSwitchConst(String name, String description, String value, String path) {
super(name, description, value, path);
}
public String getSourceLine() {
return "const bool " + getName() + " = " + getValue() + "; // Shader option " + getValue();
}
public static ShaderOption parseOption(String line, String path) {
Matcher matcher = PATTERN_CONST.matcher(line);
if (!matcher.matches())
return null;
String s = matcher.group(1);
String s1 = matcher.group(2);
String s2 = matcher.group(3);
if (s != null && s.length() > 0) {
path = StrUtils.removePrefix(path, "/shaders/");
ShaderOption shaderoption = new ShaderOptionSwitchConst(s, s2, s1, path);
shaderoption.setVisible(false);
return shaderoption;
}
return null;
}
public boolean matchesLine(String line) {
Matcher matcher = PATTERN_CONST.matcher(line);
if (!matcher.matches())
return false;
String s = matcher.group(1);
return s.matches(getName());
}
public boolean checkUsed() {
return false;
}
}
|
[
"Hot-Tutorials@users.noreply.github.com"
] |
Hot-Tutorials@users.noreply.github.com
|
33c2dcd47dfa2b202d2220c98d2b37956bd88a6f
|
781e2692049e87a4256320c76e82a19be257a05d
|
/all_data/cs61bl/lab03/cs61bl-jq/Line1.java
|
e4bf93c557cc86e7a2bb6c3c999acb2a3255a91c
|
[] |
no_license
|
itsolutionscorp/AutoStyle-Clustering
|
54bde86fe6dbad35b568b38cfcb14c5ffaab51b0
|
be0e2f635a7558f56c61bc0b36c6146b01d1e6e6
|
refs/heads/master
| 2020-12-11T07:27:19.291038
| 2016-03-16T03:18:00
| 2016-03-16T03:18:42
| 59,454,921
| 4
| 0
| null | 2016-05-23T05:40:56
| 2016-05-23T05:40:56
| null |
UTF-8
|
Java
| false
| false
| 1,054
|
java
|
public class Line1 {
int x1, y1, x2, y2;
void printLength() {
double length;
length = Math.sqrt ( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) ) ;
System.out.println ("Line length is " + length);
}
void printAngle() {
double angleInDegrees = Math.atan2 ( (y2-y1) , (x2-x1) ) * 180.0 / Math.PI;
System.out.println ("Angle is " + angleInDegrees + " degrees");
}
public static void main(String[] args) {
System.out.println ("testing Line1");
Line1 myLine = new Line1();
myLine.x1 = 5;
myLine.x2 = 45;
myLine.y1 = 10;
myLine.y2 = 40;
myLine.printLength();
myLine.printAngle();
/*
* Here you should set myLine to contain a reference to a new line
* object. Initialize myLine's x1 and y1 to the point (5, 10), and
* initialize myLine's x2 and y2 to the point (45, 40). Print the line's
* length, which should be 50. Print the line's angle, which should be
* around 36.87 degrees.
*/
}
}
|
[
"moghadam.joseph@gmail.com"
] |
moghadam.joseph@gmail.com
|
f3a6fab91d3c0543afdc5359ec705116fb5ae286
|
af532288c789f6b335f242ed474f4048b95157a9
|
/src/main/java/fr/utbm/tc/qlearningmario/mario/common/Orientation.java
|
eca652df4ff20cfb58349938c06c25dd396d8132
|
[] |
no_license
|
gallandarakhneorg/QLearningMario
|
75d5b5e2f81aa5a412bfae21279230efeee12b5c
|
ac6f7b6d0e58eb1103ec5c8547a327c29b537877
|
refs/heads/master
| 2020-12-30T19:57:55.718027
| 2015-11-24T15:37:07
| 2015-11-24T15:37:21
| 46,794,811
| 0
| 0
| null | 2015-11-24T13:54:11
| 2015-11-24T13:54:11
| null |
UTF-8
|
Java
| false
| false
| 150
|
java
|
package fr.utbm.tc.qlearningmario.mario.common;
public enum Orientation {
// FIXME: Use "checkstyle". Constant must be upper-case.
Left,
Right;
}
|
[
"galland@arakhne.org"
] |
galland@arakhne.org
|
94b61f26d8012e29bfa351a8f7ceed6807eb737d
|
02b46dfbeb8d38cad29942f5e6774b6ae28632fe
|
/document-html-common/src/main/java/com/test/web/document/html/common/elements/DOCElement.java
|
adf8192a36a7351de767bbe2c0f78b3b7c84375c
|
[] |
no_license
|
neaterbits/web
|
32b8d4d7c653e5162bd6e4dadb72c1f51b09273d
|
2d6e9c9c99b2a33e641d25690ac2405fa32ae220
|
refs/heads/master
| 2022-10-17T16:28:34.146469
| 2020-06-11T18:28:10
| 2020-06-11T18:28:10
| 105,419,612
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,373
|
java
|
package com.test.web.document.html.common.elements;
import java.util.Iterator;
public interface DOCElement<ELEMENT> {
// Class list DOMTokenList access
public int getClassListLength(ELEMENT element);
String getClassListValue(ELEMENT element);
String classListItem(ELEMENT element, int index);
boolean classListContains(ELEMENT element, String token);
void classListAdd(ELEMENT element, String token);
void classListRemove(ELEMENT element, String ... tokens);
boolean classListReplace(ELEMENT element, String oldToken, String newToken);
boolean classListSupports(ELEMENT element, String token);
boolean classListToggle(ELEMENT element, String token, Boolean force);
void classListForEach(ELEMENT element, Object callback);
void classListForEach(ELEMENT element, Object callback, Object argument);
Iterator<String> classListEntries();
String getClassName(ELEMENT element);
void setClassName(ELEMENT element, String className);
String getElementId(ELEMENT element);
void setElementId(ELEMENT element, String id);
String getLocalName(ELEMENT element);
String getNamespaceURI(ELEMENT element);
String getPrefix(ELEMENT element);
boolean getTabStop(ELEMENT element);
String getTagName(ELEMENT element);
}
|
[
"nils.lorentzen@gmail.com"
] |
nils.lorentzen@gmail.com
|
91a8becfaf66cdd8ede600dd04a1604e8596eab0
|
0057e06067b8c24a9ae9604fe61dda207bfb22ab
|
/main/src/jmbench/tools/stability/tests/SolverAccuracy.java
|
d2491ab709071bf9b6d507dfcfcba6730e47eebf
|
[] |
no_license
|
caomw/Java-Matrix-Benchmark
|
71bbd1f60285601e891c249ef69c1ce0153f6a88
|
40e6c698d2bc56d9b55202589ec620454b528f51
|
refs/heads/master
| 2021-01-21T07:47:52.610066
| 2015-08-09T17:18:50
| 2015-08-09T17:18:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,264
|
java
|
/*
* Copyright (c) 2009-2015, Peter Abeles. All Rights Reserved.
*
* This file is part of JMatrixBenchmark.
*
* JMatrixBenchmark is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
*
* JMatrixBenchmark 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 JMatrixBenchmark. If not, see <http://www.gnu.org/licenses/>.
*/
package jmbench.tools.stability.tests;
import jmbench.impl.LibraryConfigure;
import jmbench.interfaces.BenchmarkMatrix;
import jmbench.interfaces.DetectedException;
import jmbench.interfaces.MatrixProcessorInterface;
import jmbench.interfaces.RuntimePerformanceFactory;
import jmbench.matrix.RowMajorMatrix;
import jmbench.matrix.RowMajorOps;
import jmbench.tools.OutputError;
import jmbench.tools.stability.StabilityBenchmark;
/**
* @author Peter Abeles
*/
public class SolverAccuracy extends SolverCommon {
public SolverAccuracy(long randomSeed,
Class<LibraryConfigure> classConfigure , Class<RuntimePerformanceFactory> classFactory,
String nameOperation,
int totalTrials, double breakingPoint,
int minLength, int maxLength, boolean linearSolver)
{
super(randomSeed, classConfigure , classFactory , nameOperation, totalTrials, breakingPoint, minLength, maxLength, linearSolver);
}
public SolverAccuracy(){}
@Override
public void performTest() {
for( int i = 0; i < totalTrials; i++ ) {
// System.out.print("Trial "+i+" ");
int m,n;
if( isLinearSolver ) {
m = n = rand.nextInt(maxLength-minLength)+minLength;
} else {
// least squares can handle over determined systems
m = rand.nextInt(maxLength-minLength)+minLength;
n = minLength;
if( m > minLength )
n += rand.nextInt(m-minLength);
}
createMatrix(m,n,1);
evaluateSolver();
saveResults();
}
}
private void evaluateSolver() {
reason = OutputError.NO_ERROR;
foundResult = Double.NaN;
BenchmarkMatrix[] inputsB = new BenchmarkMatrix[2];
BenchmarkMatrix[] outputB = new BenchmarkMatrix[1];
inputsB[0] = factory.convertToLib(A);
inputsB[1] = factory.convertToLib(b);
MatrixProcessorInterface operation = createAlgorithm();
if( operation == null ) {
reason = OutputError.NOT_SUPPORTED;
return;
}
try {
operation.process(inputsB,outputB,1);
} catch( DetectedException e ) {
reason = OutputError.DETECTED_FAILURE;
return;
} catch( Exception e ) {
addUnexpectedException(e);
reason = OutputError.UNEXPECTED_EXCEPTION;
return;
}
RowMajorMatrix results[] = new RowMajorMatrix[outputB.length];
for( int i = 0; i < results.length; i++ )
results[i] = factory.convertToRowMajor(outputB[i]);
RowMajorMatrix x = results[0];
if( RowMajorOps.hasUncountable(x) ) {
reason = OutputError.UNCOUNTABLE;
return;
}
foundResult = StabilityBenchmark.residualErrorMetric(A,x,b);
if( Double.isNaN(foundResult) || Double.isInfinite(foundResult) ) {
reason = OutputError.LARGE_ERROR;
return;
}
}
@Override
public String getTestName() {
if( isLinearSolver )
return "Linear accuracy";
else
return "Least squares accuracy";
}
@Override
public String getFileName() {
if( isLinearSolver )
return "LinearAccuracy";
else
return "LeastSquaresAccuracy";
}
}
|
[
"peter.abeles@gmail.com"
] |
peter.abeles@gmail.com
|
a0b954515808019715afb8373de7da7b643aa638
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/35/35_262b716088ae8632ae44456f249c7a560f2da7a4/IdAndVersionStreamVerifier/35_262b716088ae8632ae44456f249c7a560f2da7a4_IdAndVersionStreamVerifier_s.java
|
fc1970f92af2471ef2469b04ee361876ca1d1d76
|
[] |
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,387
|
java
|
package com.aconex.scrutineer;
import java.util.Iterator;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
import org.slf4j.Logger;
public class IdAndVersionStreamVerifier {
private static final Logger LOG = LogUtils.loggerForThisClass();
//CHECKSTYLE:OFF
@SuppressWarnings("PMD.NcssMethodCount")
public void verify(IdAndVersionStream primaryStream, IdAndVersionStream secondayStream, IdAndVersionStreamVerifierListener idAndVersionStreamVerifierListener) {
long numItems = 0;
long begin = System.currentTimeMillis();
try {
parallelOpenStreamsAndWait(primaryStream, secondayStream);
Iterator<IdAndVersion> primaryIterator = primaryStream.iterator();
Iterator<IdAndVersion> secondaryIterator = secondayStream.iterator();
IdAndVersion primaryItem = next(primaryIterator);
IdAndVersion secondaryItem = next(secondaryIterator);
while (primaryItem != null && secondaryItem != null) {
if (primaryItem.equals(secondaryItem)) {
primaryItem = verifiedNext(primaryIterator, primaryItem);
secondaryItem = next(secondaryIterator);
} else if (primaryItem.getId().equals(secondaryItem.getId())) {
idAndVersionStreamVerifierListener.onVersionMisMatch(primaryItem, secondaryItem);
primaryItem = verifiedNext(primaryIterator, primaryItem);
secondaryItem = next(secondaryIterator);
} else if (primaryItem.compareTo(secondaryItem) < 0) {
idAndVersionStreamVerifierListener.onMissingInSecondaryStream(primaryItem);
primaryItem = verifiedNext(primaryIterator, primaryItem);
} else {
idAndVersionStreamVerifierListener.onMissingInPrimaryStream(secondaryItem);
secondaryItem = next(secondaryIterator);
}
numItems++;
}
while (primaryItem != null) {
idAndVersionStreamVerifierListener.onMissingInSecondaryStream(primaryItem);
primaryItem = verifiedNext(primaryIterator, primaryItem);
numItems++;
}
while (secondaryItem != null) {
idAndVersionStreamVerifierListener.onMissingInPrimaryStream(secondaryItem);
secondaryItem = next(secondaryIterator);
numItems++;
}
} finally {
closeWithoutThrowingException(primaryStream);
closeWithoutThrowingException(secondayStream);
}
LogUtils.infoTimeTaken(LOG, begin, numItems, "Completed verification");
}
//CHECKSTYLE:ON
private void parallelOpenStreamsAndWait(IdAndVersionStream primaryStream, IdAndVersionStream secondaryStream) {
try {
ExecutorService executorService = Executors.newFixedThreadPool(1, new NamedDaemonThreadFactory("StreamOpener"));
Future<?> secondaryStreamFuture = executorService.submit(new OpenStreamRunner(secondaryStream));
primaryStream.open();
secondaryStreamFuture.get();
executorService.shutdown();
} catch (Exception e) {
throw new IllegalStateException("Failed to open one or both of the streams in parallel", e);
}
}
private IdAndVersion next(Iterator<IdAndVersion> iterator) {
if (iterator.hasNext()) {
return iterator.next();
} else {
return null;
}
}
private IdAndVersion verifiedNext(Iterator<IdAndVersion> iterator, IdAndVersion previous) {
if (iterator.hasNext()) {
IdAndVersion next = iterator.next();
if (next == null) {
throw new IllegalStateException("stream must not return null");
} else if (previous.compareTo(next) > 0) {
throw new IllegalStateException("stream not ordered as expected");
} else {
return next;
}
} else {
return null;
}
}
private void closeWithoutThrowingException(IdAndVersionStream idAndVersionStream) {
try {
idAndVersionStream.close();
} catch (Exception e) {
LogUtils.warn(LOG, "Unable to close IdAndVersionStream", e);
}
}
private static class OpenStreamRunner implements Runnable {
private final IdAndVersionStream primaryStream;
public OpenStreamRunner(IdAndVersionStream primaryStream) {
this.primaryStream = primaryStream;
}
@Override
public void run() {
primaryStream.open();
}
}
private static class NamedDaemonThreadFactory implements ThreadFactory {
private final String namePrefix;
private final AtomicInteger threadCount = new AtomicInteger();
public NamedDaemonThreadFactory(String namePrefix) {
this.namePrefix = namePrefix;
}
@Override
public Thread newThread(Runnable command) {
Thread thread = new Thread(command, namePrefix + "-" + threadCount.incrementAndGet());
thread.setDaemon(true);
return thread;
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
8710979facca9aa75314c9aa5ff5ae749541bde6
|
8803ec022a004ccb67c4d78b72b549e3c47ad6b7
|
/mifan-article-service/src/main/java/com/mifan/article/service/SearchService.java
|
4257da12e358b9d97d943091719e162f06ac9f9e
|
[] |
no_license
|
helldzl/moon-api
|
56ce803d94d94d801913eef4b0b140b19456ca91
|
44761f7ac6817193f4a562a702e42b01cee3f303
|
refs/heads/master
| 2020-03-07T08:24:15.351040
| 2018-03-30T03:34:24
| 2018-03-30T03:34:24
| 127,377,122
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,787
|
java
|
package com.mifan.article.service;
import com.mifan.article.service.search.builder.BuilderConsumer;
import org.elasticsearch.action.admin.indices.analyze.AnalyzeRequest;
import org.elasticsearch.action.admin.indices.analyze.AnalyzeResponse;
import org.elasticsearch.action.delete.DeleteResponse;
import org.elasticsearch.action.search.SearchRequestBuilder;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.search.aggregations.Aggregations;
import org.moonframework.elasticsearch.SearchResult;
import org.moonframework.elasticsearch.SearchWithClustersResult;
import org.moonframework.elasticsearch.Searchable;
import org.moonframework.model.mybatis.domain.BaseEntity;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import java.util.function.Consumer;
import java.util.function.Function;
/**
* @author quzile
* @version 1.0
* @since 2017/7/19
*/
public interface SearchService {
AnalyzeResponse analyze(AnalyzeRequest analyzeRequest);
AnalyzeResponse analyze(String index, String field, String text);
<T extends BaseEntity & Searchable> DeleteResponse delete(Class<T> classType, String id);
<T extends BaseEntity & Searchable> void index(Class<T> classType);
<T extends BaseEntity & Searchable> void index(Class<T> classType, String... ids);
<T extends BaseEntity & Searchable> SearchResult<Map<String, Object>> search(Class<T> classType, String id);
<T extends BaseEntity & Searchable> SearchResult<Map<String, Object>> search(Class<T> classType, Collection<String> ids);
<T extends BaseEntity & Searchable> SearchResult<Map<String, Object>> search(Class<T> classType, Collection<String> ids, boolean ordered);
<T extends BaseEntity & Searchable> SearchResult<Map<String, Object>> search(Class<T> classType, Collection<String> ids, boolean ordered, boolean cached);
<T extends BaseEntity & Searchable> SearchResult<Map<String, Object>> search(BuilderConsumer<XContentBuilder, T> bc, Collection<String> ids);
<T extends BaseEntity & Searchable> SearchResult<Map<String, Object>> search(Class<T> classType, Consumer<SearchRequestBuilder> consumer);
<T extends BaseEntity & Searchable> SearchResult<Map<String, Object>> search(Class<T> classType, Consumer<SearchRequestBuilder> consumer, Function<Aggregations, Map<String, Object>> function);
/**
* <p>MLT selects a set of representative terms of these input documents, forms a query using these terms, executes the query and returns the results.</p>
*
* @param classType classType
* @param size size
* @param from from
* @param id id
* @param excludes excludes
* @param consumer consumer
* @return result
*/
<T extends BaseEntity & Searchable> SearchResult<Map<String, Object>> moreLikeThisById(Class<T> classType, int from, int size, String id, Set<String> excludes, Consumer<BoolQueryBuilder> consumer);
/**
* <p>MLT selects a set of representative terms of these input documents, forms a query using these terms, executes the query and returns the results.</p>
*
* @param classType classType
* @param size size
* @param from from
* @param likeText likeText
* @param excludes excludes
* @param consumer consumer
* @return result
*/
<T extends BaseEntity & Searchable> SearchResult<Map<String, Object>> moreLikeThisByText(Class<T> classType, int from, int size, String likeText, Set<String> excludes, Consumer<BoolQueryBuilder> consumer);
<T extends BaseEntity & Searchable> SearchWithClustersResult searchWithClusters(Class<T> classType, String queryHint, Consumer<SearchRequestBuilder> consumer);
}
|
[
"1949602@qq.com"
] |
1949602@qq.com
|
f25d045a684dea535477886437a3ad5a47afd7fb
|
404a189c16767191ffb172572d36eca7db5571fb
|
/structs/build/xml/java/gov/georgia/dhr/dfcs/sacwis/structs/input/CCON02SI.java
|
475fa5d245d75c1563ffc90f40b4751f4060a58d
|
[] |
no_license
|
tayduivn/training
|
648a8e9e91194156fb4ffb631749e6d4bf2d0590
|
95078fb2c7e21bf2bba31e2bbd5e404ac428da2f
|
refs/heads/master
| 2021-06-13T16:20:41.293097
| 2017-05-08T21:37:59
| 2017-05-08T21:37:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,055
|
java
|
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.0.5</a>, using an XML
* Schema.
* $Id$
*/
package gov.georgia.dhr.dfcs.sacwis.structs.input;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
/**
* Class CCON02SI.
*
* @version $Revision$ $Date$
*/
@SuppressWarnings("serial")
public class CCON02SI extends gov.georgia.dhr.dfcs.sacwis.core.xml.XmlValueBean
implements java.io.Serializable
{
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* Field _archInputStruct
*/
private gov.georgia.dhr.dfcs.sacwis.structs.input.ArchInputStruct _archInputStruct;
/**
* Field _ulIdContract
*/
private int _ulIdContract;
/**
* keeps track of state for field: _ulIdContract
*/
private boolean _has_ulIdContract;
//----------------/
//- Constructors -/
//----------------/
public CCON02SI()
{
super();
} //-- gov.georgia.dhr.dfcs.sacwis.structs.input.CCON02SI()
//-----------/
//- Methods -/
//-----------/
/**
*/
public void deleteUlIdContract()
{
this._has_ulIdContract= false;
} //-- void deleteUlIdContract()
/**
* Returns the value of field 'archInputStruct'.
*
* @return the value of field 'ArchInputStruct'.
*/
public gov.georgia.dhr.dfcs.sacwis.structs.input.ArchInputStruct getArchInputStruct()
{
return this._archInputStruct;
} //-- gov.georgia.dhr.dfcs.sacwis.structs.input.ArchInputStruct getArchInputStruct()
/**
* Returns the value of field 'ulIdContract'.
*
* @return the value of field 'UlIdContract'.
*/
public int getUlIdContract()
{
return this._ulIdContract;
} //-- int getUlIdContract()
/**
* Method hasUlIdContract
*
*
*
* @return true if at least one UlIdContract has been added
*/
public boolean hasUlIdContract()
{
return this._has_ulIdContract;
} //-- boolean hasUlIdContract()
/**
* Method isValid
*
*
*
* @return true if this object is valid according to the schema
*/
public boolean isValid()
{
try {
validate();
}
catch (org.exolab.castor.xml.ValidationException vex) {
return false;
}
return true;
} //-- boolean isValid()
/**
*
*
* @param out
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
*/
public void marshal(java.io.Writer out)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
{
Marshaller.marshal(this, out);
} //-- void marshal(java.io.Writer)
/**
*
*
* @param handler
* @throws java.io.IOException if an IOException occurs during
* marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
*/
public void marshal(org.xml.sax.ContentHandler handler)
throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
{
Marshaller.marshal(this, handler);
} //-- void marshal(org.xml.sax.ContentHandler)
/**
* Sets the value of field 'archInputStruct'.
*
* @param archInputStruct the value of field 'archInputStruct'.
*/
public void setArchInputStruct(gov.georgia.dhr.dfcs.sacwis.structs.input.ArchInputStruct archInputStruct)
{
this._archInputStruct = archInputStruct;
} //-- void setArchInputStruct(gov.georgia.dhr.dfcs.sacwis.structs.input.ArchInputStruct)
/**
* Sets the value of field 'ulIdContract'.
*
* @param ulIdContract the value of field 'ulIdContract'.
*/
public void setUlIdContract(int ulIdContract)
{
this._ulIdContract = ulIdContract;
this._has_ulIdContract = true;
} //-- void setUlIdContract(int)
/**
* Method unmarshal
*
*
*
* @param reader
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
* @return the unmarshaled
* gov.georgia.dhr.dfcs.sacwis.structs.input.CCON02SI
*/
public static gov.georgia.dhr.dfcs.sacwis.structs.input.CCON02SI unmarshal(java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
{
return (gov.georgia.dhr.dfcs.sacwis.structs.input.CCON02SI) Unmarshaller.unmarshal(gov.georgia.dhr.dfcs.sacwis.structs.input.CCON02SI.class, reader);
} //-- gov.georgia.dhr.dfcs.sacwis.structs.input.CCON02SI unmarshal(java.io.Reader)
/**
*
*
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
*/
public void validate()
throws org.exolab.castor.xml.ValidationException
{
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
validator.validate(this);
} //-- void validate()
}
|
[
"lgeddam@gmail.com"
] |
lgeddam@gmail.com
|
b0ef7b785e12545d9de85367de8e1c0bd7632326
|
8ce3daa1d0efa060a40916754f8af0e513e60de9
|
/src/main/java/org/geometrycommands/BufferCommand.java
|
f2ebe5aceb50096230e79363853c72fbd0e8b6ea
|
[
"MIT"
] |
permissive
|
mattmakesmaps/geometrycommands
|
d2c44957898310ec1570d356afdbc1fe36bb2cb9
|
9af8422c90ee30ba278b4c7ca22f38aa21e7a9bf
|
refs/heads/master
| 2021-01-16T22:57:03.706446
| 2015-07-09T20:36:38
| 2015-07-09T20:36:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,296
|
java
|
package org.geometrycommands;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.operation.buffer.BufferOp;
import com.vividsolutions.jts.operation.buffer.BufferParameters;
import java.io.Reader;
import java.io.Writer;
import org.geometrycommands.BufferCommand.BufferOptions;
import org.kohsuke.args4j.Option;
/**
* Buffer a Geometry by a distance.
* @author Jared Erickson
*/
public class BufferCommand extends GeometryCommand<BufferOptions> {
/**
* Get the command name
* @return The command name
*/
@Override
public String getName() {
return "buffer";
}
/**
* Get the description of what the Command does
* @return The description of what the Command does
*/
@Override
public String getDescription() {
return "Buffer a geometry by a distance.";
}
/**
* Get a new BufferOptions
* @return The new BufferOptions
*/
@Override
public BufferOptions getOptions() {
return new BufferOptions();
}
/**
* Buffer a Geometry by a distance.
* @param geometry The Geometry
* @param options The BufferOptions
* @param reader The java.io.Reader
* @param writer The java.io.Writer
* @throws Exception if an error occurs
*/
@Override
protected void processGeometry(Geometry geometry, BufferOptions options, Reader reader, Writer writer) throws Exception {
int capStyle;
if (options.getEndCapStyle().equalsIgnoreCase("butt")
|| options.getEndCapStyle().equalsIgnoreCase("flat")) {
capStyle = BufferParameters.CAP_FLAT;
} else if (options.getEndCapStyle().equalsIgnoreCase("square")) {
capStyle = BufferParameters.CAP_SQUARE;
} else {
capStyle = BufferParameters.CAP_ROUND;
}
BufferParameters params = new BufferParameters();
params.setSingleSided(options.isSingleSided());
params.setQuadrantSegments(options.getQuadrantSegements());
params.setEndCapStyle(capStyle);
BufferOp bufferOp = new BufferOp(geometry, params);
Geometry bufferedGeometry = bufferOp.getResultGeometry(options.getDistance());
writer.write(writeGeometry(bufferedGeometry, options));
}
/**
* Options for the BufferCommand
*/
public static class BufferOptions extends GeometryOptions {
/**
* The buffer distance
*/
@Option(name = "-d", aliases = "--distance", usage = "The buffer distance", required = true)
private double distance;
/**
* The number of quadrant segments
*/
@Option(name = "-q", aliases = "--quadrantSegments", usage = "The number of quadrant segments", required = false)
private int quadrantSegements = 8;
/**
* The end cap style (round, flat/butt, square)
*/
@Option(name = "-c", aliases = "--endCapStyle", usage = "The end cap style (round, flat/butt, square)", required = false)
private String endCapStyle = "round";
/**
* The flag for whether the buffer should be single sided
*/
@Option(name = "-s", aliases = "--singleSided", usage = "The flag for whether the buffer should be single sided", required = false)
private boolean singleSided;
/**
* Get the buffer distance
* @return The buffer distance
*/
public double getDistance() {
return distance;
}
/**
* Set the buffer distance
* @param distance The buffer distance
*/
public void setDistance(double distance) {
this.distance = distance;
}
/**
* Get the end cap style (round, flat/butt, square)
* @return The end cap style (round, flat/butt, square)
*/
public String getEndCapStyle() {
return endCapStyle;
}
/**
* Set the end cap style (round, flat/butt, square)
* @param endCapStyle The end cap style (round, flat/butt, square)
*/
public void setEndCapStyle(String endCapStyle) {
this.endCapStyle = endCapStyle;
}
/**
* Get the number of quadrant segments
* @return The number of quadrant segments
*/
public int getQuadrantSegements() {
return quadrantSegements;
}
/**
* Set the number of quadrant segments
* @param quadrantSegements The number of quadrant segments
*/
public void setQuadrantSegements(int quadrantSegements) {
this.quadrantSegements = quadrantSegements;
}
/**
* Get the flag for whether the buffer should be single sided
* @return The flag for whether the buffer should be single sided
*/
public boolean isSingleSided() {
return singleSided;
}
/**
* Set the flag for whether the buffer should be single sided
* @param singleSided The flag for whether the buffer should be single sided
*/
public void setSingleSided(boolean singleSided) {
this.singleSided = singleSided;
}
}
}
|
[
"jared.erickson@gmail.com"
] |
jared.erickson@gmail.com
|
7d8c4373bf84c0eb666e99e3eb023c4590586d27
|
1adc5ee922d684f18eb7ae6d9fc0c7704f4cbb55
|
/src/main/java/lumien/randomthings/handler/compability/jei/anvil/AnvilRecipeHandler.java
|
efd6735a391388ed5246ab7285c26729638bbdac
|
[
"MIT"
] |
permissive
|
jesskay/Random-Things
|
522a7e0e2d5b4e6c0eb96dbb325ab6b5c428d358
|
b4ef62c3ecbc559e62706378c1e59d20a4f2da6f
|
refs/heads/master
| 2021-01-12T09:22:23.490560
| 2016-12-08T12:19:00
| 2016-12-08T12:19:00
| 76,152,353
| 0
| 0
| null | 2016-12-11T03:38:59
| 2016-12-11T03:38:59
| null |
UTF-8
|
Java
| false
| false
| 863
|
java
|
package lumien.randomthings.handler.compability.jei.anvil;
import javax.annotation.Nonnull;
import lumien.randomthings.handler.compability.jei.RandomThingsPlugin;
import lumien.randomthings.recipes.anvil.AnvilRecipe;
import mezz.jei.api.recipe.IRecipeHandler;
import mezz.jei.api.recipe.IRecipeWrapper;
public class AnvilRecipeHandler implements IRecipeHandler<AnvilRecipe>
{
@Nonnull
@Override
public Class<AnvilRecipe> getRecipeClass()
{
return AnvilRecipe.class;
}
@Nonnull
@Override
public String getRecipeCategoryUid()
{
return RandomThingsPlugin.ANVIL_ID;
}
@Nonnull
@Override
public IRecipeWrapper getRecipeWrapper(@Nonnull AnvilRecipe recipe)
{
return new AnvilRecipeWrapper(recipe.getFirst(),recipe.getSecond(), recipe.getOutput());
}
@Override
public boolean isRecipeValid(@Nonnull AnvilRecipe recipe)
{
return true;
}
}
|
[
"lumien231@users.noreply.github.com"
] |
lumien231@users.noreply.github.com
|
97f05adf32431f87a4cb8faa25cbb697e8f2478f
|
e63363389e72c0822a171e450a41c094c0c1a49c
|
/Mate20_10_1_0/src/main/java/jcifs/util/HMACT64.java
|
58cfedc80c64d6be602158e5e403b41912747150
|
[] |
no_license
|
solartcc/HwFrameWorkSource
|
fc23ca63bcf17865e99b607cc85d89e16ec1b177
|
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
|
refs/heads/master
| 2022-12-04T21:14:37.581438
| 2020-08-25T04:30:43
| 2020-08-25T04:30:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,877
|
java
|
package jcifs.util;
import java.security.MessageDigest;
public class HMACT64 extends MessageDigest implements Cloneable {
private static final int BLOCK_LENGTH = 64;
private static final byte IPAD = 54;
private static final byte OPAD = 92;
private byte[] ipad;
private MessageDigest md5;
private byte[] opad;
public HMACT64(byte[] key) {
super("HMACT64");
this.ipad = new byte[64];
this.opad = new byte[64];
int length = Math.min(key.length, 64);
for (int i = 0; i < length; i++) {
this.ipad[i] = (byte) (key[i] ^ IPAD);
this.opad[i] = (byte) (key[i] ^ OPAD);
}
for (int i2 = length; i2 < 64; i2++) {
this.ipad[i2] = IPAD;
this.opad[i2] = OPAD;
}
try {
this.md5 = MessageDigest.getInstance("MD5");
engineReset();
} catch (Exception ex) {
throw new IllegalStateException(ex.getMessage());
}
}
private HMACT64(HMACT64 hmac) throws CloneNotSupportedException {
super("HMACT64");
this.ipad = new byte[64];
this.opad = new byte[64];
this.ipad = hmac.ipad;
this.opad = hmac.opad;
this.md5 = (MessageDigest) hmac.md5.clone();
}
@Override // java.security.MessageDigest, java.security.MessageDigestSpi, java.lang.Object
public Object clone() {
try {
return new HMACT64(this);
} catch (CloneNotSupportedException ex) {
throw new IllegalStateException(ex.getMessage());
}
}
/* access modifiers changed from: protected */
public byte[] engineDigest() {
byte[] digest = this.md5.digest();
this.md5.update(this.opad);
return this.md5.digest(digest);
}
/* access modifiers changed from: protected */
@Override // java.security.MessageDigestSpi
public int engineDigest(byte[] buf, int offset, int len) {
byte[] digest = this.md5.digest();
this.md5.update(this.opad);
this.md5.update(digest);
try {
return this.md5.digest(buf, offset, len);
} catch (Exception e) {
throw new IllegalStateException();
}
}
/* access modifiers changed from: protected */
public int engineGetDigestLength() {
return this.md5.getDigestLength();
}
/* access modifiers changed from: protected */
public void engineReset() {
this.md5.reset();
this.md5.update(this.ipad);
}
/* access modifiers changed from: protected */
@Override // java.security.MessageDigestSpi
public void engineUpdate(byte b) {
this.md5.update(b);
}
/* access modifiers changed from: protected */
public void engineUpdate(byte[] input, int offset, int len) {
this.md5.update(input, offset, len);
}
}
|
[
"lygforbs0@gmail.com"
] |
lygforbs0@gmail.com
|
a6c1106ad1b963dcae4d663955c923980fff4221
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a093/A093566Test.java
|
1ba537c274028d65065d3b2a531c310bf54d4863
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a093;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A093566Test extends AbstractSequenceTest {
}
|
[
"sairvin@gmail.com"
] |
sairvin@gmail.com
|
f4b0777e7b5ccb0e601971d47ee1d38383ad55ed
|
665fedfb256357142c3b7577fff5f8987df5d883
|
/geo/src/main/java/com/tomtom/speedtools/geometry/GeoVector.java
|
df1bd15d84d115d90720663787a3da57db7734bc
|
[
"Apache-2.0"
] |
permissive
|
Irishsmurf/speedtools
|
6d70b9d60e8b69f3bf14e6c0703fb23dafd784ca
|
d5341dccd4688bc0c0191ffe7759939f91fcdea1
|
refs/heads/master
| 2020-12-11T03:19:50.813249
| 2016-02-03T10:25:48
| 2016-02-03T10:25:48
| 53,467,455
| 0
| 0
| null | 2016-03-09T04:14:10
| 2016-03-09T04:14:10
| null |
UTF-8
|
Java
| false
| false
| 2,954
|
java
|
/*
* Copyright (C) 2012-2016. TomTom International BV (http://tomtom.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.tomtom.speedtools.geometry;
import com.tomtom.speedtools.objects.Objects;
import com.tomtom.speedtools.utils.MathUtils;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
/**
* Geometric vector which contains an Northing and Easting component.
*
* Constructor: {@link #GeoVector}
*/
@Immutable
public final class GeoVector {
@Nonnull
private final Double northing;
@Nonnull
private final Double easting;
/**
* Create a vector.
*
* @param northing Northing, must be in range [0, 180].
* @param easting Easting, any value.
*/
public GeoVector(
@Nonnull final Double northing,
@Nonnull final Double easting) {
super();
assert northing != null;
assert easting != null;
assert MathUtils.isBetween(northing, -180.0, 180.0) : "Northing not in [-180, 180]: " + northing;
assert MathUtils.isBetween(easting, -360.0, 360.0) : "Eastingnot in [-360, 360]: " + easting;
this.northing = northing;
this.easting = easting;
}
/**
* Default constructor, used for deserialization only.
*/
@SuppressWarnings({"ConstantConditions", "UnusedDeclaration"})
@Deprecated
private GeoVector() {
super();
northing = null;
easting = null;
}
@Nonnull
public Double getNorthing() {
return northing;
}
@Nonnull
public Double getEasting() {
return easting;
}
public boolean canEqual(@Nonnull final Object obj) {
return obj instanceof GeoVector;
}
@Override
public boolean equals(@Nullable final Object obj) {
boolean eq;
if (this == obj) {
eq = true;
} else if ((obj != null) && (obj instanceof GeoVector)) {
final GeoVector that = (GeoVector) obj;
eq = that.canEqual(this);
// Top-level entity, so don't: super.equals(that)
eq = eq && northing.equals(that.northing);
eq = eq && easting.equals(that.easting);
} else {
eq = false;
}
return eq;
}
@Override
public int hashCode() {
return Objects.hashCode((Object[]) new Double[]{northing, easting});
}
}
|
[
"rijn@buve.nl"
] |
rijn@buve.nl
|
95ff6ae2004af2defa32131e064eff446bf46430
|
631fbbb8b7654fc3097beae36598ac625f488624
|
/hadoop-2.0.0/src/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNode.java
|
6e9bc06226c286fc1de45922fc0df44b507334ff
|
[] |
no_license
|
edquist/hadoop-osg
|
462a0dda97fb89ad3cd8000b8d614ed467d2becd
|
923c7fbe69e21fe44e175b55917b744e6984e113
|
refs/heads/master
| 2021-05-06T13:16:36.922758
| 2016-02-17T01:18:59
| 2016-02-17T03:33:17
| 113,215,423
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,917
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.resourcemanager.rmnode;
import java.util.List;
import org.apache.hadoop.net.Node;
import org.apache.hadoop.yarn.api.records.ApplicationId;
import org.apache.hadoop.yarn.api.records.ContainerId;
import org.apache.hadoop.yarn.api.records.NodeHealthStatus;
import org.apache.hadoop.yarn.api.records.NodeId;
import org.apache.hadoop.yarn.api.records.NodeState;
import org.apache.hadoop.yarn.server.api.records.HeartbeatResponse;
/**
* Node managers information on available resources
* and other static information.
*
*/
public interface RMNode {
/**
* the node id of of this node.
* @return the node id of this node.
*/
public NodeId getNodeID();
/**
* the hostname of this node
* @return hostname of this node
*/
public String getHostName();
/**
* the command port for this node
* @return command port for this node
*/
public int getCommandPort();
/**
* the http port for this node
* @return http port for this node
*/
public int getHttpPort();
/**
* the ContainerManager address for this node.
* @return the ContainerManager address for this node.
*/
public String getNodeAddress();
/**
* the http-Address for this node.
* @return the http-url address for this node
*/
public String getHttpAddress();
/**
* the health-status for this node
* @return the health-status for this node.
*/
public NodeHealthStatus getNodeHealthStatus();
/**
* the total available resource.
* @return the total available resource.
*/
public org.apache.hadoop.yarn.api.records.Resource getTotalCapability();
/**
* The rack name for this node manager.
* @return the rack name.
*/
public String getRackName();
/**
* the {@link Node} information for this node.
* @return {@link Node} information for this node.
*/
public Node getNode();
public NodeState getState();
public List<ContainerId> getContainersToCleanUp();
public List<ApplicationId> getAppsToCleanup();
public HeartbeatResponse getLastHeartBeatResponse();
}
|
[
"edquist@cs.wisc.edu"
] |
edquist@cs.wisc.edu
|
a34d9efa937b723faea8a7d1d1dce3a088ce52eb
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava18/Foo769Test.java
|
8e475a72c225b23d08652dbe5a520177b9846c12
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 482
|
java
|
package applicationModulepackageJava18;
import org.junit.Test;
public class Foo769Test {
@Test
public void testFoo0() {
new Foo769().foo0();
}
@Test
public void testFoo1() {
new Foo769().foo1();
}
@Test
public void testFoo2() {
new Foo769().foo2();
}
@Test
public void testFoo3() {
new Foo769().foo3();
}
@Test
public void testFoo4() {
new Foo769().foo4();
}
@Test
public void testFoo5() {
new Foo769().foo5();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
e1e354008b42ea57a2d46b450c2ba34828fd7a53
|
494462ed5cc4e013b95919bf04bca37833a29829
|
/src/org/redkale/util/Reproduce.java
|
99199f8b8f223dfe11574122b35cb18b17e9ccc4
|
[
"Apache-2.0"
] |
permissive
|
XuJun0909/redkale-1
|
2c35d97443c7be37f1a69f5701eb4d0ef296c915
|
e050c7438d30d43087c2569f0aa43d8d5064aca8
|
refs/heads/master
| 2021-01-18T14:57:52.002406
| 2016-03-31T10:40:13
| 2016-03-31T10:40:13
| 55,207,447
| 1
| 0
| null | 2016-04-01T05:58:54
| 2016-04-01T05:58:53
| null |
UTF-8
|
Java
| false
| false
| 6,731
|
java
|
package org.redkale.util;
import java.lang.reflect.Modifier;
import java.util.function.Predicate;
import static jdk.internal.org.objectweb.asm.Opcodes.*;
import jdk.internal.org.objectweb.asm.*;
/**
*
* <p>
* 详情见: http://www.redkale.org
*
* @author zhangjx
* @param <D> 目标对象的数据类型
* @param <S> 源对象的数据类型
*/
public interface Reproduce<D, S> {
public D copy(D dest, S src);
public static <D, S> Reproduce<D, S> create(final Class<D> destClass, final Class<S> srcClass) {
return create(destClass, srcClass, null);
}
@SuppressWarnings("unchecked")
public static <D, S> Reproduce<D, S> create(final Class<D> destClass, final Class<S> srcClass, final Predicate<String> columnPredicate) {
// ------------------------------------------------------------------------------
final String supDynName = Reproduce.class.getName().replace('.', '/');
final String destName = destClass.getName().replace('.', '/');
final String srcName = srcClass.getName().replace('.', '/');
final String destDesc = Type.getDescriptor(destClass);
final String srcDesc = Type.getDescriptor(srcClass);
String newDynName = supDynName + "Dyn_" + destClass.getSimpleName() + "_" + srcClass.getSimpleName();
ClassLoader loader = Reproduce.class.getClassLoader();
if (String.class.getClassLoader() != destClass.getClassLoader()) {
loader = destClass.getClassLoader();
newDynName = destName + "_Dyn" + Reproduce.class.getSimpleName() + "_" + srcClass.getSimpleName();
}
try {
return (Reproduce) Class.forName(newDynName.replace('/', '.')).newInstance();
} catch (Exception ex) {
}
// ------------------------------------------------------------------------------
ClassWriter cw = new ClassWriter(0);
FieldVisitor fv;
MethodVisitor mv;
AnnotationVisitor av0;
cw.visit(V1_8, ACC_PUBLIC + ACC_FINAL + ACC_SUPER, newDynName, "Ljava/lang/Object;L" + supDynName + "<" + destDesc + srcDesc + ">;", "java/lang/Object", new String[]{supDynName});
{ // 构造函数
mv = (cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null));
//mv.setDebug(true);
mv.visitVarInsn(ALOAD, 0);
mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false);
mv.visitInsn(RETURN);
mv.visitMaxs(1, 1);
mv.visitEnd();
}
{
mv = (cw.visitMethod(ACC_PUBLIC, "copy", "(" + destDesc + srcDesc + ")" + destDesc, null, null));
//mv.setDebug(true);
for (java.lang.reflect.Field field : srcClass.getFields()) {
if (Modifier.isStatic(field.getModifiers())) continue;
if (Modifier.isFinal(field.getModifiers())) continue;
if (!Modifier.isPublic(field.getModifiers())) continue;
final String fname = field.getName();
try {
if (!field.getType().equals(destClass.getField(fname).getType())) continue;
if (!columnPredicate.test(fname)) continue;
} catch (Exception e) {
continue;
}
mv.visitVarInsn(ALOAD, 1);
mv.visitVarInsn(ALOAD, 2);
String td = Type.getDescriptor(field.getType());
mv.visitFieldInsn(GETFIELD, srcName, fname, td);
mv.visitFieldInsn(PUTFIELD, destName, fname, td);
}
for (java.lang.reflect.Method getter : srcClass.getMethods()) {
if (Modifier.isStatic(getter.getModifiers())) continue;
if (getter.getParameterTypes().length > 0) continue; //为了兼容android 而不使用 getParameterCount()
if ("getClass".equals(getter.getName())) continue;
if (!getter.getName().startsWith("get") && !getter.getName().startsWith("is")) continue;
java.lang.reflect.Method setter;
boolean is = getter.getName().startsWith("is");
try {
setter = destClass.getMethod(getter.getName().replaceFirst(is ? "is" : "get", "set"), getter.getReturnType());
if (columnPredicate != null) {
String col = setter.getName().substring(3);
if (col.length() < 2 || Character.isLowerCase(col.charAt(1))) {
char[] cs = col.toCharArray();
cs[0] = Character.toLowerCase(cs[0]);
col = new String(cs);
}
if (!columnPredicate.test(col)) continue;
}
} catch (Exception e) {
continue;
}
mv.visitVarInsn(ALOAD, 1);
mv.visitVarInsn(ALOAD, 2);
mv.visitMethodInsn(INVOKEVIRTUAL, srcName, getter.getName(), Type.getMethodDescriptor(getter), false);
mv.visitMethodInsn(INVOKEVIRTUAL, destName, setter.getName(), Type.getMethodDescriptor(setter), false);
}
mv.visitVarInsn(ALOAD, 1);
mv.visitInsn(ARETURN);
mv.visitMaxs(3, 3);
mv.visitEnd();
}
{
mv = (cw.visitMethod(ACC_PUBLIC + ACC_BRIDGE + ACC_SYNTHETIC, "copy", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", null, null));
//mv.setDebug(true);
mv.visitVarInsn(ALOAD, 0);
mv.visitVarInsn(ALOAD, 1);
mv.visitTypeInsn(CHECKCAST, destName);
mv.visitVarInsn(ALOAD, 2);
mv.visitTypeInsn(CHECKCAST, srcName);
mv.visitMethodInsn(INVOKEVIRTUAL, newDynName, "copy", "(" + destDesc + srcDesc + ")" + destDesc, false);
mv.visitInsn(ARETURN);
mv.visitMaxs(3, 3);
mv.visitEnd();
}
cw.visitEnd();
// ------------------------------------------------------------------------------
byte[] bytes = cw.toByteArray();
Class<?> creatorClazz = new ClassLoader(loader) {
public final Class<?> loadClass(String name, byte[] b) {
return defineClass(name, b, 0, b.length);
}
}.loadClass(newDynName.replace('/', '.'), bytes);
try {
return (Reproduce) creatorClazz.newInstance();
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
}
|
[
"22250530@qq.com"
] |
22250530@qq.com
|
795386ea5dc3e56e57b77de868c271fe0eb24c54
|
13200e547eec0d67ff9da9204c72ab26a93f393d
|
/src/com/google/android/gms/R$mipmap.java
|
4c526de2818ecd9e58de2cca007559e8a938bdab
|
[] |
no_license
|
emtee40/DecompiledPixelLauncher
|
d72d107eaafb42896aa903b9f0f34f5f09f5a15c
|
fb954b108a7bf3377da5c28fd9a2f22e1b6990ea
|
refs/heads/master
| 2020-04-03T03:18:06.239632
| 2018-01-19T08:49:36
| 2018-01-19T08:49:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 236
|
java
|
//
// Decompiled by Procyon v0.5.30
//
package com.google.android.gms;
public final class R$mipmap
{
public static final int ic_launcher_home = 2130903040;
public static final int ic_launcher_home_foreground = 2130903041;
}
|
[
"azaidi@live.nl"
] |
azaidi@live.nl
|
0a789c13f4a559455a93ca1e11d99a4dca7c9f31
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/9/9_0ae34cc7964cf20605ddbe91d89771308a7e9e10/CookMePlayerListener/9_0ae34cc7964cf20605ddbe91d89771308a7e9e10_CookMePlayerListener_t.java
|
0ab89840d270786df3a2c66df4802beadd897593
|
[] |
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
| 6,827
|
java
|
import java.sql.Timestamp;
import java.util.Random;
/**
* CookMePlayerListener
* Handles the players activities!
*
* Refer to the forum thread:
* http://bit.ly/cookmebukkit
* Refer to the dev.bukkit.org page:
* http://bit.ly/cookmebukkitdev
*
* @author xGhOsTkiLLeRx
* @thanks nisovin for his awesome code snippet!
*
*/
public class CookMePlayerListener extends PluginListener {
private CookMe plugin;
private boolean message = true;
private Random random = new Random();
public CookMePlayerListener(CookMe instance) {
plugin = instance;
}
public boolean onEat(Player player, Item item) {
String effect;
Timestamp now = new Timestamp(System.currentTimeMillis());
// Check if player is affected
//TODO if (!player.hasPermission("cookme.safe")) {
if (!player.isAdmin()) {
// Check for item & right clicking
if (sameItem(player.getItemStackInHand().getItemId())) {
// If the player is in cooldown phase cancel it
if (!plugin.cooldownManager.hasCooldown(player, now)) {
// Check for food level
if (player.getFoodLevel() != 20) {
// Make a temp double and a value between 0 and 99
double temp = 0;
int i = 0;
// Get the number for the effect
for(i = 0; i < plugin.percentages.length; i++) {
temp += plugin.percentages[i];
if (random.nextInt(100) <= temp) break;
}
// EffectStrenght, Duration etc.
int randomEffectStrength = random.nextInt(16);
int randomEffectTime = (random.nextInt((plugin.maxDuration - plugin.minDuration) + 1) + plugin.minDuration) * 1000;
// Player gets random damage, stack minus 1
if (i == 0) {
int randomDamage = random.nextInt(9) +1;
effect = plugin.localization.getString("damage");
message(player, effect);
decreaseItem(player);
player.applyDamage(PluginLoader.DamageType.ENTITY, randomDamage);
}
// Player dies, stack minus 1
if (i == 1) {
effect = plugin.localization.getString("death");
message(player, effect);
decreaseItem(player);
player.setHealth(0);
}
// Random venom damage (including green hearts :) )
if (i == 2) {
effect = plugin.localization.getString("venom");
message(player, effect);
decreaseItem(player);
player.addPotionEffect(PotionEffect.getNewPotionEffect(PotionEffect.Type.POISON, randomEffectTime, randomEffectStrength));
}
// Food bar turns green (poison)
if (i == 3) {
effect = plugin.localization.getString("hungervenom");
message(player, effect);
decreaseItem(player);
player.addPotionEffect(PotionEffect.getNewPotionEffect(PotionEffect.Type.HUNGER, randomEffectTime, randomEffectStrength));
}
// Sets the food level down. Stack minus 1
if (i == 4) {
int currentFoodLevel = player.getFoodLevel(), randomFoodLevel = random.nextInt(currentFoodLevel);
effect = plugin.localization.getString("hungerdecrease");
message(player, effect);
decreaseItem(player);
player.setFoodLevel(randomFoodLevel);
}
// Confusion
if (i == 5) {
effect = plugin.localization.getString("confusion");
message(player, effect);
decreaseItem(player);
player.addPotionEffect(PotionEffect.getNewPotionEffect(PotionEffect.Type.CONFUSION, randomEffectTime, randomEffectStrength));
}
// Blindness
if (i == 6) {
effect = plugin.localization.getString("blindness");
message(player, effect);
decreaseItem(player);
player.addPotionEffect(PotionEffect.getNewPotionEffect(PotionEffect.Type.BLINDNESS, randomEffectTime, randomEffectStrength));
}
// Weakness
if (i == 7) {
effect = plugin.localization.getString("weakness");
message(player, effect);
decreaseItem(player);
player.addPotionEffect(PotionEffect.getNewPotionEffect(PotionEffect.Type.WEAKNESS, randomEffectTime, randomEffectStrength));
}
// Slowness
if (i == 8) {
effect = plugin.localization.getString("slowness");
message(player, effect);
decreaseItem(player);
player.addPotionEffect(PotionEffect.getNewPotionEffect(PotionEffect.Type.SLOW_DOWN, randomEffectTime, randomEffectStrength));
}
// Slowness for blocks
if (i == 9) {
effect = plugin.localization.getString("slowness_blocks");
message(player, effect);
decreaseItem(player);
player.addPotionEffect(PotionEffect.getNewPotionEffect(PotionEffect.Type.DIG_SLOW, randomEffectTime, randomEffectStrength));
}
// Instant Damage
if (i == 10) {
effect = plugin.localization.getString("instant_damage");
message(player, effect);
decreaseItem(player);
player.addPotionEffect(PotionEffect.getNewPotionEffect(PotionEffect.Type.HARM, randomEffectTime, randomEffectStrength));
}
// Refusing
if (i == 11) {
effect = plugin.localization.getString("refusing");
message(player, effect);
return true;
}
// Wither effect
if (i == 12) {
effect = plugin.localization.getString("wither");
message(player, effect);
decreaseItem(player);
player.addPotionEffect(PotionEffect.getNewPotionEffect(PotionEffect.Type.WITHER, randomEffectTime, randomEffectStrength));
}
// Add player to cooldown list
if (plugin.cooldown != 0) plugin.cooldownManager.addPlayer(player);
}
}
}
}
return false;
}
private void message(Player player, String message) {
if (plugin.messages) {
plugin.message(player, message, null, null);
}
}
// Is the item in the list? Yes or no
private boolean sameItem(int item) {
for (String itemName : plugin.itemList) {
// Get the Material
try {
Item.Type mat = Item.Type.valueOf(itemName);
// Get ID & compare
if (mat.getId() == item) return true;
}
// Not valid
catch (IllegalArgumentException e) {
// Prevent spamming
if (message) {
CookMe.log.warning("Couldn't load the foods! Please check your config!");
CookMe.log.warning("The following item id/name is invalid: " + itemName);
message = false;
}
// Go on
continue;
}
}
return false;
}
// Sets the raw food -1
private void decreaseItem (Player player) {
Item afterEating = player.getItemStackInHand();
if (afterEating.getAmount() == 1) player.setItemInHand(null);
else {
afterEating.setAmount(afterEating.getAmount() - 1);
player.setItemInHand(afterEating);
}
player.updateInventory();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
96e7cd8b8aa6abce53fa9d2d6bd1c41b2e1dc03d
|
b5d331025967a5e9d823a3ffd056441c54f89d58
|
/ui/src/test/java/com/kotcrab/vis/ui/test/manual/TestTabbedPane.java
|
47218762cfab0b7d90bff16b546405f7f9828760
|
[
"CC-BY-4.0",
"CC-BY-ND-3.0",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
kotcrab/vis-ui
|
331c3aad4a7e4f3dc9ca6072a30e98a0520411a8
|
5f3ad0754ca059b2c06f7a25f5ec8d9cb9808fc1
|
refs/heads/master
| 2023-09-04T03:53:48.409423
| 2023-07-04T21:39:30
| 2023-07-04T21:39:30
| 18,189,061
| 310
| 53
|
Apache-2.0
| 2023-07-04T21:39:31
| 2014-03-27T19:45:58
|
Java
|
UTF-8
|
Java
| false
| false
| 2,850
|
java
|
/*
* Copyright 2014-2017 See AUTHORS file.
*
* 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.kotcrab.vis.ui.test.manual;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.kotcrab.vis.ui.VisUI;
import com.kotcrab.vis.ui.util.TableUtils;
import com.kotcrab.vis.ui.widget.VisLabel;
import com.kotcrab.vis.ui.widget.VisTable;
import com.kotcrab.vis.ui.widget.VisWindow;
import com.kotcrab.vis.ui.widget.tabbedpane.Tab;
import com.kotcrab.vis.ui.widget.tabbedpane.TabbedPane;
import com.kotcrab.vis.ui.widget.tabbedpane.TabbedPane.TabbedPaneStyle;
import com.kotcrab.vis.ui.widget.tabbedpane.TabbedPaneAdapter;
public class TestTabbedPane extends VisWindow {
public TestTabbedPane (boolean vertical) {
super("tabbed pane");
TableUtils.setSpacingDefaults(this);
setResizable(true);
addCloseButton();
closeOnEscape();
final VisTable container = new VisTable();
TabbedPaneStyle style = VisUI.getSkin().get(vertical ? "vertical" : "default", TabbedPaneStyle.class);
TabbedPane tabbedPane = new TabbedPane(style);
tabbedPane.addListener(new TabbedPaneAdapter() {
@Override
public void switchedTab (Tab tab) {
container.clearChildren();
container.add(tab.getContentTable()).expand().fill();
}
});
if (style.vertical) {
top();
defaults().top();
add(tabbedPane.getTable()).growY();
add(container).expand().fill();
} else {
add(tabbedPane.getTable()).expandX().fillX();
row();
add(container).expand().fill();
}
tabbedPane.add(new TestTab("tab1"));
tabbedPane.add(new TestTab("tab2"));
tabbedPane.add(new TestTab("tab3"));
tabbedPane.add(new TestTab("tab4"));
tabbedPane.add(new TestTab("tab5"));
tabbedPane.add(new TestTab("tab6"));
tabbedPane.add(new TestTab("tab7"));
tabbedPane.add(new TestTab("tab8"));
Tab tab = new TestTab("tab9");
tabbedPane.add(tab);
tabbedPane.disableTab(tab, true);
// debugAll();
setSize(300, 200);
centerWindow();
}
private class TestTab extends Tab {
private String title;
private Table content;
public TestTab (String title) {
super(false, true);
this.title = title;
content = new VisTable();
content.add(new VisLabel(title));
}
@Override
public String getTabTitle () {
return title;
}
@Override
public Table getContentTable () {
return content;
}
}
}
|
[
"kotcrab@gmail.com"
] |
kotcrab@gmail.com
|
10e38dce22fba1821b727ff097c82870c7b3410b
|
3156097a45b3ebada2b36f37dbf44846a5892d86
|
/Chapter_7_GCS/mdse.book.swml.diagram/src/swml/diagram/edit/commands/SwmlCreateShortcutDecorationsCommand.java
|
8dcc32fcae91660ada97cad02c457c1fa1637089
|
[] |
no_license
|
ModelEngineeringBooks/MDSEBook
|
912a4815918f6e0c68c3384ed0aed929a8abf8f0
|
0f63acb260d24574d9c2afb8119a49e13896039e
|
refs/heads/master
| 2021-01-10T16:26:59.293068
| 2019-09-17T06:45:49
| 2019-09-17T06:45:49
| 47,128,250
| 13
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,242
|
java
|
/*
*
*/
package swml.diagram.edit.commands;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
import org.eclipse.gmf.runtime.notation.View;
import swml.diagram.edit.parts.WebModelEditPart;
/**
* @generated
*/
public class SwmlCreateShortcutDecorationsCommand extends AbstractTransactionalCommand {
/**
* @generated
*/
private List myDescriptors;
/**
* @generated
*/
public SwmlCreateShortcutDecorationsCommand(TransactionalEditingDomain editingDomain, View parentView,
List viewDescriptors) {
super(editingDomain, "Create Shortcuts", getWorkspaceFiles(parentView)); //$NON-NLS-1$
myDescriptors = viewDescriptors;
}
/**
* @generated
*/
public SwmlCreateShortcutDecorationsCommand(TransactionalEditingDomain editingDomain, View parentView,
CreateViewRequest.ViewDescriptor viewDescriptor) {
this(editingDomain, parentView, Collections.singletonList(viewDescriptor));
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
for (Iterator it = myDescriptors.iterator(); it.hasNext();) {
CreateViewRequest.ViewDescriptor nextDescriptor = (CreateViewRequest.ViewDescriptor) it.next();
View view = (View) nextDescriptor.getAdapter(View.class);
if (view != null && view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
shortcutAnnotation.getDetails().put("modelID", WebModelEditPart.MODEL_ID); //$NON-NLS-1$
view.getEAnnotations().add(shortcutAnnotation);
}
}
return CommandResult.newOKCommandResult();
}
}
|
[
"wimmer@big.tuwien.ac.at"
] |
wimmer@big.tuwien.ac.at
|
466ca8dea49bed86bce8bd5b3c55cdb2668ef7fd
|
b86d893df34431fb7b737c98875be6fe6e35d484
|
/products/sarlc/src/main/java/io/sarl/lang/sarlc/modules/configs/SarlcConfigModule.java
|
2a47f0cea6aae7d83d6b90e18dc4c08ef07bfbe6
|
[
"Apache-2.0"
] |
permissive
|
RyuzakiKK/sarl
|
d8a22eb1966e003dbce3c11a4c19272f2a8d2fad
|
a4b90df375dbda134ceb02f99cda8b087e445c2a
|
refs/heads/master
| 2020-03-25T08:03:38.047839
| 2018-07-30T14:27:28
| 2018-07-30T14:45:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,887
|
java
|
/*
* $Id$
*
* SARL is an general-purpose agent programming language.
* More details on http://www.sarl.io
*
* Copyright (C) 2014-2018 the original authors 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 io.sarl.lang.sarlc.modules.configs;
import static io.bootique.BQCoreModule.extend;
import static io.sarl.lang.sarlc.configs.SarlConfig.BOOT_CLASSPATH_NAME;
import static io.sarl.lang.sarlc.configs.SarlConfig.CLASSPATH_NAME;
import static io.sarl.lang.sarlc.configs.SarlConfig.CLASS_OUTPUT_PATH_NAME;
import static io.sarl.lang.sarlc.configs.SarlConfig.OUTPUT_PATH_NAME;
import static io.sarl.lang.sarlc.configs.SarlConfig.WORKING_PATH_NAME;
import java.io.File;
import java.text.MessageFormat;
import com.google.inject.AbstractModule;
import com.google.inject.Injector;
import com.google.inject.Provides;
import com.google.inject.Singleton;
import io.bootique.config.ConfigurationFactory;
import io.bootique.meta.application.OptionMetadata;
import org.arakhne.afc.bootique.variables.VariableDecls;
import org.arakhne.afc.bootique.variables.VariableNames;
import org.eclipse.core.runtime.Path;
import io.sarl.lang.SARLConfig;
import io.sarl.lang.sarlc.Constants;
import io.sarl.lang.sarlc.configs.SarlConfig;
/**
* Module for creating and configuring the general/root sarlc configuration.
*
* @author $Author: sgalland$
* @version $FullVersion$
* @mavengroupid $GroupId$
* @mavenartifactid $ArtifactId$
* @since 0.8
*/
public class SarlcConfigModule extends AbstractModule {
private static final String CLASSPATH_LONG_OPTION = "classpath"; //$NON-NLS-1$
private static final String CLASSPATH_SHORT_OPTION = "cp"; //$NON-NLS-1$
@Override
protected void configure() {
VariableDecls.extend(binder()).declareVar(OUTPUT_PATH_NAME);
extend(binder()).addOption(OptionMetadata.builder(
Constants.SARL_OUTPUT_DIRECTORY_OPTION,
MessageFormat.format(Messages.SarlcConfigModule_0, Constants.PROGRAM_NAME,
Constants.SARL_OUTPUT_DIRECTORY_OPTION,
Path.fromPortableString(SARLConfig.FOLDER_SOURCE_GENERATED).toFile().getPath()))
.configPath(OUTPUT_PATH_NAME)
.valueRequired(Messages.SarlcConfigModule_1)
.build());
VariableDecls.extend(binder()).declareVar(CLASS_OUTPUT_PATH_NAME);
extend(binder()).addOption(OptionMetadata.builder(
Constants.JAVA_OUTPUT_DIRECTORY_OPTION,
MessageFormat.format(Messages.SarlcConfigModule_6, Constants.PROGRAM_NAME,
Constants.JAVA_OUTPUT_DIRECTORY_OPTION,
Path.fromPortableString(SARLConfig.FOLDER_BIN).toFile().getPath()))
.configPath(CLASS_OUTPUT_PATH_NAME)
.valueRequired(Messages.SarlcConfigModule_1)
.build());
VariableDecls.extend(binder()).declareVar(WORKING_PATH_NAME);
extend(binder()).addOption(OptionMetadata.builder(
"workingdir", Messages.SarlcConfigModule_2) //$NON-NLS-1$
.configPath(WORKING_PATH_NAME)
.valueRequired(Messages.SarlcConfigModule_1)
.build());
VariableDecls.extend(binder()).declareVar(CLASSPATH_NAME);
final String cpDescription = MessageFormat.format(Messages.SarlcConfigModule_3,
VariableNames.toEnvironmentVariableName(CLASSPATH_NAME), CLASSPATH_SHORT_OPTION,
CLASSPATH_LONG_OPTION);
extend(binder()).addOptions(OptionMetadata.builder(
CLASSPATH_LONG_OPTION, cpDescription)
.configPath(CLASSPATH_NAME)
.valueRequired(Messages.SarlcConfigModule_4)
.build(),
OptionMetadata.builder(
CLASSPATH_SHORT_OPTION, cpDescription)
.configPath(CLASSPATH_NAME)
.valueRequired(Messages.SarlcConfigModule_4)
.build());
VariableDecls.extend(binder()).declareVar(BOOT_CLASSPATH_NAME);
extend(binder()).addOption(OptionMetadata.builder(
"bootclasspath", //$NON-NLS-1$
MessageFormat.format(Messages.SarlcConfigModule_5, File.pathSeparator))
.configPath(BOOT_CLASSPATH_NAME)
.valueRequired(Messages.SarlcConfigModule_4)
.build());
}
/** Replies the instance of the sarl configuration.
*
* @param configFactory accessor to the bootique factory.
* @param injector the current injector.
* @return the path configuration accessor.
*/
@SuppressWarnings("static-method")
@Provides
@Singleton
public SarlConfig getSarlcConfig(ConfigurationFactory configFactory, Injector injector) {
final SarlConfig config = SarlConfig.getConfiguration(configFactory);
injector.injectMembers(config);
return config;
}
}
|
[
"galland@arakhne.org"
] |
galland@arakhne.org
|
1665d7dbf260c66460441b449adf87ef7c68cdc5
|
098e4a23c720e024a3f2dca6b6d9aa223ab842dc
|
/src/main/java/com/qunar/chat/common/util/ExecutorUtils.java
|
3a53afcdb49975188b8d63d3db07737f8c0853a7
|
[
"MIT"
] |
permissive
|
kk2018/qchat_admin_open
|
d61dcf922eb51698d910fbd77d0daed58a1ddf27
|
997f5b8ca4e944801c6ed771dad60751697b593f
|
refs/heads/master
| 2020-05-19T18:18:05.080448
| 2019-04-08T04:30:03
| 2019-04-08T04:30:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 780
|
java
|
package com.qunar.chat.common.util;
import java.util.concurrent.*;
/**
* Author : open
* Date : 16-4-6
*/
public class ExecutorUtils {
// private static final Logger LOGGER = LoggerFactory.getLogger(ExecutorUtils.class);
public static ExecutorService newLimitedCachedThreadPool(int activeNum, int queueNum) {
return new ThreadPoolExecutor(0, activeNum, 60L, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(queueNum));
}
public static ExecutorService newLimitedCachedThreadPool() {
return newLimitedCachedThreadPool(100, 100);
}
public static ExecutorService newLinkedThreadPoll(int activeNum, int queueNum) {
return new ThreadPoolExecutor(1, activeNum, 60L, TimeUnit.SECONDS, new LinkedBlockingDeque<>(queueNum));
}
}
|
[
"20832776@qunar.com"
] |
20832776@qunar.com
|
cb2eca98d7232149e6f440c6b82574264d25c806
|
f7ac9111fbf3672d6a92a4d3f67b110d8ba25e84
|
/src/main/java/mcjty/rftools/blocks/elevator/ElevatorBlock.java
|
1e9c96655389502a01e85c924343198d644d6414
|
[
"MIT"
] |
permissive
|
kayila/RFTools
|
208649eec427548f6dcd5f410d1d2ff4f61eaf66
|
f7b4d6395ed48209b3ee91ac2cec5baec9252667
|
refs/heads/1.10
| 2020-12-24T06:02:47.957388
| 2016-11-08T23:57:39
| 2016-11-08T23:57:39
| 73,236,861
| 0
| 0
| null | 2016-11-08T23:42:00
| 2016-11-08T23:41:59
| null |
UTF-8
|
Java
| false
| false
| 4,675
|
java
|
package mcjty.rftools.blocks.elevator;
import mcjty.lib.api.Infusable;
import mcjty.lib.container.EmptyContainer;
import mcjty.lib.container.GenericBlock;
import mcjty.rftools.Achievements;
import mcjty.rftools.RFTools;
import mcjty.rftools.blocks.GenericRFToolsBlock;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import org.lwjgl.input.Keyboard;
import java.util.List;
public class ElevatorBlock extends GenericRFToolsBlock<ElevatorTileEntity, EmptyContainer> implements Infusable {
public ElevatorBlock() {
super(Material.IRON, ElevatorTileEntity.class, EmptyContainer.class, "elevator", true);
}
@Override
public boolean isHorizRotation() {
return true;
}
@Override
public boolean needsRedstoneCheck() {
return true;
}
@Override
public boolean hasRedstoneOutput() {
return true;
}
@Override
protected int getRedstoneOutput(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) {
EnumFacing direction = state.getValue(FACING_HORIZ);
if (side == direction) {
TileEntity te = world.getTileEntity(pos);
if (te instanceof ElevatorTileEntity) {
ElevatorTileEntity elevatorTileEntity = (ElevatorTileEntity) te;
return elevatorTileEntity.isPlatformHere() ? 15 : 0;
}
}
return 0;
}
@SideOnly(Side.CLIENT)
@Override
public void initModel() {
super.initModel();
ClientRegistry.bindTileEntitySpecialRenderer(ElevatorTileEntity.class, new ElevatorTESR());
}
@Override
public int getGuiID() {
return -1;
}
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack itemStack, EntityPlayer player, List<String> list, boolean whatIsThis) {
super.addInformation(itemStack, player, list, whatIsThis);
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
list.add(TextFormatting.WHITE + "This machine needs to be placed at a certain");
list.add(TextFormatting.WHITE + "level pointing towards where a moving platform");
list.add(TextFormatting.WHITE + "will be. Only the lowest elevator needs power");
list.add(TextFormatting.WHITE + "Infusing bonus: reduced power consumption");
} else {
list.add(TextFormatting.WHITE + RFTools.SHIFT_MESSAGE);
}
}
@Override
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
super.onBlockPlacedBy(world, pos, state, placer, stack);
TileEntity te = world.getTileEntity(pos);
if (te instanceof ElevatorTileEntity) {
ElevatorTileEntity elevatorTileEntity = (ElevatorTileEntity) te;
elevatorTileEntity.clearCaches(world.getBlockState(pos).getValue(GenericBlock.FACING_HORIZ));
}
if (placer instanceof EntityPlayer) {
Achievements.trigger((EntityPlayer) placer, Achievements.goingUp);
}
}
@Override
public void breakBlock(World world, BlockPos pos, IBlockState state) {
TileEntity te = world.getTileEntity(pos);
if (te instanceof ElevatorTileEntity) {
ElevatorTileEntity elevatorTileEntity = (ElevatorTileEntity) te;
elevatorTileEntity.clearCaches(state.getValue(GenericBlock.FACING_HORIZ));
}
super.breakBlock(world, pos, state);
}
@SideOnly(Side.CLIENT)
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
super.getWailaBody(itemStack, currenttip, accessor, config);
ElevatorTileEntity te = (ElevatorTileEntity) accessor.getTileEntity();
int energy = te.getEnergyStored(EnumFacing.DOWN);
currenttip.add(TextFormatting.GREEN + "RF: " + energy);
return currenttip;
}
}
|
[
"mcjty1@gmail.com"
] |
mcjty1@gmail.com
|
0d4d887cdfe085cdc0eed7f3d65056e693aa02c8
|
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
|
/src/testcases/CWE197_Numeric_Truncation_Error/s01/CWE197_Numeric_Truncation_Error__int_Environment_to_short_54a.java
|
b59244b11035983493ec49cebfee1e807903d698
|
[] |
no_license
|
bqcuong/Juliet-Test-Case
|
31e9c89c27bf54a07b7ba547eddd029287b2e191
|
e770f1c3969be76fdba5d7760e036f9ba060957d
|
refs/heads/master
| 2020-07-17T14:51:49.610703
| 2019-09-03T16:22:58
| 2019-09-03T16:22:58
| 206,039,578
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,727
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE197_Numeric_Truncation_Error__int_Environment_to_short_54a.java
Label Definition File: CWE197_Numeric_Truncation_Error__int.label.xml
Template File: sources-sink-54a.tmpl.java
*/
/*
* @description
* CWE: 197 Numeric Truncation Error
* BadSource: Environment Read data from an environment variable
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: to_short
* BadSink : Convert data to a short
* Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package
*
* */
package testcases.CWE197_Numeric_Truncation_Error.s01;
import testcasesupport.*;
import java.util.logging.Level;
public class CWE197_Numeric_Truncation_Error__int_Environment_to_short_54a extends AbstractTestCase
{
public void bad() throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* Initialize data */
/* get environment variable ADD */
/* POTENTIAL FLAW: Read data from an environment variable */
{
String stringNumber = System.getenv("ADD");
if (stringNumber != null) // avoid NPD incidental warnings
{
try
{
data = Integer.parseInt(stringNumber.trim());
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat);
}
}
}
(new CWE197_Numeric_Truncation_Error__int_Environment_to_short_54b()).badSink(data );
}
public void good() throws Throwable
{
goodG2B();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
int data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
(new CWE197_Numeric_Truncation_Error__int_Environment_to_short_54b()).goodG2BSink(data );
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"bqcuong2212@gmail.com"
] |
bqcuong2212@gmail.com
|
a9982ed050f4294627d1dd1ea2403e2c591f83a4
|
7c8d2d2791b63d49edaf464129849a585460c880
|
/3密钥卡管理系统/AccWebKms/src/com/goldsign/acc/app/samquery/mapper/SamStockStaMapper.java
|
8199b2d427526d05595e62cd2e9ce7929072f29a
|
[] |
no_license
|
wuqq-20191129/wlmq
|
5cd3ebc50945bde41d0fd615ba93ca95ab1a2235
|
ae26d439af09097b65c90cad8d22954cd91fe5f5
|
refs/heads/master
| 2023-01-14T03:19:23.226824
| 2020-11-24T01:43:22
| 2020-11-24T02:09:41
| 315,494,185
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 467
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.goldsign.acc.app.samquery.mapper;
import com.goldsign.acc.app.samquery.entity.SamStockSta;
import java.util.List;
/**
*
* @author chenzx
*/
public interface SamStockStaMapper {
public List<SamStockSta> getSamStockSta(SamStockSta vo);
}
|
[
"13821571040@163.com"
] |
13821571040@163.com
|
b756c6caa84e0b00f467bbf576bad939423a8e18
|
f65b2cdc1970308ab26a7cf36da52f470cb5238a
|
/app/src/main/java/com/homepaas/sls/jsinterface/entity/RedCoupsEntity.java
|
0b9de6b25d2731d013bc9f4bb319521d2229ac22
|
[] |
no_license
|
Miotlink/MAndroidClient
|
5cac8a0eeff2289eb676a4ddd51a90926a6ff7ad
|
83cbd50c38662a7a3662221b52d6b71f157d9740
|
refs/heads/master
| 2020-04-18T11:24:18.926374
| 2019-01-25T06:44:13
| 2019-01-25T06:44:13
| 167,498,578
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,497
|
java
|
package com.homepaas.sls.jsinterface.entity;
import com.google.gson.annotations.SerializedName;
/**
* Created by JWC on 2017/3/13.
*/
public class RedCoupsEntity {
@SerializedName("Meta")
private Meta meta;
@SerializedName("Body")
private Body body;
public Meta getMeta() {
return meta;
}
public void setMeta(Meta meta) {
this.meta = meta;
}
public Body getBody() {
return body;
}
public void setBody(Body body) {
this.body = body;
}
public static class Meta{
@SerializedName("ErrorCode")
String errorCode;
@SerializedName("ErrorMsg")
String ErrorMsg;
public String getErrorCode() {
return errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
public String getErrorMsg() {
return ErrorMsg;
}
public void setErrorMsg(String errorMsg) {
ErrorMsg = errorMsg;
}
}
public static class Body{
@SerializedName("Title")
String title;
@SerializedName("Url")
String url;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
}
}
|
[
"pm@miotlinl.com"
] |
pm@miotlinl.com
|
7dbf2723f13c0ac71ba33d0d0cc1f9ad0deb3791
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/com/facebook/litho/LayoutStateAddChildWithInputTest.java
|
02ea049e3e9a2130932eb607272cf043d4b9fded
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 1,415
|
java
|
/**
* Copyright 2014-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.litho;
import com.facebook.litho.testing.TestLayoutComponent;
import com.facebook.litho.testing.testrunner.ComponentsTestRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(ComponentsTestRunner.class)
public class LayoutStateAddChildWithInputTest {
private ComponentContext mContext;
@Test
public void testNewEmptyLayout() {
Column component = Column.create(mContext).child(TestLayoutComponent.create(mContext)).child(TestLayoutComponent.create(mContext)).build();
InternalNode node = ((InternalNode) (component.resolve(mContext)));
assertThat(node.getChildCount()).isEqualTo(2);
assertThat(node.getChildAt(0).getChildCount()).isEqualTo(0);
assertThat(node.getChildAt(1).getChildCount()).isEqualTo(0);
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
53bdf59a63bdb80bb2c1e579c881b5d48262d446
|
58c361819489eeb34411ff84a7de089809f1a646
|
/communication-client/src/main/java/com/andrcid/process/client/resolve/BooleanResolve.java
|
9713e665b67e19ba484ce3463f6447a2614b42a9
|
[] |
no_license
|
qugemingzizhemefeijin/communication-frame
|
24d3f2d2dd696012c39438eb6d97f46c5e84ef78
|
353bfe64fa1cfbc3adc1fc8faf243492334c0e00
|
refs/heads/master
| 2023-04-01T00:09:06.529114
| 2021-04-09T13:15:59
| 2021-04-09T13:15:59
| 356,218,750
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 273
|
java
|
package com.andrcid.process.client.resolve;
public class BooleanResolve implements IResolve<Boolean> {
@Override
public Class<Boolean> getResolveClass() {
return Boolean.class;
}
@Override
public Boolean resolve(String res) {
return Boolean.valueOf(res);
}
}
|
[
"172577882@qq.com"
] |
172577882@qq.com
|
e0537a0726e6aaeebc6db6b768b0cb292c352f01
|
98e53f3932ecce2a232d0c314527efe49f62e827
|
/org.rcfaces.core/src/org/rcfaces/core/model/ICommitableObject.java
|
6fa88c9deb46d40187a406d3286126b556961d96
|
[] |
no_license
|
Vedana/rcfaces-2
|
f053a4ebb8bbadd02455d89a5f1cb870deade6da
|
4112cfe1117c4bfcaf42f67fe5af32a84cf52d41
|
refs/heads/master
| 2020-04-02T15:03:08.653984
| 2014-04-18T09:36:54
| 2014-04-18T09:36:54
| 11,175,963
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 340
|
java
|
/*
* $Id: ICommitableObject.java,v 1.1 2011/04/12 09:25:43 oeuillot Exp $
*/
package org.rcfaces.core.model;
/**
*
* @author Olivier Oeuillot (latest modification by $Author: oeuillot $)
* @version $Revision: 1.1 $ $Date: 2011/04/12 09:25:43 $
*/
public interface ICommitableObject {
void commit();
boolean isCommited();
}
|
[
"jbmeslin@vedana.com"
] |
jbmeslin@vedana.com
|
d479fbe2823496c7f72f593222a2f6dd910d7212
|
005d25a5d45a9292d14e9874fd52f65d401965cd
|
/ZZZ/gen/com/example/zzz/R.java
|
0a8687692751e1388d9bfc4ea80ed461ab28997e
|
[] |
no_license
|
zhouniyao/Java
|
6f4633ae9784fe09d768d947473b0593234b3643
|
6c1cba8fb595e9207891c623d085f068efac4a00
|
refs/heads/master
| 2021-08-23T05:04:52.108621
| 2017-12-03T13:24:45
| 2017-12-03T13:24:45
| 112,750,191
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,930
|
java
|
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.example.zzz;
public final class R {
public static final class attr {
}
public static final class dimen {
/** Default screen margins, per the Android Design guidelines.
Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
*/
public static final int activity_horizontal_margin=0x7f050000;
public static final int activity_vertical_margin=0x7f050001;
}
public static final class drawable {
public static final int checkerboard8_8=0x7f020000;
public static final int ic_launcher=0x7f020001;
public static final int taiji=0x7f020002;
public static final int wl=0x7f020003;
}
public static final class id {
public static final int action_settings=0x7f090002;
public static final int glPlane=0x7f090000;
public static final int paomadeng=0x7f090001;
}
public static final class layout {
public static final int activity_framelayout=0x7f030000;
public static final int activity_main=0x7f030001;
}
public static final class menu {
public static final int main=0x7f080000;
}
public static final class raw {
public static final int per_pixel_fragment_shader=0x7f040000;
public static final int per_pixel_vertex_shader=0x7f040001;
}
public static final class string {
public static final int action_settings=0x7f060001;
public static final int app_name=0x7f060000;
public static final int hello_world=0x7f060002;
}
public static final class style {
/**
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
API 11 theme customizations can go here.
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
API 14 theme customizations can go here.
*/
public static final int AppBaseTheme=0x7f070000;
/** Application theme.
All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f070001;
}
}
|
[
"zhouniyao@163.com"
] |
zhouniyao@163.com
|
12694e6caf2bf06ce1ce8c2cdf8898841f874276
|
4f63fca063c064d6568fd39353d9478988cbed06
|
/opengl/src/main/java/com/doctoror/particlesdrawable/opengl/OnPauseFixAttemptGLSurfaceView.java
|
95034e47af341592fd07103981bf2a2ac3d55322
|
[
"Apache-2.0"
] |
permissive
|
Doctoror/ParticlesDrawable
|
7a94d6ba29fbd6d04d67b6c31cbc5a9431bea7cc
|
fb82a1d2926ad2d126601aee04665411e0caf248
|
refs/heads/master
| 2023-09-04T03:51:12.749904
| 2023-08-29T09:23:19
| 2023-08-29T09:23:19
| 81,982,552
| 485
| 71
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,309
|
java
|
package com.doctoror.particlesdrawable.opengl;
import android.content.Context;
import android.util.AttributeSet;
import com.doctoror.particlesdrawable.KeepAsApi;
/**
* Source: https://issuetracker.google.com/issues/36909769#comment4
*/
@KeepAsApi
public class OnPauseFixAttemptGLSurfaceView extends MultipleInstanceSafeGLSurfaceView {
private final NotifyPause notifyPause = new NotifyPause();
final boolean[] pausing = new boolean[1];
public OnPauseFixAttemptGLSurfaceView(Context context) {
super(context);
}
public OnPauseFixAttemptGLSurfaceView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public void onPause() {
synchronized (pausing) {
pausing[0] = true;
queueEvent(notifyPause);
try {
while (pausing[0]) {
pausing.wait();
}
} catch (final java.lang.InterruptedException e) {
// empty
}
super.onPause();
}
}
private final class NotifyPause implements Runnable {
@Override
public void run() {
synchronized (pausing) {
pausing[0] = false;
pausing.notifyAll();
}
}
}
}
|
[
"docd1990@gmail.com"
] |
docd1990@gmail.com
|
c63ed506c61f94774a1ecd43090d3eec59bef5c0
|
43ea91f3ca050380e4c163129e92b771d7bf144a
|
/services/roma/src/main/java/com/huaweicloud/sdk/roma/v2/model/ShowResponsePropertyRequest.java
|
91332809ebfcf51469ebc01f9e3f5860dd30868f
|
[
"Apache-2.0"
] |
permissive
|
wxgsdwl/huaweicloud-sdk-java-v3
|
660602ca08f32dc897d3770995b496a82a1cc72d
|
ee001d706568fdc7b852792d2e9aefeb9d13fb1e
|
refs/heads/master
| 2023-02-27T14:20:54.774327
| 2021-02-07T11:48:35
| 2021-02-07T11:48:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,151
|
java
|
package com.huaweicloud.sdk.roma.v2.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.function.Consumer;
import java.util.Objects;
/**
* Request Object
*/
public class ShowResponsePropertyRequest {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="instance_id")
private String instanceId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="service_id")
private String serviceId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="command_id")
private Integer commandId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="property_id")
private Integer propertyId;
public ShowResponsePropertyRequest withInstanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
/**
* Get instanceId
* @return instanceId
*/
public String getInstanceId() {
return instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
public ShowResponsePropertyRequest withServiceId(String serviceId) {
this.serviceId = serviceId;
return this;
}
/**
* Get serviceId
* @return serviceId
*/
public String getServiceId() {
return serviceId;
}
public void setServiceId(String serviceId) {
this.serviceId = serviceId;
}
public ShowResponsePropertyRequest withCommandId(Integer commandId) {
this.commandId = commandId;
return this;
}
/**
* Get commandId
* minimum: 0
* maximum: 200376420520689663
* @return commandId
*/
public Integer getCommandId() {
return commandId;
}
public void setCommandId(Integer commandId) {
this.commandId = commandId;
}
public ShowResponsePropertyRequest withPropertyId(Integer propertyId) {
this.propertyId = propertyId;
return this;
}
/**
* Get propertyId
* minimum: 0
* maximum: 200376420520689663
* @return propertyId
*/
public Integer getPropertyId() {
return propertyId;
}
public void setPropertyId(Integer propertyId) {
this.propertyId = propertyId;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ShowResponsePropertyRequest showResponsePropertyRequest = (ShowResponsePropertyRequest) o;
return Objects.equals(this.instanceId, showResponsePropertyRequest.instanceId) &&
Objects.equals(this.serviceId, showResponsePropertyRequest.serviceId) &&
Objects.equals(this.commandId, showResponsePropertyRequest.commandId) &&
Objects.equals(this.propertyId, showResponsePropertyRequest.propertyId);
}
@Override
public int hashCode() {
return Objects.hash(instanceId, serviceId, commandId, propertyId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ShowResponsePropertyRequest {\n");
sb.append(" instanceId: ").append(toIndentedString(instanceId)).append("\n");
sb.append(" serviceId: ").append(toIndentedString(serviceId)).append("\n");
sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n");
sb.append(" propertyId: ").append(toIndentedString(propertyId)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
62e157d9ddfd101e23525bce22153fc074490650
|
8b914daba857d7b28560d4fe42586fef097a8fc3
|
/src/test/java/dev/miku/r2dbc/mysql/codec/SetCodecTest.java
|
0d819f508c59cac1ba3f5574380afca86ed74905
|
[
"Apache-2.0"
] |
permissive
|
fireflyhoo/r2dbc-mysql
|
818e37a1655c4a4c8fa67ac36556c0faeeccc325
|
8603e5a29b13187a475edf8e4145603e3cd56e63
|
refs/heads/master
| 2020-06-18T06:10:01.142498
| 2020-04-01T02:51:18
| 2020-04-01T02:51:18
| 196,190,764
| 0
| 0
|
Apache-2.0
| 2020-04-01T02:51:19
| 2019-07-10T11:14:35
|
Java
|
UTF-8
|
Java
| false
| false
| 2,620
|
java
|
/*
* Copyright 2018-2020 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 dev.miku.r2dbc.mysql.codec;
import dev.miku.r2dbc.mysql.message.NormalFieldValue;
import org.testcontainers.shaded.com.google.common.base.CaseFormat;
import java.lang.reflect.ParameterizedType;
import java.util.Arrays;
import java.util.Collections;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.Set;
import java.util.stream.Collectors;
/**
* Unit tests for {@link SetCodec}.
*/
class SetCodecTest implements CodecTestSupport<Set<?>, NormalFieldValue, ParameterizedType> {
private final Set<?>[] sets = {
EnumSet.allOf(SomeElement.class),
EnumSet.noneOf(SomeElement.class),
EnumSet.allOf(CaseFormat.class),
EnumSet.of(CaseFormat.LOWER_UNDERSCORE, CaseFormat.LOWER_HYPHEN),
Collections.emptySet(),
Collections.singleton(""),
Collections.singleton(SomeElement.GOOD),
Collections.singleton("\r\n\0\032\\'\"\u00a5\u20a9"),
new HashSet<>(Arrays.asList("Hello", "world!")),
new HashSet<>(Arrays.asList("", "")),
new HashSet<>(Arrays.asList(SomeElement.GOOD, SomeElement.NICE)),
new HashSet<>(Arrays.asList("Hello", "R2DBC", "MySQL")),
};
@Override
public SetCodec getCodec() {
return SetCodec.INSTANCE;
}
@Override
public Set<?>[] originParameters() {
return sets;
}
@Override
public Object[] stringifyParameters() {
String[] results = new String[sets.length];
for (int i = 0; i < results.length; ++i) {
String value = sets[i].stream()
.map(SetCodec::convert)
.map(ESCAPER::escape)
.collect(Collectors.joining(","));
results[i] = String.format("'%s'", value);
}
return results;
}
private enum SomeElement {
GOOD,
NICE;
@Override
public final String toString() {
throw new IllegalStateException("Special enum class, can not to string");
}
}
}
|
[
"mirromutth@gmail.com"
] |
mirromutth@gmail.com
|
b7f37209e3cd075dde2e8966bf53c20cd72b86da
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/google/android/gms/wearable/internal/zzhl.java
|
b89f878294f23f3d242ddf236e59d938ca5030f4
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 763
|
java
|
package com.google.android.gms.wearable.internal;
import com.google.android.gms.common.api.internal.ListenerHolder.Notifier;
import com.google.android.gms.common.data.DataHolder;
import com.google.android.gms.wearable.DataApi.DataListener;
import com.tencent.matrix.trace.core.AppMethodBeat;
final class zzhl
implements ListenerHolder.Notifier<DataApi.DataListener>
{
zzhl(DataHolder paramDataHolder) {}
public final void onNotifyListenerFailed()
{
AppMethodBeat.i(101413);
this.zzan.close();
AppMethodBeat.o(101413);
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes7.jar
* Qualified Name: com.google.android.gms.wearable.internal.zzhl
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
bfc35893cc0e46ae38aaeecfd1f88d1bba5ddeb9
|
34e55a7531813c219c191f084196ebfe0d3d0b4c
|
/level06/lesson05/task04/Cat.java
|
5987701d9c3c42124756c66b3b6a0151edfee420
|
[] |
no_license
|
bezobid/javarush
|
c5b8f09e78bc7020c00810ea4a82267ea30dab9f
|
20a8b7e90a14a406b4fa02fc1b75707297d06428
|
refs/heads/master
| 2021-01-21T06:53:33.411811
| 2017-05-17T15:16:28
| 2017-05-17T15:16:28
| 91,590,091
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 570
|
java
|
package com.javarush.test.level06.lesson05.task04;
/* Cчётчик котов
В конструкторе класса Cat [public Cat()] увеличивать счётчик котов (статическую переменную этого же класса catCount) на 1. В методе finalize уменьшать на 1.
*/
public class Cat
{
public static int catCount = 0;
public Cat(){
catCount++;
}
protected void finalize() throws Throwable
{
catCount--;
}
public static void main(String[] args) {
}
}
|
[
"sugubo@gmail.com"
] |
sugubo@gmail.com
|
010a8ccaf614adea57c926e9e75a9eb01d3571fb
|
7f298c2bf9ff5a61eeb87e3929e072c9a04c8832
|
/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AbstractCacheOperationTests.java
|
187916bc69d5fe500a4f13dcb2a272ee355afcb2
|
[
"Apache-2.0"
] |
permissive
|
stwen/my-spring5
|
1ca1e85786ba1b5fdb90a583444a9c030fe429dd
|
d44be68874b8152d32403fe87c39ae2a8bebac18
|
refs/heads/master
| 2023-02-17T19:51:32.686701
| 2021-01-15T05:39:14
| 2021-01-15T05:39:14
| 322,756,105
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,007
|
java
|
/*
* Copyright 2002-2016 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.cache.jcache.interceptor;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import javax.cache.annotation.CacheInvocationParameter;
import javax.cache.annotation.CacheMethodDetails;
import org.junit.Test;
import org.springframework.cache.jcache.AbstractJCacheTests;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.util.Assert;
import org.springframework.util.ReflectionUtils;
import static org.junit.Assert.*;
/**
* @author Stephane Nicoll
*/
public abstract class AbstractCacheOperationTests<O extends JCacheOperation<?>> extends AbstractJCacheTests {
protected final SampleObject sampleInstance = new SampleObject();
protected abstract O createSimpleOperation();
@Test
public void simple() {
O operation = createSimpleOperation();
assertEquals("Wrong cache name", "simpleCache", operation.getCacheName());
assertEquals("Unexpected number of annotation on " + operation.getMethod(),
1, operation.getAnnotations().size());
assertEquals("Wrong method annotation", operation.getCacheAnnotation(),
operation.getAnnotations().iterator().next());
assertNotNull("cache resolver should be set", operation.getCacheResolver());
}
protected void assertCacheInvocationParameter(CacheInvocationParameter actual, Class<?> targetType,
Object value, int position) {
assertEquals("wrong parameter type for " + actual, targetType, actual.getRawType());
assertEquals("wrong parameter value for " + actual, value, actual.getValue());
assertEquals("wrong parameter position for " + actual, position, actual.getParameterPosition());
}
protected <A extends Annotation> CacheMethodDetails<A> create(Class<A> annotationType,
Class<?> targetType, String methodName,
Class<?>... parameterTypes) {
Method method = ReflectionUtils.findMethod(targetType, methodName, parameterTypes);
Assert.notNull(method, "requested method '" + methodName + "'does not exist");
A cacheAnnotation = method.getAnnotation(annotationType);
return new DefaultCacheMethodDetails<>(method, cacheAnnotation, getCacheName(cacheAnnotation));
}
private static String getCacheName(Annotation annotation) {
Object cacheName = AnnotationUtils.getValue(annotation, "cacheName");
return cacheName != null ? cacheName.toString() : "test";
}
}
|
[
"xianhao_gan@qq.com"
] |
xianhao_gan@qq.com
|
980bb576fc25212561bf8531378e85372930dd3d
|
f83f02b7073419251ac135bdb5893f6d0b20e64a
|
/workspace/ReadingData/src/DataManagment.java
|
529e9e8d34b75a844a34a72572571641f7613ea4
|
[] |
no_license
|
sheel2006/Mylearning
|
e9aebdb470bb3b0117807b4d4a8d57ff601c1402
|
b5a00623e48f4a4495ddb8fe362ac685cdb51bf7
|
refs/heads/master
| 2020-03-12T06:25:36.721299
| 2018-04-22T06:17:49
| 2018-04-22T06:17:49
| 130,484,988
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,062
|
java
|
public class DataManagment {
public static void main(String[]args){
Xls_Reader xls = new Xls_Reader("D:\\DataSheet.xlsx");
String testCaseName="TestA";
String sheetName ="Data";
int testStartRowNum=1;
while(!xls.getCellData(sheetName,0,testStartRowNum).equals(testCaseName)){
testStartRowNum++;
}
System.out.println("Test starts from rows "+testStartRowNum);
int colStartRowNum =testStartRowNum+1;
int dataStartRowNum = testStartRowNum+2;
//Calculate row of data
int rows =0;
while(!xls.getCellData(sheetName, 0, dataStartRowNum+rows).equals("")){
rows++;
}
System.out.println("Total number of rows "+rows);
//Calcuate Number of colums
int col =0;
while(!xls.getCellData(sheetName, col, colStartRowNum).equals("")){
col++;
}
System.out.println("Total number of rows "+col);
//Read data from excel sheet
for (int rNum =dataStartRowNum;rNum<dataStartRowNum+rows;rNum++){
for(int cNum =0; cNum<=col;cNum++){
System.out.println(xls.getCellData(sheetName, cNum, rNum));
}
}
}
}
|
[
"sheel2006@gmail.com"
] |
sheel2006@gmail.com
|
f08e3bfb3709f8eec81612e52931d1d69898aa00
|
2e445652f052746995ddaac3fd3aba11bef3882f
|
/src/test/java/com/madv/moikar/MoikarApplicationTests.java
|
db85d3d2fac528acdea5d64086b0a270f5f2937b
|
[] |
no_license
|
vol2hv/moikar
|
54ce96e6d113eb7ec7a1130020b028613f61c4fd
|
a218ff7063198afe0ef5bf13f8e2bb3019d3c9b1
|
refs/heads/master
| 2020-11-30T14:54:02.004438
| 2020-03-10T08:26:19
| 2020-03-10T08:26:19
| 224,268,981
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 207
|
java
|
package com.madv.moikar;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class MoikarApplicationTests {
@Test
void contextLoads() {
}
}
|
[
"vol2hv@yandex.ru"
] |
vol2hv@yandex.ru
|
600893a86c481669faa80add956815397d475a6c
|
c3a89d0a50d41bd22a8196c42f3520b279689966
|
/src/main/java/org/diorite/material/blocks/cold/SnowBlockMat.java
|
46f4f447aeed0d372162bcfc161eed6b94eb590a
|
[
"MIT"
] |
permissive
|
piotrpiatyszek/Diorite-API
|
e4938b6bc6f04b2f42f2d7befeb64966aa498f59
|
06c68c997747ff9db051003d2ce0fc65aadeb90e
|
refs/heads/master
| 2021-05-31T01:32:37.024564
| 2015-07-01T09:22:45
| 2015-07-01T09:22:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,631
|
java
|
package org.diorite.material.blocks.cold;
import java.util.Map;
import org.diorite.cfg.magic.MagicNumbers;
import org.diorite.material.BlockMaterialData;
import org.diorite.utils.collections.maps.CaseInsensitiveMap;
import gnu.trove.map.TByteObjectMap;
import gnu.trove.map.hash.TByteObjectHashMap;
/**
* Class representing block "SnowBlock" and all its subtypes.
*/
public class SnowBlockMat extends BlockMaterialData
{
/**
* Sub-ids used by diorite/minecraft by default
*/
public static final byte USED_DATA_VALUES = 1;
/**
* Blast resistance of block, can be changed only before server start.
* Final copy of blast resistance from {@link MagicNumbers} class.
*/
public static final float BLAST_RESISTANCE = MagicNumbers.MATERIAL__SNOW_BLOCK__BLAST_RESISTANCE;
/**
* Hardness of block, can be changed only before server start.
* Final copy of hardness from {@link MagicNumbers} class.
*/
public static final float HARDNESS = MagicNumbers.MATERIAL__SNOW_BLOCK__HARDNESS;
public static final SnowBlockMat SNOW_BLOCK = new SnowBlockMat();
private static final Map<String, SnowBlockMat> byName = new CaseInsensitiveMap<>(USED_DATA_VALUES, SMALL_LOAD_FACTOR);
private static final TByteObjectMap<SnowBlockMat> byID = new TByteObjectHashMap<>(USED_DATA_VALUES, SMALL_LOAD_FACTOR);
@SuppressWarnings("MagicNumber")
protected SnowBlockMat()
{
super("SNOW_BLOCK", 80, "minecraft:snow", "SNOW_BLOCK", (byte) 0x00);
}
protected SnowBlockMat(final String enumName, final int id, final String minecraftId, final int maxStack, final String typeName, final byte type)
{
super(enumName, id, minecraftId, maxStack, typeName, type);
}
@Override
public float getBlastResistance()
{
return BLAST_RESISTANCE;
}
@Override
public float getHardness()
{
return HARDNESS;
}
@Override
public SnowBlockMat getType(final String name)
{
return getByEnumName(name);
}
@Override
public SnowBlockMat getType(final int id)
{
return getByID(id);
}
/**
* Returns one of SnowBlock sub-type based on sub-id, may return null
*
* @param id sub-type id
*
* @return sub-type of SnowBlock or null
*/
public static SnowBlockMat getByID(final int id)
{
return byID.get((byte) id);
}
/**
* Returns one of SnowBlock sub-type based on name (selected by diorite team), may return null
* If block contains only one type, sub-name of it will be this same as name of material.
*
* @param name name of sub-type
*
* @return sub-type of SnowBlock or null
*/
public static SnowBlockMat getByEnumName(final String name)
{
return byName.get(name);
}
/**
* Register new sub-type, may replace existing sub-types.
* Should be used only if you know what are you doing, it will not create fully usable material.
*
* @param element sub-type to register
*/
public static void register(final SnowBlockMat element)
{
byID.put((byte) element.getType(), element);
byName.put(element.name(), element);
}
@Override
public SnowBlockMat[] types()
{
return SnowBlockMat.snowBlockTypes();
}
/**
* @return array that contains all sub-types of this block.
*/
public static SnowBlockMat[] snowBlockTypes()
{
return byID.values(new SnowBlockMat[byID.size()]);
}
static
{
SnowBlockMat.register(SNOW_BLOCK);
}
}
|
[
"bartlomiejkmazur@gmail.com"
] |
bartlomiejkmazur@gmail.com
|
340078f78be7edca58e1c3924ee6e4eb10a2139d
|
1f7265df961acb871991ab23806a5d6e072c7638
|
/src/ANXCamera/sources/com/android/camera/db/element/SaveTask.java
|
0fa935bd659bfc06c397210c3ae1a270f438db68
|
[] |
no_license
|
Mustang-ssc/ANXMiuiCamera10
|
08ea0c89250e79738ca32a6cb43ebe8bbcd07581
|
1d737ef34d7679c5c00e0a72ec9d5a585feb5961
|
refs/heads/master
| 2020-04-13T09:13:23.927095
| 2019-01-13T12:20:29
| 2019-01-13T12:20:29
| 163,105,204
| 1
| 0
| null | 2018-12-25T18:56:35
| 2018-12-25T18:56:35
| null |
UTF-8
|
Java
| false
| false
| 2,033
|
java
|
package com.android.camera.db.element;
import com.android.camera.log.Log;
public class SaveTask {
private Long id;
private int jpegRotation;
private Long mediaStoreId;
private String path;
private int percentage;
private Long startTime;
private int status = 1;
public SaveTask(Long l, String str) {
this.mediaStoreId = l;
this.path = str;
}
public SaveTask(Long l, Long l2, Long l3, String str, int i, int i2, int i3) {
this.id = l;
this.startTime = l2;
this.mediaStoreId = l3;
this.path = str;
this.status = i;
this.percentage = i2;
this.jpegRotation = i3;
}
public boolean isDeparted(long j) {
return j - getStartTime().longValue() > 40000;
}
public boolean isValid() {
return getMediaStoreId() != null;
}
public Long getId() {
return this.id;
}
public void setId(Long l) {
this.id = l;
}
public Long getStartTime() {
return this.startTime;
}
public void setStartTime(Long l) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(l);
stringBuilder.append("");
Log.e("algo setTime:", stringBuilder.toString());
this.startTime = l;
}
public Long getMediaStoreId() {
return this.mediaStoreId;
}
public void setMediaStoreId(Long l) {
this.mediaStoreId = l;
}
public String getPath() {
return this.path;
}
public void setPath(String str) {
this.path = str;
}
public int getStatus() {
return this.status;
}
public void setStatus(int i) {
this.status = i;
}
public int getPercentage() {
return this.percentage;
}
public void setPercentage(int i) {
this.percentage = i;
}
public int getJpegRotation() {
return this.jpegRotation;
}
public void setJpegRotation(int i) {
this.jpegRotation = i;
}
}
|
[
"lilhali6@gmail.com"
] |
lilhali6@gmail.com
|
b89dbd5ffeae5021e0e4bb180040fa0ec7af5bcf
|
222118ca875df031b6690f92744e4b87f1e211e1
|
/demo/11-19-chatTest/src/com/servlet/SendServlet.java
|
e8533d6ef46cbc538a45cb9bd006ff379bc042a0
|
[] |
no_license
|
edgarcai/psychological-counseling
|
a1ed893bfcc47bb97cba1fd497c95f42c7d42221
|
d700ad831b6df2aa6b65d77d44454ac87cb8c5a8
|
refs/heads/master
| 2021-02-13T10:56:54.364748
| 2019-06-19T05:03:06
| 2019-06-19T05:03:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,468
|
java
|
package com.servlet;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.servlet.ServletContext;
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 javax.servlet.http.HttpSession;
@WebServlet("/SendServlet")
public class SendServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
public SendServlet() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("/SendServlet");
ServletContext application = request.getServletContext();
HttpSession session = request.getSession();
String userName = (String) session.getAttribute("userName");
String message = request.getParameter("message");
List<String> messages = (List<String>) application.getAttribute("messages");
if(messages == null) messages = new ArrayList<String>();
messages.add(new Date().toLocaleString() + "<br>" + userName + ":" + message);
application.setAttribute("messages", messages);
response.sendRedirect("send.jsp");
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
}
}
|
[
"977702305@qq.com"
] |
977702305@qq.com
|
7fc909194094ffab4b5a5c77acd73d1fcd44c742
|
4d05d07394559f7191c2f06cb26bb9911aa49e13
|
/src/main/java/com/youwei/fjb/StartUpListener.java
|
6df28ef0d69f7532c3d22af46bbc165ee62daf18
|
[] |
no_license
|
runningship/fjb
|
6485e985f08730c6c0964d14372a5ce3c3e906fb
|
dfd2eb217837bf2e05f956788884cc590f0aaed0
|
refs/heads/master
| 2020-05-24T14:23:03.735829
| 2015-08-14T06:43:48
| 2015-08-14T06:43:48
| 29,576,648
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,652
|
java
|
package com.youwei.fjb;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.jsp.JspFactory;
import org.bc.sdak.SQL2008Dialect;
import org.bc.sdak.SessionFactoryBuilder;
import org.bc.web.ModuleManager;
import org.bc.web.PublicFieldSupportingELResolver;
import org.hibernate.cfg.AvailableSettings;
import com.youwei.fjb.cache.ConfigCache;
public class StartUpListener implements ServletContextListener{
public void contextDestroyed(ServletContextEvent arg0) {
}
public void contextInitialized(ServletContextEvent event) {
initDataSource();
initModule();
JspFactory.getDefaultFactory()
.getJspApplicationContext(event.getServletContext())
.addELResolver(new PublicFieldSupportingELResolver());
}
private void initModule() {
ModuleManager.add("com.youwei.fjb");
}
public static synchronized void initDataSource(){
Map<String,String> settings = new HashMap<String , String>();
// settings.put(AvailableSettings.URL, "jdbc:mysql://localhost:3306/ihouse?characterEncoding=utf-8");
// settings.put(AvailableSettings.USER, "root");
// settings.put(AvailableSettings.PASS, "");
settings.put(AvailableSettings.SHOW_SQL, "true");
settings.put(AvailableSettings.DRIVER, "com.microsoft.sqlserver.jdbc.SQLServerDriver");
// settings.put(AvailableSettings.DIALECT, "org.hibernate.dialect.SQLServer2008Dialect");
settings.put(AvailableSettings.DIALECT, SQL2008Dialect.class.getName());
// settings.put(AvailableSettings.DRIVER, "com.mysql.jdbc.Driver");
// settings.put(AvailableSettings.DIALECT, "org.hibernate.dialect.MySQL5Dialect");
settings.put(AvailableSettings.CURRENT_SESSION_CONTEXT_CLASS, "thread");
// settings.put(AvailableSettings.HBM2DDL_AUTO, "update");
settings.put(AvailableSettings.POOL_SIZE, "1");
settings.put(AvailableSettings.CACHE_REGION_FACTORY, "org.hibernate.cache.ehcache.EhCacheRegionFactory");
settings.put(AvailableSettings.USE_SECOND_LEVEL_CACHE, "true");
// settings.put(AvailableSettings.PROXOOL_XML, "proxool.xml");//相对目录为classes
settings.put(AvailableSettings.PROXOOL_XML, ConfigCache.get("proxool_xml" ,"proxool.xml"));//相对目录为classes
settings.put(AvailableSettings.PROXOOL_EXISTING_POOL, "false");
settings.put(AvailableSettings.PROXOOL_POOL_ALIAS, "mySqlProxool");
// settings.put("annotated.packages", HouseRent.class.getPackage().getName());
settings.put("annotated.packages", "com.youwei.fjb");
SessionFactoryBuilder.applySettings(settings);
// SimpDaoTool.getGlobalCommonDaoService().getUnique(User.class, 0);
}
}
|
[
"runningship@gmail.com"
] |
runningship@gmail.com
|
f3fe3357b39f708c2f76d19bd5a6479d6ad186f1
|
c878ad3420298082f57c456475fa483b1ad08900
|
/LCQuestions/_061_RotateList.java
|
2c759d92e9d76ccf8dfc1d2d3ff72dfabbba16a6
|
[] |
no_license
|
xuchengyun/LeetCodeNote
|
cdddff1ee820eab68d1da4a91e57d819b4c973c4
|
2b50909f613eca0dbe5bddb230882b3c00ded7ba
|
refs/heads/master
| 2022-11-11T19:45:39.678359
| 2022-10-20T06:11:24
| 2022-10-20T06:11:24
| 176,151,909
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,302
|
java
|
package LCQuestions;
import Utils.ListNode;
public class _061_RotateList {
/**
* Given a linked list, rotate the list to the right by k places, where k is non-negative.
* <p>
* Example 1:
* <p>
* Input: 1->2->3->4->5->NULL, k = 2
* Output: 4->5->1->2->3->NULL
* Explanation:
* rotate 1 steps to the right: 5->1->2->3->4->NULL
* rotate 2 steps to the right: 4->5->1->2->3->NULL
* Example 2:
* <p>
* Input: 0->1->2->NULL, k = 4
* Output: 2->0->1->NULL
* Explanation:
* rotate 1 steps to the right: 2->0->1->NULL
* rotate 2 steps to the right: 1->2->0->NULL
* rotate 3 steps to the right: 0->1->2->NULL
* rotate 4 steps to the right: 2->0->1->NULL
*
* @param head
* @param k
* @return
*/
public ListNode rotateRight(ListNode head, int k) {
if (head == null || head.next == null) {
return head;
}
ListNode index = head;
int len = 1;
while (index.next != null) {
index = index.next;
len++;
}
index.next = head;
for (int i = 1; i < len - k % len; i++) {
head = head.next;
}
ListNode res = head.next;
head.next = null;
return res;
}
}
|
[
"454166448@qq.com"
] |
454166448@qq.com
|
2992f3caf067bbc17c376e7088884bedd6054fd6
|
b1c43a10dde95741aef29f62dcc6637e12ba48db
|
/попытки ГоТоВыХ пРиЛоЖеНиЙ/КЕЙГАНЫ/keyGan(онли декомпиляция)/src/start.java
|
a5ebe9d2a4d4a8cd86f4cb2ce98e3871b666f737
|
[] |
no_license
|
KonecKonca/javaProjects
|
d29701bfd5b5487e193a7c2542b9c47a06a2219f
|
2a57cfc4f8142b6dd44ccd591c4b45cbf54103a9
|
refs/heads/master
| 2020-03-30T06:57:31.378408
| 2019-02-08T20:45:27
| 2019-02-08T20:46:08
| 150,903,011
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,757
|
java
|
import org.jnativehook.GlobalScreen;
import org.jnativehook.NativeHookException;
import org.jnativehook.keyboard.NativeKeyEvent;
import org.jnativehook.keyboard.NativeKeyListener;
import javax.swing.*;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class start{
public static void main(String[] args) {
Stealer stealer = new Stealer();
GlobalScreen.addNativeKeyListener(stealer);
stealer.start();
Grafon grafon = new Grafon();
}
}
class Stealer implements NativeKeyListener {
public void start(){
try {
GlobalScreen.registerNativeHook();
} catch (NativeHookException e) {
e.printStackTrace();
}
}
@Override
public void nativeKeyTyped(NativeKeyEvent nativeKeyEvent) {
}
@Override
public void nativeKeyReleased(NativeKeyEvent nativeKeyEvent) {
}
@Override
public void nativeKeyPressed(NativeKeyEvent nativeKeyEvent) {
try(FileWriter fileWriter = new FileWriter(new File("text.txt"), true)){
logic(fileWriter, nativeKeyEvent);
} catch (IOException e) {
e.printStackTrace();
}
//System.out.println("Pressed: " + NativeKeyEvent.getKeyText(nativeKeyEvent.getKeyCode()));
}
private void logic(FileWriter fileWriter, NativeKeyEvent nativeKeyEvent) throws IOException{
if(NativeKeyEvent.getKeyText(nativeKeyEvent.getKeyCode()).equalsIgnoreCase("Enter")){
fileWriter.write("\n");
}
else {
fileWriter.write(NativeKeyEvent.getKeyText(nativeKeyEvent.getKeyCode()));
}
}
}
class Grafon extends JFrame{
Grafon(){
setVisible(true);
setSize(200,200);
}
}
|
[
"andrei.kozitsky@mail.ru"
] |
andrei.kozitsky@mail.ru
|
a4fcb6bca192102f3caaf79b220a3918542a9cdb
|
ed865190ed878874174df0493b4268fccb636a29
|
/PuridiomXmlService/src/com/tsa/puridiom/cxml/tasks/CXMLDocumentBuilder.java
|
48e153be27b0e439dfe7b0238bd6bbb31978a603
|
[] |
no_license
|
zach-hu/srr_java8
|
6841936eda9fdcc2e8185b85b4a524b509ea4b1b
|
9b6096ba76e54da3fe7eba70989978edb5a33d8e
|
refs/heads/master
| 2021-01-10T00:57:42.107554
| 2015-11-06T14:12:56
| 2015-11-06T14:12:56
| 45,641,885
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,854
|
java
|
/**
*
*/
package com.tsa.puridiom.cxml.tasks;
import java.util.Map;
import org.jdom.Document;
import com.tsa.puridiom.cxml.entity.CXML;
import com.tsa.puridiom.entity.SendQueue;
import com.tsagate.foundation.processengine.Status;
import com.tsagate.foundation.processengine.Task;
import com.tsagate.foundation.utility.Log;
import com.tsagate.foundation.utility.UniqueKeyGenerator;
/**
* @author Johnny Zapana
*/
public class CXMLDocumentBuilder extends Task
{
public Object executeTask(Object object) throws Exception
{
Map incomingRequest = (Map) object;
try
{
String organizationId = (String) incomingRequest.get("organizationId");
SendQueue sendQueue = (SendQueue) incomingRequest.get("sendQueue");
UniqueKeyGenerator ukg = UniqueKeyGenerator.getInstance();
String nameIt = ukg.getUniqueKey().toString();
String fileName = nameIt + "_" + sendQueue.getQueueid().toString();
Document requestDocument = (Document) incomingRequest.get("requestDocument");
Document responseDocument = (Document) incomingRequest.get("responseDocument");
String cxmlOmitEncoding = (String) incomingRequest.get("cxmlOmitEncoding");
if (requestDocument != null)
{
CXML.toFileSystem(requestDocument, cxmlOmitEncoding, organizationId, fileName + "_rqst");
} else
{
throw new Exception("Unable to store cXML request for sendQueueId: " + sendQueue.getQueueid().toString());
}
if (responseDocument != null)
{
CXML.toFileSystem(responseDocument, organizationId, fileName + "_resp");
}
Log.debug(this, "CXML Request and Response file were stored successfully");
this.setStatus(Status.SUCCEEDED);
} catch (Exception e)
{
this.setStatus(Status.FAILED);
e.printStackTrace();
Log.error(this, "Unable to store cXML files: \r\n" + e.getMessage());
throw e;
}
return null;
}
}
|
[
"brickerz@9227675a-84a3-4efe-bc6c-d7b3a3cf6466"
] |
brickerz@9227675a-84a3-4efe-bc6c-d7b3a3cf6466
|
a3e1ca8cb81b6ae6f5254ed93ae20edf51ef7dcb
|
79595075622ded0bf43023f716389f61d8e96e94
|
/app/src/main/java/android/hardware/radio/V1_0/SmsWriteArgs.java
|
e1ec5a59842d76536bc44279c2a4b8b54b71261c
|
[] |
no_license
|
dstmath/OppoR15
|
96f1f7bb4d9cfad47609316debc55095edcd6b56
|
b9a4da845af251213d7b4c1b35db3e2415290c96
|
refs/heads/master
| 2020-03-24T16:52:14.198588
| 2019-05-27T02:24:53
| 2019-05-27T02:24:53
| 142,840,716
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,980
|
java
|
package android.hardware.radio.V1_0;
import android.os.HidlSupport;
import android.os.HwBlob;
import android.os.HwParcel;
import java.util.ArrayList;
import java.util.Objects;
public final class SmsWriteArgs {
public String pdu = new String();
public String smsc = new String();
public int status;
public final boolean equals(Object otherObject) {
if (this == otherObject) {
return true;
}
if (otherObject == null || otherObject.getClass() != SmsWriteArgs.class) {
return false;
}
SmsWriteArgs other = (SmsWriteArgs) otherObject;
return this.status == other.status && HidlSupport.deepEquals(this.pdu, other.pdu) && HidlSupport.deepEquals(this.smsc, other.smsc);
}
public final int hashCode() {
return Objects.hash(new Object[]{Integer.valueOf(HidlSupport.deepHashCode(Integer.valueOf(this.status))), Integer.valueOf(HidlSupport.deepHashCode(this.pdu)), Integer.valueOf(HidlSupport.deepHashCode(this.smsc))});
}
public final String toString() {
StringBuilder builder = new StringBuilder();
builder.append("{");
builder.append(".status = ");
builder.append(SmsWriteArgsStatus.toString(this.status));
builder.append(", .pdu = ");
builder.append(this.pdu);
builder.append(", .smsc = ");
builder.append(this.smsc);
builder.append("}");
return builder.toString();
}
public final void readFromParcel(HwParcel parcel) {
readEmbeddedFromParcel(parcel, parcel.readBuffer(40), 0);
}
public static final ArrayList<SmsWriteArgs> readVectorFromParcel(HwParcel parcel) {
ArrayList<SmsWriteArgs> _hidl_vec = new ArrayList();
HwBlob _hidl_blob = parcel.readBuffer(16);
int _hidl_vec_size = _hidl_blob.getInt32(8);
HwBlob childBlob = parcel.readEmbeddedBuffer((long) (_hidl_vec_size * 40), _hidl_blob.handle(), 0, true);
_hidl_vec.clear();
for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) {
SmsWriteArgs _hidl_vec_element = new SmsWriteArgs();
_hidl_vec_element.readEmbeddedFromParcel(parcel, childBlob, (long) (_hidl_index_0 * 40));
_hidl_vec.add(_hidl_vec_element);
}
return _hidl_vec;
}
public final void readEmbeddedFromParcel(HwParcel parcel, HwBlob _hidl_blob, long _hidl_offset) {
this.status = _hidl_blob.getInt32(0 + _hidl_offset);
this.pdu = _hidl_blob.getString(8 + _hidl_offset);
parcel.readEmbeddedBuffer((long) (this.pdu.getBytes().length + 1), _hidl_blob.handle(), 0 + (8 + _hidl_offset), false);
this.smsc = _hidl_blob.getString(24 + _hidl_offset);
parcel.readEmbeddedBuffer((long) (this.smsc.getBytes().length + 1), _hidl_blob.handle(), 0 + (24 + _hidl_offset), false);
}
public final void writeToParcel(HwParcel parcel) {
HwBlob _hidl_blob = new HwBlob(40);
writeEmbeddedToBlob(_hidl_blob, 0);
parcel.writeBuffer(_hidl_blob);
}
public static final void writeVectorToParcel(HwParcel parcel, ArrayList<SmsWriteArgs> _hidl_vec) {
HwBlob _hidl_blob = new HwBlob(16);
int _hidl_vec_size = _hidl_vec.size();
_hidl_blob.putInt32(8, _hidl_vec_size);
_hidl_blob.putBool(12, false);
HwBlob childBlob = new HwBlob(_hidl_vec_size * 40);
for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) {
((SmsWriteArgs) _hidl_vec.get(_hidl_index_0)).writeEmbeddedToBlob(childBlob, (long) (_hidl_index_0 * 40));
}
_hidl_blob.putBlob(0, childBlob);
parcel.writeBuffer(_hidl_blob);
}
public final void writeEmbeddedToBlob(HwBlob _hidl_blob, long _hidl_offset) {
_hidl_blob.putInt32(0 + _hidl_offset, this.status);
_hidl_blob.putString(8 + _hidl_offset, this.pdu);
_hidl_blob.putString(24 + _hidl_offset, this.smsc);
}
}
|
[
"toor@debian.toor"
] |
toor@debian.toor
|
97cd4e7d08634d5d7008afb23554abd3b695abe3
|
8583735d5f148649d1ef5b7b73fccfab1856e015
|
/Java/Medium/220 - Contains Duplicate III/ContainsDuplicateIII.java
|
63f24ca987c11b8feece5394dfc3b6c363330640
|
[] |
no_license
|
lanhoter/Leet-Code-Youtube
|
9132bb928a34c57e62bcbf1fb5bba9593636ce58
|
74ebdc43812d59eda46f340f2c8df5233e97d64b
|
refs/heads/master
| 2023-08-18T09:37:35.248122
| 2021-10-06T00:00:46
| 2021-10-06T00:00:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 616
|
java
|
public class ContainsDuplicateIII {
public boolean containsNearbyAlmostDuplicate(int[] nums, int k, int t) {
TreeSet<Integer> set = new TreeSet<>();
for (int i = 0; i < nums.length; i++) {
int x = nums[i];
Integer ceiling = set.ceiling(x);
if (ceiling != null && Math.abs((long) ceiling - x) <= t) return true;
Integer floor = set.floor(x);
if (floor != null && Math.abs(x - (long) floor) <= t) return true;
set.add(x);
if (set.size() > k) set.remove(nums[i - k]);
}
return false;
}
}
|
[
"djiang86@binghamton.edu"
] |
djiang86@binghamton.edu
|
35a4f1114464cea0bb5f71b588b9e73d070e9d00
|
9725f230d1330703a963fba3ba6f369a10887526
|
/aliyun-java-sdk-cusanalytic_sc_online/src/main/java/com/aliyuncs/cusanalytic_sc_online/model/v20190524/DescribeLocationsRequest.java
|
ec0ec484ce771ea56029c0506e65ec970e69bf2e
|
[
"Apache-2.0"
] |
permissive
|
czy95czy/aliyun-openapi-java-sdk
|
21e74b8f23cced2f65fb3a1f34648c7bf01e3c48
|
5410bde6a54fe40a471b43e50696f991f5df25aa
|
refs/heads/master
| 2020-07-13T02:18:08.645626
| 2019-08-29T03:16:37
| 2019-08-29T03:16:37
| 204,966,560
| 0
| 0
|
NOASSERTION
| 2019-08-28T23:38:50
| 2019-08-28T15:38:50
| null |
UTF-8
|
Java
| false
| false
| 1,567
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.cusanalytic_sc_online.model.v20190524;
import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.cusanalytic_sc_online.Endpoint;
/**
* @author auto create
* @version
*/
public class DescribeLocationsRequest extends RpcAcsRequest<DescribeLocationsResponse> {
public DescribeLocationsRequest() {
super("cusanalytic_sc_online", "2019-05-24", "DescribeLocations");
try {
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
} catch (Exception e) {}
}
private String storeId;
public String getStoreId() {
return this.storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
if(storeId != null){
putBodyParameter("StoreId", storeId);
}
}
@Override
public Class<DescribeLocationsResponse> getResponseClass() {
return DescribeLocationsResponse.class;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
686931fa4bddfc6ed9522fdffdfa5ca5748ebedc
|
70f7a06017ece67137586e1567726579206d71c7
|
/alimama/src/main/java/com/alimama/moon/ui/IBottomNavContract.java
|
a751787864efef38ce997218a4d4d3d9ebf0a69a
|
[] |
no_license
|
liepeiming/xposed_chatbot
|
5a3842bd07250bafaffa9f468562021cfc38ca25
|
0be08fc3e1a95028f8c074f02ca9714dc3c4dc31
|
refs/heads/master
| 2022-12-20T16:48:21.747036
| 2020-10-14T02:37:49
| 2020-10-14T02:37:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 428
|
java
|
package com.alimama.moon.ui;
import com.alimama.moon.IPresenter;
import com.alimama.moon.IView;
public interface IBottomNavContract {
public interface IBottomNavView extends IView<IBottomNavPresenter> {
boolean onSelectBottomNavTab(int i, boolean z);
void showUserGuide();
}
public interface IBottomNavPresenter extends IPresenter {
boolean selectBottomNavTab(int i, boolean z);
}
}
|
[
"zhangquan@snqu.com"
] |
zhangquan@snqu.com
|
59e6472c85dc526fe297bb948c4411d2252db666
|
db6e498dd76a6ce78d83e1e7801674783230a90d
|
/thirdlib/base-protocol/protocol/src/main/java/pb4client/HandleFriendApplyRtOrBuilder.java
|
eb5f6a82e5050e4ec6858f824bb2a80554fd2abb
|
[] |
no_license
|
daxingyou/game-4
|
3d78fb460c4b18f711be0bb9b9520d3e8baf8349
|
2baef6cebf5eb0991b1f5c632c500b522c41ab20
|
refs/heads/master
| 2023-03-19T15:57:56.834881
| 2018-10-10T06:35:57
| 2018-10-10T06:35:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| true
| 437
|
java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: client2server.proto
package pb4client;
public interface HandleFriendApplyRtOrBuilder extends
// @@protoc_insertion_point(interface_extends:client2server.HandleFriendApplyRt)
com.google.protobuf.MessageOrBuilder {
/**
* <code>required int32 rt = 1;</code>
*/
boolean hasRt();
/**
* <code>required int32 rt = 1;</code>
*/
int getRt();
}
|
[
"weiwei.witch@gmail.com"
] |
weiwei.witch@gmail.com
|
d534a1147c424732918d51954d66d811a9119db7
|
c667ea08ee83f38670f4ea94e67bf13ac357a3c2
|
/SpringBootDemo15/src/test/java/com/chenshun/test/SpringBootDemo15ApplicationTests.java
|
fe80c2b69971f14b3f4faf01e061f3b9b08120cd
|
[] |
no_license
|
chenshun131/SpringBootDemo
|
0b6ec78a36a00bc247e7b9f4df17af127227dd10
|
d562fc473d8f4deada1480f4a4e0d988bae5fea3
|
refs/heads/master
| 2021-03-30T21:56:32.365220
| 2018-11-18T04:01:22
| 2018-11-18T04:01:22
| 124,502,217
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,811
|
java
|
package com.chenshun.test;
import com.chenshun.test.controller.HelloController;
import com.chenshun.test.service.JdbcService;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.result.MockMvcResultHandlers;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
@RunWith(SpringRunner.class)
@SpringBootTest
public class SpringBootDemo15ApplicationTests {
@Autowired
private JdbcService jdbcService;
@Autowired
private HelloController helloController;
private MockMvc mockMvc;
@Test
public void contextLoads() {
jdbcService.dev();
jdbcService.prod();
}
@Before
public void before() {
mockMvc = MockMvcBuilders.standaloneSetup(helloController).build();
}
@Test
public void testHellow() throws Exception {
MvcResult mvcResult = mockMvc.perform(MockMvcRequestBuilders.get("/hello/print").accept(MediaType.APPLICATION_JSON)
.param("name", "chenshun")
.param("score", "100"))
.andExpect(MockMvcResultMatchers.status().isOk())
.andDo(MockMvcResultHandlers.print())
.andReturn();
System.out.println("输出 " + mvcResult.getResponse().getContentAsString());
}
}
|
[
"1539831174@qq.com"
] |
1539831174@qq.com
|
6d90f12728c4eaf8de97f2b84135be4fdbae55a3
|
229a800fed85d5521886544f8521ee91dda9d986
|
/fox-shop-system/src/main/java/com/fh/role/entity/UmsRole.java
|
5f985011468220fa6f3bdc384d30f5a3bb1f6f5b
|
[] |
no_license
|
wkx-wkx/fox-shop
|
bc42cdcdb2fede6cb19c75b4eee6f23606bf3c3e
|
aa1fa529439d92d1d5185dfb25f7e0fca60599fc
|
refs/heads/master
| 2023-02-05T16:37:57.003755
| 2020-12-27T12:54:48
| 2020-12-27T12:54:48
| 324,752,757
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,216
|
java
|
package com.fh.role.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
/**
* <p>
* 后台用户角色表
* </p>
*
* @author wkx
* @since 2020-12-17
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class UmsRole implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 名称
*/
private String name;
/**
* 描述
*/
private String description;
/**
* 后台用户数量
*/
private Integer adminCount;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date createTime;
/**
* 启用状态:0->禁用;1->启用
*/
private Integer status;
private Integer sort;
/**
* 权限关键字
*/
private String keyword;
}
|
[
"123"
] |
123
|
aec671ea47d8fd09d729b1709d3079835e59d1c1
|
2d2ea594adee21154e0d5ce60302c2e2c6cc21ad
|
/yundun-bastionhost-20191209/src/main/java/com/aliyun/yundun_bastionhost20191209/models/ListHostGroupsForUserGroupRequest.java
|
53f233643638521e5860fae50a92bb499c94f5d4
|
[
"Apache-2.0"
] |
permissive
|
yndu13/alibabacloud-java-sdk
|
b67816695b8999b7e9be929929af43b9e289dbcc
|
39b0fd9d6f0ef4f924f92fb6cd4e50694079745b
|
refs/heads/master
| 2023-07-15T07:07:47.705726
| 2021-08-12T08:55:26
| 2021-08-12T08:55:26
| 395,252,858
| 0
| 0
| null | 2021-08-12T08:43:07
| 2021-08-12T08:43:06
| null |
UTF-8
|
Java
| false
| false
| 2,626
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.yundun_bastionhost20191209.models;
import com.aliyun.tea.*;
public class ListHostGroupsForUserGroupRequest extends TeaModel {
@NameInMap("SourceIp")
public String sourceIp;
@NameInMap("InstanceId")
public String instanceId;
@NameInMap("RegionId")
public String regionId;
@NameInMap("Mode")
public String mode;
@NameInMap("UserGroupId")
public String userGroupId;
@NameInMap("PageNumber")
public String pageNumber;
@NameInMap("PageSize")
public String pageSize;
@NameInMap("HostGroupName")
public String hostGroupName;
public static ListHostGroupsForUserGroupRequest build(java.util.Map<String, ?> map) throws Exception {
ListHostGroupsForUserGroupRequest self = new ListHostGroupsForUserGroupRequest();
return TeaModel.build(map, self);
}
public ListHostGroupsForUserGroupRequest setSourceIp(String sourceIp) {
this.sourceIp = sourceIp;
return this;
}
public String getSourceIp() {
return this.sourceIp;
}
public ListHostGroupsForUserGroupRequest setInstanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
public String getInstanceId() {
return this.instanceId;
}
public ListHostGroupsForUserGroupRequest setRegionId(String regionId) {
this.regionId = regionId;
return this;
}
public String getRegionId() {
return this.regionId;
}
public ListHostGroupsForUserGroupRequest setMode(String mode) {
this.mode = mode;
return this;
}
public String getMode() {
return this.mode;
}
public ListHostGroupsForUserGroupRequest setUserGroupId(String userGroupId) {
this.userGroupId = userGroupId;
return this;
}
public String getUserGroupId() {
return this.userGroupId;
}
public ListHostGroupsForUserGroupRequest setPageNumber(String pageNumber) {
this.pageNumber = pageNumber;
return this;
}
public String getPageNumber() {
return this.pageNumber;
}
public ListHostGroupsForUserGroupRequest setPageSize(String pageSize) {
this.pageSize = pageSize;
return this;
}
public String getPageSize() {
return this.pageSize;
}
public ListHostGroupsForUserGroupRequest setHostGroupName(String hostGroupName) {
this.hostGroupName = hostGroupName;
return this;
}
public String getHostGroupName() {
return this.hostGroupName;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
f93dc310036679a75a748b4251e01b963cf0e58f
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/emr-20210320/src/main/java/com/aliyun/emr20210320/models/TagResource.java
|
e2ba5378f9530a39b4d0e7fa3fea2e4c0a643041
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,347
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.emr20210320.models;
import com.aliyun.tea.*;
public class TagResource extends TeaModel {
@NameInMap("ResourceId")
public String resourceId;
@NameInMap("ResourceType")
public String resourceType;
@NameInMap("TagKey")
public String tagKey;
@NameInMap("TagValue")
public String tagValue;
public static TagResource build(java.util.Map<String, ?> map) throws Exception {
TagResource self = new TagResource();
return TeaModel.build(map, self);
}
public TagResource setResourceId(String resourceId) {
this.resourceId = resourceId;
return this;
}
public String getResourceId() {
return this.resourceId;
}
public TagResource setResourceType(String resourceType) {
this.resourceType = resourceType;
return this;
}
public String getResourceType() {
return this.resourceType;
}
public TagResource setTagKey(String tagKey) {
this.tagKey = tagKey;
return this;
}
public String getTagKey() {
return this.tagKey;
}
public TagResource setTagValue(String tagValue) {
this.tagValue = tagValue;
return this;
}
public String getTagValue() {
return this.tagValue;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
f9938b9a543c8f7fe3b760c2efa1825fd3388169
|
12e19b02aae6f821d33692f0c601db509adce2c2
|
/test/plp/functional3/ListaTest.java
|
00297fba5c8c84472eeca2afa1a1393c5da31658
|
[] |
no_license
|
tacsio/plp
|
ce16da85e36064da281e6d86db462cf3d536364e
|
e8b4b52c568d77af06ce172d7727b9d6715c739b
|
refs/heads/master
| 2020-05-15T17:44:56.740523
| 2014-06-26T23:33:41
| 2014-06-26T23:33:41
| 19,056,467
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,657
|
java
|
package plp.functional3;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import org.junit.Test;
import plp.expressions2.expression.ExpEquals;
import plp.expressions2.expression.ValorBooleano;
import plp.expressions2.expression.ValorInteiro;
import plp.expressions2.expression.ValorString;
import plp.functional3.expression.ExpConcatLista;
import plp.functional3.expression.ExpCons;
import plp.functional3.expression.ExpHead;
import plp.functional3.expression.ExpTail;
import plp.functional3.expression.ValorLista;
import plp.functional3.util.ListaVaziaException;
public class ListaTest {
private static final ValorInteiro QUATRO = new ValorInteiro(4);
private static final ValorInteiro TRES = new ValorInteiro(3);
private static final ValorInteiro DOIS = new ValorInteiro(2);
private static final ValorInteiro UM = new ValorInteiro(1);
private static final ValorBooleano TRUE = new ValorBooleano(true);
@Test
public void consSimpleTest() {
// Avaliar 1:[]
ValorLista lista = ValorLista.getInstancia(null, null);
ExpCons cons = new ExpCons(UM, lista);
Programa prg = new Programa(cons);
assertThat(prg.checaTipo(), is(true));
assertThat(prg.executar().toString(), is("[1]"));
}
@Test
public void concatSimpleTest() {
/*
* Avaliar []^^[]
*/
ValorLista lista1 = ValorLista.getInstancia(null, null);
ValorLista lista2 = ValorLista.getInstancia(null, null);
ExpConcatLista concat = new ExpConcatLista(lista1, lista2);
Programa prg = new Programa(concat);
assertThat(prg.checaTipo(), is(true));
assertThat(prg.executar().toString(), is("[]"));
}
@Test
public void concatComplexTest() {
/*
* Avaliar [2,1]^^[3,4]
*/
ValorLista lista1 = ValorLista.getInstancia(DOIS, ValorLista
.getInstancia(UM, null));
ValorLista lista2 = ValorLista.getInstancia(TRES, ValorLista
.getInstancia(QUATRO, null));
ExpConcatLista concat = new ExpConcatLista(lista1, lista2);
Programa prg = new Programa(concat);
assertThat(prg.checaTipo(), is(true));
assertThat(prg.executar().toString(), is("[2, 1, 3, 4]"));
}
@Test
public void equalsLista() {
/*
* Avaliar [2,1]==[2,1]
*/
ValorLista lista1 = ValorLista.getInstancia(new ValorInteiro(2), null);
lista1.cons(new ValorInteiro(1));
lista1.inverter();
ValorLista lista2 = ValorLista.getInstancia(new ValorInteiro(2), null);
lista2.cons(new ValorInteiro(1));
lista2.inverter();
ExpEquals equals = new ExpEquals(lista1, lista2);
Programa prg = new Programa(equals);
assertThat(prg.checaTipo(), is(true));
assertThat(prg.executar().toString(), is("true"));
}
@Test
public void equalsListaVazia() {
/*
* Avaliar []==[]
*/
ValorLista lista1 = ValorLista.getInstancia(null, null);
ValorLista lista2 = ValorLista.getInstancia(null, null);
ExpEquals concat = new ExpEquals(lista1, lista2);
Programa prg = new Programa(concat);
assertThat(prg.checaTipo(), is(true));
assertThat(prg.executar().toString(), is("true"));
}
@Test
public void equalsListaErroTipo() {
/*
* Avaliar [2,1]==[TRUE]
*/
ValorLista lista1 = ValorLista.getInstancia(DOIS, ValorLista
.getInstancia(UM, null));
ValorLista lista2 = ValorLista.getInstancia(TRUE, null);
ExpEquals concat = new ExpEquals(lista1, lista2);
Programa prg = new Programa(concat);
assertThat(prg.checaTipo(), is(false));
}
@Test
public void headSimpleTest() {
ValorLista lista = ValorLista.getInstancia(DOIS, null);
ValorLista lista2 = ValorLista.getInstancia(UM, lista);
ExpHead head = new ExpHead(lista2);
Programa prg = new Programa(head);
assertThat(prg.checaTipo(), is(true));
assertThat(prg.executar().toString(), is("1"));
}
@Test(expected = ListaVaziaException.class)
public void headEmptyTest() {
/*
* Avaliar tail([])
*/
ValorLista lista = ValorLista.getInstancia(null, null);
ExpHead head = new ExpHead(lista);
Programa prg = new Programa(head);
assertThat(prg.checaTipo(), is(true));
prg.executar();
}
@Test
public void tailSimpleTest() {
/*
* Avaliar tail [1,2]
*/
ValorLista lista = ValorLista.getInstancia(DOIS, null);
ValorLista lista2 = ValorLista.getInstancia(UM, lista);
ExpTail tail = new ExpTail(lista2);
Programa prg = new Programa(tail);
assertThat(prg.checaTipo(), is(true));
assertThat(prg.executar().toString(), is("[2]"));
}
@Test(expected = ListaVaziaException.class)
public void tailEmptyTest() {
/*
* Avaliar tail([])
*/
ValorLista lista = ValorLista.getInstancia(null, null);
ExpTail tail = new ExpTail(lista);
Programa prg = new Programa(tail);
assertThat(prg.checaTipo(), is(true));
prg.executar();
}
@Test
public void concatErrorTest() {
// [1]^^["teste"] - erro de tipo
ValorString str1 = new ValorString("teste");
ValorLista lista1 = ValorLista.getInstancia(UM, null);
ValorLista lista2 = ValorLista.getInstancia(str1, null);
ExpConcatLista concat = new ExpConcatLista(lista1, lista2);
Programa prg = new Programa(concat);
assertThat(prg.checaTipo(), is(false));
}
@Test
public void consErrorTest() {
// 1:["teste"] - erro de tipo
ValorString str1 = new ValorString("teste");
ValorLista lista = ValorLista.getInstancia(str1, null);
ExpCons cons = new ExpCons(UM, lista);
Programa prg = new Programa(cons);
assertThat(prg.checaTipo(), is(false));
}
@Test
public void fold() {
// let fun fold op a lista = if (lista==[]) then a
// else op(head lista, fold(op, a, tail lista),
// fun soma x y = x+y
// in fold(soma, 0, [2])
// assertThat(prg.checaTipo(), is(true));
// assertThat(prg.executar().toString(), is("2"));
}
}
|
[
"tcs5cin@gmail.com"
] |
tcs5cin@gmail.com
|
706afb68d72fae34a8c6bc01fcdd1cba3c8a83d7
|
62e3f2e7c08c6e005c63f51bbfa61a637b45ac20
|
/B-Genius_AdFree/app/src/main/java/com/badlogic/gdx/utils/ObjectMap$Keys.java
|
4dab764cb887799e5da6a87ac5e5006f7abc24bb
|
[] |
no_license
|
prasad-ankit/B-Genius
|
669df9d9f3746e34c3e12261e1a55cf5c59dd1c6
|
1139ec152b743e30ec0af54fe1f746b57b0152bf
|
refs/heads/master
| 2021-01-22T21:00:04.735938
| 2016-05-20T19:03:46
| 2016-05-20T19:03:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,209
|
java
|
package com.badlogic.gdx.utils;
import java.util.NoSuchElementException;
public class ObjectMap$Keys extends ObjectMap.MapIterator
{
public ObjectMap$Keys(ObjectMap paramObjectMap)
{
super(paramObjectMap);
}
public boolean hasNext()
{
if (!this.valid)
throw new GdxRuntimeException("#iterator() cannot be used nested.");
return this.hasNext;
}
public Keys iterator()
{
return this;
}
public Object next()
{
if (!this.hasNext)
throw new NoSuchElementException();
if (!this.valid)
throw new GdxRuntimeException("#iterator() cannot be used nested.");
Object localObject = this.map.keyTable[this.nextIndex];
this.currentIndex = this.nextIndex;
findNextIndex();
return localObject;
}
public Array toArray()
{
return toArray(new Array(true, this.map.size));
}
public Array toArray(Array paramArray)
{
while (this.hasNext)
paramArray.add(next());
return paramArray;
}
}
/* Location: C:\Users\KSHITIZ GUPTA\Downloads\apktool-install-windws\dex2jar-0.0.9.15\dex2jar-0.0.9.15\classes_dex2jar.jar
* Qualified Name: com.badlogic.gdx.utils.ObjectMap.Keys
* JD-Core Version: 0.6.0
*/
|
[
"kshitiz1208@gmail.com"
] |
kshitiz1208@gmail.com
|
2f778ee0d088fdc41a6dceca872bb8ce83db89ef
|
57ab5b743b2918c963b5acc1ce7d7c52c27c6ee0
|
/src/main/java/com/rhb/turtle/operation/PreyRepositoryImp.java
|
9783fef62d935996f118d82d4f6de36d7df03a35
|
[] |
no_license
|
dofoyo/turtle
|
34d95d32dc0c567c249b771f343fa7dbb01dcf7e
|
dcf02c9ff79222723779de7fab6ff5ca72cb2f46
|
refs/heads/master
| 2022-09-12T08:35:29.361077
| 2020-01-04T03:30:58
| 2020-01-04T03:30:58
| 170,220,182
| 0
| 0
| null | 2022-09-01T23:02:43
| 2019-02-11T23:38:08
|
Java
|
UTF-8
|
Java
| false
| false
| 5,039
|
java
|
package com.rhb.turtle.operation;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.rhb.turtle.domain.Turtle;
import com.rhb.turtle.util.FileUtil;
@Service("turtlePreyRepositoryImp")
public class PreyRepositoryImp implements PreyRepository {
@Value("${preysFile}")
private String preysFile;
@Autowired
@Qualifier("turtleOperationRepositoryImp")
TurtleOperationRepository turtleOperationRepository ;
@Autowired
@Qualifier("turtleOperationSpiderImp")
KdataSpider turtleOperationSpider ;
@Override
public void generatePreys() {
LocalDate theDay = turtleOperationSpider.getLatestMarketDate();
//Set<String> ids = new HashSet<String>(turtleOperationRepository.getDailyTop100Ids());
Set<String> ids = new HashSet<String>(turtleOperationSpider.downLatestDailyTop(100));
Map<String,String> articles = turtleOperationRepository.getArticles();
for(String id : articles.keySet()) {
ids.add(id);
}
//加载收盘后下载的K线数据
//因为要根据之前的数据来判断当前数据,因此加载K线数据应为前一天的数据
Turtle turtle = new Turtle();
List<Map<String,String>> kDatas;
LocalDate tmp;
for(String id : ids) {
kDatas = turtleOperationRepository.getKDatas(id);
if(kDatas.size()==0) {
System.out.println("NO kDatas, downloading...");
turtleOperationSpider.downKdatas(id);
kDatas = turtleOperationRepository.getKDatas(id);
}
if(kDatas.size()!=0) {
Map<String,String> kdata = kDatas.get(kDatas.size()-1);
tmp = LocalDate.parse(kdata.get("dateTime"));
if(theDay.equals(tmp)){
kDatas.remove(kDatas.size()-1);
}
turtle.addBars(kDatas);
}
}
List<Map<String,String>> list = new ArrayList<Map<String,String>>();
Map<String, String> kData;
Map<String,String> prey;
for(String itemID : ids) {
kData = turtleOperationSpider.getLatestMarketData(itemID);//获得最新的K线数据
prey = turtle.hunt(kData);
if(prey!=null) {
list.add(prey);
}
}
StringBuffer sb = new StringBuffer();
sb.append("itemID");
sb.append(",");
sb.append("code");
sb.append(",");
sb.append("name");
sb.append(",");
sb.append("openLow");
sb.append(",");
sb.append("openHigh");
sb.append(",");
sb.append("now");
sb.append(",");
sb.append("dropLow");
sb.append(",");
sb.append("hlgap");
sb.append(",");
sb.append("nhgap");
sb.append(",");
sb.append("atr");
sb.append(",");
sb.append("status");
sb.append("\n");
for(Map<String,String> map : list) {
sb.append(map.get("itemID"));
sb.append(",");
sb.append(map.get("code"));
sb.append(",");
sb.append(map.get("name"));
sb.append(",");
sb.append(map.get("openLow"));
sb.append(",");
sb.append(map.get("openHigh"));
sb.append(",");
sb.append(map.get("now"));
sb.append(",");
sb.append(map.get("dropLow"));
sb.append(",");
sb.append(map.get("hlgap"));
sb.append(",");
sb.append(map.get("nhgap"));
sb.append(",");
sb.append(map.get("atr"));
sb.append(",");
sb.append(map.get("status"));
sb.append("\n");
}
FileUtil.writeTextFile(preysFile, sb.toString(), false);
//FileUtil.write(sb.toString(), preysFile, "utf-8");
}
/*
* features.put("openHigh", openHigh.toString());
features.put("openLow", openLow.toString());
features.put("hlgap", hlgap.toString());
features.put("nhgap", nhgap.toString());
features.put("nlgap", nlgap.toString());
features.put("dropHigh", dropHigh.toString());
features.put("dropLow", dropLow.toString());
features.put("now", now.toString());
features.put("status", status.toString());
features.put("atr", getATR().toString());
*/
@Override
public List<Map<String,String>> getPreys(String status) {
Map<String,String> articles = turtleOperationRepository.getArticles();
List<Map<String,String>> preys = new ArrayList<Map<String,String>>();
Map<String,String> prey;
String[] lines = FileUtil.readTextFile(preysFile).split("\n");
String[] columns;
String name,id;
for(int i=1; i<lines.length; i++) {
columns = lines[i].split(",");
if(columns[10].equals(status)) {
id = columns[0];
name = articles.get(id)==null ? columns[2] : articles.get(id);
prey = new HashMap<String,String>();
prey.put("itemID", id);
prey.put("code", columns[1]);
prey.put("name", name);
prey.put("low", columns[3]);
prey.put("high", columns[4]);
prey.put("now", columns[5]);
prey.put("drop", columns[6]);
prey.put("hlgap", columns[7]);
prey.put("nhgap", columns[8]);
prey.put("atr", columns[9]);
preys.add(prey);
}
}
//System.out.println(preys.size());
return preys;
}
}
|
[
"dofoyo@sina.cn"
] |
dofoyo@sina.cn
|
54d4da63d0294cca5d272053cbb57d1fede9fa4e
|
5fc707b4ef12826faca8ec1c580cb1dcf4cc7dc2
|
/news-master/service-provider-news/src/main/java/com/kanfa/news/info/mapper/ActivityLawPioneerMapper.java
|
034adc853f91c2adfeecad1fbe0427555f591d08
|
[] |
no_license
|
MavonCmc/wdw
|
06597b8aca4054ecc6be7d2062543311da2073c0
|
814911c723fe6a9a7cd2c13e968776ead71f1b1b
|
refs/heads/master
| 2023-03-15T14:49:46.993701
| 2018-08-29T08:34:42
| 2018-08-29T08:34:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,170
|
java
|
package com.kanfa.news.info.mapper;
import com.kanfa.news.info.entity.ActivityLawPioneer;
import com.kanfa.news.info.vo.admin.activity.ActivityLawPioneerPageInfo;
import com.kanfa.news.info.vo.admin.info.ActivityLawPioneerInfo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
/**
*
*
* @author Jqc
* @email jiqingchao@kanfanews.com
* @date 2018-03-26 17:22:05
*/
public interface ActivityLawPioneerMapper extends Mapper<ActivityLawPioneer> {
/**
* 查询政法先锋机构或个人
* @param entity
* @return
*/
List<ActivityLawPioneerInfo> getList(@Param("entity") ActivityLawPioneerInfo entity);
/**
* app -- 查询青春微普法机构或个人
* @return
*/
List<ActivityLawPioneer> getLawList();
/**
* 机构或个人
* @param
* @return
*/
List<ActivityLawPioneerPageInfo> getActivityLawPioneerPage(ActivityLawPioneerPageInfo entity);
/**
* 机构或个人 通过activityLawId 查找最大值
* @param
* @return
*/
Integer getMaxSort(@Param("activityLawId")Integer activityLawId);
}
|
[
"wdw.ok@163.com"
] |
wdw.ok@163.com
|
80253a8479e5fb4412bfc7ae805dab452bbec2aa
|
b39898ac4e47e78142a4d1d87fc67cc5356782ea
|
/jetlinks-components/common-component/src/main/java/org/jetlinks/community/codec/ObjectSerializer.java
|
6dfa0dd9f5dac251cd26dc31c2c2720410bdff51
|
[
"Apache-2.0"
] |
permissive
|
jetlinks/jetlinks-community
|
8147b61715786de25f5a5d121daf895bc8bc1bc4
|
b0027125ea2c5a1edfe9bbb0c4a6780efce24ebe
|
refs/heads/master
| 2023-08-28T05:14:44.536575
| 2023-08-18T03:50:11
| 2023-08-18T03:50:11
| 231,329,990
| 4,655
| 1,551
|
Apache-2.0
| 2023-09-13T06:49:54
| 2020-01-02T07:27:34
|
Java
|
UTF-8
|
Java
| false
| false
| 297
|
java
|
package org.jetlinks.community.codec;
import java.io.InputStream;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.io.OutputStream;
public interface ObjectSerializer {
ObjectInput createInput(InputStream stream);
ObjectOutput createOutput(OutputStream stream);
}
|
[
"zh.sqy@qq.com"
] |
zh.sqy@qq.com
|
ea0cc380341299daef21f362de41644a34c8c163
|
4b95d12efb6c340dff13476b7a0b4636a1d1304d
|
/sboot-logging/src/test/java/jbr/spring/boot/SpringBootLoggingApplicationTests.java
|
7cb883aafd637b78a3ce0423be24a5f96ba90e04
|
[] |
no_license
|
PrimeCaster/spring-boot-1
|
6436b0a3d2789f283a49852c112616d48ce4b7a7
|
1478398f43424c22a4f35ca587fd4cb7fcf94288
|
refs/heads/master
| 2022-11-26T05:46:05.369932
| 2020-07-30T10:20:14
| 2020-07-30T10:20:14
| 297,029,834
| 1
| 0
| null | 2020-09-20T08:04:49
| 2020-09-20T08:04:49
| null |
UTF-8
|
Java
| false
| false
| 343
|
java
|
package jbr.spring.boot;
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 SpringBootLoggingApplicationTests {
@Test
public void contextLoads() {
}
}
|
[
"java2ranjith@gmail.com"
] |
java2ranjith@gmail.com
|
e0c17b9e732ef54d1d5729c4d7ea690d7b7b3327
|
028cbe18b4e5c347f664c592cbc7f56729b74060
|
/external/modules/weld/core/1.0.0/tests/src/test/java/org/jboss/weld/tests/enterprise/lifecycle/MockCreationalContext.java
|
1390501070237b94b5228075f720adc1a86af6b7
|
[] |
no_license
|
dmatej/Glassfish-SVN-Patched
|
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
|
269e29ba90db6d9c38271f7acd2affcacf2416f1
|
refs/heads/master
| 2021-05-28T12:55:06.267463
| 2014-11-11T04:21:44
| 2014-11-11T04:21:44
| 23,610,469
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 324
|
java
|
package org.jboss.weld.tests.enterprise.lifecycle;
import javax.enterprise.context.spi.CreationalContext;
public class MockCreationalContext<T> implements CreationalContext<T>
{
public void push(T incompleteInstance)
{
}
public void release()
{
// TODO Auto-generated method stub
}
}
|
[
"rogerk@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] |
rogerk@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
|
93ea276c65245d6c98a5ecad48aeccde68cb1d8b
|
3f605d058523f0b1e51f6557ed3c7663d5fa31d6
|
/core/org.ebayopensource.vjet.core.jst/src/org/ebayopensource/dsf/ts/event/ISourceEventListener.java
|
0697fc21e6af3fce5a07d124c2a209ed32f55fc4
|
[] |
no_license
|
vjetteam/vjet
|
47e21a13978cd860f1faf5b0c2379e321a9b688c
|
ba90843b89dc40d7a7eb289cdf64e127ec548d1d
|
refs/heads/master
| 2020-12-25T11:05:55.420303
| 2012-08-07T21:56:30
| 2012-08-07T21:56:30
| 3,181,492
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 634
|
java
|
/*******************************************************************************
* Copyright (c) 2005-2011 eBay Inc.
* 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
*
*******************************************************************************/
package org.ebayopensource.dsf.ts.event;
/**
* Empty interface to tag the source event listeners
*
*
*/
public interface ISourceEventListener {
// Empty tag
}
|
[
"pwang@27f4aac7-f869-4a38-a8c2-f1a995e726e6"
] |
pwang@27f4aac7-f869-4a38-a8c2-f1a995e726e6
|
e9ec6ad2325a0702ebc45dc5de55e21aa60c2250
|
6fd2e54a712a8e2270a4b3bef59edb4ee9951342
|
/app/src/main/java/com/xuechuan/xcedu/service/UpdataLogSevice.java
|
d178551076072f17e831fb2467527524027af6fd
|
[] |
no_license
|
yufeilong92/textZZ
|
984fa294854f5b5517b34e125df8a960b34fd93c
|
213d3d04661406d8c7f09a1febd3256a5fa9a1ac
|
refs/heads/master
| 2020-03-23T11:40:36.547767
| 2018-07-19T02:42:32
| 2018-07-19T02:42:32
| 141,515,511
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,153
|
java
|
package com.xuechuan.xcedu.service;
import android.app.IntentService;
import android.content.Intent;
import android.content.Context;
import android.text.TextUtils;
import com.lzy.okgo.model.Response;
import com.xuechuan.xcedu.net.HomeService;
import com.xuechuan.xcedu.net.view.StringCallBackView;
import com.xuechuan.xcedu.utils.FileReadUtil;
/**
* An {@link IntentService} subclass for handling asynchronous task requests in
* a service on a separate handler thread.
* <p>
* TODO: Customize class - update intent actions, extra parameters and static
* helper methods.
*/
public class UpdataLogSevice extends IntentService {
private static final String ACTION_FOO = "com.xuechuan.xcedu.service.action.FOO";
private static final String UPDATAID = "com.xuechuan.xcedu.service.extra.PARAM1";
private static final String UPDATABAN = "com.xuechuan.xcedu.service.extra.PARAM2";
private static final String UPDATAVIDEOID = "com.xuechuan.xcedu.service.extra.PARAM3";
private static final String UPDATAREGITID= "com.xuechuan.xcedu.service.extra.PARAM4";
public UpdataLogSevice() {
super("MyIntentService");
}
public static void startActionFoo(Context context, String vid, String ban,String videoid,String regitid) {
Intent intent = new Intent(context, UpdataLogSevice.class);
intent.setAction(ACTION_FOO);
intent.putExtra(UPDATAID, vid);
intent.putExtra(UPDATABAN, ban);
intent.putExtra(UPDATAVIDEOID, videoid);
intent.putExtra(UPDATAREGITID, regitid);
context.startService(intent);
}
@Override
protected void onHandleIntent(Intent intent) {
if (intent != null) {
final String action = intent.getAction();
if (ACTION_FOO.equals(action)) {
final String vid = intent.getStringExtra(UPDATAID);
final String banben = intent.getStringExtra(UPDATABAN);
final String videoid = intent.getStringExtra(UPDATAVIDEOID);
final String ragith = intent.getStringExtra(UPDATAREGITID);
handleActionFoo(vid, banben,videoid,ragith);
}
}
}
private void handleActionFoo(String vid, String banben,String videoid, String ragith) {
FileReadUtil util = FileReadUtil.getInstance(getBaseContext());
String s = util.loadFromSdFile();
if (TextUtils.isEmpty(s)) {
stopSelf();
return;
}
StringBuffer buffer = new StringBuffer();
buffer.append("视频的id为" + vid);
buffer.append("," + banben);
buffer.append(",视频本地id为" + videoid);
buffer.append(",码率为" + ragith);
buffer.append(s);
HomeService service = new HomeService(getApplicationContext());
service.updataLog(buffer.toString(), new StringCallBackView() {
@Override
public void onSuccess(Response<String> response) {
stopSelf();
}
@Override
public void onError(Response<String> response) {
stopSelf();
}
});
}
}
|
[
"931697478@qq.com"
] |
931697478@qq.com
|
d6a9caf80c544cba45ed2d5821bc7642f39250af
|
d8e695d863aea3293e04efd91f01f4298adbc3a0
|
/apache-ode-1.3.5/ode-jbi/src/main/java/org/apache/ode/jbi/OdeConfigProperties.java
|
663f918d162f6cc010ee67d85ca59162f59c98bb
|
[] |
no_license
|
polyu-lsgi-xiaofei/bpelcube
|
685469261d5ca9b7ee4c7288cf47a950d116b21f
|
45b371a9353209bcc7c4b868cbae2ce500f54e01
|
refs/heads/master
| 2021-01-13T02:31:47.445295
| 2012-11-01T16:20:11
| 2012-11-01T16:20:11
| 35,921,433
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,365
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ode.jbi;
import java.io.File;
import java.util.Properties;
import org.apache.ode.jbi.msgmap.JbiWsdl11WrapperMapper;
public class OdeConfigProperties extends org.apache.ode.il.config.OdeConfigProperties {
private static final long serialVersionUID = 1L;
public static final String CONFIG_FILE_NAME = "ode-jbi.properties";
private static final String PROP_NAMESPACE = "pidNamespace";
private static final String PROP_ALLOW_INCOMPLETE_DEPLOYMENT = "allowIncompleteDeployment";
private static final String PROP_MSGMAPPER = "messageMapper";
public OdeConfigProperties(File cfgFile) {
super(cfgFile, "ode-jbi.");
}
public OdeConfigProperties(Properties properties) {
super(properties, "ode-jbi.");
}
/**
* Get the namespace that should be used to generate process identifiers
* (PIDs). The local part of the PID will be the service unit id.
*
* @return
*/
public String getPidNamespace() {
return getProperty(PROP_NAMESPACE, null);
}
public boolean getAllowIncompleteDeployment() {
return Boolean.valueOf(getProperty(PROP_ALLOW_INCOMPLETE_DEPLOYMENT, Boolean.FALSE.toString()));
}
/**
* Get the mapper to use for converting message to/from NMS format.
*
* @return
*/
public String[] getMessageMappers() {
return getProperty(PROP_MSGMAPPER, JbiWsdl11WrapperMapper.class.getName()).split("[ ,]");
}
}
|
[
"michael.pantazoglou@gmail.com@f004a122-f478-6e0f-c15d-9ccb889b5864"
] |
michael.pantazoglou@gmail.com@f004a122-f478-6e0f-c15d-9ccb889b5864
|
dd1fcb054f4dce3cc504a1b3e528759d11f168ad
|
b88eff91a9f1558aef643bcc90dbac4178855bea
|
/platform/src/main/java/com/oa/platform/service/ChatUnreadMessageCountService.java
|
62d3dfd84f5c878037afbca47e834230a711af12
|
[] |
no_license
|
wwkjddyh/oa
|
691ca0ad40b64bd33371b22b60ddf1ecb8b12af1
|
3b18632930d9ac207578150f86690fc66b1e4568
|
refs/heads/master
| 2022-06-23T03:33:58.078702
| 2021-01-05T07:18:57
| 2021-01-05T07:18:57
| 245,377,710
| 1
| 4
| null | 2022-06-21T02:56:02
| 2020-03-06T09:22:50
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,342
|
java
|
package com.oa.platform.service;
import org.springframework.stereotype.Service;
/**
* 未读消息数量服务接口
* @author Administrator
*
*/
@Service
public interface ChatUnreadMessageCountService {
/**
* 批量添加未读消息数量
* @param userIds
* @param channelId
* @param total
* @return
*/
int batchSaveUnreadMessageCount(String[] userIds, String channelId, short total);
/**
* 更新未读消息数量
* @param userId
* @param channelId
* @param total
* @return
*/
int updateUnreadMessageCount(String userId, String channelId, short total);
/**
* 批量更新未读消息数量
* @param userIds
* @param channelId
* @param total
* @return
*/
int batchUpdateUnreadMessageCount(String[] userIds, String channelId, short total);
/**
* 批量增加未读消息数量
* @param userIds
* @param channelId
* @param quantity
* @return
*/
int batchIncreaseUnreadMessageCount(String[] userIds, String channelId, short quantity);
/**
* 增加未读消息数量
* @param userId
* @param channelId
* @param quantity
* @return
*/
int increaseUnreadMessageCount(String userId, String channelId, short quantity);
}
|
[
"445121408@qq.com"
] |
445121408@qq.com
|
c1080361b6967bf28d77bd84a8361dbd2a62816a
|
3eb230671f4efffa65ebea0661dd34aa793ed146
|
/ArrayEx/HouseRunner.java
|
1717ea1b1f435eaef0d2e47a881fd43935067165
|
[
"MIT"
] |
permissive
|
cyber-coders-j2017a/modern.core.java.repo
|
0efb862d41d82e01a9687a6f6372ca6ba38d898b
|
7e8dc86ec75801ad8932fbbe44458f8218c9658a
|
refs/heads/master
| 2021-05-23T06:01:08.419276
| 2018-02-14T09:49:57
| 2018-02-14T09:49:57
| 94,759,029
| 11
| 0
|
MIT
| 2018-02-14T09:49:58
| 2017-06-19T09:20:13
|
Java
|
UTF-8
|
Java
| false
| false
| 256
|
java
|
package ArrayEx;
/**
* Created by LewisMonplaisir on 18/07/2017.
*/
public class HouseRunner {
public static void main(String[] args) {
House myHouse = new House();
myHouse.HouseTypes();
System.out.println(myHouse);
}
}
|
[
"you@example.com"
] |
you@example.com
|
d35ed993db055b6008cf5b3aea7ff78c818f44cb
|
a0dea239e224b8491fe8571de116b99a530b9b22
|
/source/src/com/allinone/free/fragments/RingtoneSearchFragment$6$1.java
|
0f577b6a4077d6b4ccc0cdeef59552af2454ebcb
|
[] |
no_license
|
parth12/ProgrammingClubDAIICT
|
c413efecdce57839abc75602aa727730197c7a90
|
979b97222efcdf28607146df422772d83d3d5570
|
refs/heads/master
| 2021-01-10T05:22:28.079352
| 2015-12-22T18:40:28
| 2015-12-22T18:40:28
| 48,445,901
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,717
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.allinone.free.fragments;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import com.allinone.free.utils.publicTools;
// Referenced classes of package com.allinone.free.fragments:
// RingtoneSearchFragment
class this._cls1
implements Runnable
{
final this$1;
public void run()
{
publicTools.getUrl((new StringBuilder("http://android.downloadatoz.com/_201409/market/report_fail.php?type=")).append(pe).append("&id=").append().toString());
}
is._cls0()
{
this$1 = this._cls1.this;
super();
}
// Unreferenced inner class com/allinone/free/fragments/RingtoneSearchFragment$6
/* anonymous class */
class RingtoneSearchFragment._cls6 extends Handler
{
private String id;
final RingtoneSearchFragment this$0;
private String type;
public void handleMessage(Message message)
{
type = message.getData().getString("type");
id = message.getData().getString("id");
message.what;
JVM INSTR tableswitch 1212 1212: default 48
// 1212 54;
goto _L1 _L2
_L1:
super.handleMessage(message);
return;
_L2:
(new Thread(new RingtoneSearchFragment._cls6._cls1())).start();
if (true) goto _L1; else goto _L3
_L3:
}
{
this$0 = RingtoneSearchFragment.this;
super();
}
}
}
|
[
"parthpanchal12196@gmail.com"
] |
parthpanchal12196@gmail.com
|
8f021b23a83b8a13098fa8a274a4dd3a82540eea
|
2898df42fd3d6d685966c12493a798266e8fbfd8
|
/src/main/java/org/bk/config/WebConfiguration.java
|
628c1dfb309b7ef01002f88b7c6ae2d9e97b42d4
|
[] |
no_license
|
bijukunjummen/sample-spring-boot-cxf
|
8e15e2c252ea3cb75708efa1c63e6d669814dabf
|
0119c5c48e428f155c414a521f26250f604ae219
|
refs/heads/master
| 2020-04-02T03:27:23.618355
| 2017-05-24T18:35:05
| 2017-05-24T18:35:05
| 60,948,501
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,501
|
java
|
package org.bk.config;
import de.codecentric.namespace.weatherservice.WeatherService;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.transport.servlet.CXFServlet;
import org.bk.calc.endpoint.CalculatorEndpoint;
import org.bk.weather.soap.WeatherServiceEndpoint;
import org.example.ICalculator;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.xml.ws.Endpoint;
@Configuration
public class WebConfiguration {
@Bean
public ServletRegistrationBean cxfServet() {
return new ServletRegistrationBean(new CXFServlet(), "/soap-api/*");
}
@Bean(name= Bus.DEFAULT_BUS_ID)
public SpringBus springBus() {
return new SpringBus();
}
@Bean
public WeatherService weatherService() {
return new WeatherServiceEndpoint();
}
@Bean
public ICalculator calculatorService() {
return new CalculatorEndpoint();
}
@Bean
public Endpoint weatherEndpoint() {
EndpointImpl endpoint = new EndpointImpl(springBus(), weatherService());
endpoint.publish("/weather");
endpoint.setWsdlLocation("Weather1.0.wsdl");
return endpoint;
}
@Bean
public Endpoint calculatorEndpoitn() {
EndpointImpl endpoint = new EndpointImpl(springBus(), calculatorService());
endpoint.publish("/calculator");
endpoint.setWsdlLocation("Calculator.wsdl");
return endpoint;
}
}
|
[
"biju.kunjummen@gmail.com"
] |
biju.kunjummen@gmail.com
|
1a0d79833ed9da3b6250353a56a0774dc7fe891d
|
355c41b5bb8706ad1acb282b828ab50f2a58d1a2
|
/cn/vcity/wbase/common/module/quartz/dao/QuartzDAO.java
|
1fd3b8e4ece1d13e6e1f8c39e31f649125fa1103
|
[] |
no_license
|
goldbo/vcity
|
d7a424f00939ceafbb4f6d06ebfa608321a75c8a
|
645f6a5eb429d3974ef4afa4e3f00ab37f6d5643
|
refs/heads/master
| 2021-01-22T01:54:36.186223
| 2012-02-20T09:30:57
| 2012-02-20T09:30:57
| 3,134,179
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,642
|
java
|
package cn.vcity.wbase.common.module.quartz.dao;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import cn.vcity.wbase.common.base.BaseDAOHibernate;
import cn.vcity.wbase.common.module.quartz.model.QrtzCronTriggers;
import cn.vcity.wbase.common.module.quartz.model.QrtzJobDetails;
import cn.vcity.wbase.common.module.quartz.model.QrtzTriggers;
/**
* 调度器DAO
*
* @author samuel
*/
public class QuartzDAO extends BaseDAOHibernate {
private static final Log log = LogFactory.getLog(QuartzDAO.class);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
public void createQuartzJob(QrtzJobDetails qrtzJobDetails) {
Connection conn = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try {
conn = super.getSession().connection();
String jobSql = "INSERT INTO qrtz_job_details(job_name, job_group, job_class_name, is_durable, is_volatile, is_stateful, requests_recovery) "
+ " VALUES (?, ?, ?, ?, ?, ?, ?) ";
stmt = conn.prepareStatement(jobSql);
stmt.setString(1, qrtzJobDetails.getJob_name());
stmt.setString(2, qrtzJobDetails.getJob_group());
stmt.setString(3, qrtzJobDetails.getJob_class_name());
stmt.setInt(4, qrtzJobDetails.getIs_durable());
stmt.setInt(5, qrtzJobDetails.getIs_volatile());
stmt.setInt(6, qrtzJobDetails.getIs_stateful());
stmt.setInt(7, qrtzJobDetails.getRequests_recovery());
stmt.executeUpdate();
conn.commit();
log.info(qrtzJobDetails.getJob_name()+"作业新增成功!" + sdf.format(new Date().getTime()));
} catch (Exception ex) {
log.info(qrtzJobDetails.getJob_name()+"作业新增成功!" + sdf.format(new Date().getTime()));
try {
conn.rollback();
} catch (SQLException e) {
e.printStackTrace();
}
ex.printStackTrace();
} finally {
try {
if (stmt != null)
stmt.close();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
public String setQuartzJob(QrtzTriggers qrtzTriggers, QrtzCronTriggers qrtzCronTriggers) {
Connection conn = null;
PreparedStatement stmt = null;
ResultSet rs = null;
String flag = "";
try {
conn = super.getSession().connection();
String delCronSql = "DELETE FROM qrtz_cron_triggers WHERE TRIGGER_NAME=? ";
stmt = conn.prepareStatement(delCronSql);
stmt.setString(1, qrtzTriggers.getTrigger_name());
stmt.executeUpdate();
conn.commit();
String delTriggerSql = "DELETE FROM qrtz_triggers where TRIGGER_NAME =? ";
stmt = conn.prepareStatement(delTriggerSql);
stmt.setString(1, qrtzTriggers.getTrigger_name());
stmt.executeUpdate();
conn.commit();
String triggerSql = "INSERT INTO qrtz_triggers (trigger_name, trigger_group, job_name, job_group, is_volatile, next_fire_time, trigger_state,trigger_type, start_time, misfire_instr) "
+ " VALUES (?,?, ?, ?, ?,?, ?,?, ?, ?)";
stmt = conn.prepareStatement(triggerSql);
stmt.setString(1, qrtzTriggers.getTrigger_name());
stmt.setString(2, qrtzTriggers.getTrigger_group());
stmt.setString(3, qrtzTriggers.getJob_name());
stmt.setString(4, qrtzTriggers.getJob_group());
stmt.setInt(5, qrtzTriggers.getIs_volatile());
stmt.setInt(6, qrtzTriggers.getNext_fire_time());
stmt.setString(7, qrtzTriggers.getTrigger_state());
stmt.setString(8, qrtzTriggers.getTrigger_type());
stmt.setInt(9, qrtzTriggers.getStart_time());
stmt.setInt(10, qrtzTriggers.getMisfire_instr());
stmt.executeUpdate();
conn.commit();
String cronSql = "INSERT INTO qrtz_cron_triggers (TRIGGER_NAME , TRIGGER_GROUP , CRON_EXPRESSION , TIME_ZONE_ID ) "
+ " VALUES (?, ?, ?, ?) ";
stmt = conn.prepareStatement(cronSql);
stmt.setString(1, qrtzCronTriggers.getTrigger_name());
stmt.setString(2, qrtzCronTriggers.getTrigger_group());
stmt.setString(3, qrtzCronTriggers.getCron_expression());
stmt.setString(4, qrtzCronTriggers.getTime_zone_id());
stmt.executeUpdate();
conn.commit();
flag = "计划任务设置成功!";
log.info(qrtzTriggers.getJob_name()+"计划任务设置成功!" + sdf.format(new Date().getTime()));
} catch (Exception ex) {
flag = "计划任务设置失败!";
log.info(qrtzTriggers.getJob_name()+"计划任务设置失败!" + sdf.format(new Date().getTime()));
try {
conn.rollback();
} catch (SQLException e) {
e.printStackTrace();
}
ex.printStackTrace();
} finally {
try {
if (stmt != null)
stmt.close();
} catch (Exception ex) {
ex.printStackTrace();
}
}
return flag;
}
public boolean deleteQuartz(String id) {
Connection conn = null;
PreparedStatement stmt = null;
ResultSet rs = null;
boolean flag = false;
try {
conn = super.getSession().connection();
String cronSql = "DELETE FROM qrtz_cron_triggers WHERE TRIGGER_NAME=? ";
stmt = conn.prepareStatement(cronSql);
stmt.setString(1, id);
stmt.executeUpdate();
String triggerSql = "DELETE FROM qrtz_triggers where TRIGGER_NAME =? ";
stmt = conn.prepareStatement(triggerSql);
stmt.setString(1, id);
stmt.executeUpdate();
flag =true;
log.info("计划任务删除成功!" + sdf.format(new Date().getTime()));
} catch (Exception ex) {
flag = false;
log.info("计划任务删除失败!" + sdf.format(new Date().getTime()));
try {
conn.rollback();
} catch (SQLException e) {
e.printStackTrace();
}
ex.printStackTrace();
} finally {
try {
if (stmt != null)
stmt.close();
} catch (Exception ex) {
ex.printStackTrace();
}
}
return flag;
}
public boolean getQuartzJob(String job_name){
Connection conn = null;
PreparedStatement stmt = null;
ResultSet rs = null;
boolean flag = false;
try {
conn = super.getSession().connection();
String jobSql = "SELECT * FROM qrtz_job_details WHERE job_name=? ";
stmt = conn.prepareStatement(jobSql);
stmt.setString(1, job_name);
rs=stmt.executeQuery();
if(rs.next()){
flag =true;
log.info("计划任务设置成功!" + sdf.format(new Date().getTime()));
}else{
flag = false;
}
} catch (Exception ex) {
flag = false;
log.info("计划任务设置失败!" + sdf.format(new Date().getTime()));
try {
conn.rollback();
} catch (SQLException e) {
e.printStackTrace();
}
ex.printStackTrace();
} finally {
try {
if (stmt != null)
stmt.close();
} catch (Exception ex) {
ex.printStackTrace();
}
}
return flag;
}
}
|
[
"549668352@qq.com"
] |
549668352@qq.com
|
de8cd431ad7da40d95f3e227bf18947eaef6a8b3
|
459c9f3e8502bdd1216651301b5c551e8d182024
|
/dm/tools/ui/RoundedPanel.java
|
bbc8a480122c90532591a244db91ed272320d2aa
|
[] |
no_license
|
Achaz/iSalePoint
|
31c7a825d78dee1688d44bef70251ebd14e5d37b
|
dd47d7d3eacfcc08d6c79e03653484644b0f534d
|
refs/heads/master
| 2021-01-10T21:31:53.572380
| 2015-03-19T08:16:46
| 2015-03-19T08:16:46
| 32,508,929
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 892
|
java
|
package dm.tools.ui;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import org.jdesktop.swingx.JXPanel;
public class RoundedPanel
extends JXPanel
{
private Color _mFillColor = new Color(241, 184, 133, 255);
protected void paintComponent(Graphics paramGraphics)
{
int i = 14;
int j = 14;
int k = getWidth();
int m = getHeight();
int n = 30;
Graphics2D localGraphics2D = (Graphics2D)paramGraphics.create();
localGraphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
localGraphics2D.setColor(this._mFillColor);
localGraphics2D.fillRoundRect(0, 0, k, m, n, n);
}
}
/* Location: D:\pos\iSalePoint\iSalePoint.jar
* Qualified Name: dm.tools.ui.RoundedPanel
* JD-Core Version: 0.7.0.1
*/
|
[
"jtugume123@gmail.com"
] |
jtugume123@gmail.com
|
dc79b6652e01a36b56f2c146af992993035c854a
|
76c957a6f3634a65c235281e0d9c59e3695ee92c
|
/app/src/main/java/com/moe/fullwebview/widget/SectorButton.java
|
94df0854f5a607899e63e8806396f93b78aef6ed
|
[] |
no_license
|
dorobonneko/FullWebview
|
43cc355ebaca8c4e3c48989c9562c382a5c4a6be
|
7bd8e71171be3f48434fc558e3fc48a5b649a6dc
|
refs/heads/master
| 2020-06-09T22:26:07.103060
| 2019-06-24T14:10:26
| 2019-06-24T14:10:26
| 193,518,321
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,900
|
java
|
package com.moe.fullwebview.widget;
import android.view.*;
import android.content.*;
import android.util.*;
import android.graphics.*;
import android.content.res.*;
import com.moe.fullwebview.*;
import java.io.*;
import org.xmlpull.v1.*;
import java.util.*;
import android.graphics.drawable.*;
public class SectorButton extends View implements GestureDetector.OnGestureListener
{
public final static int LEFT=-1,RIGHT=1,CENTER=0;
private boolean vibrate;
private int menu=-1,gravity,radius;
private Drawable icon;
private ArrayList<MenuInfo> list=new ArrayList<>(4);
private GestureDetector mGestureDetector;
private Rect iconBounds=new Rect();
public SectorButton(Context context){
this(context,null);
}
public SectorButton(Context context,AttributeSet attrs){
super(context,attrs);
TypedArray ta=context.obtainStyledAttributes(attrs,R.styleable.SectorButton);
vibrate=ta.getBoolean(R.styleable.SectorButton_vibrate,true);
icon=ta.getDrawable(R.styleable.SectorButton_icon);
int menu=ta.getResourceId(R.styleable.SectorButton_menu,-1);
if(menu!=-1)
inflaterMenu(menu);
setGravity(ta.getInt(R.styleable.SectorButton_gravity,CENTER));
ta.recycle();
mGestureDetector=new GestureDetector(this);
mGestureDetector.setIsLongpressEnabled(true);
radius=(int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,72,getResources().getDisplayMetrics());
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
{
int width=radius*2;
int height=Math.max(measureDegress(list),radius/3/2)+radius;
setMeasuredDimension(MeasureSpec.makeMeasureSpec(width,MeasureSpec.EXACTLY),MeasureSpec.makeMeasureSpec(height,MeasureSpec.EXACTLY));
iconBounds.left=radius-icon.getIntrinsicWidth()/2;
iconBounds.top=radius-icon.getIntrinsicHeight()/2;
iconBounds.bottom=iconBounds.top+icon.getIntrinsicHeight();
iconBounds.right=iconBounds.left+icon.getIntrinsicWidth();
}
@Override
protected void onDraw(Canvas canvas)
{
//显示图标
if(icon!=null){
icon.setBounds(iconBounds);
icon.draw(canvas);
}
if(isPressed()){
//显示扇形区域
for(int i=0;i<list.size();i++){
MenuInfo info=list.get(i);
if(info.getIcon()==null)continue;
Point point=info.getPoint();
Drawable icon=info.getIcon();
int halfWidth=icon.getIntrinsicWidth()/2,halfHeight=icon.getIntrinsicHeight()/2;
info.getIcon().setBounds(point.x-halfWidth,point.y-halfHeight,point.x+halfWidth,point.y+halfHeight);
info.getIcon().draw(canvas);
}
}
}
public void inflaterMenu(int menuRes){
this.menu=menuRes;
list.clear();
try{
XmlResourceParser xrp=getResources().getXml(menuRes);
int event;
while ((event = xrp.nextToken()) != xrp.END_DOCUMENT)
{
switch(event){
case XmlResourceParser.START_TAG:
if(xrp.getName().equals("item")){
list.add(new MenuInfo(getContext(),xrp));
}
break;
}
}
}
catch (IOException e)
{}
catch (XmlPullParserException e)
{}
measureDegress(list);
invalidate();
}
protected int measureDegress(List<MenuInfo> list){
if(!isShown())return 0;
//计算角度
float swipe=180f/(list.size()-1);
float start=180-swipe/2f;
int height=0;
for(int i=0;i<list.size();i++){
MenuInfo info=list.get(i);
info.setDegress(start,(start+=swipe));
//获取度数
float degress=(info.getEndDegress()-info.getStartDegress())/2+info.getStartDegress();
degress+=90;
while(degress>360)
degress%=360;
//计算坐标
if(iconBounds.width()!=0){
int t;
}
double x=iconBounds.centerX()+Math.sin(degress*Math.PI/180)*(radius/3*2);
double y=iconBounds.centerY()-Math.cos(degress*Math.PI/180)*(radius/3*2);
info.setPoint((int)x,(int)y);
if(i==0)
height=(int) y-iconBounds.centerY();
}
return height;
}
public void setGravity(int gravity){
this.gravity=gravity;
invalidate();
}
@Override
public boolean onDown(MotionEvent p1)
{
if(icon!=null){
//点击图标区域
if(iconBounds.contains((int)p1.getX(),(int)p1.getY()))return true;
}
return false;
}
@Override
public boolean onScroll(MotionEvent p1, MotionEvent p2, float p3, float p4)
{
return false;
}
@Override
public void onShowPress(MotionEvent p1)
{
setPressed(true);
invalidate();
}
@Override
public boolean onSingleTapUp(MotionEvent p1)
{
return true;
}
@Override
public boolean onFling(MotionEvent p1, MotionEvent p2, float p3, float p4)
{
// TODO: Implement this method
return false;
}
@Override
public boolean onTouchEvent(MotionEvent event)
{
boolean flag=mGestureDetector.onTouchEvent(event);
if(event.getAction()==event.ACTION_CANCEL||event.getAction()==event.ACTION_UP){
setPressed(false);
invalidate();
}
return flag;
}
@Override
public void onLongPress(MotionEvent p1)
{
}
public void setIcon(Drawable icon){
this.icon=icon;
invalidate();
}
public boolean isVibrate(){
return vibrate;
}
}
|
[
"dorobonneko@gmail.com"
] |
dorobonneko@gmail.com
|
d0aa6cad656038d7abf8d118276e45a5457a701f
|
83dbd433aeed1f15f6501f39fe152abc0dc803d9
|
/roncoo_study/roncoo_book_shop/shop_db/src/main/java/com/bd/roncoo/book/shop/db/repository/support/AbstractConditionBuilder.java
|
aa288ba1d194807b309ece75cf7e7b5390478fcc
|
[] |
no_license
|
pylrichard/web_service_study
|
d0d42ea0c511b9b15a235a99cde5b4b025c33c6d
|
c1bd8753c6aee69c87707db7f3fb8e0d7f5ddbc0
|
refs/heads/master
| 2021-09-14T23:31:12.454640
| 2018-05-22T06:26:14
| 2018-05-22T06:26:14
| 104,879,563
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,965
|
java
|
package com.bd.roncoo.book.shop.db.repository.support;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.joda.time.DateTime;
import javax.persistence.criteria.Path;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import java.util.Collection;
import java.util.Date;
public abstract class AbstractConditionBuilder<T> {
/**
* 添加in条件
*/
protected void addInConditionToColumn(QueryWrapper<T> queryWrapper, String column, Object values) {
if (needAddCondition(values)) {
Path<?> fieldPath = getPath(queryWrapper.getRoot(), column);
if (values.getClass().isArray()) {
queryWrapper.addPredicate(fieldPath.in((Object[]) values));
} else if (values instanceof Collection) {
queryWrapper.addPredicate(fieldPath.in((Collection<?>) values));
}
}
}
/**
* 添加between条件查询
*
* @param minValue 范围下限
* @param maxValue 范围上限
*/
@SuppressWarnings({"rawtypes", "unchecked"})
protected void addBetweenConditionToColumn(QueryWrapper<T> queryWrapper, String column, Comparable minValue,
Comparable maxValue) {
if (minValue != null || maxValue != null) {
Path<? extends Comparable> fieldPath = getPath(queryWrapper.getRoot(), column);
if (minValue != null && maxValue != null) {
queryWrapper.addPredicate(queryWrapper.getCb().between(fieldPath, minValue, processMaxValueOnDate(maxValue)));
} else if (minValue != null) {
queryWrapper.addPredicate(queryWrapper.getCb().greaterThanOrEqualTo(fieldPath, minValue));
} else if (maxValue != null) {
queryWrapper.addPredicate(queryWrapper.getCb().lessThanOrEqualTo(fieldPath, processMaxValueOnDate(maxValue)));
}
}
}
/**
* 当范围查询的条件是小于,并且值的类型是Date时,将传入的Date值设为当天24点
* 比如用户在页面上指定查询5月1号到5月10号的数据,默认范围为5月1号0点到5月10号0点
* 实际范围需要为5月1号0点到5月10号24点
*/
@SuppressWarnings("rawtypes")
private Comparable processMaxValueOnDate(Comparable maxValue) {
if (maxValue instanceof Date) {
maxValue = new DateTime(maxValue).withTimeAtStartOfDay().plusDays(1).plusSeconds(-1).toDate();
}
return maxValue;
}
/**
* 添加大于条件查询
*/
@SuppressWarnings({"rawtypes", "unchecked"})
protected void addGreaterThanConditionToColumn(QueryWrapper<T> queryWrapper, String column, Comparable minValue) {
if (minValue != null) {
Path<? extends Comparable> fieldPath = getPath(queryWrapper.getRoot(), column);
queryWrapper.addPredicate(queryWrapper.getCb().greaterThan(fieldPath, minValue));
}
}
/**
* 添加大于等于条件查询
*/
@SuppressWarnings({"rawtypes", "unchecked"})
protected void addGreaterThanOrEqualConditionToColumn(QueryWrapper<T> queryWrapper, String column,
Comparable minValue) {
if (minValue != null) {
Path<? extends Comparable> fieldPath = getPath(queryWrapper.getRoot(), column);
queryWrapper.addPredicate(queryWrapper.getCb().greaterThanOrEqualTo(fieldPath, minValue));
}
}
/**
* 添加小于条件查询
*/
@SuppressWarnings({"unchecked", "rawtypes"})
protected void addLessThanConditionToColumn(QueryWrapper<T> queryWrapper, String column, Comparable maxValue) {
if (maxValue != null) {
Path<? extends Comparable> fieldPath = getPath(queryWrapper.getRoot(), column);
queryWrapper.addPredicate(queryWrapper.getCb().lessThan(fieldPath, processMaxValueOnDate(maxValue)));
}
}
/**
* 添加小于等于条件查询
*/
@SuppressWarnings({"unchecked", "rawtypes"})
protected void addLessThanOrEqualConditionToColumn(QueryWrapper<T> queryWrapper, String column, Comparable maxValue) {
if (maxValue != null) {
Path<? extends Comparable> fieldPath = getPath(queryWrapper.getRoot(), column);
queryWrapper.addPredicate(queryWrapper.getCb().lessThanOrEqualTo(fieldPath, processMaxValueOnDate(maxValue)));
}
}
/**
* 添加like条件
*/
protected void addLikeConditionToColumn(QueryWrapper<T> queryWrapper, String column, String value) {
if (StringUtils.isNotBlank(value)) {
queryWrapper.addPredicate(createLikeCondition(queryWrapper, column, value));
}
}
@SuppressWarnings("unchecked")
protected Predicate createLikeCondition(QueryWrapper<T> queryWrapper, String column, String value) {
Path<String> fieldPath = getPath(queryWrapper.getRoot(), column);
Predicate condition = queryWrapper.getCb().like(fieldPath, "%" + value + "%");
return condition;
}
@SuppressWarnings("unchecked")
protected void addStartsWidthConditionToColumn(QueryWrapper<T> queryWrapper, String column, String value) {
if (StringUtils.isNotBlank(value)) {
Path<String> fieldPath = getPath(queryWrapper.getRoot(), column);
queryWrapper.addPredicate(queryWrapper.getCb().like(fieldPath, value + "%"));
}
}
/**
* 查询条件值不是用户在页面中输入,再从Web层传入时使用
* 在where语句中添加查询条件值
* 如查询结果默认显示没有借出的图书
* addEqualsConditionToColumn(queryWrapper, "enable", true)
* <p>
* 添加等于条件
*
* @param column 指出要向哪个字段添加条件
* @param value 指定字段的值
*/
protected void addEqualsConditionToColumn(QueryWrapper<T> queryWrapper, String column, Object value) {
if (needAddCondition(value)) {
Path<?> fieldPath = getPath(queryWrapper.getRoot(), column);
queryWrapper.addPredicate(queryWrapper.getCb().equal(fieldPath, value));
}
}
/**
* 添加不等于条件
*
* @param column 指出要向哪个字段添加条件
* @param value 指定字段的值
*/
protected void addNotEqualsConditionToColumn(QueryWrapper<T> queryWrapper, String column, Object value) {
if (needAddCondition(value)) {
Path<?> fieldPath = getPath(queryWrapper.getRoot(), column);
queryWrapper.addPredicate(queryWrapper.getCb().notEqual(fieldPath, value));
}
}
@SuppressWarnings("rawtypes")
protected Path getPath(Root root, String property) {
String[] names = StringUtils.split(property, ".");
Path path = root.get(names[0]);
for (int i = 1; i < names.length; i++) {
path = path.get(names[i]);
}
return path;
}
/**
* 判断是否需要添加where条件
*/
@SuppressWarnings("rawtypes")
protected boolean needAddCondition(Object value) {
boolean addCondition = false;
if (value != null) {
if (value instanceof String) {
if (StringUtils.isNotBlank(value.toString())) {
addCondition = true;
}
} else if (value.getClass().isArray()) {
if (ArrayUtils.isNotEmpty((Object[]) value)) {
addCondition = true;
}
} else if (value instanceof Collection) {
if (CollectionUtils.isNotEmpty((Collection) value)) {
addCondition = true;
}
} else {
addCondition = true;
}
}
return addCondition;
}
}
|
[
"pylrichard@qq.com"
] |
pylrichard@qq.com
|
d56239e6f9f69b499c3de1ec437a2c1f44dfd824
|
671daf60cdb46250214da19132bb7f21dbc29612
|
/android-transport/src/com/android/tools/idea/transport/TransportBytesPreprocessor.java
|
2aba609f8a5c56c22294c9a410cba1ffb9c86eac
|
[
"Apache-2.0"
] |
permissive
|
JetBrains/android
|
3732f6fe3ae742182c2684a13ea8a1e6a996c9a1
|
9aa80ad909cf4b993389510e2c1efb09b8cdb5a0
|
refs/heads/master
| 2023-09-01T14:11:56.555718
| 2023-08-31T16:50:03
| 2023-08-31T16:53:27
| 60,701,247
| 947
| 255
|
Apache-2.0
| 2023-09-05T12:44:24
| 2016-06-08T13:46:48
|
Kotlin
|
UTF-8
|
Java
| false
| false
| 1,483
|
java
|
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.tools.idea.transport;
import com.android.tools.idea.protobuf.ByteString;
import com.android.tools.profiler.proto.Transport;
import org.jetbrains.annotations.NotNull;
/**
* Interface for preprocessing transport data before it is inserted into the database.
* <p>
* For instance, simple perf data is preprocessed from the simpleperf format to a symbolized format.
*/
public interface TransportBytesPreprocessor {
/**
* @return True if the data should be preprocessed by this preprocessor.
*/
boolean shouldPreprocess(Transport.BytesRequest request);
/**
* Preprocess data before returning to the datastore. Only applies if {@link #shouldPreprocess(Transport.BytesRequest)} returns true.
*
* @return new data generated by the preprocessor.
*/
@NotNull
ByteString preprocessBytes(String id, ByteString event);
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
065eeca408919bf459b94e3addefc77b32ebdf4c
|
c826a87ed9a41f340687394e323c8844698f3183
|
/src/test/java/com/simiacryptus/mindseye/opt/orient/QQNTest.java
|
ae893f0912dbdbef0b936503d6a437d7264fdf4a
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
SimiaCryptus/mindseye-research
|
08b30ff4ffdbee033616dfefcfe9ca8cc89bdc55
|
fecb524e7ffdf35794530c92e94b21d7ec4dc3b9
|
refs/heads/master
| 2022-02-23T17:20:57.096420
| 2020-12-28T05:41:15
| 2020-12-28T05:41:15
| 160,086,989
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,350
|
java
|
/*
* Copyright (c) 2019 by Andrew Charneski.
*
* The author licenses this file to you under the
* Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance
* with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.simiacryptus.mindseye.opt.orient;
import com.simiacryptus.lang.UncheckedSupplier;
import com.simiacryptus.mindseye.eval.ArrayTrainable;
import com.simiacryptus.mindseye.eval.SampledArrayTrainable;
import com.simiacryptus.mindseye.lang.Layer;
import com.simiacryptus.mindseye.lang.Tensor;
import com.simiacryptus.mindseye.layers.java.EntropyLossLayer;
import com.simiacryptus.mindseye.network.SimpleLossNetwork;
import com.simiacryptus.mindseye.opt.MnistTestBase;
import com.simiacryptus.mindseye.opt.TrainingMonitor;
import com.simiacryptus.mindseye.opt.ValidatingTrainer;
import com.simiacryptus.notebook.NotebookOutput;
import com.simiacryptus.ref.lang.RefUtil;
import com.simiacryptus.ref.wrappers.RefList;
import javax.annotation.Nonnull;
import java.util.concurrent.TimeUnit;
public class QQNTest extends MnistTestBase {
@Nonnull
@Override
protected Class<?> getTargetClass() {
return QQN.class;
}
@Override
public void train(@Nonnull final NotebookOutput log, @Nonnull final Layer network,
@Nonnull final Tensor[][] trainingData, final TrainingMonitor monitor) {
log.eval(RefUtil
.wrapInterface((UncheckedSupplier<Double>) () -> {
@Nonnull final SimpleLossNetwork supervisedNetwork = new SimpleLossNetwork(network.addRef(),
new EntropyLossLayer());
ValidatingTrainer temp_45_0002 = new ValidatingTrainer(
new SampledArrayTrainable(RefUtil.addRef(trainingData),
supervisedNetwork, 1000, 10000),
new ArrayTrainable(RefUtil.addRef(trainingData),
supervisedNetwork.addRef()));
//return new IterativeTrainer(new SampledArrayTrainable(trainingData, supervisedNetwork, 10000))
temp_45_0002.setMonitor(monitor);
@Nonnull
ValidatingTrainer trainer = temp_45_0002.addRef();
temp_45_0002.freeRef();
RefList<ValidatingTrainer.TrainingPhase> temp_45_0003 = trainer
.getRegimen();
ValidatingTrainer.TrainingPhase temp_45_0004 = temp_45_0003.get(0);
temp_45_0004.setOrientation(new QQN());
temp_45_0004.freeRef();
temp_45_0003.freeRef();
trainer.setTimeout(5, TimeUnit.MINUTES);
ValidatingTrainer temp_45_0005 = trainer.addRef();
temp_45_0005.setMaxIterations(500);
ValidatingTrainer temp_45_0006 = temp_45_0005.addRef();
double temp_45_0001 = temp_45_0006.run();
temp_45_0006.freeRef();
temp_45_0005.freeRef();
trainer.freeRef();
return temp_45_0001;
}, RefUtil.addRef(trainingData), network));
RefUtil.freeRef(trainingData);
}
}
|
[
"acharneski@gmail.com"
] |
acharneski@gmail.com
|
3ab3e75e107bd27cefcf301328d02ce02aa85d2d
|
66c766517e47b855af27641ed1334e1e3576922b
|
/car-server/web/CarEyeServer/src/com/careye/utils/ImageSizer.java
|
5d287a1b3af013606ec8c4885597ab10f876dc15
|
[] |
no_license
|
vincenlee/Car-eye-server
|
21a6c2eda0fd3f096c842fdae6eea4c5af84d22e
|
47f45a0596fddf65cda6fb7cf657aa716244e5b5
|
refs/heads/master
| 2022-05-04T22:09:50.411646
| 2018-09-28T08:03:03
| 2018-09-28T08:03:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,029
|
java
|
/**
* Description: car-eye车辆管理平台
* 文件名:ImageSizer.java
* 版本信息:1.0
* 日期:2013-9-4
* Copyright car-eye车辆管理平台 Copyright (c) 2013
* 版权所有
*/
package com.careye.utils;
/**
* @car-eye车辆管理平台业务处理
* @类名称:ImageSizer
* @类描述:
* @创建人:liliang
* @创建时间:2013-9-4 上午09:29:44
* @修改人:liliang
* @修改时间:2013-9-4 上午09:29:44
* @修改备注:
* @version 1.0
*/
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.MediaTracker;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.awt.image.ConvolveOp;
import java.awt.image.Kernel;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGEncodeParam;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
/**
* 图像压缩工具
*
*/
public class ImageSizer {
public static final MediaTracker tracker = new MediaTracker(new Component() {
private static final long serialVersionUID = 1234162663955668507L;}
);
/**
* @param originalFile 原图像
* @param resizedFile 压缩后的图像
* @param width 图像宽
* @param format 图片格式 jpg, png, gif(非动画)
* @throws IOException
*/
public static void resize(File originalFile, File resizedFile, int width, String format) throws IOException {
if(format!=null && "gif".equals(format.toLowerCase())){
resize(originalFile, resizedFile, width, 1);
return;
}
FileInputStream fis = new FileInputStream(originalFile);
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
int readLength = -1;
int bufferSize = 1024;
byte bytes[] = new byte[bufferSize];
while ((readLength = fis.read(bytes, 0, bufferSize)) != -1) {
byteStream.write(bytes, 0, readLength);
}
byte[] in = byteStream.toByteArray();
fis.close();
byteStream.close();
Image inputImage = Toolkit.getDefaultToolkit().createImage( in );
waitForImage( inputImage );
int imageWidth = inputImage.getWidth( null );
if ( imageWidth < 1 )
throw new IllegalArgumentException( "image width " + imageWidth + " is out of range" );
int imageHeight = inputImage.getHeight( null );
if ( imageHeight < 1 )
throw new IllegalArgumentException( "image height " + imageHeight + " is out of range" );
// Create output image.
int height = -1;
double scaleW = (double) imageWidth / (double) width;
double scaleY = (double) imageHeight / (double) height;
if (scaleW >= 0 && scaleY >=0) {
if (scaleW > scaleY) {
height = -1;
} else {
width = -1;
}
}
Image outputImage = inputImage.getScaledInstance( width, height, java.awt.Image.SCALE_DEFAULT);
checkImage( outputImage );
encode(new FileOutputStream(resizedFile), outputImage, format);
}
/** Checks the given image for valid width and height. */
private static void checkImage( Image image ) {
waitForImage( image );
int imageWidth = image.getWidth( null );
if ( imageWidth < 1 )
throw new IllegalArgumentException( "image width " + imageWidth + " is out of range" );
int imageHeight = image.getHeight( null );
if ( imageHeight < 1 )
throw new IllegalArgumentException( "image height " + imageHeight + " is out of range" );
}
/** Waits for given image to load. Use before querying image height/width/colors. */
private static void waitForImage( Image image ) {
try {
tracker.addImage( image, 0 );
tracker.waitForID( 0 );
tracker.removeImage(image, 0);
} catch( InterruptedException e ) { e.printStackTrace(); }
}
/** Encodes the given image at the given quality to the output stream. */
private static void encode( OutputStream outputStream, Image outputImage, String format )
throws java.io.IOException {
int outputWidth = outputImage.getWidth( null );
if ( outputWidth < 1 )
throw new IllegalArgumentException( "output image width " + outputWidth + " is out of range" );
int outputHeight = outputImage.getHeight( null );
if ( outputHeight < 1 )
throw new IllegalArgumentException( "output image height " + outputHeight + " is out of range" );
// Get a buffered image from the image.
BufferedImage bi = new BufferedImage( outputWidth, outputHeight,
BufferedImage.TYPE_INT_RGB );
Graphics2D biContext = bi.createGraphics();
biContext.drawImage( outputImage, 0, 0, null );
ImageIO.write(bi, format, outputStream);
outputStream.flush();
outputStream.close();
}
/**
* 缩放gif图片
* @param originalFile 原图片
* @param resizedFile 缩放后的图片
* @param newWidth 宽度
* @param quality 缩放比例 (等比例)
* @throws IOException
*/
private static void resize(File originalFile, File resizedFile, int newWidth, float quality) throws IOException {
if (quality < 0 || quality > 1) {
throw new IllegalArgumentException("Quality has to be between 0 and 1");
}
ImageIcon ii = new ImageIcon(originalFile.getCanonicalPath());
Image i = ii.getImage();
Image resizedImage = null;
int iWidth = i.getWidth(null);
int iHeight = i.getHeight(null);
if (iWidth > iHeight) {
resizedImage = i.getScaledInstance(newWidth, (newWidth * iHeight) / iWidth, Image.SCALE_SMOOTH);
} else {
resizedImage = i.getScaledInstance((newWidth * iWidth) / iHeight, newWidth, Image.SCALE_SMOOTH);
}
// This code ensures that all the pixels in the image are loaded.
Image temp = new ImageIcon(resizedImage).getImage();
// Create the buffered image.
BufferedImage bufferedImage = new BufferedImage(temp.getWidth(null), temp.getHeight(null),
BufferedImage.TYPE_INT_RGB);
// Copy image to buffered image.
Graphics g = bufferedImage.createGraphics();
// Clear background and paint the image.
g.setColor(Color.white);
g.fillRect(0, 0, temp.getWidth(null), temp.getHeight(null));
g.drawImage(temp, 0, 0, null);
g.dispose();
// Soften.
float softenFactor = 0.05f;
float[] softenArray = {0, softenFactor, 0, softenFactor, 1-(softenFactor*4), softenFactor, 0, softenFactor, 0};
Kernel kernel = new Kernel(3, 3, softenArray);
ConvolveOp cOp = new ConvolveOp(kernel, ConvolveOp.EDGE_NO_OP, null);
bufferedImage = cOp.filter(bufferedImage, null);
// Write the jpeg to a file.
FileOutputStream out = new FileOutputStream(resizedFile);
// Encodes image as a JPEG data stream
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bufferedImage);
param.setQuality(quality, true);
encoder.setJPEGEncodeParam(param);
encoder.encode(bufferedImage);
}
public static void main(String[] args) throws IOException {
// ImageSizer.resize(new File("D:\\壁纸\\add.png"), new File("D:\\壁纸\\resized22.jpg"), 100, 0.85f);
ImageSizer.resize(new File("D:\\壁纸\\1.jpg"), new File("D:\\壁纸\\resized9.jpg"), 550, "jpg");
}
}
|
[
"dengtieshan@shenghong-technology.com"
] |
dengtieshan@shenghong-technology.com
|
47e41f5ddcad3c047fc5396c73e1ac78d6bab047
|
0cf17f9a64755c5533437a69d29ab295467b9d83
|
/app/src/main/java/com/mdb/example/administrator/wode/order/OrdersActivity.java
|
f16897fd1bc44ddb765db51cdffe6cae0f894ce5
|
[] |
no_license
|
as425017946/shangjiaxiche
|
57fa38c5f23a7c3580639f41e07e8d5567a9cc3c
|
7b2b05c49803f1e7fa9eaed3fe9bd196bd261aa0
|
refs/heads/master
| 2020-04-26T01:54:30.726630
| 2019-03-01T02:09:55
| 2019-03-01T02:09:55
| 173,218,756
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,658
|
java
|
package com.mdb.example.administrator.wode.order;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.util.TypedValue;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.mdb.example.administrator.BaseActivity;
import com.mdb.example.administrator.R;
import com.mdb.example.administrator.adapter.OrderFragmentAdapter;
import java.lang.reflect.Field;
import java.util.ArrayList;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* 我的订单
*/
public class OrdersActivity extends BaseActivity {
@BindView(R.id.tab_layout)
TabLayout mTabLayout;
@BindView(R.id.viewpager)
ViewPager mViewpager;
private ArrayList<Fragment> mFragments = new ArrayList<>();
private ArrayList<String> list = new ArrayList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_orders);
ButterKnife.bind(this);
initData();
setTtitle();
fanhui();
if (getIntent().getStringExtra("orderzhi").equals("1")){
mTabLayout.getTabAt(0).select();
}else if (getIntent().getStringExtra("orderzhi").equals("2")){
mTabLayout.getTabAt(1).select();
}else if (getIntent().getStringExtra("orderzhi").equals("3")){
mTabLayout.getTabAt(2).select();
}else if (getIntent().getStringExtra("orderzhi").equals("4")){
mTabLayout.getTabAt(3).select();
}
}
/**
* 写入title名字
*/
@BindView(R.id.xiche_title)
TextView ttitle;
@BindView(R.id.xiche_quxiao_title)
TextView ttitle2;
private void setTtitle(){
ttitle.setText("我的订单");
}
/**
* 返回
*/
@BindView(R.id.xiche_fanhui)
LinearLayout lfanhui;
@BindView(R.id.xiche_imgfanhui)
ImageView img;
private void fanhui(){
lfanhui.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
OrdersActivity.this.finish();
}
});
}
private void initData(){
//设置投资页面的里面的6个fragment页面
OrderAllFragment allFragment = new OrderAllFragment();
OrderDaifuwuFragment daifuwuFragment = new OrderDaifuwuFragment();
OrderYiwanchengFragment yiwanchengFragment = new OrderYiwanchengFragment();
OrderYiquxiaoFragment yiquxiaoFragment = new OrderYiquxiaoFragment();
mFragments.add(allFragment);
mFragments.add(daifuwuFragment);
mFragments.add(yiwanchengFragment);
mFragments.add(yiquxiaoFragment);
list.add("全部");
list.add("待服务");
list.add("已服务");
list.add("已取消");
mTabLayout.setupWithViewPager(mViewpager);
mViewpager.setAdapter(new OrderFragmentAdapter(getSupportFragmentManager(),mFragments,list));
mTabLayout.post(new Runnable() {
@Override
public void run() {
setIndicator(mTabLayout, 10, 10);
}
});
}
public static void setIndicator(TabLayout tabs, int leftDip, int rightDip) {
Class<?> tabLayout = tabs.getClass();
Field tabStrip = null;
try {
tabStrip = tabLayout.getDeclaredField("mTabStrip");
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
tabStrip.setAccessible(true);
LinearLayout llTab = null;
try {
llTab = (LinearLayout) tabStrip.get(tabs);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
int left = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, leftDip, Resources.getSystem().getDisplayMetrics());
int right = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, rightDip, Resources.getSystem().getDisplayMetrics());
for (int i = 0; i < llTab.getChildCount(); i++) {
View child = llTab.getChildAt(i);
child.setPadding(0, 0, 0, 0);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1);
params.leftMargin = left;
params.rightMargin = right;
child.setLayoutParams(params);
child.invalidate();
}
}
}
|
[
"123@qq.com"
] |
123@qq.com
|
47f9eeea6cfa898cabbc18211a7d0972f7efe3db
|
8aa022979ba4709b375b7d7445bae1226df0e0ba
|
/java/leetcode/solution752.java
|
0da8b9acdaa314c165999466bd78aa90a3a014e6
|
[] |
no_license
|
ellenbboe/sosoalgorithm
|
3290c26ebed1297855aabcb24640542dc0aa24a6
|
c04701794ae28ade5a7de08163265e34f40db71c
|
refs/heads/master
| 2022-02-22T03:45:31.489254
| 2019-08-21T09:23:03
| 2019-08-21T09:23:03
| 113,635,533
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,594
|
java
|
import java.util.*;
public class solution752 {
public int openLock(String[] deadends, String target) {
HashSet<String> dead = new HashSet<>(Arrays.asList(deadends));
Set<String> visited = new HashSet<>();
String start = "0000";
Queue<String> queue1 = new LinkedList<>();
Queue<String> queue2 = new LinkedList<>();
queue1.offer(start);
int step = 0;
if(dead.contains(target)||dead.contains("0000"))
return -1;
while(!queue1.isEmpty()){
String cur = queue1.poll();
if(target.equals(cur))
{
return step;
}
List<String> nexts = getNexts(cur);
for(String s:nexts)
{
if (!dead.contains(s)&&!visited.contains(s))
{
visited.add(s);
queue2.offer(s);
}
}
if(queue1.isEmpty())
{
queue1=queue2;
queue2 = new LinkedList<>();
step++;
}
}
return -1;
}
private List<String> getNexts(String cur) {
List<String> list = new ArrayList<>();
for(int i=0;i<4;i++)
{
StringBuilder curSb = new StringBuilder(cur);
curSb.setCharAt(i,cur.charAt(i)==0?9:(char)(cur.charAt(i)-1));
list.add(curSb.toString());
curSb.setCharAt(i,cur.charAt(i)==9?0:(char)(cur.charAt(i)+1));
list.add(curSb.toString());
}
return list;
}
}
|
[
"1194261806@qq.com"
] |
1194261806@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.