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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b48261c2f106fea8cf311fcb9584d010b0d6a108 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/5/5_9e6cee7b211ae00c6e876ac73ab417d1990a9ca6/ModelRenderer/5_9e6cee7b211ae00c6e876ac73ab417d1990a9ca6_ModelRenderer_t.java | 63532089c2610260bb3045404514c0497ecdb766 | [] | 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,171 | java | /**
* Project Wonderland
*
* Copyright (c) 2004-2009, Sun Microsystems, Inc., All Rights Reserved
*
* Redistributions in source code form must reproduce the above
* copyright and this condition.
*
* The contents of this file are subject to the GNU General Public
* License, Version 2 (the "License"); you may not use this file
* except in compliance with the License. A copy of the License is
* available at http://www.opensource.org/licenses/gpl-license.php.
*
* Sun designates this particular file as subject to the "Classpath"
* exception as provided by Sun in the License file that accompanied
* this code.
*/
package org.jdesktop.wonderland.client.jme.cellrenderer;
import com.jme.math.Quaternion;
import com.jme.math.Vector3f;
import com.jme.scene.Geometry;
import com.jme.scene.Node;
import com.jme.scene.Spatial;
import com.jme.scene.state.RenderState;
import com.jme.scene.state.TextureState;
import java.net.URL;
import java.util.Map;
import org.jdesktop.mtgame.Entity;
import org.jdesktop.mtgame.RenderComponent;
import org.jdesktop.mtgame.RenderUpdater;
import org.jdesktop.wonderland.client.cell.Cell;
import org.jdesktop.wonderland.client.cell.ModelCellComponent;
import org.jdesktop.wonderland.client.jme.ClientContextJME;
import org.jdesktop.wonderland.client.jme.artimport.DeployedModel;
import org.jdesktop.wonderland.client.jme.artimport.LoaderManager;
import org.jdesktop.wonderland.client.jme.artimport.ModelLoader;
import org.jdesktop.wonderland.client.jme.utils.traverser.ProcessNodeInterface;
import org.jdesktop.wonderland.client.jme.utils.traverser.TreeScan;
/**
*
* @author paulby
*/
public class ModelRenderer extends BasicRenderer {
private URL deployedModelURL;
private Vector3f modelTranslation = null;
private Quaternion modelRotation = null;
private Vector3f modelScale = null;
private ModelCellComponent modelComponent = null;
private DeployedModel deployedModel = null;
public ModelRenderer(Cell cell, URL deployedModelURL) {
this(cell, deployedModelURL, null, null, null, null);
}
public ModelRenderer(Cell cell, ModelCellComponent modelComponent) {
super(cell);
this.modelComponent = modelComponent;
}
public ModelRenderer(Cell cell, DeployedModel deployedModel) {
super(cell);
this.deployedModel = deployedModel;
}
public ModelRenderer(Cell cell,
URL deployedModelURL,
Vector3f modelTranslation,
Quaternion modelRotation,
Vector3f modelScale,
Map<String, Object> properties) {
super(cell);
this.deployedModelURL = deployedModelURL;
this.modelTranslation = modelTranslation;
this.modelRotation = modelRotation;
this.modelScale = modelScale;
}
@Override
protected Node createSceneGraph(Entity entity) {
if (modelComponent!=null) {
return modelComponent.loadModel(entity);
}
if (deployedModel!=null) {
ModelLoader loader = deployedModel.getModelLoader();
if (loader==null) {
logger.warning("No loader for model "+deployedModel.getModelURL());
return new Node("No Loader");
}
Node ret = loader.loadDeployedModel(deployedModel, entity);
return ret;
}
ModelLoader loader = LoaderManager.getLoaderManager().getLoader(deployedModelURL);
if (loader==null) {
logger.warning("No loader for model "+deployedModel.getModelURL());
return new Node("No Loader");
}
deployedModel = new DeployedModel(deployedModelURL, loader);
deployedModel.setModelTranslation(modelTranslation);
deployedModel.setModelRotation(modelRotation);
deployedModel.setModelScale(modelScale);
return loader.loadDeployedModel(deployedModel, entity);
}
@Override
protected void cleanupSceneGraph(Entity entity) {
RenderComponent rc = entity.getComponent(RenderComponent.class);
if (rc!=null) {
ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {
public void update(Object arg0) {
TreeScan.findNode((Spatial) arg0, new ProcessNodeInterface() {
public boolean processNode(Spatial node) {
if (node instanceof Geometry) {
((Geometry)node).clearBuffers();
TextureState ts = (TextureState) node.getRenderState(RenderState.RS_TEXTURE);
// deleteAll is too aggressive, it deletes other copies of the same texture
// if (ts!=null)
// ts.deleteAll(false);
}
return true;
}
});
}
}, rc.getSceneRoot());
}
deployedModel = null;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
90ccdb87afc5a5436a4593f933031f6729185c44 | 0d26d715a0e66246d9a88d1ca77637c208089ec4 | /fxadmin/src/main/java/com/ylxx/fx/service/po/jsh/ForfxsaInfoin.java | b27c109cbdd8e15c6d0667cd74e07d9c18d37784 | [] | no_license | lkp7321/sour | ff997625c920ddbc8f8bd05307184afc748c22b7 | 06ac40e140bad1dc1e7b3590ce099bc02ae065f2 | refs/heads/master | 2021-04-12T12:18:22.408705 | 2018-04-26T06:22:26 | 2018-04-26T06:22:26 | 126,673,285 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,459 | java | package com.ylxx.fx.service.po.jsh;
/**
* 冲销参数
* @author lz130
*
*/
public class ForfxsaInfoin {
/* private String ctof;//资金去向类型
toac //资金去向卡号
common_user_code //用户名
password //密码
common_org_code //12位外管局机构号
msgno //交易流水
idtype_code //证件类型
idcode //证件号
ctycode //国别
bank_self_num //银行自身流水号
//log.info("补充证件号码:")
biz_tx_chnl_code //业务办理渠道代码
//log.info("业务类型代码:" + "01")
fcy_remit_amt//汇出资金(包括外汇票据)金额
person_name //姓名
purfx_acct_cny //购汇人民币账户
purfx_type_code//购汇资金属性代码
remark //备注
tchk_amt //旅行支票金额
txccy //币种
purfx_amt //购汇金额
purfx_cash_amt //购汇提钞金额
fcy_acct_amt //存入个人外汇账户金额
lcy_acct_no//个人外汇账户账号
*/
private String COMMON_ORG_CODE; //12位外管局机构号
private String COMMON_USER_CODE;//外管局柜员号
private String PASSWORD;//外管局柜员密码
private String MSGNO;//外管局交易流水号
private String REFNO;//业务参号
private String BANK_SELF_NUM; //银行自身流水号
private String CANCEL_REASON; //撤销原因
private String CANCEL_REMARK; //撤销说明
public String getCOMMON_ORG_CODE() {
return COMMON_ORG_CODE;
}
public void setCOMMON_ORG_CODE(String cOMMON_ORG_CODE) {
COMMON_ORG_CODE = cOMMON_ORG_CODE;
}
public String getCOMMON_USER_CODE() {
return COMMON_USER_CODE;
}
public void setCOMMON_USER_CODE(String cOMMON_USER_CODE) {
COMMON_USER_CODE = cOMMON_USER_CODE;
}
public String getPASSWORD() {
return PASSWORD;
}
public void setPASSWORD(String pASSWORD) {
PASSWORD = pASSWORD;
}
public String getMSGNO() {
return MSGNO;
}
public void setMSGNO(String mSGNO) {
MSGNO = mSGNO;
}
public String getREFNO() {
return REFNO;
}
public void setREFNO(String rEFNO) {
REFNO = rEFNO;
}
public String getBANK_SELF_NUM() {
return BANK_SELF_NUM;
}
public void setBANK_SELF_NUM(String bANK_SELF_NUM) {
BANK_SELF_NUM = bANK_SELF_NUM;
}
public String getCANCEL_REASON() {
return CANCEL_REASON;
}
public void setCANCEL_REASON(String cANCEL_REASON) {
CANCEL_REASON = cANCEL_REASON;
}
public String getCANCEL_REMARK() {
return CANCEL_REMARK;
}
public void setCANCEL_REMARK(String cANCEL_REMARK) {
CANCEL_REMARK = cANCEL_REMARK;
}
}
| [
"lz13037330@163.com"
] | lz13037330@163.com |
786afe390761d3078f65f7ae7b9ce0961baee076 | dfa945d8bfa2d4e2b8006a2cfffdf4ec7217cee7 | /telegram-src/ui/Components/PickerBottomLayout.java | 98daad6425d2a9bf782ebe46c00412ef7372ae44 | [] | no_license | ondfly/cmp_eitaa_telegram | fd0b258fec8318bd5380baba4708882014c70dc1 | 79a1473e04f5fe57fe05570117dfda9a3e8c755d | refs/heads/master | 2020-03-14T13:03:57.239807 | 2018-04-30T17:18:47 | 2018-05-01T17:16:21 | 131,624,694 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,040 | java | package org.telegram.ui.Components;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.LocaleController;
import org.telegram.ui.ActionBar.Theme;
public class PickerBottomLayout
extends FrameLayout
{
public TextView cancelButton;
public LinearLayout doneButton;
public TextView doneButtonBadgeTextView;
public TextView doneButtonTextView;
private boolean isDarkTheme;
public PickerBottomLayout(Context paramContext)
{
this(paramContext, true);
}
public PickerBottomLayout(Context paramContext, boolean paramBoolean)
{
super(paramContext);
this.isDarkTheme = paramBoolean;
Object localObject;
if (this.isDarkTheme)
{
i = -15066598;
setBackgroundColor(i);
this.cancelButton = new TextView(paramContext);
this.cancelButton.setTextSize(1, 14.0F);
localObject = this.cancelButton;
if (!this.isDarkTheme) {
break label524;
}
i = -1;
label65:
((TextView)localObject).setTextColor(i);
this.cancelButton.setGravity(17);
localObject = this.cancelButton;
if (!this.isDarkTheme) {
break label533;
}
i = -12763843;
label96:
((TextView)localObject).setBackgroundDrawable(Theme.createSelectorDrawable(i, 0));
this.cancelButton.setPadding(AndroidUtilities.dp(29.0F), 0, AndroidUtilities.dp(29.0F), 0);
this.cancelButton.setText(LocaleController.getString("Cancel", 2131493127).toUpperCase());
this.cancelButton.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
addView(this.cancelButton, LayoutHelper.createFrame(-2, -1, 51));
this.doneButton = new LinearLayout(paramContext);
this.doneButton.setOrientation(0);
localObject = this.doneButton;
if (!this.isDarkTheme) {
break label539;
}
i = -12763843;
label206:
((LinearLayout)localObject).setBackgroundDrawable(Theme.createSelectorDrawable(i, 0));
this.doneButton.setPadding(AndroidUtilities.dp(29.0F), 0, AndroidUtilities.dp(29.0F), 0);
addView(this.doneButton, LayoutHelper.createFrame(-2, -1, 53));
this.doneButtonBadgeTextView = new TextView(paramContext);
this.doneButtonBadgeTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
this.doneButtonBadgeTextView.setTextSize(1, 13.0F);
localObject = this.doneButtonBadgeTextView;
if (!this.isDarkTheme) {
break label545;
}
i = -1;
label300:
((TextView)localObject).setTextColor(i);
this.doneButtonBadgeTextView.setGravity(17);
if (!this.isDarkTheme) {
break label554;
}
localObject = Theme.createRoundRectDrawable(AndroidUtilities.dp(11.0F), -10043398);
label334:
this.doneButtonBadgeTextView.setBackgroundDrawable((Drawable)localObject);
this.doneButtonBadgeTextView.setMinWidth(AndroidUtilities.dp(23.0F));
this.doneButtonBadgeTextView.setPadding(AndroidUtilities.dp(8.0F), 0, AndroidUtilities.dp(8.0F), AndroidUtilities.dp(1.0F));
this.doneButton.addView(this.doneButtonBadgeTextView, LayoutHelper.createLinear(-2, 23, 16, 0, 0, 10, 0));
this.doneButtonTextView = new TextView(paramContext);
this.doneButtonTextView.setTextSize(1, 14.0F);
paramContext = this.doneButtonTextView;
if (!this.isDarkTheme) {
break label572;
}
}
label524:
label533:
label539:
label545:
label554:
label572:
for (int i = j;; i = Theme.getColor("picker_enabledButton"))
{
paramContext.setTextColor(i);
this.doneButtonTextView.setGravity(17);
this.doneButtonTextView.setCompoundDrawablePadding(AndroidUtilities.dp(8.0F));
this.doneButtonTextView.setText(LocaleController.getString("Send", 2131494331).toUpperCase());
this.doneButtonTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
this.doneButton.addView(this.doneButtonTextView, LayoutHelper.createLinear(-2, -2, 16));
return;
i = Theme.getColor("windowBackgroundWhite");
break;
i = Theme.getColor("picker_enabledButton");
break label65;
i = 788529152;
break label96;
i = 788529152;
break label206;
i = Theme.getColor("picker_badgeText");
break label300;
localObject = Theme.createRoundRectDrawable(AndroidUtilities.dp(11.0F), Theme.getColor("picker_badge"));
break label334;
}
}
public void updateSelectedCount(int paramInt, boolean paramBoolean)
{
int i = -1;
TextView localTextView1 = null;
TextView localTextView2 = null;
Object localObject = null;
if (paramInt == 0)
{
this.doneButtonBadgeTextView.setVisibility(8);
if (paramBoolean)
{
localTextView1 = this.doneButtonTextView;
if (this.isDarkTheme)
{
localTextView1.setTag(localObject);
localObject = this.doneButtonTextView;
if (!this.isDarkTheme) {
break label86;
}
}
label86:
for (paramInt = -6710887;; paramInt = Theme.getColor("picker_disabledButton"))
{
((TextView)localObject).setTextColor(paramInt);
this.doneButton.setEnabled(false);
return;
localObject = "picker_disabledButton";
break;
}
}
localTextView2 = this.doneButtonTextView;
if (this.isDarkTheme)
{
localObject = localTextView1;
localTextView2.setTag(localObject);
localObject = this.doneButtonTextView;
if (!this.isDarkTheme) {
break label148;
}
}
label148:
for (paramInt = -1;; paramInt = Theme.getColor("picker_enabledButton"))
{
((TextView)localObject).setTextColor(paramInt);
return;
localObject = "picker_enabledButton";
break;
}
}
this.doneButtonBadgeTextView.setVisibility(0);
this.doneButtonBadgeTextView.setText(String.format("%d", new Object[] { Integer.valueOf(paramInt) }));
localTextView1 = this.doneButtonTextView;
if (this.isDarkTheme)
{
localObject = localTextView2;
label205:
localTextView1.setTag(localObject);
localObject = this.doneButtonTextView;
if (!this.isDarkTheme) {
break label253;
}
}
label253:
for (paramInt = i;; paramInt = Theme.getColor("picker_enabledButton"))
{
((TextView)localObject).setTextColor(paramInt);
if (!paramBoolean) {
break;
}
this.doneButton.setEnabled(true);
return;
localObject = "picker_enabledButton";
break label205;
}
}
}
/* Location: /test_eitaa/dex2jar/telegram-dex2jar.jar!/org/telegram/ui/Components/PickerBottomLayout.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"ondfly@b00mrang"
] | ondfly@b00mrang |
8fcd87aff0056fcb149cd3a670488b415ddbce18 | 02a108d2eeb1c0245a306ee1d766db7f03e020f0 | /ER_api/src/main/java/com/vizzavi/ecommerce/common/EnvironmentException.java | 99ec0dfeaf255ccecf14b6649fb6869b330c3f2d | [] | no_license | raghera/er-common | fa30398ac6d3589ace42c3834c840879d4a81c99 | 38894e2d5cf765e5c97e8a2fc0e51943520a9a9a | refs/heads/master | 2021-01-13T09:07:08.157301 | 2016-09-27T14:54:57 | 2016-09-27T14:54:57 | 69,253,161 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,093 | java | package com.vizzavi.ecommerce.common;
public class EnvironmentException extends EcommerceRuntimeException {
private static final long serialVersionUID = -1762365784820133107L;
// private final static String VERSION = "$Revision: 1.4 $";
/**
* Default constructor of the ChargingException class.
*/
public EnvironmentException() {
super();
}
/**
* Constructor of the ChargingException class passing the exception message as parameter.<BR>
* @param message java.lang.String. The message to be inserted in the Exception
*/
public EnvironmentException(String message) {
super(message);
}
/**
* Constructor of the ChargingException class passing the exception message and a nested exception object as parameter.<BR>
* @param message java.lang.String. The message to be inserted in the Exception
* @param th java.lang.Throwable. The previously generated exception
*/
public EnvironmentException(String message, Throwable th) {
super(message, th);
}
public EnvironmentException(Throwable th) {
super(th);
}
}
| [
"raghera@hotmail.com"
] | raghera@hotmail.com |
d3cd4cd6b35377a838edb53fa53b82bcea56d758 | 6354c618a1e9213f0605c6b3e5da2449a4873d2c | /src/main/java/stevekung/mods/moreplanets/planets/nibiru/client/model/ModelInfectedZombie.java | 843aab438bc9c0fffb6b2a27e6b7d870db52b3b6 | [
"MIT"
] | permissive | SteveKunG/MorePlanets | a13d04244b7dec2eae2784ee8de835aaabe433e8 | ff343a7e087e18eeeb2783dc7e984a7dcc7eec06 | refs/heads/1.12.2 | 2023-03-16T19:18:12.993448 | 2023-03-09T11:30:32 | 2023-03-09T11:30:32 | 94,581,238 | 32 | 37 | MIT | 2023-08-30T22:48:34 | 2017-06-16T21:07:26 | Java | UTF-8 | Java | false | false | 2,833 | java | package stevekung.mods.moreplanets.planets.nibiru.client.model;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.model.ModelZombie;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.MathHelper;
public class ModelInfectedZombie extends ModelZombie
{
private ModelRenderer tail1;
private ModelRenderer tail2;
private ModelRenderer tail3;
public ModelInfectedZombie()
{
this.textureWidth = 64;
this.textureHeight = 64;
this.tail2 = new ModelRenderer(this, 52, 8);
this.tail2.setRotationPoint(0.0F, 0.0F, 3.3F);
this.tail2.addBox(-1.5F, -1.5F, 0.0F, 3, 3, 3, 0.0F);
this.tail3 = new ModelRenderer(this, 56, 14);
this.tail3.setRotationPoint(0.0F, 0.0F, 2.7F);
this.tail3.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 2, 0.0F);
this.tail1 = new ModelRenderer(this, 48, 0);
this.tail1.setRotationPoint(0.0F, -3.6F, 2.8F);
this.tail1.addBox(-2.0F, -2.0F, 0.0F, 4, 4, 4, 0.0F);
this.tail1.addChild(this.tail2);
this.tail2.addChild(this.tail3);
this.bipedHead.addChild(this.tail1);
}
public ModelInfectedZombie(float scale, boolean bool)
{
super(scale, bool);
}
@Override
public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
this.bipedHeadwear.showModel = false;
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entity);
}
@Override
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale, Entity entity)
{
super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entity);
this.tail1.rotateAngleY = MathHelper.cos(ageInTicks * 0.9F + 2 * 0.15F * (float)Math.PI) * (float)Math.PI * 0.05F * (1 + Math.abs(2 - 2));
this.tail1.rotationPointX = MathHelper.sin(ageInTicks * 0.9F + 2 * 0.15F * (float)Math.PI) * (float)Math.PI * 0.2F * Math.abs(2 - 2);
this.tail2.rotateAngleY = MathHelper.cos(ageInTicks * 0.9F + 3 * 0.15F * (float)Math.PI) * (float)Math.PI * 0.05F * (1 + Math.abs(3 - 2));
this.tail2.rotationPointX = MathHelper.sin(ageInTicks * 0.9F + 3 * 0.15F * (float)Math.PI) * (float)Math.PI * 0.2F * Math.abs(3 - 2);
this.tail3.rotateAngleY = MathHelper.cos(ageInTicks * 0.9F + 5 * 0.15F * (float)Math.PI) * (float)Math.PI * 0.05F * (1 + Math.abs(5 - 2));
this.tail3.rotationPointX = MathHelper.sin(ageInTicks * 0.9F + 5 * 0.15F * (float)Math.PI) * (float)Math.PI * 0.2F * Math.abs(5 - 2);
}
} | [
"mccommander_minecraft@hotmail.com"
] | mccommander_minecraft@hotmail.com |
3b79544be304027d925cb9438b1298fdb08c8a36 | b26d0ac0846fc13080dbe3c65380cc7247945754 | /src/main/java/imports/aws/Wafv2WebAclRuleStatementNotStatementStatementOrStatementStatementXssMatchStatementFieldToMatchQueryString.java | df4f4b8a74786b34a0184d381c2b0cbf1e7618f0 | [] | no_license | nvkk-devops/cdktf-java-aws | 1431404f53df8de517f814508fedbc5810b7bce5 | 429019d87fc45ab198af816d8289dfe1290cd251 | refs/heads/main | 2023-03-23T22:43:36.539365 | 2021-03-11T05:17:09 | 2021-03-11T05:17:09 | 346,586,402 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,636 | java | package imports.aws;
@javax.annotation.Generated(value = "jsii-pacmak/1.24.0 (build b722f66)", date = "2021-03-10T09:47:03.136Z")
@software.amazon.jsii.Jsii(module = imports.aws.$Module.class, fqn = "aws.Wafv2WebAclRuleStatementNotStatementStatementOrStatementStatementXssMatchStatementFieldToMatchQueryString")
@software.amazon.jsii.Jsii.Proxy(Wafv2WebAclRuleStatementNotStatementStatementOrStatementStatementXssMatchStatementFieldToMatchQueryString.Jsii$Proxy.class)
public interface Wafv2WebAclRuleStatementNotStatementStatementOrStatementStatementXssMatchStatementFieldToMatchQueryString extends software.amazon.jsii.JsiiSerializable {
/**
* @return a {@link Builder} of {@link Wafv2WebAclRuleStatementNotStatementStatementOrStatementStatementXssMatchStatementFieldToMatchQueryString}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link Wafv2WebAclRuleStatementNotStatementStatementOrStatementStatementXssMatchStatementFieldToMatchQueryString}
*/
public static final class Builder implements software.amazon.jsii.Builder<Wafv2WebAclRuleStatementNotStatementStatementOrStatementStatementXssMatchStatementFieldToMatchQueryString> {
/**
* Builds the configured instance.
* @return a new instance of {@link Wafv2WebAclRuleStatementNotStatementStatementOrStatementStatementXssMatchStatementFieldToMatchQueryString}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public Wafv2WebAclRuleStatementNotStatementStatementOrStatementStatementXssMatchStatementFieldToMatchQueryString build() {
return new Jsii$Proxy();
}
}
/**
* An implementation for {@link Wafv2WebAclRuleStatementNotStatementStatementOrStatementStatementXssMatchStatementFieldToMatchQueryString}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements Wafv2WebAclRuleStatementNotStatementStatementOrStatementStatementXssMatchStatementFieldToMatchQueryString {
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy() {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("aws.Wafv2WebAclRuleStatementNotStatementStatementOrStatementStatementXssMatchStatementFieldToMatchQueryString"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
}
}
| [
"venkata.nidumukkala@emirates.com"
] | venkata.nidumukkala@emirates.com |
46ca9de1680cce23ab643efc6bbd8c76b7381171 | 5fddb9a3f85f50cdefe3bf29ca06b33ad44bcd62 | /src/main/java/com/syncleus/aethermud/game/Abilities/Common/Excavation.java | 3f0fee7fe8d6b702e54f2b0b5abb0b33b0f897f8 | [
"Apache-2.0"
] | permissive | freemo/AetherMUD-coffee | da315ae8046d06069a058fb38723750a02f72853 | dbc091b3e1108aa6aff3640da4707ace4c6771e5 | refs/heads/master | 2021-01-19T22:34:29.830622 | 2017-08-26T14:01:24 | 2017-08-26T14:06:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,457 | java | /**
* Copyright 2017 Syncleus, Inc.
* with portions copyright 2004-2017 Bo Zimmerman
*
* 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.syncleus.aethermud.game.Abilities.Common;
import com.syncleus.aethermud.game.MOBS.interfaces.MOB;
import com.syncleus.aethermud.game.core.CMLib;
public class Excavation extends BuildingSkill {
private final static String localizedName = CMLib.lang().L("Excavation");
private static final String[] triggerStrings = I(new String[]{"EXCAVATE", "EXCAVATION"});
public Excavation() {
super();
}
@Override
public String ID() {
return "Excavation";
}
@Override
public String name() {
return localizedName;
}
@Override
public String[] triggerStrings() {
return triggerStrings;
}
@Override
public String supportedResourceString() {
return "ROCK|STONE";
}
@Override
public String parametersFile() {
return "excavation.txt";
}
@Override
protected String getMainResourceName() {
return "Stone";
}
@Override
protected String getSoundName() {
return "stone.wav";
}
@Override
public String establishVerb(final MOB mob, final String[] recipe) {
final Building doingCode = Building.valueOf(recipe[DAT_BUILDCODE]);
if (doingCode == Building.EXCAVATE)
return L("excavating the " + recipe[DAT_DESC], CMLib.directions().getInDirectionName(dir).toLowerCase());
else
return super.establishVerb(mob, recipe);
}
@Override
protected int[][] getBasicMaterials(final MOB mob, int woodRequired, String miscType) {
if (miscType.length() == 0)
miscType = "stone";
final int[][] idata = fetchFoundResourceData(mob,
woodRequired, miscType, null,
0, null, null,
false,
0, null);
return idata;
}
}
| [
"jeffrey.freeman@syncleus.com"
] | jeffrey.freeman@syncleus.com |
b72289374301d8671d22e9e1f45531ddb504ec45 | 5e6483cd2cb3a6f62fbdbb018c1eb4ff780082e7 | /src/main/java/org/fix4j/sbe/meta/MetaData.java | f525233c2fe0543a79dba3aeed4e706ab0b16957 | [
"MIT"
] | permissive | tools4j/tools4j-sbe | 5f0bd9d1f018962c6020a5b22b86227e19b9929f | 0fcf620472347611efc0346a0bc826dcb4e88693 | refs/heads/master | 2023-06-19T13:46:12.193107 | 2022-12-05T15:11:50 | 2022-12-05T15:11:50 | 214,233,430 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,552 | java | /*
* The MIT License (MIT)
*
* Copyright (c) 2019-2022 fix4j-sbe, Marco Terzer, Anton Anufriev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.fix4j.sbe.meta;
public interface MetaData {
String name();
int id();
int sinceVersion();
Presence presence();
String epoch();
String timeUnit();
String semanticType();
String description();
enum Presence {
REQUIRED,
OPTIONAL,
CONSTANT
}
interface FixedLength extends MetaData {
int length();
int encodingOffset();
int encodingLength();
}
interface CharEncoded extends MetaData {
String characterEncoding();
}
interface Char extends CharEncoded, FixedLength {
byte nullValue();
byte minValue();
byte maxValue();
}
interface Uint8 extends FixedLength {
int MASK = 0xff;
default int mask() {return MASK;}
byte nullValue();
byte minValue();
byte maxValue();
}
interface Uint16 extends FixedLength {
int MASK = 0xffff;
default int mask() {return MASK;}
short nullValue();
short minValue();
short maxValue();
}
interface Uint32 extends FixedLength {
long MASK = 0xffffffffL;
default long mask() {return MASK;}
long nullValue();
long minValue();
long maxValue();
}
interface Uint64 extends FixedLength {
long MASK = 0xffffffffffffffffL;
default long mask() {return MASK;}
long nullValue();
long minValue();
long maxValue();
}
interface Int8 extends FixedLength {
byte nullValue();
byte minValue();
byte maxValue();
}
interface Int16 extends FixedLength {
short nullValue();
short minValue();
short maxValue();
}
interface Int32 extends FixedLength {
int nullValue();
int minValue();
int maxValue();
}
interface Int64 extends FixedLength {
long nullValue();
long minValue();
long maxValue();
}
interface Float extends FixedLength {
float nullValue();
float minValue();
float maxValue();
}
interface Double extends FixedLength {
double nullValue();
double minValue();
double maxValue();
}
interface VarData extends MetaData {
int headerLength();
}
interface VarChar extends CharEncoded, VarData {}
}
| [
"terzerm@gmail.com"
] | terzerm@gmail.com |
cd359753cb898aa80b9de203f993caca5ec2b77c | 58a0495674943c94d8391a677eaa4a749ad3cf36 | /src/main/java/com/thinkinginjava/containers/Groundhog2.java | 579c1cc8cb602097cec9110cd2f9b70f8366776e | [] | no_license | PavelTsekhanovich/ThinkingInJava | f00897ce6bd38871d9eaa0e00bf1d8c17350203e | 7754c639472c47ba1940856edbb0dee75d6a8b6b | refs/heads/master | 2021-09-17T23:22:21.421088 | 2018-07-06T19:24:24 | 2018-07-06T19:24:24 | 105,444,993 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 339 | java | package com.thinkinginjava.containers;
public class Groundhog2 extends Groundhog {
public Groundhog2(int n) {
super(n);
}
public int hashCode() {
return number;
}
public boolean equals(Object o) {
return o instanceof Groundhog2 &&
(number == ((Groundhog2) o).number);
}
}
| [
"p.tsekhanovich93@gmail.com"
] | p.tsekhanovich93@gmail.com |
732dc63f802425c18c09ac8bb2675e427a89864f | 48597c519e7a0199ccc8b7b6d6afbdb3f68e55e7 | /framework/src/main/java/com/frodo/android/app/framework/orm/table/TableUtils.java | 154ccd15fae4c710d0864c23ba214e337c6220f1 | [
"Apache-2.0"
] | permissive | weikipeng/App-Architecture | d2f2f21db7840eaa8dff1d8770dd792e108a5827 | c30778d3761281baeef0f993100a3025310d91ae | refs/heads/master | 2021-01-12T22:21:36.814780 | 2015-12-29T10:19:36 | 2015-12-29T10:19:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,658 | java | package com.frodo.android.app.framework.orm.table;
import com.frodo.android.app.framework.exception.DbException;
import com.frodo.android.app.framework.orm.annotation.Table;
import com.frodo.android.app.framework.orm.converter.ColumnConverterFactory;
import com.frodo.android.app.framework.toolbox.TextUtils;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
public class TableUtils {
/**
* key: entityType.name
*/
private static ConcurrentHashMap<String, HashMap<String, Column>> entityColumnsMap = new ConcurrentHashMap<String, HashMap<String, Column>>();
/**
* key: entityType.name
*/
private static ConcurrentHashMap<String, Id> entityIdMap = new ConcurrentHashMap<>();
private TableUtils() {
}
public static String getTableName(Class<?> entityType) {
Table table = entityType.getAnnotation(Table.class);
if (table == null || TextUtils.isEmpty(table.name())) {
return entityType.getName().replace('.', '_');
}
return table.name();
}
public static String getExecAfterTableCreated(Class<?> entityType) {
Table table = entityType.getAnnotation(Table.class);
if (table != null) {
return table.execAfterTableCreated();
}
return null;
}
static synchronized HashMap<String, Column> getColumnMap(Class<?> entityType) throws DbException {
if (entityColumnsMap.containsKey(entityType.getName())) {
return entityColumnsMap.get(entityType.getName());
}
HashMap<String, Column> columnMap = new HashMap<>();
String primaryKeyFieldName = getPrimaryKeyFieldName(entityType);
addColumns2Map(entityType, primaryKeyFieldName, columnMap);
entityColumnsMap.put(entityType.getName(), columnMap);
return columnMap;
}
private static void addColumns2Map(Class<?> entityType, String primaryKeyFieldName, HashMap<String, Column> columnMap) throws DbException {
if (Object.class.equals(entityType)) return;
try {
Field[] fields = entityType.getDeclaredFields();
for (Field field : fields) {
if (ColumnUtils.isTransient(field) || Modifier.isStatic(field.getModifiers())) {
continue;
}
if (ColumnConverterFactory.isSupportColumnConverter(field.getType())) {
if (!field.getName().equals(primaryKeyFieldName)) {
Column column = new Column(entityType, field);
if (!columnMap.containsKey(column.getColumnName())) {
columnMap.put(column.getColumnName(), column);
}
}
} else if (ColumnUtils.isForeign(field)) {
Foreign column = new Foreign(entityType, field);
if (!columnMap.containsKey(column.getColumnName())) {
columnMap.put(column.getColumnName(), column);
}
} else if (ColumnUtils.isFinder(field)) {
Finder column = new Finder(entityType, field);
if (!columnMap.containsKey(column.getColumnName())) {
columnMap.put(column.getColumnName(), column);
}
}
}
if (!Object.class.equals(entityType.getSuperclass())) {
addColumns2Map(entityType.getSuperclass(), primaryKeyFieldName, columnMap);
}
} catch (Throwable e) {
throw new DbException(e);
}
}
/* package */
static Column getColumnOrId(Class<?> entityType, String columnName) throws DbException {
if (getPrimaryKeyColumnName(entityType).equals(columnName)) {
return getId(entityType);
}
return getColumnMap(entityType).get(columnName);
}
/* package */
static synchronized Id getId(Class<?> entityType) throws DbException {
if (Object.class.equals(entityType)) {
throw new RuntimeException("field 'id' not found");
}
if (entityIdMap.containsKey(entityType.getName())) {
return entityIdMap.get(entityType.getName());
}
Field primaryKeyField = null;
Field[] fields = entityType.getDeclaredFields();
if (fields != null) {
for (Field field : fields) {
if (field.getAnnotation(com.frodo.android.app.framework.orm.annotation.Id.class) != null) {
primaryKeyField = field;
break;
}
}
if (primaryKeyField == null) {
for (Field field : fields) {
if ("id".equals(field.getName()) || "_id".equals(field.getName())) {
primaryKeyField = field;
break;
}
}
}
}
if (primaryKeyField == null) {
return getId(entityType.getSuperclass());
}
Id id = new Id(entityType, primaryKeyField);
entityIdMap.put(entityType.getName(), id);
return id;
}
private static String getPrimaryKeyFieldName(Class<?> entityType) throws DbException {
Id id = getId(entityType);
return id == null ? null : id.getColumnField().getName();
}
private static String getPrimaryKeyColumnName(Class<?> entityType) throws DbException {
Id id = getId(entityType);
return id == null ? null : id.getColumnName();
}
}
| [
"awangyun8@gmail.com"
] | awangyun8@gmail.com |
5ac2d2e73030abfe045f8eb2c4371f0e0f2e8087 | 8a98577c5995449677ede2cbe1cc408c324efacc | /Big_Clone_Bench_files_used/bcb_reduced/3/selected/284133.java | 084d7aca6a097c1a079cf9fcf42922fca1456a0f | [
"MIT"
] | permissive | pombredanne/lsh-for-source-code | 9363cc0c9a8ddf16550ae4764859fa60186351dd | fac9adfbd98a4d73122a8fc1a0e0cc4f45e9dcd4 | refs/heads/master | 2020-08-05T02:28:55.370949 | 2017-10-18T23:57:08 | 2017-10-18T23:57:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,175 | java | package conversores;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.convert.ConverterException;
public class HashSenhaConverter implements Converter {
public Object getAsObject(FacesContext fc, UIComponent c, String pass_temp) throws ConverterException {
if (pass_temp.length() < 5) {
return pass_temp;
} else {
MessageDigest md = null;
try {
md = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
BigInteger hash = new BigInteger(1, md.digest(pass_temp.getBytes()));
String pass = hash.toString(16);
return pass;
}
}
public String getAsString(FacesContext fc, UIComponent c, Object pass) throws ConverterException {
if ((pass == null) || (pass.toString().trim().equals(""))) {
return "";
} else return pass.toString();
}
}
| [
"nishima@mymail.vcu.edu"
] | nishima@mymail.vcu.edu |
2aeb2369aa146995a7938a2a0ffbc9ab72790fab | c46c9294d6121a9f3f92cc93ac39ff8cbbc50374 | /codegen/src/main/java/software/amazon/awssdk/codegen/poet/waiters/WaiterInterfaceSpec.java | 2909198b6b344fdb7296620071754e53cbf1fed8 | [
"Apache-2.0"
] | permissive | devfest-bugbust/aws-sdk-java-v2 | 8387eb245eb08c6022fc7c7c12942cae53a5d6a1 | 02f47aa9f82150b174487a6d7edf1c11d013002b | refs/heads/master | 2023-08-17T05:43:20.856040 | 2021-09-22T09:53:12 | 2021-09-22T19:51:29 | 404,018,407 | 0 | 4 | Apache-2.0 | 2021-09-23T13:42:57 | 2021-09-07T14:54:04 | Java | UTF-8 | Java | false | false | 2,241 | java | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package software.amazon.awssdk.codegen.poet.waiters;
import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.ParameterizedTypeName;
import software.amazon.awssdk.codegen.model.intermediate.IntermediateModel;
import software.amazon.awssdk.codegen.model.intermediate.OperationModel;
import software.amazon.awssdk.codegen.poet.PoetExtensions;
import software.amazon.awssdk.core.waiters.WaiterResponse;
public final class WaiterInterfaceSpec extends BaseWaiterInterfaceSpec {
private final IntermediateModel model;
private final PoetExtensions poetExtensions;
private final ClassName className;
private final String modelPackage;
public WaiterInterfaceSpec(IntermediateModel model) {
super(model);
this.modelPackage = model.getMetadata().getFullModelPackageName();
this.model = model;
this.poetExtensions = new PoetExtensions(model);
this.className = poetExtensions.getSyncWaiterInterface();
}
@Override
protected ClassName waiterImplName() {
return poetExtensions.getSyncWaiterClass();
}
@Override
protected ClassName clientClassName() {
return poetExtensions.getClientClass(model.getMetadata().getSyncInterface());
}
@Override
public ClassName className() {
return className;
}
@Override
protected ParameterizedTypeName getWaiterResponseType(OperationModel opModel) {
ClassName pojoResponse = ClassName.get(modelPackage, opModel.getReturnType().getReturnType());
return ParameterizedTypeName.get(ClassName.get(WaiterResponse.class),
pojoResponse);
}
}
| [
"33073555+zoewangg@users.noreply.github.com"
] | 33073555+zoewangg@users.noreply.github.com |
779ffa7746b611db986881813636c74eaa172e81 | f19876894438a1b442fef075cceaa269c8ca2f99 | /Utilities/src/jhelp/util/thread/ThreadActor.java | 7ed943c82344e2b606000909dcfddd8c76e42f01 | [] | no_license | jhelpgg/JHelpAPI2 | f239253114fcef06d107a28c63fbadc59ca2f5a3 | f60842f15e349ad72b23c609587fa23eff4a2786 | refs/heads/master | 2021-01-02T22:55:15.727027 | 2017-12-27T16:52:20 | 2017-12-27T16:52:20 | 99,416,936 | 1 | 2 | null | 2020-05-15T19:02:10 | 2017-08-05T10:49:00 | Java | UTF-8 | Java | false | false | 1,240 | java | /*
* Copyright:
* License :
* The following code is deliver as is.
* I take care that code compile and work, but I am not responsible about any damage it may cause.
* You can use, modify, the code as your need for any usage.
* But you can't do any action that avoid me or other person use, modify this code.
* The code is free for usage and modification, you can't change that fact.
* @author JHelp
*
*/
package jhelp.util.thread;
/**
* Actor that play a task
*/
class ThreadActor implements Runnable
{
/**
* Task element
*/
TaskElement<?, ?> taskElement = null;
/**
* When an object implementing interface <code>Runnable</code> is used
* to create a thread, starting the thread causes the object's
* <code>run</code> method to be called in that separately executing
* thread.
* <p>
* The general contract of the method <code>run</code> is that it may
* take any action whatsoever.
*
* @see Thread#run()
*/
@Override
public void run()
{
if (this.taskElement != null)
{
this.taskElement.playTask();
}
this.taskElement = null;
ThreadManager.THREAD_MANAGER.anActorIsFree();
}
}
| [
"jhelpgg@gmail.com"
] | jhelpgg@gmail.com |
6008a45efdea302507768e6524d0c2d9d272f3c3 | 1f2e8cd3edb167900c33c0474d14a128a4a33e4c | /changgou-parent/changgou-service-api/changgou-service-goods-api/src/main/java/jack/changgou/goods/pojo/Spu.java | 8302d93ac7703b1f2ca347b2950a968ca19ea044 | [] | no_license | jack13163/changgou | b13039fc4f582598adea8d90980b4b44c6abfac2 | 6379bd4ef6f06f081c73b3a8db224b7e1821967d | refs/heads/master | 2022-12-04T01:35:45.310842 | 2020-08-26T07:51:54 | 2020-08-26T07:51:54 | 288,689,914 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,959 | java | package jack.changgou.goods.pojo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
/****
* @Author:admin
* @Description:Spu构建
* @Date 2019/6/14 19:13
*****/
@ApiModel(description = "Spu",value = "Spu")
@Table(name="tb_spu")
public class Spu implements Serializable{
@ApiModelProperty(value = "主键",required = false)
@JsonSerialize(using = ToStringSerializer.class)
@Id
@Column(name = "id")
private Long id;//主键
@ApiModelProperty(value = "货号",required = false)
@Column(name = "sn")
private String sn;//货号
@ApiModelProperty(value = "SPU名",required = false)
@Column(name = "name")
private String name;//SPU名
@ApiModelProperty(value = "副标题",required = false)
@Column(name = "caption")
private String caption;//副标题
@ApiModelProperty(value = "品牌ID",required = false)
@Column(name = "brand_id")
private Integer brandId;//品牌ID
@ApiModelProperty(value = "一级分类",required = false)
@Column(name = "category1_id")
private Integer category1Id;//一级分类
@ApiModelProperty(value = "二级分类",required = false)
@Column(name = "category2_id")
private Integer category2Id;//二级分类
@ApiModelProperty(value = "三级分类",required = false)
@Column(name = "category3_id")
private Integer category3Id;//三级分类
@ApiModelProperty(value = "模板ID",required = false)
@Column(name = "template_id")
private Integer templateId;//模板ID
@ApiModelProperty(value = "运费模板id",required = false)
@Column(name = "freight_id")
private Integer freightId;//运费模板id
@ApiModelProperty(value = "图片",required = false)
@Column(name = "image")
private String image;//图片
@ApiModelProperty(value = "图片列表",required = false)
@Column(name = "images")
private String images;//图片列表
@ApiModelProperty(value = "售后服务",required = false)
@Column(name = "sale_service")
private String saleService;//售后服务
@ApiModelProperty(value = "介绍",required = false)
@Column(name = "introduction")
private String introduction;//介绍
@ApiModelProperty(value = "规格列表",required = false)
@Column(name = "spec_items")
private String specItems;//规格列表
@ApiModelProperty(value = "参数列表",required = false)
@Column(name = "para_items")
private String paraItems;//参数列表
@ApiModelProperty(value = "销量",required = false)
@Column(name = "sale_num")
private Integer saleNum;//销量
@ApiModelProperty(value = "评论数",required = false)
@Column(name = "comment_num")
private Integer commentNum;//评论数
@ApiModelProperty(value = "是否上架,0已下架,1已上架",required = false)
@Column(name = "is_marketable")
private String isMarketable;//是否上架
@ApiModelProperty(value = "是否启用规格",required = false)
@Column(name = "is_enable_spec")
private String isEnableSpec;//是否启用规格
@ApiModelProperty(value = "是否删除",required = false)
@Column(name = "is_delete")
private String isDelete;//是否删除
@ApiModelProperty(value = "审核状态,0未审核,1已审核",required = false)
@Column(name = "status")
private String status;//审核状态
//get方法
public Long getId() {
return id;
}
//set方法
public void setId(Long id) {
this.id = id;
}
//get方法
public String getSn() {
return sn;
}
//set方法
public void setSn(String sn) {
this.sn = sn;
}
//get方法
public String getName() {
return name;
}
//set方法
public void setName(String name) {
this.name = name;
}
//get方法
public String getCaption() {
return caption;
}
//set方法
public void setCaption(String caption) {
this.caption = caption;
}
//get方法
public Integer getBrandId() {
return brandId;
}
//set方法
public void setBrandId(Integer brandId) {
this.brandId = brandId;
}
//get方法
public Integer getCategory1Id() {
return category1Id;
}
//set方法
public void setCategory1Id(Integer category1Id) {
this.category1Id = category1Id;
}
//get方法
public Integer getCategory2Id() {
return category2Id;
}
//set方法
public void setCategory2Id(Integer category2Id) {
this.category2Id = category2Id;
}
//get方法
public Integer getCategory3Id() {
return category3Id;
}
//set方法
public void setCategory3Id(Integer category3Id) {
this.category3Id = category3Id;
}
//get方法
public Integer getTemplateId() {
return templateId;
}
//set方法
public void setTemplateId(Integer templateId) {
this.templateId = templateId;
}
//get方法
public Integer getFreightId() {
return freightId;
}
//set方法
public void setFreightId(Integer freightId) {
this.freightId = freightId;
}
//get方法
public String getImage() {
return image;
}
//set方法
public void setImage(String image) {
this.image = image;
}
//get方法
public String getImages() {
return images;
}
//set方法
public void setImages(String images) {
this.images = images;
}
//get方法
public String getSaleService() {
return saleService;
}
//set方法
public void setSaleService(String saleService) {
this.saleService = saleService;
}
//get方法
public String getIntroduction() {
return introduction;
}
//set方法
public void setIntroduction(String introduction) {
this.introduction = introduction;
}
//get方法
public String getSpecItems() {
return specItems;
}
//set方法
public void setSpecItems(String specItems) {
this.specItems = specItems;
}
//get方法
public String getParaItems() {
return paraItems;
}
//set方法
public void setParaItems(String paraItems) {
this.paraItems = paraItems;
}
//get方法
public Integer getSaleNum() {
return saleNum;
}
//set方法
public void setSaleNum(Integer saleNum) {
this.saleNum = saleNum;
}
//get方法
public Integer getCommentNum() {
return commentNum;
}
//set方法
public void setCommentNum(Integer commentNum) {
this.commentNum = commentNum;
}
//get方法
public String getIsMarketable() {
return isMarketable;
}
//set方法
public void setIsMarketable(String isMarketable) {
this.isMarketable = isMarketable;
}
//get方法
public String getIsEnableSpec() {
return isEnableSpec;
}
//set方法
public void setIsEnableSpec(String isEnableSpec) {
this.isEnableSpec = isEnableSpec;
}
//get方法
public String getIsDelete() {
return isDelete;
}
//set方法
public void setIsDelete(String isDelete) {
this.isDelete = isDelete;
}
//get方法
public String getStatus() {
return status;
}
//set方法
public void setStatus(String status) {
this.status = status;
}
}
| [
"18163132129@163.com"
] | 18163132129@163.com |
255bf299426efd83387c8c1a9641377f7d5a4613 | 10186b7d128e5e61f6baf491e0947db76b0dadbc | /org/w3c/dom/svg/SVGTextPathElement.java | 6f7ccecc2d5f3e37780921b763ebbaeda2530dff | [
"SMLNJ",
"Apache-1.1",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | MewX/contendo-viewer-v1.6.3 | 7aa1021e8290378315a480ede6640fd1ef5fdfd7 | 69fba3cea4f9a43e48f43148774cfa61b388e7de | refs/heads/main | 2022-07-30T04:51:40.637912 | 2021-03-28T05:06:26 | 2021-03-28T05:06:26 | 351,630,911 | 2 | 0 | Apache-2.0 | 2021-10-12T22:24:53 | 2021-03-26T01:53:24 | Java | UTF-8 | Java | false | false | 780 | java | package org.w3c.dom.svg;
public interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
public static final short TEXTPATH_METHODTYPE_UNKNOWN = 0;
public static final short TEXTPATH_METHODTYPE_ALIGN = 1;
public static final short TEXTPATH_METHODTYPE_STRETCH = 2;
public static final short TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
public static final short TEXTPATH_SPACINGTYPE_AUTO = 1;
public static final short TEXTPATH_SPACINGTYPE_EXACT = 2;
SVGAnimatedLength getStartOffset();
SVGAnimatedEnumeration getMethod();
SVGAnimatedEnumeration getSpacing();
}
/* Location: /mnt/r/ConTenDoViewer.jar!/org/w3c/dom/svg/SVGTextPathElement.class
* Java compiler version: 1 (45.3)
* JD-Core Version: 1.1.3
*/ | [
"xiayuanzhong+gpg2020@gmail.com"
] | xiayuanzhong+gpg2020@gmail.com |
c8544166452973727ceb24397be1a36d0a2f7184 | d1c3d03d619857dfb1b044b236383db74cee3569 | /app/src/main/java/com/example/franj/mtelc20/Adaptador.java | e31e1c2047c457c8d540d7b2fe8f2973144ea2c0 | [] | no_license | Franjapx08/Aprende- | 96793ebfcf3922ccb096ff7646233fab8bc89cd0 | 7b39cca9962b599904d487083272446209dced4d | refs/heads/master | 2020-07-09T20:33:21.291718 | 2019-08-23T22:35:17 | 2019-08-23T22:35:17 | 204,076,526 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,510 | java | package com.example.franj.mtelc20;
import android.content.Context;
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import java.util.List;
/**
* Created by franj on 08/12/2018.
*/
public class Adaptador extends RecyclerView.Adapter<Adaptador.PersonViewHolder> {
//respuestas del usuario
public static String[] myArray = new String[6];
//respuestas reales
public static String [] ArrayResp = new String[6];
//validar input
public static String[] check = new String[6];
public static class PersonViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
Context contex;
CardView cv;
TextView personName;
ImageView personPhoto;
TextView hidden, id, num;
Button a;
Button ko;
EditText val;
PersonViewHolder(View itemView) {
super(itemView);
contex = itemView.getContext();
cv = (CardView)itemView.findViewById(R.id.cv);
personName = (TextView)itemView.findViewById(R.id.person_name);
personPhoto = (ImageView)itemView.findViewById(R.id.person_photo);
val = (EditText)itemView.findViewById(R.id.valida);
hidden = (TextView)itemView.findViewById(R.id.hidden_value2);
id = (TextView)itemView.findViewById(R.id.hidden_value3);
a = (Button) itemView.findViewById(R.id.ok);
ko = (Button) itemView.findViewById(R.id.actp);
num = (TextView) itemView.findViewById(R.id.num);
}
void setOnClick(){
a.setOnClickListener(this);
}
@Override
public void onClick(View view) {
myArray[0] = "x";
switch (view.getId()) {
case R.id.ok:
int a = Integer.parseInt(hidden.getText().toString());
int op = Integer.parseInt(id.getText().toString());
if(val.getText().toString().equals("")){
if (myArray[op] == "F" || myArray[op] == "V"){
Toast toast1 =
Toast.makeText(contex,
"Usted ya guardo su respuesta:"+check[op], Toast.LENGTH_SHORT);
toast1.show();
val.setText(check[op]);
val.setBackgroundResource(R.color.ColorVal);
}else {
Toast toast1 =
Toast.makeText(contex,
"Coloque algo en el input", Toast.LENGTH_SHORT);
toast1.show();
// val.setBackgroundResource(R.color.ColorBad);
}
}else {
//cambia colo input
val.setBackgroundResource(R.color.ColorVal);
//guarda respeusta correcta
ArrayResp[op] = String.valueOf(a);
int b = Integer.parseInt(val.getText().toString());
check[op] = String.valueOf(b);
if (a == b) {
Toast toast1 =
Toast.makeText(contex,
"Guardado", Toast.LENGTH_SHORT);
toast1.show();
// DataAsk.getInstance().setPuntos(DataAsk.getInstance().getPuntos() + 5);
myArray[op] = "V";
} else {
myArray[op] = "F";
Toast toast1 =
Toast.makeText(contex,
"Guardado", Toast.LENGTH_SHORT);
toast1.show();
}
}
break;
}
}
}
List<PersonTest> persons;
Adaptador(List<PersonTest> persons){
this.persons = persons;
}
@Override
public void onAttachedToRecyclerView(RecyclerView recyclerView) {
super.onAttachedToRecyclerView(recyclerView);
}
@Override
public PersonViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_card, viewGroup, false);
PersonViewHolder pvh = new PersonViewHolder(v);
return pvh;
}
@Override
public void onBindViewHolder(PersonViewHolder personViewHolder, int i) {
personViewHolder.setOnClick();
personViewHolder.personName.setText(persons.get(i).name);
// personViewHolder.personAge.setText(persons.get(i).age);
personViewHolder.personPhoto.setImageResource(persons.get(i).photoId);
personViewHolder.hidden.setText(persons.get(i).idd);
personViewHolder.id.setText(persons.get(i).id);
personViewHolder.num.setText(persons.get(i).id);
// personViewHolder.a.setOnClickListener(this);
}
@Override
public int getItemCount() {
return persons.size();
}
}
| [
"you@example.com"
] | you@example.com |
c370598a0b938799f7879841f055c13f0bbba33d | 7c20e36b535f41f86b2e21367d687ea33d0cb329 | /Capricornus/src/com/gopawpaw/erp/hibernate/p/PrdDet.java | 315c9bf14ea6fd5ca34f611a09afa1238b2ee80b | [] | no_license | fazoolmail89/gopawpaw | 50c95b924039fa4da8f309e2a6b2ebe063d48159 | b23ccffce768a3d58d7d71833f30b85186a50cc5 | refs/heads/master | 2016-09-08T02:00:37.052781 | 2014-05-14T11:46:18 | 2014-05-14T11:46:18 | 35,091,153 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,172 | java | package com.gopawpaw.erp.hibernate.p;
/**
* PrdDet entity. @author MyEclipse Persistence Tools
*/
public class PrdDet extends AbstractPrdDet implements java.io.Serializable {
// Constructors
/** default constructor */
public PrdDet() {
}
/** minimal constructor */
public PrdDet(String prdPath, Integer prdDestType, Double oidPrdDet) {
super(prdPath, prdDestType, oidPrdDet);
}
/** full constructor */
public PrdDet(String prdDesc, String prdSt80, String prdReset,
String prdSt132, String prdStBc, String prdEndBc,
String prdNegLine, Integer prdLength, Integer prdBlank,
String prdPage, String prdType, Boolean prdSpooler, String prdPath,
String prdInit, String prdInitPro, String prdRsetPro,
String prdUser1, String prdUser2, String prdMapterm,
Integer prdMaxPage, Boolean prdScrollOnly, String prdQad01,
Integer prdDestType, Double oidPrdDet) {
super(prdDesc, prdSt80, prdReset, prdSt132, prdStBc, prdEndBc,
prdNegLine, prdLength, prdBlank, prdPage, prdType, prdSpooler,
prdPath, prdInit, prdInitPro, prdRsetPro, prdUser1, prdUser2,
prdMapterm, prdMaxPage, prdScrollOnly, prdQad01, prdDestType,
oidPrdDet);
}
}
| [
"ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5"
] | ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5 |
7aa30ce9f249c530348874cf21ce455b8e9ee162 | 23d74172fa3f2a1378829cfb0935a2618e1dcecf | /app/src/main/java/com/journals/tsijournals/model/DashBoardModel.java | 49db1544671bf4401c9ffa6b7a4f6ad504fd1c82 | [] | no_license | suresh429/Trade_Science_Inc | 7d67de21ea3bfa6a2a293034dd48ad2e232da5f7 | c3f1c89385b3eaa2292de86e54f710160638a699 | refs/heads/master | 2023-03-23T08:39:05.072581 | 2021-03-18T10:59:31 | 2021-03-18T10:59:31 | 349,039,518 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 402 | java | package com.journals.tsijournals.model;
public class DashBoardModel {
private String dashBoardTitle;
public DashBoardModel(String dashBoardTitle) {
this.dashBoardTitle = dashBoardTitle;
}
public String getDashBoardTitle() {
return dashBoardTitle;
}
public void setDashBoardTitle(String dashBoardTitle) {
this.dashBoardTitle = dashBoardTitle;
}
}
| [
"ksuresh.unique@gmail.com"
] | ksuresh.unique@gmail.com |
de30379df62e2f9707e194baaa9ba1dde6a665cc | 1c83f56ebeda5c76a92f2e7e819c4f2a630bc4cf | /components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringEnricherRefTest.java | 1326f53ccc367764c444415563944fa72d07b78c | [
"Apache-2.0",
"LicenseRef-scancode-unknown",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | valtoni/camel | a6a8c1244b4045b2ed47aa5f59b2495702e6c759 | 2563e716d5b348fc80219accbb8aa7b83d77bd68 | refs/heads/master | 2020-03-23T08:22:47.079621 | 2018-08-24T20:25:07 | 2018-08-24T20:25:07 | 141,323,246 | 1 | 0 | Apache-2.0 | 2018-07-18T17:38:16 | 2018-07-17T17:39:38 | Java | UTF-8 | Java | false | false | 1,674 | 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.camel.spring.processor;
import org.apache.camel.CamelContext;
import org.apache.camel.ContextTestSupport;
import org.apache.camel.component.mock.MockEndpoint;
import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
public class SpringEnricherRefTest extends ContextTestSupport {
private MockEndpoint mock;
@Override
protected void setUp() throws Exception {
super.setUp();
mock = getMockEndpoint("mock:result");
}
public void testEnrich() throws Exception {
mock.expectedBodiesReceived("test:blah");
template.sendBody("direct:start", "test");
mock.assertIsSatisfied();
}
protected CamelContext createCamelContext() throws Exception {
return createSpringCamelContext(this, "org/apache/camel/spring/processor/enricherref.xml");
}
} | [
"davsclaus@apache.org"
] | davsclaus@apache.org |
79c6d1e4e839bbb91ebebe8c8a3f512aabc8056b | 056a186236f1dab99c2cf8e553eddd1cedb47734 | /drools-wb-services/drools-wb-verifier/drools-wb-verifier-api/src/main/java/org/drools/workbench/services/verifier/api/client/checks/util/SubsumptionBlocker.java | cd255dc951f08cc6496d8321d710f285cdd3e961 | [
"Apache-2.0"
] | permissive | bingyue/drools-wb | bdd5ae52606771c95cb2aedccc14ef927753d3aa | 88dcdfc366c97984ac39a27f971a76d2a702af07 | refs/heads/master | 2021-01-12T16:36:58.397797 | 2016-10-19T14:43:17 | 2016-10-19T14:43:17 | 71,418,437 | 1 | 0 | null | 2016-10-20T02:34:16 | 2016-10-20T02:34:16 | null | UTF-8 | Java | false | false | 3,077 | java | /*
* Copyright 2016 Red Hat, Inc. and/or its affiliates.
*
* 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.drools.workbench.services.verifier.api.client.checks.util;
import org.drools.workbench.services.verifier.api.client.index.keys.UUIDKey;
import org.drools.workbench.services.verifier.api.client.cache.util.HasUUID;
import org.drools.workbench.services.verifier.api.client.cache.util.maps.InspectorList;
import org.uberfire.commons.validation.PortablePreconditions;
public class SubsumptionBlocker
extends Relation<SubsumptionBlocker> {
public static final SubsumptionBlocker EMPTY = new SubsumptionBlocker();
private final InspectorList list;
private final HasUUID item;
private SubsumptionBlocker() {
super( null );
list = null;
item = null;
}
public SubsumptionBlocker( final InspectorList list,
final HasUUID item ) {
super( null );
this.list = PortablePreconditions.checkNotNull( "list", list );
this.item = PortablePreconditions.checkNotNull( "item", item );
}
public SubsumptionBlocker( final InspectorList list,
final HasUUID item,
final SubsumptionBlocker origin ) {
super( origin );
this.list = PortablePreconditions.checkNotNull( "list", list );
this.item = PortablePreconditions.checkNotNull( "item", item );
}
private HasUUID getItem() {
return item;
}
private InspectorList getList() {
return list;
}
public boolean foundIssue() {
return item != null;
}
@Override
public UUIDKey otherUUID() {
return item.getUuidKey();
}
@Override
public boolean doesRelationStillExist() {
if ( origin != null
&& stillContainsBlockingItem( getOrigin().getItem() ) ) {
return SubsumptionResolver.isSubsumedByAnObjectInThisList( getOrigin().getList(),
getOrigin().getItem() ).foundIssue();
} else {
return false;
}
}
private boolean stillContainsBlockingItem( final HasUUID item ) {
if ( this.item instanceof InspectorList ) {
return (( InspectorList ) this.item).contains( item );
} else {
if ( parent != null ) {
return parent.stillContainsBlockingItem( item );
} else {
return false;
}
}
}
}
| [
"manstis@users.noreply.github.com"
] | manstis@users.noreply.github.com |
bf3616bd6581e883dd402e43c1b9868da49b491e | 13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3 | /crash-reproduction-ws/results/LANG-20b-1-28-Single_Objective_GGA-WeightedSum/org/apache/commons/lang3/StringUtils_ESTest.java | cf863290c2cce53dbba108c7c186c7b02ffa75fe | [
"MIT",
"CC-BY-4.0"
] | permissive | STAMP-project/Botsing-basic-block-coverage-application | 6c1095c6be945adc0be2b63bbec44f0014972793 | 80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da | refs/heads/master | 2022-07-28T23:05:55.253779 | 2022-04-20T13:54:11 | 2022-04-20T13:54:11 | 285,771,370 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 553 | java | /*
* This file was automatically generated by EvoSuite
* Tue Mar 31 09:58:45 UTC 2020
*/
package org.apache.commons.lang3;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class StringUtils_ESTest extends StringUtils_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
78b8db26a4e4853704173e003b3a2d1c55389467 | 753244933fc4465b0047821aea81c311738e1732 | /core/target/java-D no-inline/ts8/src/thx/Orderings.java | 1b9a22d1da6d2c224935ed74db8535e5c5cdd9b4 | [
"MIT"
] | permissive | mboussaa/HXvariability | abfaba5452fecb1b83bc595dc3ed942a126510b8 | ea32b15347766b6e414569b19cbc113d344a56d9 | refs/heads/master | 2021-01-01T17:45:54.656971 | 2017-07-26T01:27:49 | 2017-07-26T01:27:49 | 98,127,672 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | true | 2,346 | java | // Generated by Haxe 3.3.0
package thx;
import haxe.root.*;
@SuppressWarnings(value={"rawtypes", "unchecked"})
public class Orderings extends haxe.lang.HxObject
{
static
{
//line 27 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Ord.hx"
java.lang.Object __temp_stmt2 = null;
//line 27 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Ord.hx"
{
//line 29 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Ord.hx"
haxe.lang.Function __temp_odecl1 = ( (( thx.Orderings_Anon_29__Fun.__hx_current != null )) ? (thx.Orderings_Anon_29__Fun.__hx_current) : (thx.Orderings_Anon_29__Fun.__hx_current = ((thx.Orderings_Anon_29__Fun) (new thx.Orderings_Anon_29__Fun()) )) );
//line 27 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Ord.hx"
__temp_stmt2 = new haxe.lang.DynamicObject(new java.lang.String[]{"append", "zero"}, new java.lang.Object[]{__temp_odecl1, thx.OrderingImpl.EQ}, new java.lang.String[]{}, new double[]{});
}
//line 27 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Ord.hx"
thx.Orderings.monoid = ((java.lang.Object) (__temp_stmt2) );
}
public Orderings(haxe.lang.EmptyObject empty)
{
}
public Orderings()
{
//line 26 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Ord.hx"
thx.Orderings.__hx_ctor_thx_Orderings(this);
}
public static void __hx_ctor_thx_Orderings(thx.Orderings __temp_me107)
{
}
public static java.lang.Object monoid;
public static thx.OrderingImpl negate(thx.OrderingImpl o)
{
//line 36 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Ord.hx"
switch (o)
{
case LT:
{
//line 36 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Ord.hx"
return thx.OrderingImpl.GT;
}
case GT:
{
//line 36 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Ord.hx"
return thx.OrderingImpl.LT;
}
case EQ:
{
//line 36 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Ord.hx"
return thx.OrderingImpl.EQ;
}
}
//line 36 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Ord.hx"
return null;
}
public static java.lang.Object __hx_createEmpty()
{
//line 26 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Ord.hx"
return new thx.Orderings(haxe.lang.EmptyObject.EMPTY);
}
public static java.lang.Object __hx_create(haxe.root.Array arr)
{
//line 26 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Ord.hx"
return new thx.Orderings();
}
}
| [
"mohamed.boussaa@inria.fr"
] | mohamed.boussaa@inria.fr |
123b09178198f01a81b352f0a0eaca6c7a59d450 | 6b34e9f52ebd095dc190ee9e89bcb5c95228aed6 | /l2gw-scripts/highfive/data/scripts/ai/AiDragonKnight3.java | b8b854ba3f98d867f43a0eb16b1455761a6cc7e8 | [] | no_license | tablichka/play4 | 86c057ececdb81f24fc493c7557b7dbb7260218d | b0c7d142ab162b7b37fe79d203e153fcf440a8a6 | refs/heads/master | 2022-04-25T17:04:32.244384 | 2020-04-27T12:59:45 | 2020-04-27T12:59:45 | 259,319,030 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,214 | java | package ai;
import ai.base.WarriorUseSkill;
import ru.l2gw.commons.math.Rnd;
import ru.l2gw.gameserver.model.L2Character;
import ru.l2gw.gameserver.model.L2Skill;
import ru.l2gw.gameserver.tables.SkillTable;
/**
* @author: rage
* @date: 04.09.11 21:00
*/
public class AiDragonKnight3 extends WarriorUseSkill
{
public AiDragonKnight3(L2Character actor)
{
super(actor);
IsAggressive = 1;
Skill01_ID = SkillTable.getInstance().getInfo(443219969);
Skill01_Probablity = 1000;
Skill01_Target = 1;
Skill02_ID = SkillTable.getInstance().getInfo(443088897);
Skill02_Probablity = 500;
Skill02_Check_Dist = 1;
Skill02_Dist_Max = 150;
HATE_SKILL_Weight_Point = 10000.000000f;
}
@Override
protected void onEvtSpawn()
{
_thisActor.createOnePrivate(22847, "AiDragonWarrior", 0, 0, _thisActor.getX() + 30, _thisActor.getY() + 10, _thisActor.getZ(), 0, 0, 0, 0);
_thisActor.createOnePrivate(22847, "AiDragonWarrior", 0, 0, _thisActor.getX() + 30, _thisActor.getY() - 10, _thisActor.getZ(), 0, 0, 0, 0);
_thisActor.i_ai0 = 0;
super.onEvtSpawn();
}
@Override
protected void onEvtAttacked(L2Character attacker, int damage, L2Skill skill)
{
if( _thisActor.i_ai0 == 0 )
{
broadcastScriptEvent(14001, 0, null, 300);
_thisActor.i_ai0++;
}
super.onEvtAttacked(attacker, damage, skill);
}
@Override
protected void onEvtManipulation(L2Character target, int aggro, L2Skill skill)
{
addAttackDesire(target, (int)( aggro * HATE_SKILL_Weight_Point ), 0);
super.onEvtManipulation(target, aggro, skill);
}
@Override
protected void onEvtDead(L2Character killer)
{
if(true )// gg.GetItemCollectable(myself.sm) == 1 )
{
if( Rnd.get(5) < 2 )
{
_thisActor.createOnePrivate(22845, "AiDragonKnight5", 0, 0, _thisActor.getX(), _thisActor.getY(), _thisActor.getZ(), 0, 1000, getStoredIdFromCreature(_thisActor.getMostHated()), 0);
}
}
else if( Rnd.get(5) < 1 )
{
_thisActor.createOnePrivate(22845, "AiDragonKnight5", 0, 0, _thisActor.getX(), _thisActor.getY(), _thisActor.getZ(), 0, 1000, getStoredIdFromCreature(_thisActor.getMostHated()), 0);
}
super.onEvtDead(killer);
}
}
| [
"ubuntu235@gmail.com"
] | ubuntu235@gmail.com |
d94033f4a5033f892dd1f4a01d1271c284a41c86 | afd91358ff5d2cd868153731ec5f8b6c03df630a | /commons/domain/src/main/java/com/redhat/gpe/domain/integration/salesforce/QueryRecordsCommunity.java | 962f4b87c966542e842db693a22eca14c8ea7912 | [] | no_license | jbride/OPEN_Reporting | 729797547e4f13037a989ae8a5368f48665256dc | a9a39de8a7a6d9fab61dd1f06c46a9b81c7fe58c | refs/heads/master | 2022-10-02T15:03:29.125113 | 2020-03-23T14:20:24 | 2020-03-23T14:20:24 | 249,445,329 | 0 | 0 | null | 2022-09-22T19:08:03 | 2020-03-23T13:56:24 | TSQL | UTF-8 | Java | false | false | 696 | java | /*
* Salesforce Query DTO generated by camel-salesforce-maven-plugin
* Generated on: Fri Feb 19 14:36:19 BRST 2016
*/
package com.redhat.gpe.domain.integration.salesforce;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import org.apache.camel.component.salesforce.api.dto.AbstractQueryRecordsBase;
import java.util.List;
/**
* Salesforce QueryRecords DTO for type Community
*/
public class QueryRecordsCommunity extends AbstractQueryRecordsBase {
@XStreamImplicit
private List<Community> records;
public List<Community> getRecords() {
return records;
}
public void setRecords(List<Community> records) {
this.records = records;
}
}
| [
"jbride2001@yahoo.com"
] | jbride2001@yahoo.com |
350eab45eb9c70d751c0848ae4cc5745c13e29a9 | 302cc26a9ddbfd27a149cbabec49b60ac327099a | /battle-models/src/main/java/com/battle/domain/BattleMessage.java | 2bf190cd824af5d98a9858b7a8466465429b07af | [] | no_license | wangyuchuan12/battle2.0 | 48a44e89608bd4be86abec0dc46f68f21ea04136 | b9dfce9ed6f636d4ca4297931ce2a5a2fbcaf948 | refs/heads/master | 2020-03-16T05:33:24.413475 | 2018-05-28T11:24:26 | 2018-05-28T11:24:26 | 132,534,637 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,572 | java | package com.battle.domain;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.Type;
import org.joda.time.DateTime;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.wyc.annotation.IdAnnotation;
import com.wyc.annotation.ParamAnnotation;
import com.wyc.annotation.ParamEntityAnnotation;
@ParamEntityAnnotation
@Entity
@Table(name="battle_message")
public class BattleMessage {
@Id
@IdAnnotation
private String id;
@ParamAnnotation
@Column
private String touser;
@ParamAnnotation
@Column(name="template_id")
private String templateId;
@ParamAnnotation
@Column
private String page;
@ParamAnnotation
@Column(name="form_id")
private String formId;
@ParamAnnotation
@Column
private String value;
@ParamAnnotation
@Column
private String color;
@ParamAnnotation
@Column(name="emphasis_keyword")
private String emphasisKeyword;
@ParamAnnotation
@Column(name = "create_at")
@Type(type="org.jadira.usertype.dateandtime.joda.PersistentDateTime")
@JsonIgnore
private DateTime createAt;
@ParamAnnotation
@Column(name = "update_at")
@Type(type="org.jadira.usertype.dateandtime.joda.PersistentDateTime")
@JsonIgnore
private DateTime updateAt;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTouser() {
return touser;
}
public void setTouser(String touser) {
this.touser = touser;
}
public String getTemplateId() {
return templateId;
}
public void setTemplateId(String templateId) {
this.templateId = templateId;
}
public String getPage() {
return page;
}
public void setPage(String page) {
this.page = page;
}
public String getFormId() {
return formId;
}
public void setFormId(String formId) {
this.formId = formId;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public String getEmphasisKeyword() {
return emphasisKeyword;
}
public void setEmphasisKeyword(String emphasisKeyword) {
this.emphasisKeyword = emphasisKeyword;
}
public DateTime getCreateAt() {
return createAt;
}
public void setCreateAt(DateTime createAt) {
this.createAt = createAt;
}
public DateTime getUpdateAt() {
return updateAt;
}
public void setUpdateAt(DateTime updateAt) {
this.updateAt = updateAt;
}
}
| [
"root@dawang.local"
] | root@dawang.local |
33f29ad3526e262f581d53fb3993f5d09a32e96f | 3799d4727c4f55fa727e56ece65f93ea60bd1854 | /shapeloading/src/main/java/com/mingle/widget/ShapeLoadingDialog.java | 8cfa0d12b4ffdf10fcae3eac2419c7c2bc868a98 | [] | no_license | wuguitong/MyApplication | 5f17bd7b97e2bf3d23217d15d671e196eb925566 | acfd955642a28b076e933746b2c217db77328d08 | refs/heads/master | 2020-06-19T01:40:52.886176 | 2018-08-10T07:02:49 | 2018-08-10T07:02:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,489 | java | package com.mingle.widget;
import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.GradientDrawable;
import android.view.LayoutInflater;
import android.view.View;
import com.mingle.shapeloading.R;
/**
* Created by zzz40500 on 15/6/15.
*/
public class ShapeLoadingDialog {
private Context mContext;
private Dialog mDialog;
private LoadingView mLoadingView;
private View mDialogContentView;
public ShapeLoadingDialog(Context context) {
this.mContext=context;
init();
}
private void init() {
mDialog = new Dialog(mContext, R.style.custom_dialog);
mDialogContentView= LayoutInflater.from(mContext).inflate(R.layout.layout_dialog,null);
mLoadingView= (LoadingView) mDialogContentView.findViewById(R.id.loadView);
mDialog.setContentView(mDialogContentView);
}
public void setBackground(int color){
GradientDrawable gradientDrawable= (GradientDrawable) mDialogContentView.getBackground();
gradientDrawable.setColor(color);
}
public void setLoadingText(CharSequence charSequence){
mLoadingView.setLoadingText(charSequence);
}
public void show(){
mDialog.show();
}
public void dismiss(){
mDialog.dismiss();
}
public Dialog getDialog(){
return mDialog;
}
public void setCanceledOnTouchOutside(boolean cancel){
mDialog.setCanceledOnTouchOutside(cancel);
}
}
| [
"liangxiao6@live.com"
] | liangxiao6@live.com |
10221f21e451710fc423b233ea9d55ed2cfb42c5 | 410d05e3cd614019a6224f53c9c42c38c2876242 | /core-connector-kafka/src/main/java/com/acme/core/architecture/connector/producer/service/KafkaProducerByteArrayService.java | 4562106e363fedb879bd6cdc027346805d9450f1 | [
"MIT"
] | permissive | rsanfer/enmilocalfunciona-kafka | ab50bf58e8b59e5387c8431b8b86ced841952d7e | dc2e72a1ae7ebb03a373292133e6deb15e3e354e | refs/heads/master | 2023-04-12T09:56:55.188589 | 2021-05-18T20:10:43 | 2021-05-18T20:10:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 310 | java | package com.acme.core.architecture.connector.producer.service;
import org.apache.kafka.clients.producer.ProducerRecord;
public interface KafkaProducerByteArrayService {
public void send(String topic, byte[] bytearray);
public void send(String topic, ProducerRecord<String, byte[]> record);
}
| [
"vjmadrid@atsistemas.com"
] | vjmadrid@atsistemas.com |
3c10314c16dd9e6a9021067fc5b8cc4f2165741a | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/5/5_d371293093c850cd10a28fe7e72f84a83a6eb02e/ImagePainter/5_d371293093c850cd10a28fe7e72f84a83a6eb02e_ImagePainter_t.java | e44d009e200d7879c6008444bc24a5b93ce036ae | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 3,573 | java | /*******************************************************************************
* Copyright (c) 2012 Original authors and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Original authors and others - initial API and implementation
******************************************************************************/
package org.eclipse.nebula.widgets.nattable.painter.cell;
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
import org.eclipse.nebula.widgets.nattable.layer.cell.LayerCell;
import org.eclipse.nebula.widgets.nattable.style.CellStyleAttributes;
import org.eclipse.nebula.widgets.nattable.style.CellStyleUtil;
import org.eclipse.nebula.widgets.nattable.style.IStyle;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Rectangle;
/**
* Paints an image. If no image is provided, it will attempt to look up an image from the cell style.
*/
public class ImagePainter extends BackgroundPainter {
private Image image;
private final boolean paintBg;
public ImagePainter() {
this(null);
}
public ImagePainter(Image image) {
this(image, true);
}
public ImagePainter(Image image, boolean paintBg) {
this.image = image;
this.paintBg = paintBg;
}
@Override
public int getPreferredWidth(LayerCell cell, GC gc, IConfigRegistry configRegistry) {
Image image = getImage(cell, configRegistry);
if (image != null) {
return image.getBounds().width;
} else {
return 0;
}
}
@Override
public int getPreferredHeight(LayerCell cell, GC gc, IConfigRegistry configRegistry) {
Image image = getImage(cell, configRegistry);
if (image != null) {
return image.getBounds().height;
} else {
return 0;
}
}
@Override
public ICellPainter getCellPainterAt(int x, int y, LayerCell cell, GC gc, Rectangle bounds, IConfigRegistry configRegistry) {
Rectangle imageBounds = getImage(cell, configRegistry).getBounds();
IStyle cellStyle = CellStyleUtil.getCellStyle(cell, configRegistry);
int x0 = bounds.x + CellStyleUtil.getHorizontalAlignmentPadding(cellStyle, bounds, imageBounds.width);
int y0 = bounds.y + CellStyleUtil.getVerticalAlignmentPadding(cellStyle, bounds, imageBounds.height);
if ( x >= x0 &&
x < x0 + imageBounds.width &&
y >= y0 &&
y < y0 + imageBounds.height) {
return super.getCellPainterAt(x, y, cell, gc, bounds, configRegistry);
} else {
return null;
}
}
@Override
public void paintCell(LayerCell cell, GC gc, Rectangle bounds, IConfigRegistry configRegistry) {
if (paintBg) {
super.paintCell(cell, gc, bounds, configRegistry);
}
Image image = getImage(cell, configRegistry);
if (image != null) {
Rectangle imageBounds = image.getBounds();
IStyle cellStyle = CellStyleUtil.getCellStyle(cell, configRegistry);
gc.drawImage(
image,
bounds.x + CellStyleUtil.getHorizontalAlignmentPadding(cellStyle, bounds, imageBounds.width),
bounds.y + CellStyleUtil.getVerticalAlignmentPadding(cellStyle, bounds, imageBounds.height));
}
}
protected Image getImage(LayerCell cell, IConfigRegistry configRegistry) {
return image != null ? image : CellStyleUtil.getCellStyle(cell, configRegistry).getAttributeValue(CellStyleAttributes.IMAGE);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
1af0018fa6b10e6bafc9608354c6ca768c26bba1 | fc6c869ee0228497e41bf357e2803713cdaed63e | /weixin6519android1140/src/sourcecode/com/tencent/mm/plugin/remittance/a/a.java | d14a6e9b71e24e10fc28e053c0eaba8e5145238b | [] | no_license | hyb1234hi/reverse-wechat | cbd26658a667b0c498d2a26a403f93dbeb270b72 | 75d3fd35a2c8a0469dbb057cd16bca3b26c7e736 | refs/heads/master | 2020-09-26T10:12:47.484174 | 2017-11-16T06:54:20 | 2017-11-16T06:54:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,767 | java | package com.tencent.mm.plugin.remittance.a;
import android.app.Activity;
import android.os.Bundle;
import com.tencent.gmtrace.GMTrace;
import com.tencent.mm.plugin.remittance.ui.RemittanceAdapterUI;
import com.tencent.mm.sdk.platformtools.w;
import com.tencent.mm.wallet_core.b;
public class a
extends b
{
public a()
{
GMTrace.i(10838349971456L, 80752);
GMTrace.o(10838349971456L, 80752);
}
public b a(Activity paramActivity, Bundle paramBundle)
{
GMTrace.i(10838484189184L, 80753);
w.d("MicroMsg.RemittanceProcess", "start Process : RemittanceProcess");
c(paramActivity, RemittanceAdapterUI.class, paramBundle);
GMTrace.o(10838484189184L, 80753);
return this;
}
public final void a(Activity paramActivity, int paramInt, Bundle paramBundle)
{
GMTrace.i(10838618406912L, 80754);
GMTrace.o(10838618406912L, 80754);
}
public final String aAd()
{
GMTrace.i(10839155277824L, 80758);
GMTrace.o(10839155277824L, 80758);
return "RemittanceProcess";
}
public final void b(Activity paramActivity, Bundle paramBundle)
{
GMTrace.i(10838752624640L, 80755);
super.ae(paramActivity);
GMTrace.o(10838752624640L, 80755);
}
public final void c(Activity paramActivity, int paramInt)
{
GMTrace.i(10838886842368L, 80756);
B(paramActivity);
GMTrace.o(10838886842368L, 80756);
}
public final boolean c(Activity paramActivity, Bundle paramBundle)
{
GMTrace.i(10839021060096L, 80757);
GMTrace.o(10839021060096L, 80757);
return false;
}
}
/* Location: D:\tools\apktool\weixin6519android1140\jar\classes3-dex2jar.jar!\com\tencent\mm\plugin\remittance\a\a.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"robert0825@gmail.com"
] | robert0825@gmail.com |
cb479e586938f0ab1b68090dbac58f72718317b1 | 6732becbb46b0d2c14bf877292009b042fcd2f86 | /src/main/java/com/tchepannou/app/login/mapper/AppMyTeamsResponseMapper.java | 579eca3d32d6df90282695c52cb1318fa63b6c93 | [] | no_license | htchepannou/insidesoccer-app | 3f7dc87eb9e878fe51d78a1c84456dbdf78cdb8f | 8282aec2ff7d1c9ab59ee648821ad93cc7803025 | refs/heads/master | 2020-12-24T16:59:49.277951 | 2015-10-10T02:47:34 | 2015-10-10T02:47:34 | 42,081,710 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,436 | java | package com.tchepannou.app.login.mapper;
import com.tchepannou.app.login.client.v1.team.AppMyTeamsResponse;
import com.tchepannou.party.client.v1.PartyResponse;
import java.util.List;
import java.util.Map;
public class AppMyTeamsResponseMapper {
//-- Attributes
private List<PartyResponse> teams;
private Map<PartyResponse, List<PartyResponse>> teamsByChild;
//-- Public
public AppMyTeamsResponse map (){
AppMyTeamsResponse response = new AppMyTeamsResponse();
teams.forEach(team -> response.addTeam(team));
teamsByChild.keySet().forEach(child -> {
response.addChild(child);
teamsByChild.get(child).forEach(team -> response.link(child, team));
});
response.sortTeams();
return response;
}
public AppMyTeamsResponseMapper withTeams (List<PartyResponse> teams){
this.teams = teams;
return this;
}
public AppMyTeamsResponseMapper withTeamsByChild (Map<PartyResponse, List<PartyResponse>> teamsByChild){
this.teamsByChild = teamsByChild;
return this;
}
private int occurence(final PartyResponse team, final Map<PartyResponse, List<PartyResponse>> teamsByChildren){
int value = 0;
for (final List<PartyResponse> teams : teamsByChildren.values()){
if (teams.contains(team)){
value++;
}
}
return value;
}
}
| [
"htchepannou@expedia.com"
] | htchepannou@expedia.com |
05cedfd857b9f0273e1fe67d94981c09a719d8ba | b34654bd96750be62556ed368ef4db1043521ff2 | /jive_forum_services/tags/version-1.1.0.1/src/java/tests/com/topcoder/forum/service/failuretests/FailureTests.java | 022919fca09d47f981d65d04ad45c12d9b38564e | [] | no_license | topcoder-platform/tcs-cronos | 81fed1e4f19ef60cdc5e5632084695d67275c415 | c4ad087bb56bdaa19f9890e6580fcc5a3121b6c6 | refs/heads/master | 2023-08-03T22:21:52.216762 | 2019-03-19T08:53:31 | 2019-03-19T08:53:31 | 89,589,444 | 0 | 1 | null | 2019-03-19T08:53:32 | 2017-04-27T11:19:01 | null | UTF-8 | Java | false | false | 706 | java | /*
* Copyright (C) 2008 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.forum.service.failuretests;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* <p>This test case aggregates all Failure test cases.</p>
*
* @author zhengjuyu
* @version 1.0
*/
public class FailureTests extends TestCase {
/**
* <p>
* Returns the suite of failure test cases.
* </p>
* @return the suite of failure test cases.
*/
public static Test suite() {
final TestSuite suite = new TestSuite();
suite.addTest(MockJiveForumServiceFailure.suite());
return suite;
}
}
| [
"tingyifang@fb370eea-3af6-4597-97f7-f7400a59c12a"
] | tingyifang@fb370eea-3af6-4597-97f7-f7400a59c12a |
2193cdc39c02521b8a35f338491abb302abda5bb | 5c974834e29934f2ecaa6aea48ae434b6a18e4cf | /src/main/java/com/ivoronline/springboot_dto_jsonformat/controllers/MyController.java | 7ab4b8bbb3ecc21cecf811e43463763cd7f5e539 | [] | no_license | ivoronline/springboot_dto_jsonformat | a20403eaa4c3572d8bda4087ccdb42389305a023 | 5fd210245254720d0a20d4099248088a68b9d4c2 | refs/heads/master | 2023-03-30T17:55:46.766608 | 2021-04-13T17:35:48 | 2021-04-13T17:35:48 | 344,874,298 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 524 | java | package com.ivoronline.springboot_dto_jsonformat.controllers;
import com.ivoronline.springboot_dto_jsonformat.DTO.PersonDTO;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class MyController {
@RequestMapping("/AddPerson")
public String addPerson(@RequestBody PersonDTO personDTO) {
return personDTO.name + " is born on " + personDTO.birthday;
}
}
| [
"ivoronline@gmail.com"
] | ivoronline@gmail.com |
6c2ed0bcc99bbd31f8dda467d58b3d74796eabce | 569ce95bb1554b653468a86e0a8a9450a4215287 | /comprehensive/src/main/java/com/luo/factory/challenge/CalendarTestDrive.java | 1ba5ea36a9f09ac47e2a4d8e60618b6af7740bc0 | [] | no_license | RononoaZoro/archer-pattern | bf2449a96e77caae289b51efb0f3575d6549727d | 2bb352dcf571892686c3b3e354739b47cd5472a4 | refs/heads/master | 2022-07-30T21:43:44.248197 | 2019-11-07T07:47:22 | 2019-11-07T07:47:22 | 201,577,210 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 440 | java | package com.luo.factory.challenge;
import java.util.Arrays;
import java.util.List;
/**
* @author luoxuzheng
* @create 2019-09-15 21:15
**/
public class CalendarTestDrive {
public static void main(String[] args) {
ZoneFactory zoneFactory = new ZoneFactory();
Calendar calendar = new PacificCalendar(zoneFactory);
List<String> appts = Arrays.asList("appt 1", "appt 2");
calendar.createCalendar(appts);
calendar.print();
}
}
| [
"352907839@qq.com"
] | 352907839@qq.com |
1376923ded77f26047fdc51f93e330efab32e471 | 4e726bcc6a72842d31aae1ef3f7906d5082de529 | /CrayHomes/src/com/mrcrayfish/crayhomes/main/HomeGUI.java | 0631bce906caec6bfd94879d152d0323bab3b6ba | [] | no_license | MrCrayfish/BukkitPlugins | 58affdfda622a4945a3e1b0f92a2f974da9efb64 | 5fc248119491e5b7b4504860d3a28c60a78ef32c | refs/heads/master | 2023-03-24T07:00:45.979182 | 2016-05-29T01:56:56 | 2016-05-29T01:56:56 | 29,530,957 | 8 | 2 | null | 2016-05-29T01:56:56 | 2015-01-20T13:27:33 | Java | UTF-8 | Java | false | false | 5,088 | java | package com.mrcrayfish.crayhomes.main;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import com.mrcrayfish.crayhomes.CrayHomes;
public class HomeGUI
{
private static Material[] blocks = { Material.GRASS, Material.DIRT, Material.STONE, Material.COBBLESTONE, Material.LOG, Material.WOOD, Material.GLASS, Material.BRICK, Material.BOOKSHELF, Material.OBSIDIAN, Material.NETHER_BRICK, Material.NETHERRACK, Material.COAL_BLOCK, Material.IRON_BLOCK, Material.GOLD_BLOCK, Material.DIAMOND_BLOCK, Material.EMERALD_BLOCK, Material.HAY_BLOCK, Material.COAL_ORE, Material.IRON_ORE, Material.GOLD_ORE, Material.LAPIS_ORE, Material.DIAMOND_ORE,
Material.LEAVES, Material.WORKBENCH, Material.FURNACE, Material.CHEST, Material.REDSTONE_LAMP_OFF, Material.TNT, Material.PISTON_BASE, Material.JUKEBOX, Material.DISPENSER, Material.REDSTONE_BLOCK, Material.PACKED_ICE, Material.PUMPKIN, Material.MELON_BLOCK };
public static Inventory createHomeInventory(CrayHomes crayHomes, Player player)
{
if (!CrayHomes.owners.containsKey(player.getUniqueId()))
{
CrayHomes.owners.put(player.getUniqueId().toString(), new Homes());
}
return createHomeInventory(crayHomes, player, CrayHomes.owners.get(player.getUniqueId().toString()));
}
public static Inventory createHomeInventory(CrayHomes crayHomes, Player player, Homes homes)
{
String newPlayerName = player.getName();
if (newPlayerName.length() >= 11)
{
newPlayerName = newPlayerName.substring(0, 11);
}
Inventory inventory = Bukkit.getServer().createInventory(null, 9, newPlayerName + "'s Homes " + ChatColor.GREEN + "[Teleport]");
int count = 0;
int rows = 1;
if (homes.size() > 7)
{
for (int i = 0; i < homes.size(); i++)
{
if ((i + 2) % 9 == 0)
{
rows++;
}
}
}
int size = rows * 9;
if (size > 54)
{
size = 54;
}
inventory = Bukkit.getServer().createInventory(null, size, newPlayerName + "'s Homes " + ChatColor.GREEN + "[Teleport]");
for (Home home : homes)
{
ItemStack homeItem = new ItemStack(Material.getMaterial(home.icon));
ItemMeta homeItemMeta = homeItem.getItemMeta();
homeItemMeta.setDisplayName(home.name);
homeItem.setItemMeta(homeItemMeta);
inventory.setItem(count, homeItem);
count++;
}
ItemStack setHomeItem = new ItemStack(Material.WOOL, 1, (byte) 5);
ItemMeta setHomeItemMeta = setHomeItem.getItemMeta();
setHomeItemMeta.setDisplayName("Set Home");
setHomeItem.setItemMeta(setHomeItemMeta);
inventory.setItem(size - 2, setHomeItem);
ItemStack delHomeItem = new ItemStack(Material.WOOL, 1, (byte) 14);
ItemMeta delHomeItemMeta = delHomeItem.getItemMeta();
delHomeItemMeta.setDisplayName("Delete Home");
delHomeItem.setItemMeta(delHomeItemMeta);
inventory.setItem(size - 1, delHomeItem);
return inventory;
}
public static Inventory createDeleteHomeInventory(CrayHomes crayHomes, Player player)
{
if (!CrayHomes.owners.containsKey(player.getUniqueId()))
{
CrayHomes.owners.put(player.getUniqueId().toString(), new Homes());
}
return createDeleteHomeInventory(crayHomes, player, CrayHomes.owners.get(player.getUniqueId().toString()));
}
public static Inventory createDeleteHomeInventory(CrayHomes crayHomes, Player player, Homes homes)
{
String newPlayerName = player.getName();
if (newPlayerName.length() >= 11)
{
newPlayerName = newPlayerName.substring(0, 11);
}
Inventory inventory = Bukkit.getServer().createInventory(null, 9, newPlayerName + "'s Homes " + ChatColor.RED + "[Delete]");
int count = 0;
int rows = 1;
if (homes.size() > 7)
{
for (int i = 0; i < homes.size(); i++)
{
if ((i + 1) % 9 == 0)
{
rows++;
}
}
}
int size = rows * 9;
if (size > 54)
{
size = 54;
}
inventory = Bukkit.getServer().createInventory(null, size, newPlayerName + "'s Homes " + ChatColor.RED + "[Delete]");
for (Home home : homes)
{
ItemStack homeItem = new ItemStack(Material.getMaterial(home.icon));
ItemMeta homeItemMeta = homeItem.getItemMeta();
homeItemMeta.setDisplayName(home.name);
homeItem.setItemMeta(homeItemMeta);
inventory.setItem(count, homeItem);
count++;
}
ItemStack delHomeItem = new ItemStack(Material.WOOL, 1, (byte) 14);
ItemMeta delHomeItemMeta = delHomeItem.getItemMeta();
delHomeItemMeta.setDisplayName("Back");
delHomeItem.setItemMeta(delHomeItemMeta);
inventory.setItem(size - 1, delHomeItem);
return inventory;
}
public static Inventory createSetIconInventory(CrayHomes crayHomes, String homeName)
{
Inventory inventory = Bukkit.getServer().createInventory(null, 36, "Select Icon");
for (int i = 0; i < blocks.length; i++)
{
ItemStack iconItem = new ItemStack(blocks[i]);
ItemMeta iconItemMeta = iconItem.getItemMeta();
iconItemMeta.setDisplayName(homeName);
iconItem.setItemMeta(iconItemMeta);
inventory.setItem(i, iconItem);
}
return inventory;
}
}
| [
"mrcrayfish@hotmail.com"
] | mrcrayfish@hotmail.com |
d6421260c7ec35fc33e1015ace3306ad23943e10 | 04b1803adb6653ecb7cb827c4f4aa616afacf629 | /chrome/test/android/javatests/src/org/chromium/chrome/test/util/DisableInTabbedMode.java | 56f6d03feecb63c03b3eee95fe8bbb84fa2f0f3d | [
"BSD-3-Clause"
] | permissive | Samsung/Castanets | 240d9338e097b75b3f669604315b06f7cf129d64 | 4896f732fc747dfdcfcbac3d442f2d2d42df264a | refs/heads/castanets_76_dev | 2023-08-31T09:01:04.744346 | 2021-07-30T04:56:25 | 2021-08-11T05:45:21 | 125,484,161 | 58 | 49 | BSD-3-Clause | 2022-10-16T19:31:26 | 2018-03-16T08:07:37 | null | UTF-8 | Java | false | false | 519 | java | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.test.util;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* This annotation can be used to mark a test that should be enabled only in Document mode.
*/
@Inherited
@Retention(RetentionPolicy.RUNTIME)
public @interface DisableInTabbedMode {
}
| [
"sunny.nam@samsung.com"
] | sunny.nam@samsung.com |
9c1c0be899f8a18944a27c2248776396f05b84f4 | d9cc2a2609b39d64433efeccb8c18e0e4e0527bb | /imageio/imageio-bmp/src/test/java/com/twelvemonkeys/imageio/plugins/bmp/CURImageReaderTest.java | d4d53c4ad6e690ba6c369b2c4c4a1f9bbd4fe11d | [
"BSD-3-Clause"
] | permissive | githabibi/TwelveMonkeys | dcf7997fedfcf7868ad0264fdfb3c93a36a5081a | 0809fbfba55e6a5b8c1cf31c9f30177bfc820995 | refs/heads/master | 2022-11-29T23:32:24.326777 | 2020-08-03T15:23:40 | 2020-08-03T15:23:40 | 284,734,581 | 0 | 0 | BSD-3-Clause | 2020-08-03T15:19:37 | 2020-08-03T15:19:36 | null | UTF-8 | Java | false | false | 5,947 | java | /*
* Copyright (c) 2009, Harald Kuhr
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.twelvemonkeys.imageio.plugins.bmp;
import com.twelvemonkeys.imageio.util.ImageReaderAbstractTest;
import org.junit.Ignore;
import org.junit.Test;
import javax.imageio.ImageReadParam;
import javax.imageio.spi.ImageReaderSpi;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import static org.junit.Assert.*;
/**
* CURImageReaderTest
*
* @author <a href="mailto:harald.kuhr@gmail.com">Harald Kuhr</a>
* @author last modified by $Author: haraldk$
* @version $Id: CURImageReaderTest.java,v 1.0 Apr 1, 2008 10:39:17 PM haraldk Exp$
*/
public class CURImageReaderTest extends ImageReaderAbstractTest<CURImageReader> {
protected List<TestData> getTestData() {
return Arrays.asList(
new TestData(getClassLoaderResource("/cur/hand.cur"), new Dimension(32, 32)),
new TestData(getClassLoaderResource("/cur/zoom.cur"), new Dimension(32, 32))
);
}
protected ImageReaderSpi createProvider() {
return new CURImageReaderSpi();
}
@Override
protected CURImageReader createReader() {
return new CURImageReader();
}
protected Class<CURImageReader> getReaderClass() {
return CURImageReader.class;
}
protected List<String> getFormatNames() {
return Collections.singletonList("cur");
}
protected List<String> getSuffixes() {
return Collections.singletonList("cur");
}
protected List<String> getMIMETypes() {
return Arrays.asList("image/vnd.microsoft.cursor", "image/cursor", "image/x-cursor");
}
private void assertHotSpot(final TestData pTestData, final ImageReadParam pParam, final Point pExpected) throws IOException {
CURImageReader reader = createReader();
reader.setInput(pTestData.getInputStream());
BufferedImage image = reader.read(0, pParam);
// We can only be sure the hotspot is defined, if no param, but if defined, it must be correct
Object hotspot = image.getProperty("cursor_hotspot");
if (hotspot != Image.UndefinedProperty || pParam == null) {
// Typically never happens, because of weirdness with UndefinedProperty
assertNotNull("Hotspot for cursor not present", hotspot);
// Image weirdness
assertTrue("Hotspot for cursor undefined (java.awt.Image.UndefinedProperty)", Image.UndefinedProperty != hotspot);
assertTrue(String.format("Hotspot not a java.awt.Point: %s", hotspot.getClass()), hotspot instanceof Point);
assertEquals(pExpected, hotspot);
}
assertNotNull("Hotspot for cursor not present", reader.getHotSpot(0));
assertEquals(pExpected, reader.getHotSpot(0));
}
@Test
public void testHandHotspot() throws IOException {
assertHotSpot(getTestData().get(0), null, new Point(15, 15));
}
@Test
public void testZoomHotspot() throws IOException {
assertHotSpot(getTestData().get(1), null, new Point(13, 11));
}
@Test
public void testHandHotspotWithParam() throws IOException {
ImageReadParam param = new ImageReadParam();
assertHotSpot(getTestData().get(0), param, new Point(15, 15));
}
@Test
public void testHandHotspotExplicitDestination() throws IOException {
CURImageReader reader = createReader();
reader.setInput(getTestData().get(0).getInputStream());
BufferedImage image = reader.read(0);
// Create dest image with same data, except properties...
BufferedImage dest = new BufferedImage(
image.getColorModel(), image.getRaster(), image.getColorModel().isAlphaPremultiplied(), null
);
ImageReadParam param = new ImageReadParam();
param.setDestination(dest);
assertHotSpot(getTestData().get(0), param, new Point(15, 15));
}
// TODO: Test cursor is transparent
@Test
@Ignore("Known issue")
@Override
public void testNotBadCaching() throws IOException {
super.testNotBadCaching();
}
@Test
@Ignore("Known issue: Subsampled reading currently not supported")
@Override
public void testReadWithSubsampleParamPixels() throws IOException {
super.testReadWithSubsampleParamPixels();
}
} | [
"harald.kuhr@gmail.com"
] | harald.kuhr@gmail.com |
599aa3b1a97fa51f0c94205b57da7127d67c18ee | 29b6a856a81a47ebab7bfdba7fe8a7b845123c9e | /dingtalk/java/src/main/java/com/aliyun/dingtalkworkflow_1_0/models/GrantCspaceAuthorizationRequest.java | 8fa1df33c4311d4b8abdd3cd32e2cc87135a1841 | [
"Apache-2.0"
] | permissive | aliyun/dingtalk-sdk | f2362b6963c4dbacd82a83eeebc223c21f143beb | 586874df48466d968adf0441b3086a2841892935 | refs/heads/master | 2023-08-31T08:21:14.042410 | 2023-08-30T08:18:22 | 2023-08-30T08:18:22 | 290,671,707 | 22 | 9 | null | 2021-08-12T09:55:44 | 2020-08-27T04:05:39 | PHP | UTF-8 | Java | false | false | 1,478 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.dingtalkworkflow_1_0.models;
import com.aliyun.tea.*;
public class GrantCspaceAuthorizationRequest extends TeaModel {
@NameInMap("durationSeconds")
public Long durationSeconds;
@NameInMap("spaceId")
public String spaceId;
@NameInMap("type")
public String type;
@NameInMap("userId")
public String userId;
public static GrantCspaceAuthorizationRequest build(java.util.Map<String, ?> map) throws Exception {
GrantCspaceAuthorizationRequest self = new GrantCspaceAuthorizationRequest();
return TeaModel.build(map, self);
}
public GrantCspaceAuthorizationRequest setDurationSeconds(Long durationSeconds) {
this.durationSeconds = durationSeconds;
return this;
}
public Long getDurationSeconds() {
return this.durationSeconds;
}
public GrantCspaceAuthorizationRequest setSpaceId(String spaceId) {
this.spaceId = spaceId;
return this;
}
public String getSpaceId() {
return this.spaceId;
}
public GrantCspaceAuthorizationRequest setType(String type) {
this.type = type;
return this;
}
public String getType() {
return this.type;
}
public GrantCspaceAuthorizationRequest setUserId(String userId) {
this.userId = userId;
return this;
}
public String getUserId() {
return this.userId;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
8e333a981df21e76e3b5312759e3f108b3eb4162 | cc828fa93854913040a1c3ec63a55163ccb7a20d | /HW03/src/main/java/hr/fer/zemris/java/tecaj/hw3/ComplexNumberException.java | fd72d887d77254112472a1443f33874af1c9774e | [
"MIT"
] | permissive | 51ebyte/java-course | c12d814c5f514ff699bbadd0d40c2be39d172526 | 5782802112679373e1d42a03f814cdaeca84875f | refs/heads/master | 2021-06-19T04:32:34.641789 | 2017-06-16T16:32:49 | 2017-06-16T16:32:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,173 | java | package hr.fer.zemris.java.tecaj.hw3;
/**
* Thrown to indicate that there is error with complex number object.
* @author Filip Gulan
* @version 1.0
*/
public class ComplexNumberException extends RuntimeException {
/**
* A new serialVersionUID.
*/
private static final long serialVersionUID = 2188668868628763045L;
/**
* Constructs <code>ComplexNumberException</code> with no detailed message.
*/
public ComplexNumberException() {
super();
}
/**
* Constructs <code>ComplexNumberException</code> with the specified detailed message and cause.
* @param message Detail message.
* @param cause Cause of exception.
*/
public ComplexNumberException(String message, Throwable cause) {
super(message, cause);
}
/**
* Constructs <code>ComplexNumberException</code> with detailed message.
* @param message Specified message.
*/
public ComplexNumberException(String message) {
super(message);
}
/**
* Constructs <code>ComplexNumberException</code> with the specified cause.
* @param cause Specified cause.
*/
public ComplexNumberException(Throwable cause) {
super(cause);
}
}
| [
"filip.gulan@infinum.hr"
] | filip.gulan@infinum.hr |
2c032aab98ee602b1e58eb81e492d994627c62c6 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/29/29_6e908a03f1ee76b9fafe7c2a12bee9d0292bfd1f/UsersTest/29_6e908a03f1ee76b9fafe7c2a12bee9d0292bfd1f_UsersTest_t.java | 7064c937849cffa086df3ad659c72f786475e862 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 3,779 | java | package org.mdissjava.api;
import java.io.IOException;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.impl.client.DefaultHttpClient;
import org.junit.Test;
import org.mdissjava.api.helpers.ApiHelper;
public class UsersTest {
private final String user = "cerealguy";
private final String secret = "I/eN3CaDswAqPDMz+fgyeWRNyeDv+ywVbgNFtZlLXgA=";
@Test
public void HttpGetUserFollowingsTest() throws ClientProtocolException, IOException {
String url = "http://127.0.0.1:8080/mdissapi/api/1.0/users/cerealguy/following";
HttpGet get = ApiHelper.assembleHttpGet(this.user, this.secret, url);
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(get);
String message = ApiHelper.inputStreamToOutputStream(response.getEntity().getContent()).toString();
System.out.println(message);
}
@Test
public void HttpGetUserFollowersTest() throws ClientProtocolException, IOException {
String url = "http://127.0.0.1:8080/mdissapi/api/1.0/users/cerealguy/followers";
HttpGet get = ApiHelper.assembleHttpGet(this.user, this.secret, url);
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(get);
String message = ApiHelper.inputStreamToOutputStream(response.getEntity().getContent()).toString();
System.out.println(message);
}
@Test
public void HttpGetUserTest() throws ClientProtocolException, IOException {
String url = "http://127.0.0.1:8080/mdissapi/api/1.0/users/cerealguy/";
HttpGet get = ApiHelper.assembleHttpGet(this.user, this.secret, url);
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(get);
String message = ApiHelper.inputStreamToOutputStream(response.getEntity().getContent()).toString();
System.out.println(message);
}
@Test
public void HttpUpdateUserTest() throws ClientProtocolException, IOException {
String data = "{\"name\":\"Cruz\"}";
String url = "http://127.0.0.1:8080/mdissapi/api/1.0/users/cerealguy/";
HttpPut put = ApiHelper.assembleHttpPut(this.user, this.secret, data, url);
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(put);
String message = ApiHelper.inputStreamToOutputStream(response.getEntity().getContent()).toString();
System.out.println(message);
}
/*
@Test
public void HttpCreateUserTest() throws ClientProtocolException, IOException {
String data = "{\"title\":\"Me\",\"userNick\":\"horl\"}";
String url = "http://127.0.0.1:8080/mdissapi/api/1.0/users/";
HttpPost post = ApiHelper.assembleHttpPost(this.user, this.secret, data, url);
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(post);
String message = ApiHelper.inputStreamToOutputStream(response.getEntity().getContent()).toString();
System.out.println(message);
}
*/
@Test
public void HttpGetUserAlbumsTest() throws ClientProtocolException, IOException {
String url = "http://127.0.0.1:8080/mdissapi/api/1.0/users/cerealguy/albums";
HttpGet get = ApiHelper.assembleHttpGet(this.user, this.secret, url);
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(get);
String message = ApiHelper.inputStreamToOutputStream(response.getEntity().getContent()).toString();
System.out.println(message);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
7fccc72946bc9fa58697e0f236c5ebc0c40431a7 | 821ed0666d39420d2da9362d090d67915d469cc5 | /protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/types/BgpFsActionTrafficActionTest.java | fa6741c99f6a5431f7d9f4de32fd6dfe1a87e906 | [
"Apache-2.0"
] | permissive | LenkayHuang/Onos-PNC-for-PCEP | 03b67dcdd280565169f2543029279750da0c6540 | bd7d201aba89a713f5ba6ffb473aacff85e4d38c | refs/heads/master | 2021-01-01T05:19:31.547809 | 2016-04-12T07:25:13 | 2016-04-12T07:25:13 | 56,041,394 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,335 | java | /*
* Copyright 2016 Open Networking Laboratory
*
* 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.onosproject.bgpio.types;
import org.junit.Test;
import com.google.common.testing.EqualsTester;
/**
* Test for traffic action flow specification component.
*/
public class BgpFsActionTrafficActionTest {
private final BgpFsActionTrafficAction tlv1 = new BgpFsActionTrafficAction(new byte[100]);
private final BgpFsActionTrafficAction sameAsTlv1 = new BgpFsActionTrafficAction(new byte[100]);
private final BgpFsActionTrafficAction tlv2 = new BgpFsActionTrafficAction(new byte[200]);
@Test
public void testEquality() {
new EqualsTester()
.addEqualityGroup(tlv1, sameAsTlv1)
.addEqualityGroup(tlv2)
.testEquals();
}
}
| [
"826080529@qq.com"
] | 826080529@qq.com |
6c403624fbc8349317f1602aa91a8dd9ac33ada6 | 3cdd34647078a9a117d5c7a2e248aa730f2963ab | /diagnostic/common/src/test/java/org/terracotta/diagnostic/common/json/TestModule.java | 6d4acfe3101d881d040e9cab80949929a3e2b353 | [
"Apache-2.0"
] | permissive | mathieucarbou/terracotta-platform | f5ae1dd8f905ff4462ece8afe707c08dfdac2518 | 7a155e79ba8ecf76fba1edf9c22bbeb5eaee0b97 | refs/heads/master | 2023-07-24T19:07:59.961201 | 2023-07-05T17:01:31 | 2023-07-05T17:01:31 | 44,820,939 | 1 | 0 | null | 2016-12-12T18:50:06 | 2015-10-23T15:17:29 | Java | UTF-8 | Java | false | false | 2,493 | java | /*
* Copyright Terracotta, 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 org.terracotta.diagnostic.common.json;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.databind.module.SimpleModule;
import org.terracotta.diagnostic.common.JsonDiagnosticCodecTest;
import org.terracotta.json.Json;
/**
* @author Mathieu Carbou
*/
public class TestModule extends SimpleModule implements Json.Module {
private static final long serialVersionUID = 1L;
public TestModule() {
super(TestModule.class.getSimpleName(), new Version(1, 0, 0, null, null, null));
setMixInAnnotation(JsonDiagnosticCodecTest.Vegie.class, VegieMixin.class);
setMixInAnnotation(JsonDiagnosticCodecTest.Tomato.class, TomatoMixin.class);
setMixInAnnotation(JsonDiagnosticCodecTest.Pepper.class, PepperMixin.class);
}
public static abstract class VegieMixin<T extends JsonDiagnosticCodecTest.CookingManual> extends JsonDiagnosticCodecTest.Vegie<T> {
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
private final T cookingManual;
public VegieMixin(T cookingManual, String color) {
super(cookingManual, color);
this.cookingManual = cookingManual;
}
}
public static class TomatoMixin extends JsonDiagnosticCodecTest.Tomato {
@JsonCreator
public TomatoMixin(@JsonProperty("cookingManual") JsonDiagnosticCodecTest.TomatoCooking cookingManual,
@JsonProperty("color") String color) {
super(cookingManual, color);
}
}
public static class PepperMixin extends JsonDiagnosticCodecTest.Pepper {
@JsonCreator
public PepperMixin(@JsonProperty("cookingManual") JsonDiagnosticCodecTest.TomatoCooking cookingManual,
@JsonProperty("color") String color) {
super(cookingManual, color);
}
}
}
| [
"mathieu.carbou@gmail.com"
] | mathieu.carbou@gmail.com |
03fced96a0e61d4881a4b55a76eefa772c7f404f | ee4cbc27087d3b7f4da7de2a36c39a2ebf381f79 | /eis-yqfs-parent/eis-yqfs-facade/src/main/java/com/prolog/eis/model/tk/BackStorePlan.java | d3c0386afcf7d0d8738d4ffd4d8fb3d278937ecf | [] | no_license | Chaussure-org/eis-yq-plg | 161126bd784095bb5eb4b45ae581439169fa0e38 | 19313dbbc74fbe79e38f35594ee5a5b3dc26b3cb | refs/heads/master | 2023-01-02T08:27:57.747759 | 2020-10-19T07:22:52 | 2020-10-19T07:22:52 | 305,276,116 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,428 | java | package com.prolog.eis.model.tk;
import java.util.Date;
import com.prolog.framework.core.annotation.AutoKey;
import com.prolog.framework.core.annotation.Column;
import com.prolog.framework.core.annotation.Id;
import com.prolog.framework.core.annotation.Table;
import io.swagger.annotations.ApiModelProperty;
/**
* 退库计划
* @author tg
*
*/
@Table("back_store_plan")
public class BackStorePlan {
@Id
@Column("id")
@AutoKey(type = AutoKey.TYPE_IDENTITY)
@ApiModelProperty("id")
private int id;
@Column("name")
@ApiModelProperty("退库计划名称")
private String name;
@Column("remark")
@ApiModelProperty("备注")
private String remark;
@Column("create_time")
@ApiModelProperty("创建时间")
private Date createTime;
@Column("state")
@ApiModelProperty("计划状态(0新建;10已下发;20执行中)")
private int state;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public int getState() {
return state;
}
public void setState(int state) {
this.state = state;
}
}
| [
"chaussure@qq.com"
] | chaussure@qq.com |
162d9742c094756c44d5a5582e07a279587a81f5 | 48b016c8eb1e33be1077a5e55482d10ebd023393 | /src/main/java/ctp/thostapi/CThostFtdcMarketDataBid45Field.java | 0f1573fe41b47cc8a7d037d25d15608ef40f3ff7 | [
"Apache-2.0",
"ICU"
] | permissive | yellow013/jctp_bak | 17776f152024cf0afea0a8c476ea873f8dedc9e0 | c293756c2e16a6cff18614f59e4a405eba9cee89 | refs/heads/master | 2021-02-06T16:02:43.465965 | 2020-02-29T08:19:27 | 2020-02-29T08:19:27 | 243,929,609 | 0 | 0 | Apache-2.0 | 2020-10-13T19:56:55 | 2020-02-29T08:10:02 | C++ | UTF-8 | Java | false | false | 2,149 | java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package ctp.thostapi;
public class CThostFtdcMarketDataBid45Field {
private long swigCPtr;
protected boolean swigCMemOwn;
protected CThostFtdcMarketDataBid45Field(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(CThostFtdcMarketDataBid45Field obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
thosttraderapiJNI.delete_CThostFtdcMarketDataBid45Field(swigCPtr);
}
swigCPtr = 0;
}
}
public void setBidPrice4(double value) {
thosttraderapiJNI.CThostFtdcMarketDataBid45Field_BidPrice4_set(swigCPtr, this, value);
}
public double getBidPrice4() {
return thosttraderapiJNI.CThostFtdcMarketDataBid45Field_BidPrice4_get(swigCPtr, this);
}
public void setBidVolume4(int value) {
thosttraderapiJNI.CThostFtdcMarketDataBid45Field_BidVolume4_set(swigCPtr, this, value);
}
public int getBidVolume4() {
return thosttraderapiJNI.CThostFtdcMarketDataBid45Field_BidVolume4_get(swigCPtr, this);
}
public void setBidPrice5(double value) {
thosttraderapiJNI.CThostFtdcMarketDataBid45Field_BidPrice5_set(swigCPtr, this, value);
}
public double getBidPrice5() {
return thosttraderapiJNI.CThostFtdcMarketDataBid45Field_BidPrice5_get(swigCPtr, this);
}
public void setBidVolume5(int value) {
thosttraderapiJNI.CThostFtdcMarketDataBid45Field_BidVolume5_set(swigCPtr, this, value);
}
public int getBidVolume5() {
return thosttraderapiJNI.CThostFtdcMarketDataBid45Field_BidVolume5_get(swigCPtr, this);
}
public CThostFtdcMarketDataBid45Field() {
this(thosttraderapiJNI.new_CThostFtdcMarketDataBid45Field(), true);
}
}
| [
"wk9988@gmail.com"
] | wk9988@gmail.com |
e9b4cfdf2c9e50ede1e26f8a3939864498ffc213 | 17aa64e839f88415d5778025f393b054a2374de0 | /app/src/main/java/com/aserbao/aserbaosandroid/aaSource/android/media/mediaRecorder/MediaRecorderAudioActivity.java | c7073eb9287455dff5e8c23336a45ce066333c48 | [] | no_license | zhuhuajian0527/AserbaosAndroid | dc7093e7a04b4fd8b37dc65cfba4f8f7b3c8f471 | b10f87b01e580f0c88264981ec3e36830f04901a | refs/heads/master | 2021-03-28T18:39:19.932430 | 2020-03-16T12:51:33 | 2020-03-16T12:51:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,911 | java | package com.aserbao.aserbaosandroid.aaSource.android.media.mediaRecorder;
import android.media.MediaRecorder;
import android.view.View;
import com.aserbao.aserbaosandroid.comon.base.BaseRecyclerViewActivity;
import com.aserbao.aserbaosandroid.comon.base.beans.BaseRecyclerBean;
import java.io.IOException;
import static com.aserbao.aserbaosandroid.comon.commonData.StaticFinalValues.MUSIC_PATH_NAME;
public class MediaRecorderAudioActivity extends BaseRecyclerViewActivity {
private MediaRecorder mMediaRecorder;
@Override
public void initGetData() {
mBaseRecyclerBean.add(new BaseRecyclerBean("点击开始录音",0));
mBaseRecyclerBean.add(new BaseRecyclerBean("点击暂停录音",1));
}
@Override
public void itemClickBack(View view, int position, boolean isLongClick, int comeFrom) {
switch (position){
case 0:
useMediaRecorderAudio();
break;
case 1:
stop();
break;
}
}
/**
* 使用MediaRecorder录制音频
*/
private void useMediaRecorderAudio() {
mMediaRecorder = new MediaRecorder();
mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
mMediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
mMediaRecorder.setOutputFile(MUSIC_PATH_NAME);
try {
mMediaRecorder.prepare();
} catch (IOException e) {
e.printStackTrace();
}
mMediaRecorder.start(); // Recording is now started
}
public void stop(){
if (mMediaRecorder != null) {
mMediaRecorder.stop();
mMediaRecorder.reset(); // You can reuse the object by going back to setAudioSource() step
mMediaRecorder.release();
}
}
}
| [
"aserbao@163.com"
] | aserbao@163.com |
86128e854bc2db3cfd8a17b2167eceec3d41ab34 | cf0704535a27e4dc1aa80d87c0f5d417ea20aa5f | /evote/src/main/java/com/jaha/evote/mapper/BannerPopMapper.java | a16e4c82c9981ac27e8506def3b5b8edcf458662 | [] | no_license | sms8884/evote | 7f7931f785f4bce9e342b3b76ba0b4d532a38999 | 99940a43840b853d1f4c27858912c77bd581297e | refs/heads/master | 2021-07-04T06:31:26.164142 | 2017-09-26T07:02:47 | 2017-09-26T07:02:47 | 104,844,695 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,592 | java | /**
* Copyright (c) 2016 JAHA SMART CORP., LTD ALL RIGHT RESERVED
*/
package com.jaha.evote.mapper;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import com.jaha.evote.domain.BannerPop;
/**
* <pre>
* Class Name : BannerPopMapper.java
* Description : Description
*
* Modification Information
*
* Mod Date Modifier Description
* ----------- -------- ---------------------------
* 2016. 10. 28. jjpark Generation
* </pre>
*
* @author jjpark
* @since 2016. 10. 28.
* @version 1.0
*/
@Mapper
public interface BannerPopMapper {
/**
* 배너/팝업 카운트 조회
*
* @param searchParam
* @return
*/
public int selectBannerPopListCount(BannerPop searchParam);
/**
* 배너/팝업 목록 조회
*
* @param searchParam
* @return
*/
public List<BannerPop> selectBannerPopList(BannerPop searchParam);
/**
* 배너/팝업 상세 조회
*
* @param param
* @return
*/
public BannerPop selectBannerPop(Map<String, Object> param);
/**
* 메인 배너/팝업 목록 조회
*
* @param param
* @return
*/
public List<BannerPop> selectMainBannerPopList(Map<String, Object> param);
/**
* 배너/팝업 등록
*
* @param bannerPop
* @return
*/
public int insertBannerPop(BannerPop bannerPop);
/**
* 배너/팝업 수정
*
* @param bannerPop
* @return
*/
public int updateBannerPop(BannerPop bannerPop);
}
| [
"sms8884@nate.com"
] | sms8884@nate.com |
957c61248a3023c90986a4218c407455f50971f7 | 5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1 | /Code Snippet Repository/Struts/Struts1878.java | b2032789e2612606551fa54060beb95384049cfa | [] | no_license | saber13812002/DeepCRM | 3336a244d4852a364800af3181e03e868cf6f9f5 | be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9 | refs/heads/master | 2023-03-16T00:08:06.473699 | 2018-04-18T05:29:50 | 2018-04-18T05:29:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 873 | java | public void testNoContentMultipartRequest() throws Exception {
MockHttpServletRequest req = new MockHttpServletRequest();
req.setCharacterEncoding("text/html");
req.setMethod("post");
req.addHeader("Content-type", "multipart/form-data");
req.setContent(null); // there is no content
MyFileupAction action = container.inject(MyFileupAction.class);
MockActionInvocation mai = new MockActionInvocation();
mai.setAction(action);
mai.setResultCode("success");
mai.setInvocationContext(ActionContext.getContext());
ActionContext.getContext().setParameters(HttpParameters.create().build());
ActionContext.getContext().put(ServletActionContext.HTTP_REQUEST, createMultipartRequest(req, 2000));
interceptor.intercept(mai);
assertTrue(action.hasErrors());
}
| [
"Qing.Mi@my.cityu.edu.hk"
] | Qing.Mi@my.cityu.edu.hk |
a7d8ea1a4b3cc092f5149981de3d8271022171c7 | 0849df64da2b5fef78ac24c55533ea3f7d001a6c | /datingBall/src/main/java/edu/com/app/news/newsList/NewsPresenter.java | dd15218a92aaefb638c227d3ddca50a393c29449 | [
"Apache-2.0"
] | permissive | CNmark/MVPCommon | ea8207b9bc365cc0c0dba1caf97b2809e6a05396 | aa582b5d54850252019cd8656a0f465a4dd3689b | refs/heads/master | 2021-01-18T18:12:29.417031 | 2016-05-31T10:05:27 | 2016-05-31T10:05:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,671 | java | package edu.com.app.news.newsList;
import android.content.Context;
import edu.com.base.ui.BaseView;
/**
* Created by Anthony on 2016/5/3.
* Class Note: Presenter in MVP
* see {@link NewsContract}-----------Manager role of MVP
* &{@link NewsPresenter}------------Presenter
* &{@link NewsFragment}-------------View
* &{@link NewsData}-----------------Model
*/
public class NewsPresenter implements NewsContract.Presenter, NewsContract.onGetChannelListListener {
private NewsContract.View mView;
private Context mContext;
private NewsData mData;
public NewsPresenter(Context mContext) {
this.mContext = mContext;
// this.mView = mView;
// mView.setPresenter(this);//!!! bind presenter for View
mData = new NewsData(mContext, this);//!!!bind data listener to Model
}
@Override
public void getData(String url) {
// TODO: 2016/5/6 传递给model层处理数据
try {
mData.parseUrl(url);
} catch (Exception e) {
this.onError();
e.printStackTrace();
}
}
@Override
public void onSuccess() {
// mView.hideLoading();
mView.hideProgress();
mView.onDataReceived(mData.getChannels());
}
@Override
public void onError() {
// mView.showEmpty("data error", new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// }
// });
mView.showMessage("error");
}
@Override
public void attachView(BaseView view) {
mView = (NewsContract.View) view;
}
@Override
public void detachView() {
}
}
| [
"838577576@qq.com"
] | 838577576@qq.com |
0321d97d1cb521480bf2db2443e23fe5538dee05 | a3bd3b51694c78649560a40f91241fda62865b18 | /src/test/java/com/alibaba/druid/bvt/sql/oracle/select/OracleSelectTest_param.java | 5a9e96853ca5a5f739220e5bb6ebabbc0b1ee831 | [
"Apache-2.0"
] | permissive | kerry8899/druid | e96d7ccbd03353e47a97bea8388d46b2fe173f61 | a7cd07aac11c49d4d7d3e1312c97b6513efd2daa | refs/heads/master | 2021-01-23T02:00:33.500852 | 2019-03-29T10:14:34 | 2019-03-29T10:14:34 | 85,957,671 | 0 | 0 | null | 2017-03-23T14:14:01 | 2017-03-23T14:14:01 | null | UTF-8 | Java | false | false | 1,976 | java | /*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.druid.bvt.sql.oracle.select;
import com.alibaba.druid.sql.OracleTest;
import com.alibaba.druid.sql.SQLUtils;
import com.alibaba.druid.sql.ast.SQLStatement;
import com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser;
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleSchemaStatVisitor;
import com.alibaba.druid.util.JdbcConstants;
import org.junit.Assert;
import java.util.List;
public class OracleSelectTest_param extends OracleTest {
private String dbType = JdbcConstants.ORACLE;
public void test_0() throws Exception {
String sql = //
"select c1 from t1 t where t.c2=1 and (t.c3=1 or t.c3=5)"; //
List<SQLStatement> statementList = SQLUtils.parseStatements(sql, dbType);
assertEquals(1, statementList.size());
SQLStatement stmt = statementList.get(0);
assertEquals("SELECT c1\n" +
"FROM t1 t\n" +
"WHERE t.c2 = 1\n" +
"\tAND (t.c3 = 1\n" +
"\t\tOR t.c3 = 5)", SQLUtils.toSQLString(stmt, dbType));
assertEquals("SELECT c1\n" +
"FROM t1 t\n" +
"WHERE t.c2 = ?\n" +
"\tAND (t.c3 = ?)", SQLUtils.toSQLString(stmt, dbType, new SQLUtils.FormatOption(true, true, true)));
}
}
| [
"372822716@qq.com"
] | 372822716@qq.com |
99740dfe9e8bab0357df8cb80e0486f6bef803a7 | fa7e89fe2e7ea936ff2634e3c9adf1a6aaf1ad29 | /jaxb/extract-data-v1/ch/admin/geo/schemas/v_d/oereb/_1_0/extractdata/Theme.java | 67943091010460bcc1e4b42aa595cd6bd1e686b5 | [
"MIT"
] | permissive | edigonzales-archiv/oereb-rahmenmodell-tests | b3da73e3f74536b97a132325e78cf05d887924d6 | 292adf552f37bc82d4164b7746884b998fdccc7e | refs/heads/master | 2021-09-07T06:09:57.471579 | 2018-02-18T14:38:22 | 2018-02-18T14:38:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,438 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2017.12.16 at 12:11:56 PM CET
//
package ch.admin.geo.schemas.v_d.oereb._1_0.extractdata;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for Theme complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="Theme">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Code" type="{http://schemas.geo.admin.ch/V_D/OeREB/1.0/ExtractData}ThemeCode"/>
* <element name="Text" type="{http://schemas.geo.admin.ch/V_D/OeREB/1.0/ExtractData}LocalisedText"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Theme", propOrder = {
"code",
"text"
})
public class Theme {
@XmlElement(name = "Code", required = true)
protected String code;
@XmlElement(name = "Text", required = true)
protected LocalisedText text;
/**
* Gets the value of the code property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCode() {
return code;
}
/**
* Sets the value of the code property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCode(String value) {
this.code = value;
}
/**
* Gets the value of the text property.
*
* @return
* possible object is
* {@link LocalisedText }
*
*/
public LocalisedText getText() {
return text;
}
/**
* Sets the value of the text property.
*
* @param value
* allowed object is
* {@link LocalisedText }
*
*/
public void setText(LocalisedText value) {
this.text = value;
}
}
| [
"edi.gonzales@gmail.com"
] | edi.gonzales@gmail.com |
cbde610682d02a1f1b53681d9bcb55a479b830e6 | 9254e7279570ac8ef687c416a79bb472146e9b35 | /swas-open-20200601/src/main/java/com/aliyun/swas_open20200601/models/CreateSnapshotResponseBody.java | e5ee2026e87e73159fb71c430fb9d9d856ecbd40 | [
"Apache-2.0"
] | permissive | lquterqtd/alibabacloud-java-sdk | 3eaa17276dd28004dae6f87e763e13eb90c30032 | 3e5dca8c36398469e10cdaaa34c314ae0bb640b4 | refs/heads/master | 2023-08-12T13:56:26.379027 | 2021-10-19T07:22:15 | 2021-10-19T07:22:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 951 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.swas_open20200601.models;
import com.aliyun.tea.*;
public class CreateSnapshotResponseBody extends TeaModel {
@NameInMap("SnapshotId")
public String snapshotId;
@NameInMap("RequestId")
public String requestId;
public static CreateSnapshotResponseBody build(java.util.Map<String, ?> map) throws Exception {
CreateSnapshotResponseBody self = new CreateSnapshotResponseBody();
return TeaModel.build(map, self);
}
public CreateSnapshotResponseBody setSnapshotId(String snapshotId) {
this.snapshotId = snapshotId;
return this;
}
public String getSnapshotId() {
return this.snapshotId;
}
public CreateSnapshotResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
9f4b7337140d20b3772234b2a8dc31117186576a | dcfd2befbc4908f655a0d61f394ae8f170dfbfb3 | /Jena-tools/jena-arq-src/org/apache/jena/atlas/csv/CSVParseException.java | 110cd6a24c82efb7b4bc8c256531c0f374f3704f | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | USEPA/LCA-HT | 0bc63cf37bca4ced2e31c3947c02616dc29de0fe | 3e8753e8c0976cf9d48198058f1258f879e417fd | refs/heads/master | 2021-04-30T23:14:15.420622 | 2017-01-20T21:01:17 | 2017-01-20T21:01:17 | 15,712,927 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,215 | 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.jena.atlas.csv;
class CSVParseException extends RuntimeException
{
public CSVParseException(String msg, Throwable cause) { super(msg, cause) ; }
public CSVParseException(String msg) { super(msg) ; }
public CSVParseException(Throwable cause) { super(cause) ; }
public CSVParseException() { super() ; }
}
| [
"juno@hp-linux.krahn.home"
] | juno@hp-linux.krahn.home |
d5d1f211dc3ddbda83cfaf24d061f7b62fc0c905 | 4d9909e72f5d9c4d7d4e8ad5d222e11a033e156c | /onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/serialization/mappings/EntityFieldMappingFactory.java | 360e6e3452fa57122796b5aab6239d729073a0a7 | [
"Apache-2.0"
] | permissive | OneBusAway/onebusaway-gtfs-modules | 881569c157ef270bdb8ff8c3dc271e03b56ee268 | e9e5c98e582d708bc0998ee05f73f0579e71729c | refs/heads/master | 2023-09-01T01:54:14.928813 | 2023-08-13T15:26:00 | 2023-08-13T15:26:00 | 3,423,262 | 99 | 91 | NOASSERTION | 2023-08-13T15:26:02 | 2012-02-12T17:16:44 | Java | UTF-8 | Java | false | false | 1,854 | java | /**
* Copyright (C) 2011 Brian Ferris <bdferris@onebusaway.org>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onebusaway.gtfs.serialization.mappings;
import org.onebusaway.csv_entities.schema.EntitySchemaFactory;
import org.onebusaway.csv_entities.schema.FieldMapping;
import org.onebusaway.csv_entities.schema.FieldMappingFactory;
import org.onebusaway.gtfs.model.IdentityBean;
import org.onebusaway.gtfs.serialization.GtfsReaderContext;
/**
* {@link FieldMappingFactory} that produces a {@link FieldMapping} instance
* capable of mapping a CSV string entity id to an entity instance, and vice
* versa. Assumes field entity type subclasses {@link IdentityBean} and the
* target entity can be found with
* {@link GtfsReaderContext#getEntity(Class, java.io.Serializable)}.
*
* @author bdferris
* @see IdentityBean
* @see GtfsReaderContext#getEntity(Class, java.io.Serializable)
*/
public class EntityFieldMappingFactory implements FieldMappingFactory {
public EntityFieldMappingFactory() {
}
public FieldMapping createFieldMapping(EntitySchemaFactory schemaFactory,
Class<?> entityType, String csvFieldName, String objFieldName,
Class<?> objFieldType, boolean required) {
return new EntityFieldMappingImpl(entityType, csvFieldName, objFieldName,
objFieldType, required);
}
} | [
"bdferris@google.com"
] | bdferris@google.com |
9d87628bcddacff1cab729de3abb56efbb5c0235 | 96f8d42c474f8dd42ecc6811b6e555363f168d3e | /baike/sources/android/support/v7/app/ai.java | 5bbeae80f71e11b25e9a59c0c36b3b7664307add | [] | no_license | aheadlcx/analyzeApk | 050b261595cecc85790558a02d79739a789ae3a3 | 25cecc394dde4ed7d4971baf0e9504dcb7fabaca | refs/heads/master | 2020-03-10T10:24:49.773318 | 2018-04-13T09:44:45 | 2018-04-13T09:44:45 | 129,332,351 | 6 | 2 | null | null | null | null | UTF-8 | Java | false | false | 4,071 | java | package android.support.v7.app;
import android.annotation.SuppressLint;
import android.content.Context;
import android.location.Location;
import android.location.LocationManager;
import android.support.annotation.NonNull;
import android.support.annotation.RequiresPermission;
import android.support.annotation.VisibleForTesting;
import android.support.v4.content.PermissionChecker;
import android.util.Log;
import java.util.Calendar;
class ai {
private static ai a;
private final Context b;
private final LocationManager c;
private final a d = new a();
private static class a {
boolean a;
long b;
long c;
long d;
long e;
long f;
a() {
}
}
static ai a(@NonNull Context context) {
if (a == null) {
Context applicationContext = context.getApplicationContext();
a = new ai(applicationContext, (LocationManager) applicationContext.getSystemService("location"));
}
return a;
}
@VisibleForTesting
ai(@NonNull Context context, @NonNull LocationManager locationManager) {
this.b = context;
this.c = locationManager;
}
boolean a() {
a aVar = this.d;
if (c()) {
return aVar.a;
}
Location b = b();
if (b != null) {
a(b);
return aVar.a;
}
Log.i("TwilightManager", "Could not get last known location. This is probably because the app does not have any location permissions. Falling back to hardcoded sunrise/sunset values.");
int i = Calendar.getInstance().get(11);
return i < 6 || i >= 22;
}
@SuppressLint({"MissingPermission"})
private Location b() {
Location a;
Location location = null;
if (PermissionChecker.checkSelfPermission(this.b, "android.permission.ACCESS_COARSE_LOCATION") == 0) {
a = a("network");
} else {
a = null;
}
if (PermissionChecker.checkSelfPermission(this.b, "android.permission.ACCESS_FINE_LOCATION") == 0) {
location = a("gps");
}
if (location == null || a == null) {
if (location == null) {
location = a;
}
return location;
} else if (location.getTime() > a.getTime()) {
return location;
} else {
return a;
}
}
@RequiresPermission(anyOf = {"android.permission.ACCESS_COARSE_LOCATION", "android.permission.ACCESS_FINE_LOCATION"})
private Location a(String str) {
try {
if (this.c.isProviderEnabled(str)) {
return this.c.getLastKnownLocation(str);
}
} catch (Throwable e) {
Log.d("TwilightManager", "Failed to get last known location", e);
}
return null;
}
private boolean c() {
return this.d.f > System.currentTimeMillis();
}
private void a(@NonNull Location location) {
long j;
a aVar = this.d;
long currentTimeMillis = System.currentTimeMillis();
ah a = ah.a();
a.calculateTwilight(currentTimeMillis - 86400000, location.getLatitude(), location.getLongitude());
long j2 = a.sunset;
a.calculateTwilight(currentTimeMillis, location.getLatitude(), location.getLongitude());
boolean z = a.state == 1;
long j3 = a.sunrise;
long j4 = a.sunset;
a.calculateTwilight(86400000 + currentTimeMillis, location.getLatitude(), location.getLongitude());
long j5 = a.sunrise;
if (j3 == -1 || j4 == -1) {
j = 43200000 + currentTimeMillis;
} else {
if (currentTimeMillis > j4) {
j = 0 + j5;
} else if (currentTimeMillis > j3) {
j = 0 + j4;
} else {
j = 0 + j3;
}
j += 60000;
}
aVar.a = z;
aVar.b = j2;
aVar.c = j3;
aVar.d = j4;
aVar.e = j5;
aVar.f = j;
}
}
| [
"aheadlcxzhang@gmail.com"
] | aheadlcxzhang@gmail.com |
aadfc0605f4402358b5a8c292067ad2a3a3dd87b | 0b1f8cb4354c08ad5bcf681461c0fc1354930680 | /src/main/java/com/thtf/auth/service/SysUserRoleService.java | c98a227ba1d197bea10c00d175b356f2b5ddf49a | [] | no_license | springsecuritydemo/microservice-auth-center04 | d8dcae91c5d93b27883d6d045dc2bb3fd8e6adfb | 4c5fa36d004f82c6332a503f6d9734a7f1ada9c0 | refs/heads/master | 2022-07-09T15:19:46.509457 | 2019-07-25T00:38:06 | 2019-07-25T00:38:06 | 198,728,245 | 3 | 0 | null | 2022-06-21T01:31:49 | 2019-07-25T00:36:17 | Java | UTF-8 | Java | false | false | 628 | java | package com.thtf.auth.service;
import com.thtf.auth.dao.SysUserRoleMapper;
import com.thtf.auth.model.SysUserRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* ========================
* Created with IntelliJ IDEA.
* User:pyy
* Date:2019/7/23 10:38
* Version: v1.0
* ========================
*/
@Service
public class SysUserRoleService {
@Autowired
private SysUserRoleMapper userRoleMapper;
public List<SysUserRole> listByUserId(Integer userId) {
return userRoleMapper.listByUserId(userId);
}
} | [
"panyangyang@thtf.com.cn"
] | panyangyang@thtf.com.cn |
5fb5e4a95e5ca5cad58951e6d82d869edca66572 | bfd0ccc5e51e10a338cd48a175060693b9fc64d1 | /advance/src/com/thzhima/advance/jdbc/StudentDao2.java | f58f8cda92c99413055e1246814f6699efbe75db | [] | no_license | sunjava2006/202102 | afa66e1e7e5e49bef9b3c0c002fa51b66bdb74f5 | 9f04c031cd4bf70fedcbec766fcf77ffa89f6068 | refs/heads/main | 2023-08-11T18:14:17.519625 | 2021-09-07T11:36:00 | 2021-09-07T11:36:00 | 367,238,609 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 5,353 | java | package com.thzhima.advance.jdbc;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.Date;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Types;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import oracle.jdbc.OracleCallableStatement;
public class StudentDao2 {
public static Map<String, Object> login(String name, String pwd) throws SQLException {
Map<String, Object> map = null;
String sql = "select * from student where student_name=? and pwd=?";
Connection conn = null;
PreparedStatement stm = null;
ResultSet rst = null;
try {
conn = ConnectionUtil.getConnection();
stm = conn.prepareStatement(sql); // 将语句在数据库进行预编译。
stm.setString(1, name);
stm.setString(2, pwd);
rst = stm.executeQuery();
if(rst.next()) {
map = new HashMap<>();
map.put("studentID", rst.getInt("student_id"));
map.put("studentName", rst.getString("student_name"));
map.put("gender", rst.getString("gender"));
map.put("birthDate", rst.getDate("birth_date"));
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
if(null != rst) {
rst.close();
}
if(null != stm) {
stm.close();
}
if(null != conn) {
conn.close();
}
}
return map;
}
public static boolean update(int id, String name, String gender, Date birthDate) throws SQLException {
boolean ok = false;
String sql = "update student set student_name=?, gender=?, birth_date=? where student_id=?";
Connection conn = null;
PreparedStatement stm = null;
try {
conn = ConnectionUtil.getConnection();
stm = conn.prepareStatement(sql);
stm.setString(1, name);
stm.setString(2, gender);
stm.setDate(3, birthDate);
stm.setInt(4, id);
int count = stm.executeUpdate();
ok = count == 1;
} catch (SQLException e) {
e.printStackTrace();
}finally {
if(null != stm) {
stm.close();
}
if(null != conn) {
conn.close();
}
}
return ok;
}
public static void addStudent(String name, String gender, Date birthDate) throws SQLException {
Connection conn = null;
CallableStatement stm = null;
try {
conn = ConnectionUtil.getConnection();
conn.setAutoCommit(false); // 进行事务控制
stm = conn.prepareCall("{call p_add_student(?,?,?)}");
stm.setString("name", name);
stm.setString("gender", gender);
stm.setDate("birth_date", birthDate);
System.out.println(stm.execute());
conn.commit(); // 提交事务
} catch (SQLException e) {
conn.rollback(); // 回滚事务
e.printStackTrace();
} finally {
if(null != stm) {
stm.close();
}
if(null != conn) {
conn.setAutoCommit(true);
conn.close();
}
}
}
public static String findNameByID(int id) throws SQLException {
String name = null;
Connection conn = null;
CallableStatement stm = null;
try {
conn = ConnectionUtil.getConnection();
conn.setAutoCommit(false);
stm = conn.prepareCall("{call p_find_by_id(?,?)}");
stm.setInt(1, id); // 为输入参数赋值
stm.registerOutParameter(2, Types.NVARCHAR); // 要注册输出参数
boolean b = stm.execute();
System.out.println(b);
name = stm.getString(2); // 取输出参数值
conn.commit();
} catch (SQLException e) {
if(null != conn) {
conn.rollback();
}
e.printStackTrace();
} finally {
if(null != stm) {
stm.close();
}
if(null != conn) {
conn.setAutoCommit(true);
conn.close();
}
}
return name;
}
public static List<Map<String, Object>> list(int page, int len) throws SQLException{
List<Map<String, Object>> list = new ArrayList<>();
Connection conn = null;
CallableStatement stm= null;
ResultSet rst = null;
try {
conn = ConnectionUtil.getConnection();
conn.setAutoCommit(false);
stm = conn.prepareCall("{call p_list_student(?,?,?)}");
stm.setInt(1, page);
stm.setInt(2, len);
stm.registerOutParameter(3, Types.REF_CURSOR);
boolean s = stm.execute();
System.out.println(s);
rst = ((OracleCallableStatement)stm).getCursor(3);
ResultSetMetaData md = rst.getMetaData(); // 获取结果集元数据对象
int count = md.getColumnCount(); // 结果集返回了列数
while(rst.next()) {
Map<String, Object> map = new HashMap<>();
for(int i=1; i<=count; i++) {
String name = md.getColumnName(i); // 获取列的名字
Object o = rst.getObject(i);
map.put(name, o);
}
list.add(map);
}
conn.commit();
} catch (SQLException e) {
conn.rollback();
e.printStackTrace();
} finally {
if(null != rst) {
rst.close();
}
if(null != stm) {
stm.close();
}
if(null != conn) {
conn.setAutoCommit(true);
conn.close();
}
}
return list;
}
public static void main(String[] args) throws SQLException {
// System.out.println(login("xxx' or 1=1 --", "123456"));
// StudentDao2.update(3, "陈光", "女", new Date(90, 0, 1));
// StudentDao2.addStudent("李完蛋", "男", new Date(76, 11, 30));
// System.out.println(StudentDao2.findNameByID(1));
System.out.println(StudentDao2.list(2, 2));
}
}
| [
"jkwangrui@126.com"
] | jkwangrui@126.com |
ff0f5ed1555e684bd62e1cfdab14179857660d39 | f2aa242407145391f21e0c3b29899fda227b32a9 | /src/main/java/com/mikesamuel/cil/ast/j8/ti/ResolutionOrder.java | e862b46b04d4f82f9432d2c9efe15f22b51da80c | [
"Apache-2.0"
] | permissive | mikesamuel/code-interlingua | 579474b4a2873a0f236a691f3ada5dffe43c2f06 | 987b21e67d4cf756b849e3ea1fce0a2503409ac8 | refs/heads/master | 2021-01-11T00:29:26.490413 | 2018-03-05T16:24:06 | 2018-03-05T16:24:06 | 70,525,636 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 7,523 | java | package com.mikesamuel.cil.ast.j8.ti;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.LinkedHashMultimap;
import com.google.common.collect.Multimap;
final class ResolutionOrder {
final ImmutableList<Clique> cliquesInResolutionOrder;
private ResolutionOrder(
ImmutableList<Clique> cliquesInResolutionOrder) {
this.cliquesInResolutionOrder = cliquesInResolutionOrder;
}
/** A minimal group of nodes that are mutually dependent. */
static final class Clique {
private final List<Node> members = new ArrayList<>();
Clique(Node n) {
members.add(n);
}
ImmutableList<Node> members() { return ImmutableList.copyOf(members); }
void mergeInto(Clique other) {
if (other != this) {
for (Node member : members) {
other.members.add(member);
member.setClique(other);
}
members.clear();
}
}
ImmutableSet<InferenceVariable> vars() {
ImmutableSet.Builder<InferenceVariable> b = ImmutableSet.builder();
for (Node node : members) {
if (node instanceof VarNode) {
b.add(((VarNode) node).v);
}
}
return b.build();
}
ImmutableSet<Bound> bounds() {
ImmutableSet.Builder<Bound> b = ImmutableSet.builder();
for (Node node : members) {
if (node instanceof BoundNode) {
b.add(((BoundNode) node).b);
}
}
return b.build();
}
}
static abstract class Node {
private Clique clique;
Node() {
this.clique = new Clique(this);
}
void setClique(Clique c) {
this.clique = Preconditions.checkNotNull(c);
}
Clique clique() { return this.clique; }
}
static final class VarNode extends Node {
final InferenceVariable v;
VarNode(InferenceVariable v) {
this.v = v;
}
@Override public String toString() { return "(VarNode " + v + ")"; }
}
static final class BoundNode extends Node {
final Bound b;
BoundNode(Bound b) {
this.b = b;
}
@Override public String toString() { return "(BoundNode " + b + ")"; }
}
@SuppressWarnings("synthetic-access")
static Builder builder(BoundSet bs) {
return new Builder(bs);
}
static final class Builder {
final BoundSet bounds;
final ImmutableSet<InferenceVariable> unionOfCaptureRelationAlphas;
private final List<Object> deps = new ArrayList<>();
private Builder(BoundSet bounds) {
this.bounds = bounds;
ImmutableSet.Builder<InferenceVariable> b = ImmutableSet.builder();
for (Bound bound : bounds.bounds) {
if (bound instanceof CaptureRelation) {
b.addAll(((CaptureRelation) bound).alphas);
}
}
this.unionOfCaptureRelationAlphas = b.build();
}
Builder mustResolveBeforeOrAtSameTime(
InferenceVariable before, InferenceVariable dependency) {
deps.add(before);
deps.add(dependency);
return this;
}
Builder boundDependsOn(InferenceVariable v, Bound b) {
deps.add(v);
deps.add(b);
return this;
}
Builder boundInforms(Bound b, InferenceVariable v) {
deps.add(b);
deps.add(v);
return this;
}
private static Node getNode(
Map<? super InferenceVariable, Node> nodes, InferenceVariable k) {
Node n = nodes.get(k);
if (n == null) {
n = new VarNode(k);
nodes.put(k, n);
}
return n;
}
private static Node getNode(Map<? super Bound, Node> nodes, Bound b) {
Node n = nodes.get(b);
if (n == null) {
n = new BoundNode(b);
nodes.put(b, n);
}
return n;
}
private static void mergeCliques(
Node node, List<Node> onPath,
ImmutableMultimap<Node, Node> followerMap) {
int index = onPath.indexOf(node);
if (index >= 0) {
Clique c = node.clique();
for (int i = index + 1, n = onPath.size(); i < n; ++i) {
onPath.get(i).clique().mergeInto(c);
}
return;
} else {
index = onPath.size();
onPath.add(node);
for (Node follower : followerMap.get(node)) {
mergeCliques(follower, onPath, followerMap);
}
Node removed = onPath.remove(index);
Preconditions.checkState(removed == node);
}
}
ResolutionOrder build() {
// Build a follower table.
Map<Object, Node> nodes = new LinkedHashMap<>();
Multimap<Node, Node> followerMap = LinkedHashMultimap.create();
for (int i = 0, n = deps.size(); i < n; i += 2) {
Object before = deps.get(i);
Object after = deps.get(i + 1);
Node beforeNode, afterNode;
beforeNode = before instanceof Bound
? getNode(nodes, (Bound) before)
: getNode(nodes, (InferenceVariable) before);
afterNode = after instanceof Bound
? getNode(nodes, (Bound) after)
: getNode(nodes, (InferenceVariable) after);
followerMap.put(beforeNode, afterNode);
}
for (Bound b : this.bounds.bounds) {
getNode(nodes, b);
}
for (InferenceVariable v : this.bounds.thrown) {
getNode(nodes, v);
}
ImmutableMultimap<Node, Node> iFollowerMap =
ImmutableMultimap.copyOf(followerMap);
// Using the follower table, walk from each node,
// and when a cycle is detected, merge cliques.
List<Node> onPath = new ArrayList<>();
for (Node node : nodes.values()) {
onPath.clear();
mergeCliques(node, onPath, iFollowerMap);
}
// Now that we've merged cliques, come up with a preceder table for
// cliques.
Set<Clique> cliques = new LinkedHashSet<>();
for (Node n : nodes.values()) {
cliques.add(n.clique());
}
Multimap<Clique, Clique> cliquePrecederTable =
LinkedHashMultimap.create();
for (Node before : nodes.values()) {
for (Node after : iFollowerMap.get(before)) {
if (before.clique() != after.clique()) {
// Not transitively co-dependent since we merged cliques above.
cliquePrecederTable.put(after.clique(), before.clique());
}
}
}
// Use Topological sort to order cliques.
@SuppressWarnings("synthetic-access")
ResolutionOrder order = new ResolutionOrder(
new TopoSort<>(cliquePrecederTable).sort(cliques));
return order;
}
}
}
final class TopoSort<T> {
private Multimap<? super T, ? extends T> backEdges;
/** @param backEdges acyclic */
TopoSort(Multimap<? super T, ? extends T> backEdges) {
this.backEdges = backEdges;
}
ImmutableList<T> sort(Iterable<? extends T> elements) {
ImmutableList.Builder<T> out = ImmutableList.builder();
Set<T> ordered = new LinkedHashSet<>();
for (T element : elements) {
sortOneOnto(element, ordered, out);
}
return out.build();
}
private void sortOneOnto(
T element, Set<T> ordered, ImmutableList.Builder<T> out) {
if (ordered.add(element)) {
for (T before : backEdges.get(element)) {
sortOneOnto(before, ordered, out);
}
out.add(element);
}
}
}
| [
"mikesamuel@gmail.com"
] | mikesamuel@gmail.com |
f841f1587d08225e14971e6c12881b91f555da34 | 677330c29502be126e6202ec77a83cedd8348053 | /src/game/net/message/Message.java | 4851fa370789cda2287f27667b76861323f095ab | [] | no_license | wcyfd/NettyServer | 6b228778283b434000871485125d13c49b3fa1bf | 9e26024321738b10e149e7714c180e082eba5f10 | refs/heads/master | 2021-01-10T01:37:40.960780 | 2016-04-10T03:01:26 | 2016-04-10T03:01:26 | 55,470,556 | 5 | 6 | null | null | null | null | UTF-8 | Java | false | false | 189 | java | package game.net.message;
public class Message {
public static NettyMessage create() {
NettyMessage message = new BaseCustomTypeLengthMessage();
return message;
}
}
| [
"1101697681@qq.com"
] | 1101697681@qq.com |
9214add4b64a9eff39ebd3d2001108095d430156 | ed5c0f718b75dfbb0fce308366d8aa8e2506b420 | /work/decompile-82634944/net/minecraft/server/PacketPlayOutSpawnEntityWeather.java | 515adef8d95933c086ddc4eb3c3b053ff767c84d | [
"Apache-2.0"
] | permissive | RutgersGRID/minecraftworlds | 24d92275f4e3373835f14aa1a0aa2f2dfb3862bb | ec6e6f5634cad8423c25c3e3606b9a3814600b78 | refs/heads/master | 2022-08-06T16:15:32.197094 | 2020-05-26T20:42:19 | 2020-05-26T20:42:19 | 88,202,857 | 1 | 1 | Apache-2.0 | 2020-04-07T19:26:12 | 2017-04-13T20:16:27 | Java | UTF-8 | Java | false | false | 1,354 | java | package net.minecraft.server;
import java.io.IOException;
public class PacketPlayOutSpawnEntityWeather implements Packet<PacketListenerPlayOut> {
private int a;
private double b;
private double c;
private double d;
private int e;
public PacketPlayOutSpawnEntityWeather() {}
public PacketPlayOutSpawnEntityWeather(Entity entity) {
this.a = entity.getId();
this.b = entity.locX;
this.c = entity.locY;
this.d = entity.locZ;
if (entity instanceof EntityLightning) {
this.e = 1;
}
}
public void a(PacketDataSerializer packetdataserializer) throws IOException {
this.a = packetdataserializer.g();
this.e = packetdataserializer.readByte();
this.b = packetdataserializer.readDouble();
this.c = packetdataserializer.readDouble();
this.d = packetdataserializer.readDouble();
}
public void b(PacketDataSerializer packetdataserializer) throws IOException {
packetdataserializer.d(this.a);
packetdataserializer.writeByte(this.e);
packetdataserializer.writeDouble(this.b);
packetdataserializer.writeDouble(this.c);
packetdataserializer.writeDouble(this.d);
}
public void a(PacketListenerPlayOut packetlistenerplayout) {
packetlistenerplayout.a(this);
}
}
| [
"rianders@docs.rutgers.edu"
] | rianders@docs.rutgers.edu |
b2d2e09678c4450a5927527911c0216ab5ec3baf | 08506438512693067b840247fa2c9a501765f39d | /Product/Production/Services/HIEMCore/src/main/java/gov/hhs/fha/nhinc/unsubscribe/adapter/proxy/HiemUnsubscribeAdapterWebServiceProxySecured.java | b6073b1e4297c85f844b4d51056d11bd40b2d738 | [] | no_license | AurionProject/Aurion | 2f577514de39e91e1453c64caa3184471de891fa | b99e87e6394ecdde8a4197b755774062bf9ef890 | refs/heads/master | 2020-12-24T07:42:11.956869 | 2017-09-27T22:08:31 | 2017-09-27T22:08:31 | 49,459,710 | 1 | 0 | null | 2017-03-07T23:24:56 | 2016-01-11T22:55:12 | Java | UTF-8 | Java | false | false | 6,135 | java | /*
* Copyright (c) 2012, United States Government, as represented by the Secretary of Health and Human Services.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the United States Government nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE UNITED STATES GOVERNMENT BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package gov.hhs.fha.nhinc.unsubscribe.adapter.proxy;
import gov.hhs.fha.nhinc.adaptersubscriptionmanagementsecured.AdapterSubscriptionManagerPortSecuredType;
import gov.hhs.fha.nhinc.common.nhinccommon.AssertionType;
import gov.hhs.fha.nhinc.common.nhinccommon.NhinTargetSystemType;
import gov.hhs.fha.nhinc.common.nhinccommonadapter.UnsubscribeRequestType;
import gov.hhs.fha.nhinc.hiem.consumerreference.ReferenceParametersHelper;
import gov.hhs.fha.nhinc.hiem.consumerreference.SoapMessageElements;
import gov.hhs.fha.nhinc.hiem.dte.marshallers.WsntUnsubscribeMarshaller;
import gov.hhs.fha.nhinc.hiem.dte.marshallers.WsntUnsubscribeResponseMarshaller;
import gov.hhs.fha.nhinc.messaging.client.CONNECTCXFClientFactory;
import gov.hhs.fha.nhinc.messaging.client.CONNECTClient;
import gov.hhs.fha.nhinc.messaging.service.port.ServicePortDescriptor;
import gov.hhs.fha.nhinc.nhinclib.NhincConstants;
import gov.hhs.fha.nhinc.nhinclib.NullChecker;
import gov.hhs.fha.nhinc.unsubscribe.adapter.proxy.service.HiemUnsubscribeAdapterSecuredServicePortDescriptor;
import gov.hhs.fha.nhinc.webserviceproxy.WebServiceProxyHelper;
import org.apache.log4j.Logger;
import org.oasis_open.docs.wsn.b_2.Unsubscribe;
import org.oasis_open.docs.wsn.b_2.UnsubscribeResponse;
import org.w3c.dom.Element;
/**
*
* @author rayj
*/
public class HiemUnsubscribeAdapterWebServiceProxySecured implements HiemUnsubscribeAdapterProxy {
private static final Logger LOG = Logger.getLogger(HiemUnsubscribeAdapterWebServiceProxySecured.class);
private static WebServiceProxyHelper oProxyHelper = null;
protected CONNECTClient<AdapterSubscriptionManagerPortSecuredType> getCONNECTClientSecured(
ServicePortDescriptor<AdapterSubscriptionManagerPortSecuredType> portDescriptor, String url,
AssertionType assertion, String wsAddressingTo) {
return CONNECTCXFClientFactory.getInstance().getCONNECTClientSecured(portDescriptor, url, assertion,
wsAddressingTo, null);
}
public Element unsubscribe(Element unsubscribeElement, SoapMessageElements referenceParametersElements,
AssertionType assertion, NhinTargetSystemType target) {
Element responseElement = null;
try {
String url = getWebServiceProxyHelper().getAdapterEndPointFromConnectionManager(
NhincConstants.HIEM_UNSUBSCRIBE_ADAPTER_SERVICE_SECURED_NAME);
if (NullChecker.isNotNullish(url)) {
WsntUnsubscribeMarshaller unsubscribeMarshaller = new WsntUnsubscribeMarshaller();
Unsubscribe unsubscribe = unsubscribeMarshaller.unmarshal(unsubscribeElement);
UnsubscribeRequestType adapterUnsubscribeRequest = new UnsubscribeRequestType();
adapterUnsubscribeRequest.setUnsubscribe(unsubscribe);
adapterUnsubscribeRequest.setAssertion(assertion);
String wsAddressingTo = ReferenceParametersHelper.getWsAddressingTo(referenceParametersElements);
if (wsAddressingTo == null) {
wsAddressingTo = url;
}
ServicePortDescriptor<AdapterSubscriptionManagerPortSecuredType> portDescriptor = new HiemUnsubscribeAdapterSecuredServicePortDescriptor();
CONNECTClient<AdapterSubscriptionManagerPortSecuredType> client = getCONNECTClientSecured(
portDescriptor, url, assertion, wsAddressingTo);
UnsubscribeResponse response = (UnsubscribeResponse) client.invokePort(
AdapterSubscriptionManagerPortSecuredType.class, "unsubscribe", adapterUnsubscribeRequest);
WsntUnsubscribeResponseMarshaller unsubscribeResponseMarshaller = new WsntUnsubscribeResponseMarshaller();
responseElement = unsubscribeResponseMarshaller.marshal(response);
} else {
LOG.error("Failed to call the web service ("
+ NhincConstants.HIEM_UNSUBSCRIBE_ADAPTER_SERVICE_SECURED_NAME + "). The URL is null.");
}
} catch (Exception e) {
LOG.error("Failed to send unsubscribe message to adapter.", e);
}
return responseElement;
}
protected WebServiceProxyHelper getWebServiceProxyHelper() {
if (oProxyHelper == null) {
oProxyHelper = new WebServiceProxyHelper();
}
return oProxyHelper;
}
}
| [
"neilkwebb@hotmail.com"
] | neilkwebb@hotmail.com |
0623bd6d2ee10a44ad22d5f19456ecded9eea0de | fd750edb64aaf31cafd7bb5a703b25e4455d8904 | /api/src/main/java/nl/xillio/util/TriFunction.java | fa14cb477ca0423e7140ec0d8e1106b069683d06 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | xillio/xill | 4f714060d85b9c17daf2639acb1a7d6e86bb0126 | a94a1a4f3420c0c49c48082185d1623b35ca5463 | refs/heads/master | 2021-01-25T10:28:32.858772 | 2016-06-20T15:28:49 | 2016-06-20T15:28:49 | 58,641,093 | 1 | 2 | null | 2016-06-30T13:17:00 | 2016-05-12T12:50:46 | null | UTF-8 | Java | false | false | 547 | java | package nl.xillio.util;
/**
* A function with three arguments.
*
* @param <S> the first argument type
* @param <T> the second argument type
* @param <U> the third argument type
* @param <R> the result type
*/
@FunctionalInterface
public interface TriFunction<S, T, U, R> {
/**
* Applies this function to the given arguments.
*
* @param s the first function argument
* @param t the second function argument
* @param u the third function argument
* @return the function result
*/
R apply(final S s, final T t, final U u);
}
| [
"thomas.biesaart@outlook.com"
] | thomas.biesaart@outlook.com |
9981d6d1f0276d40b66af9d0f6cffc686f11c165 | 13516f81274e767d2bcece79dca22752461471e1 | /maven-java-02-algorithm_and_data_structures/src/main/java/com/zzt/algorithm/sort/heap/HeapSortDemo03.java | 4d0c76427c76876f5af1e3dce070a89f75f8189a | [] | no_license | zhouzhitong/maven-java-learning_route | 899d7aa2d8546c7fc6e2af371a704b462bfccb02 | 776ef9cbe5d46d5930fee5b9703c83a7da791115 | refs/heads/master | 2023-02-20T17:32:33.595828 | 2020-10-22T13:22:16 | 2020-10-22T13:22:16 | 296,757,433 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,707 | java | package com.zzt.algorithm.sort.heap;
import java.util.Arrays;
/**
* 描述:<br>
* </>
*
* @author 周志通
* @version 1.0.0
* @date 2020/9/22 21:46
**/
public class HeapSortDemo03 {
public static void main(String[] args) {
int[] arr = {3, 9, 7, 24, 6, 77, 4123, 12, 3,2,3,5,6,1,3,231};
HeapSort heapSort = new HeapSort(arr);
heapSort.push();
}
private static class HeapSort {
private int[] heap;
private int limit;
private int heapSize;
public HeapSort(int[] arr) {
this.heap = arr;
this.limit = arr.length;
this.heapSize = arr.length;
}
public void push() {
for (int i = heap.length - 1; i >= 0; i--) {
heapify(i);
}
System.out.println(Arrays.toString(heap));
}
// 判断是否需要往下沉
private void heapify(int index) {
int l = index * 2 + 1, r;
int largest;
while (l < heapSize) {
r = l + 1;
largest = r < heapSize && heap[r] > heap[l]
? r
: l;
largest = heap[largest] > heap[index]
? largest
: index;
if (largest == index) {
break;
}
swap(largest, index);
index = largest;
l = index * 2 + 1;
}
}
private void swap(int i, int j) {
heap[i] = heap[i] ^ heap[j];
heap[j] = heap[i] ^ heap[j];
heap[i] = heap[i] ^ heap[j];
}
}
}
| [
"528382226@qq.com"
] | 528382226@qq.com |
59524a703eba78eb3ac7a6c8dd9f3cd67167c27c | 9a04c77ad732f318d3ee71d7f96b509f254172e1 | /opennlp-tools/src/main/java/opennlp/tools/entitylinker/CountryContext.java | b92749d59775c1ef4b0fd547ced7daec31ecf573 | [
"Apache-2.0"
] | permissive | tupilabs/opennlp | ecabe7df5e5f0f9a184003265e92fa25992cd983 | ad18a0b7a0bdf0aace97f0aaea263380254458e3 | refs/heads/master | 2021-01-20T22:45:12.884547 | 2013-08-03T22:54:12 | 2013-08-03T22:54:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,669 | java | /*
* Copyright 2013 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package opennlp.tools.entitylinker;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import opennlp.tools.entitylinker.EntityLinkerProperties;
public class CountryContext {
private Connection con;
private List<CountryContextEntry> countrydata;
public CountryContext() {
}
public List<CountryContextHit> find(String docText, EntityLinkerProperties properties) {
List<CountryContextHit> hits = new ArrayList<CountryContextHit>();
try {
if (con == null) {
con = getMySqlConnection(properties);
}
if (countrydata == null) {
countrydata = getCountryData(properties);
}
for (CountryContextEntry entry : countrydata) {
if (docText.contains(entry.getFull_name_nd_ro())) {
System.out.println("hit on " + entry.getFull_name_nd_ro());
CountryContextHit hit = new CountryContextHit(entry.getCc1(), docText.indexOf(entry.getFull_name_nd_ro()), docText.indexOf(entry.getFull_name_nd_ro()+ entry.getFull_name_nd_ro().length()));
hits.add(hit);
}
}
} catch (Exception ex) {
Logger.getLogger(CountryContext.class.getName()).log(Level.SEVERE, null, ex);
}
return hits;
}
private Connection getMySqlConnection(EntityLinkerProperties properties) throws Exception {
String driver = properties.getProperty("mysql.driver", "org.gjt.mm.mysql.Driver");
String url = properties.getProperty("mysql.url", "jdbc:mysql://localhost:3306/world");
String username = properties.getProperty("mysql.username", "root");
String password = properties.getProperty("mysql.password", "559447");
Class.forName(driver);
Connection conn = DriverManager.getConnection(url, username, password);
return conn;
}
private List<CountryContextEntry> getCountryData(EntityLinkerProperties properties) throws SQLException {
List<CountryContextEntry> entries = new ArrayList<CountryContextEntry>();
try {
if (con == null) {
con = getMySqlConnection(properties);
}
CallableStatement cs;
cs = con.prepareCall("CALL `getCountryList`()");
ResultSet rs;
rs = cs.executeQuery();
if (rs == null) {
return entries;
}
while (rs.next()) {
CountryContextEntry s = new CountryContextEntry();
//rc,cc1, full_name_nd_ro,dsg
s.setRc(rs.getString(1));
s.setCc1(rs.getString(2));
//a.district,
s.setFull_name_nd_ro(rs.getString(3));
//b.name as countryname,
s.setDsg(rs.getString(4));
entries.add(s);
}
} catch (SQLException ex) {
throw ex;
} catch (Exception e) {
System.err.println(e);
} finally {
con.close();
}
return entries;
}
}
| [
"brunodepaulak@yahoo.com.br"
] | brunodepaulak@yahoo.com.br |
1e07aa778c0ca30a8bd19f846a873560706aeff8 | 601582228575ca0d5f61b4c211fd37f9e4e2564c | /logisoft_revision1/src/com/gp/cong/logisoft/beans/PrinterBean.java | aef3223086fdc498631d445c7034961e7912093e | [] | no_license | omkarziletech/StrutsCode | 3ce7c36877f5934168b0b4830cf0bb25aac6bb3d | c9745c81f4ec0169bf7ca455b8854b162d6eea5b | refs/heads/master | 2021-01-11T08:48:58.174554 | 2016-12-17T10:45:19 | 2016-12-17T10:45:19 | 76,713,903 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 457 | java | package com.gp.cong.logisoft.beans;
import java.io.Serializable;
public class PrinterBean implements Serializable {
private String printerType;
private String printerName;
public String getPrinterName() {
return printerName;
}
public void setPrinterName(String printerName) {
this.printerName = printerName;
}
public String getPrinterType() {
return printerType;
}
public void setPrinterType(String printerType) {
this.printerType = printerType;
}
}
| [
"omkar@ziletech.com"
] | omkar@ziletech.com |
18447db03dc56159694ea1d4daa1578266655caa | 15b260ccada93e20bb696ae19b14ec62e78ed023 | /v2/src/main/java/com/alipay/api/domain/AlipayBossProdCompanyQueryModel.java | 6f40aac6059f8c23bd50f1ff0040a8fa22510a72 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-java-all | df461d00ead2be06d834c37ab1befa110736b5ab | 8cd1750da98ce62dbc931ed437f6101684fbb66a | refs/heads/master | 2023-08-27T03:59:06.566567 | 2023-08-22T14:54:57 | 2023-08-22T14:54:57 | 132,569,986 | 470 | 207 | Apache-2.0 | 2022-12-25T07:37:40 | 2018-05-08T07:19:22 | Java | UTF-8 | Java | false | false | 1,224 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* OU查询2
*
* @author auto create
* @since 1.0, 2021-11-15 11:49:47
*/
public class AlipayBossProdCompanyQueryModel extends AlipayObject {
private static final long serialVersionUID = 4475166165513127782L;
/**
* 请求id
*/
@ApiField("business_id")
private String businessId;
/**
* 公司名称
*/
@ApiField("key_word")
private String keyWord;
/**
* 当前系统名称
*/
@ApiField("source_system_id")
private String sourceSystemId;
/**
* 租户
*/
@ApiField("tenant")
private String tenant;
public String getBusinessId() {
return this.businessId;
}
public void setBusinessId(String businessId) {
this.businessId = businessId;
}
public String getKeyWord() {
return this.keyWord;
}
public void setKeyWord(String keyWord) {
this.keyWord = keyWord;
}
public String getSourceSystemId() {
return this.sourceSystemId;
}
public void setSourceSystemId(String sourceSystemId) {
this.sourceSystemId = sourceSystemId;
}
public String getTenant() {
return this.tenant;
}
public void setTenant(String tenant) {
this.tenant = tenant;
}
}
| [
"auto-publish"
] | auto-publish |
073a19202bcc26342669748144146e588bdf967d | d51679766b6c92adc6f747520b7b4e48cabc41d0 | /sjk-stacktrace/src/main/java/org/gridkit/jvmtool/stacktrace/StackTraceReaderV1.java | 93d6d38e312afdfed76f2a0c16dbfaaace463144 | [
"Apache-2.0"
] | permissive | konigsbergg/jvm-tools | 264c5831fab37d711020c930e01c5b0d3fb337ed | 0db927b3cc6961f872c93fbb9ddbc1a81e4310be | refs/heads/master | 2022-07-19T11:19:58.617046 | 2020-05-24T09:55:32 | 2020-05-24T09:55:32 | 267,233,244 | 1 | 0 | Apache-2.0 | 2020-05-27T05:56:08 | 2020-05-27T05:56:07 | null | UTF-8 | Java | false | false | 4,292 | java | package org.gridkit.jvmtool.stacktrace;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.Thread.State;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.zip.InflaterInputStream;
class StackTraceReaderV1 implements StackTraceReader {
private DataInputStream dis;
private List<String> stringDic = new ArrayList<String>();
private List<StackFrame> frameDic = new ArrayList<StackFrame>();
private Map<StackFrame, StackTraceElement> frameCache = new HashMap<StackFrame, StackTraceElement>();
private boolean loaded;
private long threadId;
private long timestamp;
private StackFrameList trace;
public StackTraceReaderV1(InputStream is) {
this.dis = new DataInputStream(new BufferedInputStream(new InflaterInputStream(is), 64 << 10));
stringDic.add(null);
frameDic.add(null);
loaded = false;;
}
@Override
public boolean isLoaded() {
return loaded;
}
@Override
public long getThreadId() {
if (!isLoaded()) {
throw new NoSuchElementException();
}
return threadId;
}
@Override
public long getTimestamp() {
if (!isLoaded()) {
throw new NoSuchElementException();
}
return timestamp;
}
@Override
public StackTraceElement[] getTrace() {
if (!isLoaded()) {
throw new NoSuchElementException();
}
StackTraceElement[] strace = new StackTraceElement[trace.depth()];
for(int i = 0; i != strace.length; ++i) {
StackFrame frame = trace.frameAt(i);
StackTraceElement e = frameCache.get(frame);
if (e == null) {
frameCache.put(frame, e = frame.toStackTraceElement());
}
strace[i] = e;
}
return strace;
}
@Override
public StackFrameList getStackTrace() {
if (!isLoaded()) {
throw new NoSuchElementException();
}
return trace;
}
@Override
public String getThreadName() {
return null;
}
@Override
public State getThreadState() {
return null;
}
@Override
public CounterCollection getCounters() {
return CounterArray.EMPTY;
}
@Override
public boolean loadNext() throws IOException {
loaded = false;
while(true) {
int tag = dis.read();
if (tag < 0) {
dis.close();
break;
}
else if (tag == StackTraceCodec.TAG_STRING) {
String str = dis.readUTF();
stringDic.add(str);
}
else if (tag == StackTraceCodec.TAG_FRAME) {
StackFrame ste = readStackTraceElement();
frameDic.add(ste);
}
else if (tag == StackTraceCodec.TAG_EVENT) {
threadId = dis.readLong();
timestamp = dis.readLong();
int len = StackTraceCodec.readVarInt(dis);
StackFrame[] frames = new StackFrame[len];
for(int i = 0; i != len; ++i) {
int ref = StackTraceCodec.readVarInt(dis);
frames[i] = frameDic.get(ref);
}
trace = new StackFrameArray(frames);
loaded = true;
break;
}
else {
throw new IOException("Data format error");
}
}
return loaded;
}
private StackFrame readStackTraceElement() throws IOException {
int npkg = StackTraceCodec.readVarInt(dis);
int ncn = StackTraceCodec.readVarInt(dis);
int nmtd = StackTraceCodec.readVarInt(dis);
int nfile = StackTraceCodec.readVarInt(dis);
int line = StackTraceCodec.readVarInt(dis) - 2;
String cp = stringDic.get(npkg);
String cn = stringDic.get(ncn);
String mtd = stringDic.get(nmtd);
String file = stringDic.get(nfile);
StackFrame e = new StackFrame(cp, cn, mtd, file, line);
return e;
}
} | [
"alexey.ragozin@gmail.com"
] | alexey.ragozin@gmail.com |
f0c76d364d6f9639e43e55e94f98280d7df2175c | fc1380f7d9001ff6020c32a6a8068479dcba6f0e | /src/com/javaex/ex10/Book.java | 0c83de0e17cc514137bfa61a8e78154c62614f4d | [] | no_license | JeongYunu/Practice05 | 8b587d6d9d1fd6b2cf17b6e62d29e7e4fee40c2c | 5c02d2f41fd714a2f5b4159984f672492f17c1fe | refs/heads/master | 2023-05-28T08:23:03.783955 | 2021-06-14T00:45:13 | 2021-06-14T00:45:13 | 374,484,396 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,303 | java | package com.javaex.ex10;
public class Book {
private int bookNo;
private String title;
private String author;
private int stateCode;
public Book(){}
public Book(int bookNo, String title, String author) {
this.bookNo = bookNo;
this.author = author;
this.title = title;
this.stateCode = 1;
}
public void rent() {
stateCode = 0;
System.out.println(title + "이(가) 대여 됐습니다.");
}
public void print() {
String rentState;
if( stateCode == 1 ) {
rentState = "재고있음";
}else {
rentState = "대여중";
}
System.out.println(bookNo + " 책 제목:" + title + ", 작가:" + author + ", 대여 유무:" + rentState);
}
public int getBookNo() {
return bookNo;
}
public void setBookNo(int bookNo) {
this.bookNo = bookNo;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
}
| [
"oa8859@gmail.com"
] | oa8859@gmail.com |
47f6fb71379ac888c2ed66bbe6da4f1b87ddbfb3 | df712303b969d53bc48ed907f447826cf2327b1e | /src/main/java/com/meiqi/app/dao/impl/OrderDaoImpl.java | ee7a3c376fe641c219649009280ded84b6499c47 | [] | no_license | weimingtom/DSORM | d452b7034a69e08853ca9101282b6f62564f919a | e80f730e7494a5d794cc44da4c7d4f28f90c0850 | refs/heads/master | 2021-01-09T20:37:12.755144 | 2016-05-03T02:43:31 | 2016-05-03T02:43:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,812 | java | package com.meiqi.app.dao.impl;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Service;
import com.meiqi.app.common.utils.CollectionsUtils;
import com.meiqi.app.common.utils.StringUtils;
import com.meiqi.app.dao.OrderDao;
import com.meiqi.app.pojo.Order;
/**
*
* @ClassName: OrderDaoImpl
* @Description:
* @author 杨永川
* @date 2015年5月8日 下午6:18:24
*
*/
@Service
public class OrderDaoImpl extends BaseDaoImpl implements OrderDao {
/**
*
* @Title: getAllOrderByUserId
* @Description:获取订单 根据用户id
* @param @param userId
* @param @param lastMonthDayTime
* @param @return
* @throws
*/
@Override
public List<Order> getAllOrderByUserId(long userId, int firstResult, int maxResults) {
String hql = "from Order O where O.userId = ? and O.isDel = 0 order by O.addTime desc";
Query query = getSession().createQuery(hql);
query.setParameter(0, userId);
query.setFirstResult(firstResult);
query.setMaxResults(maxResults);
return query.list();
}
@Override
public int getOrderTotalUserId(long userId) {
String hql = "select count(*) from Order O where O.userId = ? and O.isDel = 0";
Query query = getSession().createQuery(hql);
query.setParameter(0, userId);
List list = query.list();
if (!CollectionsUtils.isNull(list) && null != list.get(0)) {
return StringUtils.StringToInt(list.get(0).toString());
}
return 0;
}
@Override
public Order getOrderByUserIdAndOrderId(long orderId) {
String hql = "from Order O where O.orderId = ? and O.isDel = 0 ";
Query query = getSession().createQuery(hql);
query.setParameter(0, orderId);
List<Order> list = query.list();
if (!CollectionsUtils.isNull(list)) {
return list.get(0);
}
return null;
}
@Override
public Order getOrderByUserIdAndOrderId(long userId, long orderId) {
String hql = "from Order O where O.userId = ? and O.orderId = ? and O.isDel = 0 ";
Query query = getSession().createQuery(hql);
query.setParameter(0, userId);
query.setParameter(1, orderId);
List<Order> list = query.list();
if (!CollectionsUtils.isNull(list)) {
return list.get(0);
}
return null;
}
/**
*
* @Title: getOrderByOrderSn
* @Description:根据订单号获取订单
* @param @param cls
* @param @param orderSn
* @param @return
* @throws
*/
@Override
public Order getOrderByOrderSn(Class<Order> cls, String orderSn) {
Criteria criteria = getSession().createCriteria(cls);
criteria.add(Restrictions.eq("orderSn", orderSn)).add(Restrictions.eq("isDel", 1));
List<Order> orderList = criteria.list();
if (!CollectionsUtils.isNull(orderList)) {
return orderList.get(0);
}
return null;
}
/**
*
* @Title: getAllOrderByPhone
* @Description:根据电话号码获取订单
* @param @param phone
* @param @param lastMonthDayTime
* @param @return
* @throws
*/
@Override
public List<Order> getAllOrderByPhone(String phone, int firstResult, int maxResults) {
String hql = "from Order O where O.phone = ? and O.isDel = 0 order by O.addTime desc";
Query query = getSession().createQuery(hql);
query.setParameter(0, phone);
query.setFirstResult(firstResult);
query.setMaxResults(maxResults);
return query.list();
}
/**
*
* @Title: getOrderTotalByPhone
* @Description:根据电话号码获取订单总数
* @param @param phone
* @param @param phone
* @param @return
* @throws
*/
@Override
public int getOrderTotalByPhone(String phone) {
String hql = "select count(*) from Order O where O.phone = ? and O.isDel = 0";
Query query = getSession().createQuery(hql);
query.setParameter(0, phone);
List list = query.list();
if (!CollectionsUtils.isNull(list) && null != list.get(0)) {
return StringUtils.StringToInt(list.get(0).toString());
}
return 0;
}
@Override
public Object getObjectById(Class cls, long id) {
String hql = "from Order O where O.orderId = ? and O.isDel = 0 ";
Query query = getSession().createQuery(hql);
query.setParameter(0, id);
List<Order> list = query.list();
if (!CollectionsUtils.isNull(list)) {
return list.get(0);
}
return null;
}
}
| [
"2785739797@qq.com"
] | 2785739797@qq.com |
b371807a6f5ef979ab8fd73a59d985b64937e9fb | 96342d1091241ac93d2d59366b873c8fedce8137 | /java/com/l2jolivia/log/formatter/OlympiadFormatter.java | 06581b320790bcacf5d71bf97943558705d072ce | [] | no_license | soultobe/L2JOlivia_EpicEdition | c97ac7d232e429fa6f91d21bb9360cf347c7ee33 | 6f9b3de9f63d70fa2e281b49d139738e02d97cd6 | refs/heads/master | 2021-01-10T03:42:04.091432 | 2016-03-09T06:55:59 | 2016-03-09T06:55:59 | 53,468,281 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,616 | java | /*
* This file is part of the L2J Olivia project.
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jolivia.log.formatter;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.Formatter;
import java.util.logging.LogRecord;
import com.l2jolivia.Config;
import com.l2jolivia.util.StringUtil;
public class OlympiadFormatter extends Formatter
{
private final SimpleDateFormat dateFmt = new SimpleDateFormat("dd/MM/yyyy H:mm:ss");
@Override
public String format(LogRecord record)
{
final Object[] params = record.getParameters();
final StringBuilder output = StringUtil.startAppend(30 + record.getMessage().length() + (params == null ? 0 : params.length * 10), dateFmt.format(new Date(record.getMillis())), ",", record.getMessage());
if (params != null)
{
for (Object p : params)
{
if (p == null)
{
continue;
}
StringUtil.append(output, ",", p.toString());
}
}
output.append(Config.EOL);
return output.toString();
}
}
| [
"kim@tsnet-j.co.jp"
] | kim@tsnet-j.co.jp |
a05ae5fe333aba889693459c009b88586990dd22 | 173a7e3c1d4b34193aaee905beceee6e34450e35 | /kmzyc-b2b/kmzyc-b2b-web/src/main/java/com/kmzyc/b2b/ajax/BrowsingHisInterfaceAction.java | 97f1606b017a8c676e23ffc4021ffec0e776d7ff | [] | no_license | jjmnbv/km_dev | d4fc9ee59476248941a2bc99a42d57fe13ca1614 | f05f4a61326957decc2fc0b8e06e7b106efc96d4 | refs/heads/master | 2020-03-31T20:03:47.655507 | 2017-05-26T10:01:56 | 2017-05-26T10:01:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,109 | java | package com.kmzyc.b2b.ajax;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import com.km.framework.action.BaseAction;
import com.kmzyc.b2b.model.BrowsingHis;
import com.kmzyc.b2b.service.BrowsingHisService;
import com.kmzyc.b2b.service.ProductPriceService;
import com.kmzyc.b2b.vo.ReturnResult;
import com.kmzyc.framework.constants.Constants;
import com.kmzyc.framework.constants.InterfaceResultCode;
import com.kmzyc.util.StringUtil;
@SuppressWarnings({"serial", "unchecked"})
@Scope("prototype")
@Controller
public class BrowsingHisInterfaceAction extends BaseAction {
// private static Logger logger = Logger.getLogger(BrowsingHisInterfaceAction.class);
private static Logger logger = LoggerFactory.getLogger(BrowsingHisInterfaceAction.class);
// 返回至页面的对象
private ReturnResult returnResult;
@Resource(name = "browsingHisServiceImpl")
private BrowsingHisService browsingHisService;
@Resource(name = "productPriceService")
private ProductPriceService productPriceService;
/**
* 添加用户浏览商品记录
*
* @return
*/
public String insertBrowsingHis() {
// 商品编号
String contentCode = getRequest().getParameter("contentCode");
// 用户Id
Long userId = (Long) getSession().getAttribute(Constants.SESSION_USER_ID);
if (userId == null || StringUtil.isEmpty(contentCode)) {
returnResult = new ReturnResult(InterfaceResultCode.NOT_LOGIN, "未登录", null);
return SUCCESS;
}
try {
BrowsingHis browsingHis = new BrowsingHis();
browsingHis.setContentCode(contentCode);
browsingHis.setLoginId(userId.intValue());
// 浏览记录类型1:商品 2:商户
browsingHis.setBrowsingType(1);
browsingHisService.addBrowsingHis(browsingHis);
returnResult = new ReturnResult(InterfaceResultCode.SUCCESS, "成功", null);
} catch (Exception e) {
logger.error("新增浏览发生异常", e);
returnResult = new ReturnResult(InterfaceResultCode.FAILED, "失败", null);
}
return SUCCESS;
}
/**
* 根据用户id查询对应的浏览记录 2175
*
* @return
*/
public String querybrowsingHisById() {
// 获取缓存用户
Long userId = (Long) getSession().getAttribute(Constants.SESSION_USER_ID);
if (userId == null) {
returnResult = new ReturnResult(InterfaceResultCode.NOT_LOGIN, "未登录", null);
return SUCCESS;
}
// 获取参数显示个数
String rowNum = getRequest().getParameter("rowNum");
// 判断参数是否为空处理
Integer number = StringUtils.isBlank(rowNum) ? null : Integer.valueOf(rowNum);
// 绑定sql参数
Map<String, Object> map = new HashMap<String, Object>();
map.put("loginId", userId.intValue());
map.put("rowNum", number);
try {
List<BrowsingHis> browsingHisList = browsingHisService.queryBrowsingHis(map);
// 获取商品促销信息和价格
productPriceService.getPriceBatch(browsingHisList);
returnResult = new ReturnResult(InterfaceResultCode.SUCCESS, "成功", browsingHisList);
} catch (Exception e) {
logger.error("浏览记录加载出错" + e.getMessage(), e);
returnResult = new ReturnResult(InterfaceResultCode.FAILED, "失败", null);
}
return SUCCESS;
}
/**
* 清空删除浏览记录
*
* @return
*/
public String deleteBrowsingHisById() {
// 获取缓存用户
Long userId = (Long) getSession().getAttribute(Constants.SESSION_USER_ID);
if (userId == null) {
returnResult = new ReturnResult(InterfaceResultCode.NOT_LOGIN, "未登录", null);
return SUCCESS;
}
try {
// 根据登录id清空浏览记录
browsingHisService.deleteBrowingHisById(userId.intValue());
returnResult = new ReturnResult(InterfaceResultCode.SUCCESS, "成功", null);
} catch (Exception e) {
logger.error("清空浏览记录失败" + e.getMessage(), e);
returnResult = new ReturnResult(InterfaceResultCode.FAILED, "失败", null);
}
return SUCCESS;
}
/**
* 根据浏览ID删除对应的浏览记录
*
* @return
*/
public String deleteBrowsingHisByBrowsingId() {
// 获取缓存用户
Long userId = (Long) getSession().getAttribute(Constants.SESSION_USER_ID);
if (userId == null) {
returnResult = new ReturnResult(InterfaceResultCode.NOT_LOGIN, "未登录", null);
return SUCCESS;
}
Map<String, Object> map = new HashMap<String, Object>();
map.put("loginId", userId);
String browsingId = getRequest().getParameter("browsingId");
map.put("browsingId", browsingId);
try {
// 根据登录id清空浏览记录
browsingHisService.deleteBrowingHisByBrowingId(map);
returnResult = new ReturnResult(InterfaceResultCode.SUCCESS, "成功", null);
} catch (Exception e) {
logger.error("清空浏览记录失败" + e.getMessage(), e);
returnResult = new ReturnResult(InterfaceResultCode.FAILED, "失败", null);
}
return SUCCESS;
}
/**
* wap根据用户id查询对应的浏览记录 2175
*
* @return
*/
public String wapQuerybrowsingHisById() {
// 获取缓存用户
Long userId = (Long) getSession().getAttribute(Constants.SESSION_USER_ID);
Map<String, Object> mapReturn = new HashMap<String, Object>();
if (userId == null) {
returnResult = new ReturnResult(InterfaceResultCode.NOT_LOGIN, "未登录", null);
return SUCCESS;
}
// 获取是第几页
String startNumber = getRequest().getParameter("pageNumber");
Map<String, Object> map = new HashMap<String, Object>();
map.put("loginId", userId.intValue());
map.put("startNum", (Integer.parseInt(startNumber.toString()) - 1) * 10 + 1); // 起始页
map.put("rowNum", Integer.parseInt(startNumber.toString()) * 10); // 终结页
try {
List<BrowsingHis> browsingHisList = browsingHisService.queryBrowsingHis(map);
if (browsingHisList != null && browsingHisList.size() > 0) { // 获取类目属性
for (int i = 0; i < browsingHisList.size(); i++) {
String categoryAttrValueStr = "";
List<Map<String, String>> categoryAttrValueList =
browsingHisList.get(i).getCategoryAttrValueList();
if (categoryAttrValueList != null && categoryAttrValueList.size() > 0) {
for (int j = 0; j < categoryAttrValueList.size(); j++) {
categoryAttrValueStr += categoryAttrValueList.get(j).get("categoryAttrValue") + " ";
}
// categoryAttrValueStr.subSequence(0, categoryAttrValueStr.length() - 1);
}
browsingHisList.get(i).setCategoryAttrValueStr(categoryAttrValueStr);
}
}
// 查询浏览商品的个数
Long browsingCount = browsingHisService.queryBrowsingHisCount(map);
// 获取商品促销信息和价格
productPriceService.getPriceBatch(browsingHisList);
mapReturn.put("browsingHisList", browsingHisList);
// 计算总页数
if (browsingCount != 0) {
browsingCount = browsingCount / 10 + 1;
}
mapReturn.put("browsTotal", browsingCount);
returnResult = new ReturnResult(InterfaceResultCode.SUCCESS, "成功", mapReturn);
} catch (Exception e) {
logger.error("浏览记录加载出错" + e.getMessage(), e);
returnResult = new ReturnResult(InterfaceResultCode.FAILED, "失败", null);
}
return SUCCESS;
}
public ReturnResult getReturnResult() {
return returnResult;
}
public void setReturnResult(ReturnResult returnResult) {
this.returnResult = returnResult;
}
}
| [
"luoxinyu@km.com"
] | luoxinyu@km.com |
40a054c733a81db05fc1b919ee4acf60b3022b95 | 47a1618c7f1e8e197d35746639e4480c6e37492e | /src/oracle/retail/stores/pos/services/inquiry/ItemInquiryLaunchShuttle.java | cdde5fe1a68ae9d0e3f40db15f68d59b570e7195 | [] | no_license | dharmendrams84/POSBaseCode | 41f39039df6a882110adb26f1225218d5dcd8730 | c588c0aa2a2144aa99fa2bbe1bca867e008f47ee | refs/heads/master | 2020-12-31T07:42:29.748967 | 2017-03-29T08:12:34 | 2017-03-29T08:12:34 | 86,555,051 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,552 | java | /* ===========================================================================
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
* ===========================================================================
* $Header: rgbustores/applications/pos/src/oracle/retail/stores/pos/services/inquiry/ItemInquiryLaunchShuttle.java /rgbustores_13.4x_generic_branch/1 2011/05/05 14:05:45 mszekely Exp $
* ===========================================================================
* NOTES
* <other useful comments, qualifications, etc.>
*
* MODIFIED (MM/DD/YY)
* cgreene 05/26/10 - convert to oracle packaging
* cgreene 04/27/10 - XbranchMerge cgreene_refactor-duplicate-pos-classes
* from st_rgbustores_techissueseatel_generic_branch
* abondala 01/03/10 - update header date
*
* ===========================================================================
* $Log:
* 3 360Commerce 1.2 3/31/2005 4:28:31 PM Robert Pearse
* 2 360Commerce 1.1 3/10/2005 10:22:27 AM Robert Pearse
* 1 360Commerce 1.0 2/11/2005 12:11:38 PM Robert Pearse
*
* Revision 1.4 2004/09/23 00:07:12 kmcbride
* @scr 7211: Adding static serialVersionUIDs to all POS Serializable objects, minus the JComponents
*
* Revision 1.3 2004/02/12 16:50:26 mcs
* Forcing head revision
*
* Revision 1.2 2004/02/11 21:51:10 rhafernik
* @scr 0 Log4J conversion and code cleanup
*
* Revision 1.1.1.1 2004/02/11 01:04:16 cschellenger
* updating to pvcs 360store-current
*
*
*
* Rev 1.0 Aug 29 2003 15:59:52 CSchellenger
* Initial revision.
*
* Rev 1.2 Jan 12 2003 16:03:56 pjf
* Remove deprecated calls to AbstractFinancialCargo.getCodeListMap(), setCodeListMap().
* Resolution for 1907: Remove deprecated calls to AbstractFinancialCargo.getCodeListMap()
*
* Rev 1.1 Oct 14 2002 16:09:44 DCobb
* Added alterations service to item inquiry service.
* Resolution for POS SCR-1753: POS 5.5 Alterations Package
*
* Rev 1.0 Apr 29 2002 15:21:44 msg
* Initial revision.
*
* Rev 1.1 10 Apr 2002 17:21:40 baa
* get department list from reason codes
* Resolution for POS SCR-1562: Get Department list from Reason Codes, not separate Dept. list.
*
* Rev 1.0 Mar 18 2002 11:33:16 msg
* Initial revision.
*
* Rev 1.2 Dec 11 2001 20:48:46 dfh
* pass along transaction type
* Resolution for POS SCR-260: Special Order feature for release 5.0
*
*
* Rev 1.1 25 Oct 2001 17:41:22 baa
*
* cross store inventory feature
*
* Resolution for POS SCR-230: Cross Store Inventory
*
* ===========================================================================
*/
package oracle.retail.stores.pos.services.inquiry;
// Foundation imports
import oracle.retail.stores.pos.services.common.FinancialCargoShuttle;
import oracle.retail.stores.foundation.tour.ifc.BusIfc;
import oracle.retail.stores.foundation.tour.ifc.ShuttleIfc;
import oracle.retail.stores.foundation.utility.Util;
import oracle.retail.stores.pos.services.inquiry.iteminquiry.ItemInquiryCargo;
//--------------------------------------------------------------------------
/**
Transfers the inquiry options cargo to the item inquiry cargo. <P>
@version $Revision: /rgbustores_13.4x_generic_branch/1 $
**/
//--------------------------------------------------------------------------
public class ItemInquiryLaunchShuttle extends FinancialCargoShuttle implements ShuttleIfc
{
// This id is used to tell
// the compiler not to generate a
// new serialVersionUID.
//
static final long serialVersionUID = 6906914400670091407L;
/**
revision number
**/
public static final String revisionNumber = "$Revision: /rgbustores_13.4x_generic_branch/1 $";
// The calling service's cargo
protected InquiryOptionsCargo inquiryOptionsCargo = null;
//----------------------------------------------------------------------
/**
Loads the inquiry options cargo.
@param bus Service Bus to copy cargo from.
**/
//----------------------------------------------------------------------
public void load(BusIfc bus)
{
// load financial cargo
super.load(bus);
inquiryOptionsCargo = (InquiryOptionsCargo) bus.getCargo();
}
//----------------------------------------------------------------------
/**
Sets the register and transaction type for the item inquiry service.
<P>
@param bus Service Bus to copy cargo to.
**/
//----------------------------------------------------------------------
public void unload(BusIfc bus)
{
// unload financial cargo
super.unload(bus);
ItemInquiryCargo itemInquiryCargo = (ItemInquiryCargo) bus.getCargo();
itemInquiryCargo.setRegister(inquiryOptionsCargo.getRegister());
itemInquiryCargo.setTransactionType(inquiryOptionsCargo.getTransactionType());
itemInquiryCargo.setTransaction(inquiryOptionsCargo.getTransaction());
}
//----------------------------------------------------------------------
/**
Returns the revision number of the class.
<P>
@return String representation of revision number
**/
//----------------------------------------------------------------------
public String getRevisionNumber()
{
return(Util.parseRevisionNumber(revisionNumber));
}
}
| [
"Ignitiv021@Ignitiv021-PC"
] | Ignitiv021@Ignitiv021-PC |
75527b1a975d2e329598fb8831b619250e909dfc | 0e72060cb1b7651c9552af3e59786e9946a3d03f | /app/src/main/java/com/owo/module_c_mylabel/FragMyLabel.java | d9f449743a207c34ed3c575a51fa30b0b762d093 | [] | no_license | AlexCatP/YUP | f24a4d805b37c63a768bd6962c81395089271bbb | 2a3f1a31c621e572a6790fc2e931d8439786357e | refs/heads/master | 2021-09-08T03:09:45.256258 | 2018-03-06T13:34:58 | 2018-03-06T13:34:58 | 115,122,678 | 0 | 2 | null | 2018-03-06T13:34:59 | 2017-12-22T14:30:47 | Java | UTF-8 | Java | false | false | 4,331 | java | package com.owo.module_c_mylabel;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.assist.ImageScaleType;
import com.owo.base.FragBase;
import com.owo.module_b_personal.widgets.FragPersonalViewpagerLeft;
import com.owo.utils.util_http.MyURL;
import com.wao.dogcat.R;
import com.wao.dogcat.widget.CircleImageView;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* @author XQF
* @created 2017/5/24
*/
public class FragMyLabel extends FragBase {
public static FragMyLabel newInstance(){
return new FragMyLabel();
}
private static String FRAG_SELF = "self";
private static String FRAG_HIM = "him";
@BindView(R.id.btn_self)
protected Button mBtnSelf;
@BindView(R.id.btn_him)
protected Button mBtnHim;
private FragmentManager mFragmentManager;
private FragMyLabelSelf myLabelSelf;
private FragMyLabelHim myLabelHim;
private DisplayImageOptions options;
@BindView(R.id.my_label_avatar)
protected CircleImageView mCircleImageViewUserAvatar;
@OnClick(R.id.btnBack)
public void back(){
getActivity().finish();
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.aty_my_label, container, false);
ButterKnife.bind(this, view);
mFragmentManager = getActivity().getSupportFragmentManager();
mBtnSelf.performClick();
options = new DisplayImageOptions.Builder()//
.bitmapConfig(Bitmap.Config.RGB_565)
.imageScaleType(ImageScaleType.EXACTLY)//图片大小刚好满足控件尺寸
.showImageForEmptyUri(R.drawable.my) //
.showImageOnFail(R.drawable.my) //
.cacheInMemory(true) //
.cacheOnDisk(true) //
.build();//
com.nostra13.universalimageloader.core.ImageLoader.getInstance().
displayImage(MyURL.ROOT+ FragPersonalViewpagerLeft.mBeanUser.getAvatar(), mCircleImageViewUserAvatar, options);
return view;
}
@OnClick(R.id.btn_self)
public void onBtnSelfClick() {
mBtnSelf.setTextColor(getResources().getColor(R.color.word_color_white));
mBtnSelf.setBackgroundColor(getResources().getColor(R.color.toolbar_bg_color));
if (myLabelSelf == null) {
FragmentTransaction fragmentTransaction = mFragmentManager.beginTransaction();
myLabelSelf = FragMyLabelSelf.newInstance();
fragmentTransaction.replace(R.id.frag_container_aty_my_label, myLabelSelf, FRAG_SELF);
fragmentTransaction.show(myLabelSelf);
fragmentTransaction.commit();
myLabelHim = null;
mBtnHim.setTextColor(getResources().getColor(R.color.word_color_black));
mBtnHim.setBackgroundColor(getResources().getColor(R.color.tab_color_normal));
}
}
@OnClick(R.id.btn_him)
public void onBtnHimClick() {
mBtnHim.setTextColor(getResources().getColor(R.color.word_color_white));
mBtnHim.setBackgroundColor(getResources().getColor(R.color.toolbar_bg_color));
if (myLabelHim == null) {
myLabelHim = FragMyLabelHim.newInstance();
FragmentTransaction fragmentTransaction = mFragmentManager.beginTransaction();
fragmentTransaction.replace(R.id.frag_container_aty_my_label, myLabelHim, FRAG_HIM);
fragmentTransaction.show(myLabelHim);
fragmentTransaction.commit();
myLabelSelf = null;
mBtnSelf.setTextColor(getResources().getColor(R.color.word_color_black));
mBtnSelf.setBackgroundColor(getResources().getColor(R.color.tab_color_normal));
}
}
}
| [
"847307933@qq.com"
] | 847307933@qq.com |
f0244391bf4502494f705e7d9cd7d74881d20248 | 7dece986667a167def13934088d50fc0363b411e | /src/main/java/jdk/designPatterns/proxy/staticProxy/HelloService.java | 4fe956dd2b415b78030fb1462f485d6ac16f03ed | [] | no_license | dongfangding/JavaDemo | 9c425b22224dee0c0a7fa44a721950893135bb9f | 6a1a7d38fbd67b952fed7190f5fc8aca859241f7 | refs/heads/master | 2022-12-06T07:01:19.913940 | 2021-04-25T08:43:09 | 2021-04-25T08:43:09 | 193,824,392 | 1 | 0 | null | 2022-11-15T23:47:30 | 2019-06-26T03:39:56 | Java | UTF-8 | Java | false | false | 277 | java | package jdk.designPatterns.proxy.staticProxy;
/**
* 静态代理要求必须基于接口$
*
* @author dongfang.ding
* @date 2020/10/28 0028 22:34
*/
public interface HelloService {
/**
* 接口方法
* @param name
*/
void sayHello(String name);
}
| [
"1041765757@qq.com"
] | 1041765757@qq.com |
1c82fcd9927f4c32d5084567c812352f8d296a6c | 13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3 | /crash-reproduction-ws/results/XRENDERING-481-100-10-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/web/XWikiAction_ESTest.java | e9f6920bff1cf2368dbc59d16f58b7aa73a331cd | [
"MIT",
"CC-BY-4.0"
] | permissive | STAMP-project/Botsing-basic-block-coverage-application | 6c1095c6be945adc0be2b63bbec44f0014972793 | 80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da | refs/heads/master | 2022-07-28T23:05:55.253779 | 2022-04-20T13:54:11 | 2022-04-20T13:54:11 | 285,771,370 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 546 | java | /*
* This file was automatically generated by EvoSuite
* Tue Mar 31 16:31:26 UTC 2020
*/
package com.xpn.xwiki.web;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class XWikiAction_ESTest extends XWikiAction_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
db780f9f65078d247c6ffa143d98f7bf4e908a6e | df48dc6e07cdf202518b41924444635f30d60893 | /jinx-com4j/src/main/java/com/exceljava/com4j/excel/IAddIns2.java | 0e98234d709d21c8397feae854f918f32c8a73d9 | [
"MIT"
] | permissive | ashwanikaggarwal/jinx-com4j | efc38cc2dc576eec214dc847cd97d52234ec96b3 | 41a3eaf71c073f1282c2ab57a1c91986ed92e140 | refs/heads/master | 2022-03-29T12:04:48.926303 | 2020-01-10T14:11:17 | 2020-01-10T14:11:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,032 | java | package com.exceljava.com4j.excel ;
import com4j.*;
@IID("{000244B5-0001-0000-C000-000000000046}")
public interface IAddIns2 extends Com4jObject,Iterable<Com4jObject> {
// Methods:
/**
* <p>
* Getter method for the COM property "Application"
* </p>
* @return Returns a value of type com.exceljava.com4j.excel._Application
*/
@VTID(7)
com.exceljava.com4j.excel._Application getApplication();
/**
* <p>
* Getter method for the COM property "Creator"
* </p>
* @return Returns a value of type com.exceljava.com4j.excel.XlCreator
*/
@VTID(8)
com.exceljava.com4j.excel.XlCreator getCreator();
/**
* <p>
* Getter method for the COM property "Parent"
* </p>
* @return Returns a value of type com4j.Com4jObject
*/
@VTID(9)
@ReturnValue(type=NativeType.Dispatch)
com4j.Com4jObject getParent();
/**
* <p>
* This method uses predefined default values for the following parameters:
* </p>
* <ul>
* <li>java.lang.Object parameter copyFile is set to com4j.Variant.getMissing()</li></ul>
* <p>
* Therefore, using this method is equivalent to
* <code>
* add(filename, com4j.Variant.getMissing());
* </code>
* </p>
* @param filename Mandatory java.lang.String parameter.
* @return Returns a value of type com.exceljava.com4j.excel.AddIn
*/
@VTID(10)
@UseDefaultValues(paramIndexMapping = {0, 2}, optParamIndex = {1}, javaType = {java.lang.Object.class}, nativeType = {NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR}, literal = {"80020004"})
@ReturnValue(index=2)
com.exceljava.com4j.excel.AddIn add(
java.lang.String filename);
/**
* @param filename Mandatory java.lang.String parameter.
* @param copyFile Optional parameter. Default value is com4j.Variant.getMissing()
* @return Returns a value of type com.exceljava.com4j.excel.AddIn
*/
@VTID(10)
com.exceljava.com4j.excel.AddIn add(
java.lang.String filename,
@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object copyFile);
/**
* <p>
* Getter method for the COM property "Count"
* </p>
* @return Returns a value of type int
*/
@VTID(11)
int getCount();
/**
* <p>
* Getter method for the COM property "Item"
* </p>
* @param index Mandatory java.lang.Object parameter.
* @return Returns a value of type com.exceljava.com4j.excel.AddIn
*/
@VTID(12)
com.exceljava.com4j.excel.AddIn getItem(
@MarshalAs(NativeType.VARIANT) java.lang.Object index);
/**
* <p>
* Getter method for the COM property "_NewEnum"
* </p>
*/
@VTID(13)
java.util.Iterator<Com4jObject> iterator();
/**
* <p>
* Getter method for the COM property "_Default"
* </p>
* @param index Mandatory java.lang.Object parameter.
* @return Returns a value of type com.exceljava.com4j.excel.AddIn
*/
@VTID(14)
@DefaultMethod
com.exceljava.com4j.excel.AddIn get_Default(
@MarshalAs(NativeType.VARIANT) java.lang.Object index);
// Properties:
}
| [
"tony@pyxll.com"
] | tony@pyxll.com |
80c6ebd73eb54a15a5dab0a8ab65e183272a8a38 | ed6bbcb57c3cb21edce7e29424567b54b7aa2518 | /ACE/Huangliangyun/Circle1.java | 13b70477498bcd4036efbee34a901cda0ed14462 | [] | no_license | xingchenpro/HlyAlgorithm | b6fabaf5c516cbda22e6e6b0863dcffbfe9047fe | 01aaa1b75362a8a6e51e7e8114a86c3cb154db42 | refs/heads/master | 2022-01-17T01:46:57.204178 | 2019-04-28T13:19:53 | 2019-04-28T13:19:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 326 | java | package Huangliangyun;
public class Circle1 implements Shape1 {
double r;
public Circle1() {
}
public Circle1(double r) {
this.r=r;
}
@Override
public double getArea() {
return Math.PI*r*r;
}
@Override
public void draw() {
System.out.println("I am a circle,my area is:");
}
}
| [
"1136513099@qq.com"
] | 1136513099@qq.com |
0968fae0f6ef664ea4e07746204e3c05b860f53e | a46f309d68a9e2d9026ca90357f1c947cbf043ff | /java_01/src/day22_io/Test04.java | b31bb5ea6cb6a7081793a18f59713dce07340a0e | [] | no_license | aaaaaandohee/bit_java | e84322927340f48647f372b17616a0ac62b86717 | 9a2a85f071890ec14cf7766656dabc850ea29fe1 | refs/heads/master | 2022-01-20T16:30:55.622591 | 2019-08-27T05:10:14 | 2019-08-27T05:10:14 | 201,861,788 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,671 | java | package day22_io;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
public class Test04 {
public static void main(String[] args) {
String src = "c://lib//Ben.mp3";
FileInputStream fis = null;
FileOutputStream fos = null;
System.out.println("< 파일 복사 시작 >");
try {
fis = new FileInputStream(src);
fos = new FileOutputStream("c://lib//copy3.mp3", false); //true : append모드 => 원본을 유지한 채 복사됨. 기존의 파일 내용 뒤에 복사.
//false => 덮어씌움
int read = 0;
int count = 0;
byte[] buffer = new byte[1024*1024]; //버퍼의 사이즈를 1메가로 지정.
while((read = fis.read(buffer)) != -1) {
// System.out.println("read : " + read);
fos.write(buffer, 0, read); //0에서부터 읽은 바이트수만큼 기록. => 사이즈가 일치하는 파일이 생성됨.
//해당 속성 지정하지 않으면 버퍼의 사이즈에 따라 파일의 사이즈가 달라짐.
count++;
}
System.out.println("I/O 횟수 : " + count);
System.out.println("< 파일 복사 완료 >");
} catch (FileNotFoundException e) {
System.out.println(src + " 파일(복사원본) 확인해주세요.");
} catch (Exception e) {
e.printStackTrace();
}finally {
try {
if(fis!=null) fis.close();
if(fos!=null) fos.close();
} catch (IOException e) {
e.printStackTrace();
}
}
System.out.println("--- main end ---");
}
}
| [
"user@DESKTOP-V882PTR"
] | user@DESKTOP-V882PTR |
bbe3f644e3565c72d1231cf32340b9b8f7cb50cc | 9ff2171a04aac0701b1bfa009c14aeaadc59fba2 | /meishai1/src/main/java/com/meishai/entiy/TrialDetailRespData.java | f7db2afb4bd9488b5ba7cfd153156657797e59aa | [] | no_license | disert/meishai1 | e77c295342d4222c3dcb31ab567dd4c319b369c2 | 9a27d30f894d533190cfde301eedaae3f7c93e7f | refs/heads/master | 2021-01-17T16:15:36.243661 | 2016-07-21T12:07:41 | 2016-07-21T12:07:41 | 59,624,705 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,092 | java | package com.meishai.entiy;
import java.util.List;
import com.meishai.entiy.BaseRespData;
import com.meishai.entiy.ShareData;
/**
* 试用详情相应的数据封装类
*
* @author Administrator yl
*/
public class TrialDetailRespData extends BaseRespData {
public TrialDetailData data;
public Notice notice;
public List<Picture> pics;
public ShareData sharedata;
public List<UserInfo> users;
public class TrialDetailData {
public int gid;// 5080
public int isapp;//当前登录用户是否以申请,
public int isshare;
public String page_title;// 试用详情
public String image;// http://img.meishai.com/2015/0930/20150930033134243.jpg
public String title;// 秋冬新品打底裤裙子
public String snum;// 限量:5份
public String price;// 价值:45元
public String gprice;// 已缴纳225元保证金
public String lowpoint;// "积分:7000分",
public String record_text;// "查看兑换记录",
public String record_url;// "http://www.meishai.com/index.php?m=mobile&c=goods&c=point_user&gid=4395",
public String shop_logo;// 赞助商家LOGO,
public String shop_name;// 赞助商家名称,
public String shop_url;// 赞助商家链接,
public String shop_text;// 赞助商:
public String user_more;// http://www.meishai.com/index.php?m=app&c=goods&a=userlist&gid=5080
public String user_text;// 申请会员
public String lastnum;// "剩余:0份",;
public String appnum;//限量:2件
public String endday;// 距离结束:7天
public String button_text;// 申请试用
public int isorder;//
public String content;//
}
public class Notice {
public String note_content;
public String note_title;
}
public class Picture {
public int pic_height;
public String pic_url;
public int pic_width;
}
public class UserInfo {
public String avatar;
public int userid;
}
}
| [
"541878326@qq.com"
] | 541878326@qq.com |
62dc4315ec0c393d185038a81fd71a5b3a58b1cb | 0367438f3faf6a167ed6e0d1be8f91c237e1fd0c | /core/cas-server-core-webflow-mfa/src/test/java/org/apereo/cas/web/flow/authentication/RankedMultifactorAuthenticationProviderSelectorTests.java | 585d740b7ad14886048a74bdeea865bc5630cae4 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | wangqc93/cas | 42556a8e2e8f55481e54ff5701e65d6825b225b5 | a89039f517ed9f1bb57049ddaaf2b3688ae955fb | refs/heads/master | 2020-11-24T06:52:08.165890 | 2019-12-13T08:29:52 | 2019-12-13T08:29:52 | 227,976,255 | 1 | 0 | Apache-2.0 | 2019-12-14T06:20:05 | 2019-12-14T06:20:04 | null | UTF-8 | Java | false | false | 2,049 | java | package org.apereo.cas.web.flow.authentication;
import org.apereo.cas.BaseCasWebflowMultifactorAuthenticationTests;
import org.apereo.cas.authentication.MultifactorAuthenticationProviderSelector;
import org.apereo.cas.authentication.mfa.TestMultifactorAuthenticationProvider;
import org.apereo.cas.services.RegisteredServiceMultifactorPolicyFailureModes;
import org.apereo.cas.services.RegisteredServiceTestUtils;
import org.apereo.cas.util.CollectionUtils;
import lombok.val;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import static org.junit.jupiter.api.Assertions.*;
/**
* This is {@link RankedMultifactorAuthenticationProviderSelectorTests}.
*
* @author Misagh Moayyed
* @since 6.1.0
*/
public class RankedMultifactorAuthenticationProviderSelectorTests extends BaseCasWebflowMultifactorAuthenticationTests {
@Autowired
@Qualifier("multifactorAuthenticationProviderSelector")
private MultifactorAuthenticationProviderSelector multifactorAuthenticationProviderSelector;
@Test
public void verifySelectionOfMfaProvider() {
val dummy1 = TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext);
dummy1.setOrder(10);
dummy1.setFailureMode(RegisteredServiceMultifactorPolicyFailureModes.PHANTOM.name());
val dummy2 = TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext);
dummy2.setOrder(5);
val provider = multifactorAuthenticationProviderSelector.resolve(CollectionUtils.wrapList(dummy1, dummy2),
RegisteredServiceTestUtils.getRegisteredService(), RegisteredServiceTestUtils.getPrincipal());
assertNotNull(provider);
assertEquals(dummy1.getId(), provider.getId());
assertEquals(dummy1.getOrder(), provider.getOrder());
assertEquals(RegisteredServiceMultifactorPolicyFailureModes.PHANTOM, provider.getFailureMode());
}
}
| [
"mm1844@gmail.com"
] | mm1844@gmail.com |
11d301892a068d3cdebbe019f20c3855956ac32b | 4536078b4070fc3143086ff48f088e2bc4b4c681 | /v1.0.4/decompiled/com/microsoft/azure/sdk/iot/device/transport/mqtt/TopicParser.java | ac651bfec58122f6bee36c5d3a00eb402f3c206a | [] | no_license | olealgoritme/smittestopp_src | 485b81422752c3d1e7980fbc9301f4f0e0030d16 | 52080d5b7613cb9279bc6cda5b469a5c84e34f6a | refs/heads/master | 2023-05-27T21:25:17.564334 | 2023-05-02T14:24:31 | 2023-05-02T14:24:31 | 262,846,147 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,264 | java | package com.microsoft.azure.sdk.iot.device.transport.mqtt;
import com.microsoft.azure.sdk.iot.device.exceptions.TransportException;
public class TopicParser
{
public final String QUESTION = "?";
public final String REQ_ID = "$rid=";
public final String VERSION = "$version=";
public String[] topicTokens = null;
public TopicParser(String paramString)
{
if ((paramString != null) && (paramString.length() != 0))
{
topicTokens = paramString.split("/");
return;
}
throw new TransportException(new IllegalArgumentException("topic cannot be null or empty"));
}
public String getMethodName(int paramInt)
{
if (paramInt > 0)
{
Object localObject = topicTokens;
if (paramInt < localObject.length)
{
if (localObject.length > paramInt)
{
localObject = localObject[paramInt];
if (localObject == null) {
throw new TransportException(new IllegalArgumentException("method name could not be parsed"));
}
}
else
{
localObject = null;
}
return (String)localObject;
}
}
throw new TransportException(new IllegalArgumentException("Invalid token Index for Method Name"));
}
public String getRequestId(int paramInt)
{
if (paramInt > 0)
{
Object localObject = topicTokens;
if (paramInt < localObject.length)
{
if (localObject.length > paramInt)
{
localObject = localObject[paramInt];
if ((((String)localObject).contains("$rid=")) && (((String)localObject).contains("?")))
{
int i = ((String)localObject).indexOf("$rid=");
int j = ((String)localObject).length();
paramInt = j;
if (((String)localObject).contains("$version="))
{
paramInt = j;
if (!((String)localObject).contains("?$version=")) {
paramInt = ((String)localObject).indexOf("$version=") - 1;
}
}
localObject = ((String)localObject).substring(i + 5, paramInt);
break label103;
}
}
localObject = null;
label103:
return (String)localObject;
}
}
throw new TransportException(new IllegalArgumentException("Invalid token Index for request id"));
}
public String getStatus(int paramInt)
{
if (paramInt > 0)
{
Object localObject = topicTokens;
if (paramInt < localObject.length)
{
if (localObject.length > paramInt)
{
localObject = localObject[paramInt];
if (localObject == null) {
throw new TransportException("Status could not be parsed");
}
}
else
{
localObject = null;
}
return (String)localObject;
}
}
throw new TransportException(new IllegalArgumentException("Invalid token Index for status"));
}
public String getVersion(int paramInt)
{
if (paramInt > 0)
{
Object localObject = topicTokens;
if (paramInt < localObject.length)
{
if (localObject.length > paramInt)
{
localObject = localObject[paramInt];
if ((((String)localObject).contains("$version=")) && (((String)localObject).contains("?")))
{
int i = ((String)localObject).indexOf("$version=");
int j = ((String)localObject).length();
paramInt = j;
if (!((String)localObject).contains("?$rid="))
{
paramInt = j;
if (((String)localObject).contains("$rid=")) {
paramInt = ((String)localObject).indexOf("$rid=") - 1;
}
}
localObject = ((String)localObject).substring(i + 9, paramInt);
break label104;
}
}
localObject = null;
label104:
return (String)localObject;
}
}
throw new TransportException(new IllegalArgumentException("Invalid token Index for Version"));
}
}
/* Location:
* Qualified Name: base.com.microsoft.azure.sdk.iot.device.transport.mqtt.TopicParser
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"olealgoritme@gmail.com"
] | olealgoritme@gmail.com |
a9c9f81ce3e905a2d0421dba56496a3c8be2bcbe | 8b7ea5475818da25141e5e7e8bf70b138b0603b1 | /k12servo/src/main/java/cn/k12soft/servo/module/applyFor/domain/dto/ApplyForEveryDTO.java | cbc36e6db3814eb197cd74b4a7cdcbff308fe6fa | [
"Apache-2.0"
] | permissive | Mengxc2018/k12 | f92abd49830026edc7553741af25c3fe21e4ffbd | 3af8d1e37606cae089475f3c767b04454cbd5a15 | refs/heads/master | 2020-04-10T21:48:40.149046 | 2019-03-31T07:52:11 | 2019-03-31T07:52:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,399 | java | package cn.k12soft.servo.module.applyFor.domain.dto;
import cn.k12soft.servo.module.VacationTeacher.VacationTeacherUtil;
import cn.k12soft.servo.module.applyFor.domain.ApplyForEntity;
import java.time.Instant;
public class ApplyForEveryDTO extends ApplyForEntity{
public ApplyForEveryDTO(Integer masterId, String masterName, String masterPortrait, Integer actorId, String userName, String portrait) {
super(masterId, masterName, masterPortrait, actorId, userName, portrait);
}
private Integer id;
private String processInstanceId; // activiti 流程实例ID
private String taskId; // activiti 任务节点ID
private Integer massageId; // 申请信息id
private Integer processType; // 申请类型
private VacationTeacherUtil.YES_NO auditResult; // 申请结果
private String comment; // 审批意见
private Instant createTime; // 创建时间
private Instant updateTime; // 审核时间
public ApplyForEveryDTO(Integer masterId, String masterName, String masterPortrait, Integer actorId, String userName, String portrait, Integer id, String processInstanceId, String taskId, Integer massageId, Integer processType, VacationTeacherUtil.YES_NO auditResult, String comment, Instant createTime, Instant updateTime) {
super(masterId, masterName, masterPortrait, actorId, userName, portrait);
this.id = id;
this.processInstanceId = processInstanceId;
this.taskId = taskId;
this.massageId = massageId;
this.processType = processType;
this.auditResult = auditResult;
this.comment = comment;
this.createTime = createTime;
this.updateTime = updateTime;
}
public Integer getId() {
return id;
}
public String getProcessInstanceId() {
return processInstanceId;
}
public String getTaskId() {
return taskId;
}
public Integer getMassageId() {
return massageId;
}
public Integer getProcessType() {
return processType;
}
public VacationTeacherUtil.YES_NO getAuditResult() {
return auditResult;
}
public String getComment() {
return comment;
}
public Instant getCreateTime() {
return createTime;
}
public Instant getUpdateTime() {
return updateTime;
}
}
| [
"mxc12345"
] | mxc12345 |
c8b3a0a1d2326a96d31fb77d0ecc0b2bbc031f62 | 4365604e3579b526d473c250853548aed38ecb2a | /modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/v202011/ActivateAudienceSegments.java | 2ca193b75d9f5bf2502d4873f154bfa97cb8d236 | [
"Apache-2.0"
] | permissive | lmaeda/googleads-java-lib | 6e73572b94b6dcc46926f72dd4e1a33a895dae61 | cc5b2fc8ef76082b72f021c11ff9b7e4d9326aca | refs/heads/master | 2023-08-12T19:03:46.808180 | 2021-09-28T16:48:04 | 2021-09-28T16:48:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,380 | java | // Copyright 2020 Google 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.
/**
* ActivateAudienceSegments.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.admanager.axis.v202011;
/**
* Action that can be performed on {@link FirstPartyAudienceSegment}
* objects to activate them.
*/
public class ActivateAudienceSegments extends com.google.api.ads.admanager.axis.v202011.AudienceSegmentAction implements java.io.Serializable {
public ActivateAudienceSegments() {
}
@Override
public String toString() {
return com.google.common.base.MoreObjects.toStringHelper(this.getClass())
.omitNullValues()
.toString();
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof ActivateAudienceSegments)) return false;
ActivateAudienceSegments other = (ActivateAudienceSegments) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj);
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(ActivateAudienceSegments.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v202011", "ActivateAudienceSegments"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
| [
"christopherseeley@users.noreply.github.com"
] | christopherseeley@users.noreply.github.com |
0f419e3208b746f74dffecd0c118e0c9a00aea6c | 0907c886f81331111e4e116ff0c274f47be71805 | /sources/com/facebook/ads/AudienceNetworkContentProvider.java | b4f83e884e1fd7d4668f32501898b8471fccedb8 | [
"MIT"
] | permissive | Minionguyjpro/Ghostly-Skills | 18756dcdf351032c9af31ec08fdbd02db8f3f991 | d1a1fb2498aec461da09deb3ef8d98083542baaf | refs/heads/Android-OS | 2022-07-27T19:58:16.442419 | 2022-04-15T07:49:53 | 2022-04-15T07:49:53 | 415,272,874 | 2 | 0 | MIT | 2021-12-21T10:23:50 | 2021-10-09T10:12:36 | Java | UTF-8 | Java | false | false | 1,229 | java | package com.facebook.ads;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import com.facebook.ads.AudienceNetworkAds;
import com.facebook.ads.internal.dynamicloading.DynamicLoaderFactory;
import com.facebook.ads.internal.settings.MultithreadedBundleWrapper;
public class AudienceNetworkContentProvider extends ContentProvider {
public int delete(Uri uri, String str, String[] strArr) {
return 0;
}
public String getType(Uri uri) {
return null;
}
public Uri insert(Uri uri, ContentValues contentValues) {
return null;
}
public Cursor query(Uri uri, String[] strArr, String str, String[] strArr2, String str2) {
return null;
}
public int update(Uri uri, ContentValues contentValues, String str, String[] strArr) {
return 0;
}
public boolean onCreate() {
Context context = getContext();
if (context == null) {
return false;
}
DynamicLoaderFactory.initialize(context, (MultithreadedBundleWrapper) null, (AudienceNetworkAds.InitListener) null, true);
return false;
}
}
| [
"66115754+Minionguyjpro@users.noreply.github.com"
] | 66115754+Minionguyjpro@users.noreply.github.com |
5f729e81afdd36e4d7705636f7b94a243d60ae0e | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a069/A069905Test.java | 7d7a8df239b789bdea93cb5c343e26171d80cc72 | [] | 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.a069;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A069905Test extends AbstractSequenceTest {
}
| [
"sairvin@gmail.com"
] | sairvin@gmail.com |
4aeb455690c9418f2f9c5572294cc4c46d999f1c | a370ff524a6e317488970dac65d93a727039f061 | /archive/unsorted/2020.06/2020.06.15 - Codeforces - 300iq Contest 3/JJustCounting.java | 20d6e6cdb12fbf37d777b1910c22abbb08be3722 | [] | no_license | taodaling/contest | 235f4b2a033ecc30ec675a4526e3f031a27d8bbf | 86824487c2e8d4fc405802fff237f710f4e73a5c | refs/heads/master | 2023-04-14T12:41:41.718630 | 2023-04-10T14:12:47 | 2023-04-10T14:12:47 | 213,876,299 | 9 | 1 | null | 2021-06-12T06:33:05 | 2019-10-09T09:28:43 | Java | UTF-8 | Java | false | false | 2,555 | java | package contest;
import template.io.FastInput;
import template.io.FastOutput;
import template.math.Modular;
import template.math.Power;
import java.util.ArrayList;
import java.util.List;
public class JJustCounting {
Modular mod = new Modular(998244353);
Power pow = new Power(mod);
public void solve(int testNumber, FastInput in, FastOutput out) {
int n = in.readInt();
int m = in.readInt();
Node[] nodes = new Node[n];
for (int i = 0; i < n; i++) {
nodes[i] = new Node();
nodes[i].id = i;
}
Edge[] edges = new Edge[m];
for (int i = 0; i < m; i++) {
Edge e = new Edge();
e.a = nodes[in.readInt() - 1];
e.b = nodes[in.readInt() - 1];
Node.merge(e.a, e.b);
e.a.adj.add(e);
e.b.adj.add(e);
edges[i] = e;
}
for (Node node : nodes) {
if(node.visited){
continue;
}
dfs(node, 0);
}
int cnt = 0;
for (Edge e : edges) {
if(e.tree){
continue;
}
if (e.a.depth % 2 != e.b.depth % 2) {
cnt++;
continue;
}
if (e.a.find().added) {
cnt++;
continue;
}
e.a.find().added = true;
}
int ans = pow.pow(5, cnt);
out.println(ans);
}
public void dfs(Node root, int d) {
root.visited = true;
root.depth = d;
for (Edge e : root.adj) {
Node node = e.other(root);
if (node.visited) {
continue;
}
e.tree = true;
dfs(node, d + 1);
}
}
}
class Edge {
Node a;
Node b;
boolean tree;
Node other(Node x) {
return a == x ? b : a;
}
}
class Node {
List<Edge> adj = new ArrayList<>();
boolean visited;
int id;
int depth;
Node p = this;
int rank = 0;
boolean added;
Node find() {
return p.p == p ? p : (p = p.find());
}
static void merge(Node a, Node b) {
a = a.find();
b = b.find();
if (a == b) {
return;
}
if (a.rank == b.rank) {
a.rank++;
}
if (a.rank < b.rank) {
Node tmp = a;
a = b;
b = tmp;
}
b.p = a;
}
@Override
public String toString() {
return "" + (id + 1);
}
} | [
"daling.tao@ideacome.com"
] | daling.tao@ideacome.com |
9906f9c7b03300812e3ca03b4f904052da5a4418 | ba55269057e8dc503355a26cfab3c969ad7eb278 | /POSNirvanaORM/src/com/nirvanaxp/types/entities/inventory/UnitOfMeasurementType.java | 4977bd7b586fb0374cec5da892fd74b77d565d2b | [
"Apache-2.0"
] | permissive | apoorva223054/SF3 | b9db0c86963e549498f38f7e27f65c45438b2a71 | 4dab425963cf35481d2a386782484b769df32986 | refs/heads/master | 2022-03-07T17:13:38.709002 | 2020-01-29T05:19:06 | 2020-01-29T05:19:06 | 236,907,773 | 0 | 0 | Apache-2.0 | 2022-02-09T22:46:01 | 2020-01-29T05:10:51 | Java | UTF-8 | Java | false | false | 1,232 | java | /**
* Copyright (c) 2012 - 2017 by NirvanaXP, LLC. All Rights reserved. Express
* written consent required to use, copy, share, alter, distribute or transmit
* this source code in part or whole through any means physical or electronic.
**/
package com.nirvanaxp.types.entities.inventory;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import com.nirvanaxp.types.entities.POSNirvanaBaseClass;
@Entity
@Table(name = "unit_of_measurement_type")
@XmlRootElement(name = "UnitOfMeasurementType")
public class UnitOfMeasurementType extends POSNirvanaBaseClass
{
/**
*
*/
private static final long serialVersionUID = 1L;
@Column(name = "name")
private String name;
@Column(name = "display_name")
private String displayName;
public String getName()
{
return name;
}
public String getDisplayName()
{
return displayName;
}
public void setName(String name)
{
this.name = name;
}
public void setDisplayName(String displayName)
{
this.displayName = displayName;
}
@Override
public String toString() {
return "UnitOfMeasurementType [name=" + name + ", displayName="
+ displayName + "]";
}
}
| [
"naman223054@gmail.com"
] | naman223054@gmail.com |
3b22a6f9a37bec72995b772d394043811bcbc6d2 | 4edf60515c4a5bfca7a3d83c111266ad7f9505da | /Clase 29 de abril/src/cl/curso/java/ejemplos/buscar_palabras/BuscarPalabras.java | 51b9444eda418bb17501c1936335a3b5c4b49732 | [] | no_license | gazagal/workspace | ae5f10efee58e64464a69c20b0cf3951f13698ac | e861c8803b5fdeb3e83932f5207bf6fe80d7b81b | refs/heads/master | 2021-01-09T20:43:08.061403 | 2016-06-22T17:34:52 | 2016-06-22T17:34:52 | 60,852,551 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 858 | java | /**
*
*/
package cl.curso.java.ejemplos.buscar_palabras;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/**
* @author Gabriel Zagal
*
*/
public class BuscarPalabras {
public static void main(String[] args) {
String texto = "buenos dias buenos dias";
String[] palabras = texto.split(" ");
Map<String,Integer> contadorPalabras = new HashMap<String,Integer>();
for (String palabra : palabras) {
if(contadorPalabras.containsKey(palabra)){
contadorPalabras.put(palabra, contadorPalabras.get(palabra)+1);
}else{
contadorPalabras.put(palabra, 1);
}
}
Iterator<java.util.Map.Entry<String, Integer>> it = contadorPalabras.entrySet().iterator();
while(it.hasNext()){
java.util.Map.Entry<String, Integer> e = it.next();
System.out.println(e.getKey()+": "+e.getValue());
}
}
}
| [
"Usuario"
] | Usuario |
b7cc63dd5171859f79fd66fee11d166dee171f2e | 2fc51c5135661e997ecf08d0d462b043ada7b6a6 | /seava.j4e.presenter/src/main/java/seava/j4e/presenter/action/impex/DsXmlExport.java | 091706d903e8200dc6b961f90f24ee763b75e506 | [
"Apache-2.0"
] | permissive | RainerJava/seava.lib.j4e | 283f9b23a31a46c541f4c322ec111c60d0c5f3fc | f0df2b835a489319bc889b5eb534cb4107c6673f | refs/heads/master | 2021-01-16T19:31:48.813324 | 2014-05-26T09:29:51 | 2014-05-26T09:29:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,678 | java | /**
* DNet eBusiness Suite
* Copyright: 2013 Nan21 Electronics SRL. All rights reserved.
* Use is subject to license terms.
*/
package seava.j4e.presenter.action.impex;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import seava.j4e.api.action.impex.IDsExport;
public class DsXmlExport<M> extends AbstractDsExport<M> implements IDsExport<M> {
private String rootTag = "records";
public DsXmlExport() {
super();
this.outFileExtension = "xml";
}
@Override
public void write(M data, boolean isFirst) throws Exception {
List<ExportField> columns = ((ExportInfo) this.getExportInfo())
.getColumns();
Iterator<ExportField> it = columns.iterator();
StringBuffer sb = new StringBuffer();
sb.append("<record>");
while (it.hasNext()) {
ExportField k = it.next();
Object x = k._getFieldGetter().invoke(data);
String tag = k.getName();
if (x != null) {
if (x instanceof Date) {
sb.append("<" + tag + ">"
+ this.getServerDateFormat().format(x) + "</" + tag
+ ">");
} else {
sb.append("<" + tag + ">" + x.toString() + "</" + tag + ">");
}
} else {
sb.append("<" + tag + "></" + tag + ">");
}
}
sb.append("</record>");
this.writer.write(sb.toString());
}
@Override
protected void beginContent() throws Exception {
this.writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
this.writer.write("<" + rootTag + ">");
}
@Override
protected void endContent() throws Exception {
this.writer.write("</" + rootTag + ">");
}
public String getRootTag() {
return rootTag;
}
public void setRootTag(String rootTag) {
this.rootTag = rootTag;
}
}
| [
"attila.mathe@dnet-ebusiness-suite.com"
] | attila.mathe@dnet-ebusiness-suite.com |
f2f788334c93395cd5783cf08a59d22ab7eeb39e | 2a2db962f626e9d1582f704892671fb18257f426 | /moco-runner/src/test/java/com/github/dreamhead/moco/parser/GlobalSettingParserTest.java | 3ae13546d2784643419eca19f6f2ba2766d96d90 | [
"MIT"
] | permissive | KobeFeng/moco | 3b109e0a91afb8caa9250d2a2251388689972f7b | aedfcb7055bdc2df80ceae993b6d4c434e6830a4 | refs/heads/master | 2020-12-25T23:48:09.388243 | 2013-12-01T23:38:56 | 2013-12-01T23:39:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,792 | java | package com.github.dreamhead.moco.parser;
import com.github.dreamhead.moco.parser.model.GlobalSetting;
import org.junit.Before;
import org.junit.Test;
import java.io.InputStream;
import java.util.List;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
public class GlobalSettingParserTest {
private GlobalSettingParser parser;
@Before
public void setUp() throws Exception {
parser = new GlobalSettingParser();
}
@Test
public void should_parse_settings_file() {
InputStream stream = getResourceAsStream("multiple/settings.json");
List<GlobalSetting> globalSettings = parser.parse(stream);
assertThat(globalSettings.get(0).getInclude(), is("src/test/resources/multiple/foo.json"));
assertThat(globalSettings.get(1).getInclude(), is("src/test/resources/multiple/bar.json"));
}
private InputStream getResourceAsStream(String filename) {
return GlobalSettingParserTest.class.getClassLoader().getResourceAsStream(filename);
}
@Test
public void should_parse_settings_file_with_context() {
InputStream stream = getResourceAsStream("multiple/context-settings.json");
List<GlobalSetting> globalSettings = parser.parse(stream);
assertThat(globalSettings.get(0).getInclude(), is("src/test/resources/multiple/foo.json"));
assertThat(globalSettings.get(0).getContext(), is("/foo"));
assertThat(globalSettings.get(1).getInclude(), is("src/test/resources/multiple/bar.json"));
assertThat(globalSettings.get(1).getContext(), is("/bar"));
}
@Test
public void should_parse_setting_file_with_file_root() {
InputStream stream = getResourceAsStream("multiple/fileroot-settings.json");
List<GlobalSetting> globalSettings = parser.parse(stream);
assertThat(globalSettings.get(0).getInclude(), is("src/test/resources/multiple/fileroot.json"));
assertThat(globalSettings.get(0).getContext(), is("/fileroot"));
assertThat(globalSettings.get(0).getFileRoot(), is("src/test/resources/"));
}
@Test
public void should_parse_setting_file_with_env() {
InputStream stream = getResourceAsStream("multiple/env-settings.json");
List<GlobalSetting> globalSettings = parser.parse(stream);
assertThat(globalSettings.get(0).getInclude(), is("src/test/resources/multiple/foo.json"));
assertThat(globalSettings.get(0).getContext(), is("/foo"));
assertThat(globalSettings.get(0).getEnv(), is("foo"));
assertThat(globalSettings.get(1).getInclude(), is("src/test/resources/multiple/bar.json"));
assertThat(globalSettings.get(1).getContext(), is("/bar"));
assertThat(globalSettings.get(1).getEnv(), is("bar"));
}
}
| [
"dreamhead.cn@gmail.com"
] | dreamhead.cn@gmail.com |
c60d48cc399887273ac1db70d89d96609e58f8ea | 770441d12c3246dbd6ee571e904b783cd1d27758 | /src/main/java/mutants/fastjson_1_2_32/com/alibaba/fastjson/parser/deserializer/ObjectDeserializer.java | b861dd341799fe532357ffa0ba7608ed85c7a254 | [] | no_license | GenaGeng/FastJsonTester | 047a937222bf256c8688b0e8f11deea56219e71b | 4eb1f980ce7d493cc150ca2f414ad541b88ab0d8 | refs/heads/master | 2020-09-10T05:03:10.336765 | 2019-12-03T06:40:24 | 2019-12-03T06:40:34 | 221,655,012 | 0 | 0 | null | 2019-11-14T09:07:08 | 2019-11-14T09:07:07 | null | UTF-8 | Java | false | false | 2,387 | java | package mutants.fastjson_1_2_32.com.alibaba.fastjson.parser.deserializer;
import java.lang.reflect.Type;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.parser.DefaultJSONParser;
import com.alibaba.fastjson.parser.Feature;
import com.alibaba.fastjson.parser.ParserConfig;
/**
* <p>Interface representing a custom deserializer for Json. You should write a custom
* deserializer, if you are not happy with the default deserialization done by Gson. You will
* also need to register this deserializer through
* {@link ParserConfig#putDeserializer(Type, ObjectDeserializer)}.</p>
* <pre>
* public static enum OrderActionEnum {
* FAIL(1), SUCC(0);
*
* private int code;
*
* OrderActionEnum(int code){
* this.code = code;
* }
* }
*
* public static class OrderActionEnumDeser implements ObjectDeserializer {
*
* public <T> T deserialze(DefaultJSONParser parser, Type type, Object fieldName) {
* Integer intValue = parser.parseObject(int.class);
* if (intValue == 1) {
* return (T) OrderActionEnum.FAIL;
* } else if (intValue == 0) {
* return (T) OrderActionEnum.SUCC;
* }
* throw new IllegalStateException();
* }
*
*
* public int getFastMatchToken() {
* return JSONToken.LITERAL_INT;
* }
* }
* </pre>
*
* <p>You will also need to register {@code OrderActionEnumDeser} to ParserConfig:</p>
* <pre>
* ParserConfig.getGlobalInstance().putDeserializer(OrderActionEnum.class, new OrderActionEnumDeser());
* </pre>
*/
public interface ObjectDeserializer {
/**
* fastjson invokes this call-back method during deserialization when it encounters a field of the
* specified type.
* <p>In the implementation of this call-back method, you should consider invoking
* {@link JSON#parseObject(String, Type, Feature[])} method to create objects
* for any non-trivial field of the returned object.
*
* @param parser context DefaultJSONParser being deserialized
* @param type The type of the Object to deserialize to
* @param fieldName parent object field name
* @return a deserialized object of the specified type which is a subclass of {@code T}
*/
<T> T deserialze(DefaultJSONParser parser, Type type, Object fieldName);
int getFastMatchToken();
}
| [
"17854284492@163.com"
] | 17854284492@163.com |
c0bfe878a54d0a256af40ed9948634adc4e722dd | 857f5b800b4efe5627393efd82467713e3cc1839 | /northwind-javaee8-jsf-sectionA01/src/main/java/northwind/repository/TerritoryRepository.java | 144f45b2f8fbbe10a676017e4d15cb2d611cbccd | [] | no_license | swunait/dmit2015-winter2019term-A01 | 1026571c59c8bfd0250eec90bf00339a2f6f7440 | 9faa1fd1df28b13b85ab0f2c573d1eb874714321 | refs/heads/master | 2023-01-06T16:02:23.605307 | 2022-12-29T22:50:41 | 2022-12-29T22:50:41 | 166,113,031 | 0 | 4 | null | null | null | null | UTF-8 | Java | false | false | 219 | java | package northwind.repository;
import northwind.entity.Territory;
public class TerritoryRepository extends AbstractNorthwindJpaRepository<Territory> {
public TerritoryRepository() {
super(Territory.class);
}
}
| [
"swu@nait.ca"
] | swu@nait.ca |
94e4b85d44718f9fd648f46ed25e4d205a9dd926 | 22d93e73b4b829b6b8b64b09ea8ef7c676a6806a | /2.JavaCore/src/com/javarush/task/task19/task1920/Solution.java | 3b031f0d4a158467d4c56b3ce6e094e1834fa26c | [] | no_license | Sekator778/JavaRushTasks | 99b2844deaf42626704d23c8a83f75bd1a3661cb | 82f1801395fd53dc7ffacd1d902115475c4e8601 | refs/heads/master | 2022-12-05T06:33:42.385482 | 2020-12-20T17:51:00 | 2020-12-20T17:51:00 | 243,021,523 | 2 | 0 | null | 2022-11-16T01:33:26 | 2020-02-25T14:35:20 | Roff | UTF-8 | Java | false | false | 912 | java | package com.javarush.task.task19.task1920;
/*
Самый богатый
*/
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;
import java.util.TreeMap;
public class Solution {
public static void main(String[] args) throws IOException {
Map<String, Double> map = new TreeMap<>();
BufferedReader reader = new BufferedReader(new FileReader(args[0]));
while (reader.ready()) {
String line = reader.readLine();
String[] sArr = line.split(" ");
map.merge(sArr[0], Double.parseDouble(sArr[1]), (oldName, oldDouble) -> oldName + Double.parseDouble(sArr[1]));
}
reader.close();
Double max = Collections.max(map.values());
map.forEach((key, value) -> {
if (value.equals(max)) System.out.println(key);
});
}
}
| [
"sekator778@gmail.com"
] | sekator778@gmail.com |
d64e938543fd546884accc5f4b23465c91559f95 | 5c6f104a63c4be0b95f03318ef079edfee016b93 | /src/sample/Main.java | bb141ba9a5a8785744705761fc2415fc722bac7a | [] | no_license | shengjies/codeFx | 5f9cb889be793b195e8a46aae0e5040832a7893b | 785e7f214e037eb0a07aa0db61a5d11614ccefe2 | refs/heads/master | 2020-04-04T10:56:41.604005 | 2018-11-02T14:02:24 | 2018-11-02T14:02:24 | 155,873,094 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 617 | java | package sample;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
primaryStage.setTitle("登录");
primaryStage.setResizable(false);
primaryStage.setScene(new Scene(root, 300, 200));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
| [
"1305219970@qq.com"
] | 1305219970@qq.com |
788563cf5e2365b73165f9a9ac6329eb4c70ead8 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/13/13_d9e889d4837d41ef0a95690af21b81a5f3b0efd7/DatabaseHelper/13_d9e889d4837d41ef0a95690af21b81a5f3b0efd7_DatabaseHelper_t.java | 95d8072008c3dae1803e20e5dcddedd10e82617a | [] | 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,426 | java | package ngocnv371.Money.Model;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.InvalidKeyException;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class DatabaseHelper extends SQLiteOpenHelper {
private static String DB_PATH = "/data/data/ngocnv371.Money/databases/";
private static String DB_NAME = "transactions.db";
private SQLiteDatabase mDatabase;
private final Context mContext;
public DatabaseHelper(Context context) throws IOException {
super(context, DB_NAME, null, 1);
mContext = context;
createDataBase();
openDataBase();
}
public Cursor getItems(String similar) {
return mDatabase.query("Items", new String[] { "_id", "Name", "Price"}, "Name like '%" + similar + "%'", null, null, null, null);
}
public Cursor getTags(String similar) {
return mDatabase.query("Tags", new String[] { "_id", "Name"}, "Name like '%" + similar + "%'", null, null, null, null);
}
public Cursor getItemTags(long itemId) {
return mDatabase.rawQuery("Select _id, Name from (Select TagId From ItemTags Where ItemId = " + itemId + ") it Join Tags t on it.TagId = t._id", null);
}
public Cursor getTransactions(String similar) {
return mDatabase.rawQuery("Select t._id, i._id, i.Name, Spend, Notes, Year, Month, Day, Hour, Minute From Transactions t Join Items i on t.ItemId = i._id Where Name Like '%" + similar + "%'", null);
}
public Transaction getTransaction(long id) {
Cursor cursor = mDatabase.rawQuery("Select t._id, i._id, i.Name, Spend, Notes, Year, Month, Day, Hour, Minute From Transactions t Join Items i on t.ItemId = i._id Where t._id = " + id, null);
if (cursor.moveToFirst()) {
return new Transaction(cursor);
}
return null;
}
private long isExistedItem(String name) {
Cursor cursor = mDatabase.rawQuery("Select _id From Items Where Name = '" + name + "'", null);
if (cursor.moveToFirst()) {
long id = cursor.getLong(0);
cursor.close();
return id;
}
return 0;
}
private long isExistedTag(String name) {
Cursor cursor = mDatabase.rawQuery("Select _id From Tags Where Name = '" + name + "'", null);
if (cursor.moveToFirst()) {
long id = cursor.getLong(0);
cursor.close();
return id;
}
return 0;
}
public void addTag(long itemId, long tagId) {
ContentValues cv = new ContentValues();
cv.put("ItemId", itemId);
cv.put("TagId", tagId);
mDatabase.insertOrThrow("ItemTags", null, cv);
}
public void removeTag(long itemId) {
mDatabase.execSQL("Delete From ItemTags Where ItemId = " + itemId);
}
public long updateTransaction(long id, String itemName, int spend, String notes, String tags, int year, int month, int day, int hour, int minute) throws InvalidKeyException
{
// update
ContentValues cv = new ContentValues();
cv.put("Spend", spend);
cv.put("Notes", notes);
cv.put("Year", year);
cv.put("Month", month);
cv.put("Day", day);
cv.put("Hour", hour);
cv.put("Minute", minute);
long itemId = isExistedItem(itemName);
removeTag(itemId);
String[] tag = tags.trim().split(",");
for (int i = 0; i < tag.length; i++) {
long tagId = isExistedTag(tag[i].trim());
addTag(itemId, tagId > 0 ? tagId : createTag(tag[i].trim()));
}
cv.put("ItemId", itemId > 0 ? updateItem(itemId, spend) : createItem(itemName, spend));
return mDatabase.update("Transactions", cv, "_id = " + id, null);
}
public long createTransaction(String itemName, int spend, String notes, String tags, int year, int month, int day, int hour, int minute) throws InvalidKeyException
{
ContentValues cv = new ContentValues();
cv.put("Spend", spend);
cv.put("Notes", notes);
cv.put("Year", year);
cv.put("Month", month);
cv.put("Day", day);
cv.put("Hour", hour);
cv.put("Minute", minute);
long itemId = isExistedItem(itemName);
cv.put("ItemId", itemId > 0 ? updateItem(itemId, spend) : createItem(itemName, spend));
return mDatabase.insertOrThrow("Transactions", null, cv);
}
public long updateItem(long id, int price) throws InvalidKeyException {
ContentValues cv = new ContentValues();
cv.put("Price", price);
if (mDatabase.update("Items", cv, "_id = " + id, null) == 0) {
throw new InvalidKeyException("The item with id " + id + " is not existed!");
}
return id;
}
public long createTag(String name) {
ContentValues cv = new ContentValues();
cv.put("Name", name);
return mDatabase.insertOrThrow("Tags", null, cv);
}
public long createItem(String name, int price)
{
ContentValues cv = new ContentValues();
cv.put("Name", name);
cv.put("Price", price);
return mDatabase.insertOrThrow("Items", null, cv);
}
public void createDataBase() throws IOException {
boolean dbExisted = checkDataBase();
if (!dbExisted) {
this.getReadableDatabase();
try {
copyDataBase();
} catch (IOException e) {
throw new Error("An error occured on copying database");
}
}
}
private void copyDataBase() throws IOException {
InputStream source = mContext.getAssets().open(DB_NAME);
OutputStream target = new FileOutputStream(DB_PATH + DB_NAME);
byte[] buffer = new byte[1024];
while (source.read(buffer) > 0) {
target.write(buffer);
}
target.flush();
target.close();
source.close();
}
public void openDataBase(){
mDatabase = SQLiteDatabase.openDatabase(DB_PATH + DB_NAME, null, SQLiteDatabase.OPEN_READWRITE);
}
@Override
public synchronized void close() {
if (mDatabase != null) {
mDatabase.close();
}
super.close();
}
private boolean checkDataBase() {
SQLiteDatabase checkDB = null;
try {
checkDB = SQLiteDatabase.openDatabase(DB_PATH + DB_NAME, null, SQLiteDatabase.OPEN_READONLY);
} catch (SQLException e) {
// not existed
}
if (checkDB != null) {
checkDB.close();
}
return checkDB != null;
}
@Override
public void onCreate(SQLiteDatabase arg0) {
}
@Override
public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
7db51dbf9eac9a8eae98729ded2495b1058a7666 | 082e26b011e30dc62a62fae95f375e4f87d9e99c | /docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/plugin/offline/a/n.java | b60d022caee69562ccac48b90381f8a993c165be | [] | no_license | xsren/AndroidReverseNotes | 9631a5aabc031006e795a112b7ac756a8edd4385 | 9202c276fe9f04a978e4e08b08e42645d97ca94b | refs/heads/master | 2021-04-07T22:50:51.072197 | 2019-07-16T02:24:43 | 2019-07-16T02:24:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,958 | java | package com.tencent.mm.plugin.offline.a;
import com.google.android.gms.measurement.AppMeasurement.Param;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.compatible.e.q;
import com.tencent.mm.kernel.g;
import com.tencent.mm.plugin.offline.k;
import com.tencent.mm.sdk.platformtools.ag;
import com.tencent.mm.storage.ac.a;
import com.tencent.mm.wallet_core.tenpay.model.m;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;
public final class n extends m {
public static String oYC = "";
public static String oYj = "";
private int kCl = -1;
private String kCm = "";
public int oXZ = -1;
public String oYD = "";
public String oYE = "";
public String oYF = "";
final Map<String, String> oYG = new HashMap();
public String oYa = "";
public n(String str, int i) {
AppMethodBeat.i(43411);
this.oYG.put("device_id", q.LM());
this.oYG.put(Param.TIMESTAMP, str);
this.oYG.put("scene", String.valueOf(i));
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(q.LM());
stringBuilder.append("&");
stringBuilder.append(str);
this.oYG.put("sign", ag.ck(stringBuilder.toString()));
StringBuilder stringBuilder2 = new StringBuilder();
g.RQ();
this.oYG.put("code_ver", stringBuilder2.append(g.RP().Ry().get(a.USERINFO_WALLET_OFFLINE_CODE_VER_STRING, (Object) "")).toString());
M(this.oYG);
AppMethodBeat.o(43411);
}
public final int bgI() {
return 49;
}
public final void a(int i, String str, JSONObject jSONObject) {
AppMethodBeat.i(43412);
if (jSONObject != null) {
oYj = jSONObject.optString("limit_fee");
oYC = jSONObject.optString("is_show_order_detail");
String optString = jSONObject.optString("pay_amount");
String optString2 = jSONObject.optString("pay_number");
String optString3 = jSONObject.optString("card_logos");
k.bXg();
k.aT(196629, oYj);
k.bXg();
k.aT(196641, oYC);
k.bXg();
k.aT(196645, optString);
k.bXg();
k.aT(196646, optString2);
com.tencent.mm.plugin.offline.c.a.Ui(optString3);
this.kCl = jSONObject.optInt("retcode");
this.kCm = jSONObject.optString("retmsg");
this.oXZ = jSONObject.optInt("wx_error_type");
this.oYa = jSONObject.optString("wx_error_msg");
this.oYD = jSONObject.optString("get_code_flag");
this.oYE = jSONObject.optString("micropay_pause_flag");
this.oYF = jSONObject.optString("micropay_pause_word");
}
AppMethodBeat.o(43412);
}
public final int ZU() {
return 568;
}
public final String getUri() {
return "/cgi-bin/mmpay-bin/tenpay/offlinequeryuser";
}
}
| [
"alwangsisi@163.com"
] | alwangsisi@163.com |
5da29133b9d1af532ec841b8f56d71f2d628559a | 32f38cd53372ba374c6dab6cc27af78f0a1b0190 | /app/src/main/java/com/squareup/wire/WireInput.java | f8d8be57a20b3c97e72a077b37abbb6b88b18b4a | [] | no_license | shuixi2013/AmapCode | 9ea7aefb42e0413f348f238f0721c93245f4eac6 | 1a3a8d4dddfcc5439df8df570000cca12b15186a | refs/heads/master | 2023-06-06T23:08:57.391040 | 2019-08-29T04:36:02 | 2019-08-29T04:36:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,180 | java | package com.squareup.wire;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import okio.Buffer;
import okio.BufferedSource;
import okio.ByteString;
import okio.Okio;
import okio.Source;
final class WireInput {
private static final String ENCOUNTERED_A_MALFORMED_VARINT = "WireInput encountered a malformed varint.";
private static final String ENCOUNTERED_A_NEGATIVE_SIZE = "Encountered a negative size";
private static final String INPUT_ENDED_UNEXPECTEDLY = "The input ended unexpectedly in the middle of a field";
private static final String PROTOCOL_MESSAGE_CONTAINED_AN_INVALID_TAG_ZERO = "Protocol message contained an invalid tag (zero).";
private static final String PROTOCOL_MESSAGE_END_GROUP_TAG_DID_NOT_MATCH_EXPECTED_TAG = "Protocol message end-group tag did not match expected tag.";
public static final int RECURSION_LIMIT = 64;
private static final Charset UTF_8 = Charset.forName("UTF-8");
private int currentLimit = Integer.MAX_VALUE;
private int lastTag;
private int pos = 0;
public int recursionDepth;
private final BufferedSource source;
public static int decodeZigZag32(int i) {
return (-(i & 1)) ^ (i >>> 1);
}
public static long decodeZigZag64(long j) {
return (-(j & 1)) ^ (j >>> 1);
}
public static WireInput newInstance(byte[] bArr) {
return new WireInput(new Buffer().write(bArr));
}
public static WireInput newInstance(byte[] bArr, int i, int i2) {
return new WireInput(new Buffer().write(bArr, i, i2));
}
public static WireInput newInstance(InputStream inputStream) {
return new WireInput(Okio.buffer(Okio.source(inputStream)));
}
public static WireInput newInstance(Source source2) {
return new WireInput(Okio.buffer(source2));
}
public final int readTag() throws IOException {
if (isAtEnd()) {
this.lastTag = 0;
return 0;
}
this.lastTag = readVarint32();
if (this.lastTag != 0) {
return this.lastTag;
}
throw new IOException(PROTOCOL_MESSAGE_CONTAINED_AN_INVALID_TAG_ZERO);
}
public final void checkLastTagWas(int i) throws IOException {
if (this.lastTag != i) {
throw new IOException(PROTOCOL_MESSAGE_END_GROUP_TAG_DID_NOT_MATCH_EXPECTED_TAG);
}
}
public final String readString() throws IOException {
int readVarint32 = readVarint32();
this.pos += readVarint32;
return this.source.readString((long) readVarint32, UTF_8);
}
public final ByteString readBytes() throws IOException {
return readBytes(readVarint32());
}
public final ByteString readBytes(int i) throws IOException {
this.pos += i;
long j = (long) i;
this.source.require(j);
return this.source.readByteString(j);
}
public final int readVarint32() throws IOException {
byte b;
this.pos++;
byte readByte = this.source.readByte();
if (readByte >= 0) {
return readByte;
}
byte b2 = readByte & Byte.MAX_VALUE;
this.pos++;
byte readByte2 = this.source.readByte();
if (readByte2 >= 0) {
b = b2 | (readByte2 << 7);
} else {
byte b3 = b2 | ((readByte2 & Byte.MAX_VALUE) << 7);
this.pos++;
byte readByte3 = this.source.readByte();
if (readByte3 >= 0) {
b = b3 | (readByte3 << 14);
} else {
byte b4 = b3 | ((readByte3 & Byte.MAX_VALUE) << 14);
this.pos++;
byte readByte4 = this.source.readByte();
if (readByte4 >= 0) {
b = b4 | (readByte4 << 21);
} else {
byte b5 = b4 | ((readByte4 & Byte.MAX_VALUE) << 21);
this.pos++;
byte readByte5 = this.source.readByte();
b = b5 | (readByte5 << 28);
if (readByte5 < 0) {
for (int i = 0; i < 5; i++) {
this.pos++;
if (this.source.readByte() >= 0) {
return b;
}
}
throw new IOException(ENCOUNTERED_A_MALFORMED_VARINT);
}
}
}
}
return b;
}
public final long readVarint64() throws IOException {
long j = 0;
for (int i = 0; i < 64; i += 7) {
this.pos++;
byte readByte = this.source.readByte();
j |= ((long) (readByte & Byte.MAX_VALUE)) << i;
if ((readByte & 128) == 0) {
return j;
}
}
throw new IOException(ENCOUNTERED_A_MALFORMED_VARINT);
}
public final int readFixed32() throws IOException {
this.pos += 4;
return this.source.readIntLe();
}
public final long readFixed64() throws IOException {
this.pos += 8;
return this.source.readLongLe();
}
private WireInput(BufferedSource bufferedSource) {
this.source = bufferedSource;
}
public final int pushLimit(int i) throws IOException {
if (i < 0) {
throw new IOException(ENCOUNTERED_A_NEGATIVE_SIZE);
}
int i2 = i + this.pos;
int i3 = this.currentLimit;
if (i2 > i3) {
throw new EOFException(INPUT_ENDED_UNEXPECTEDLY);
}
this.currentLimit = i2;
return i3;
}
public final void popLimit(int i) {
this.currentLimit = i;
}
private boolean isAtEnd() throws IOException {
if (getPosition() == ((long) this.currentLimit)) {
return true;
}
return this.source.exhausted();
}
public final long getPosition() {
return (long) this.pos;
}
public final void skipGroup() throws IOException {
int readTag;
do {
readTag = readTag();
if (readTag == 0) {
return;
}
} while (!skipField(readTag));
}
private boolean skipField(int i) throws IOException {
switch (WireType.valueOf(i)) {
case VARINT:
readVarint64();
return false;
case FIXED32:
readFixed32();
return false;
case FIXED64:
readFixed64();
return false;
case LENGTH_DELIMITED:
skip((long) readVarint32());
return false;
case START_GROUP:
skipGroup();
checkLastTagWas((i & -8) | WireType.END_GROUP.value());
return false;
case END_GROUP:
return true;
default:
throw new AssertionError();
}
}
private void skip(long j) throws IOException {
this.pos = (int) (((long) this.pos) + j);
this.source.skip(j);
}
}
| [
"hubert.yang@nf-3.com"
] | hubert.yang@nf-3.com |
39f07e8e8d49eca1a408f73e54ca320b344ce4c8 | eed15c0c8697a3c3bfbc9d3a0dc14acae47eeab7 | /app/src/main/java/com/ruesga/rview/model/ContinuousIntegrationInfo.java | e5e47458db3e646bac582b39fb7a4e7ccfc7efa3 | [
"Apache-2.0"
] | permissive | morristech/rview | 502a18713cdccf805527c0385a21a9065afd83fa | 0bd0f42eb916b66817234b0f1794dd4095472ba1 | refs/heads/master | 2020-03-22T09:06:25.595477 | 2018-07-01T22:53:21 | 2018-07-01T22:53:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,984 | java | /*
* Copyright (C) 2017 Jorge Ruesga
*
* 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.ruesga.rview.model;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import com.google.gson.annotations.SerializedName;
public class ContinuousIntegrationInfo implements Parcelable, Comparable<ContinuousIntegrationInfo> {
public enum BuildStatus {
SUCCESS, FAILURE, SKIPPED, RUNNING
}
@SerializedName("name") public String mName;
@SerializedName("url") public String mUrl;
@SerializedName("status") public BuildStatus mStatus;
public ContinuousIntegrationInfo(String name, String url, BuildStatus status) {
mName = name;
mUrl = url;
mStatus = status;
}
protected ContinuousIntegrationInfo(Parcel in) {
if (in.readInt() == 1) {
mName = in.readString();
}
if (in.readInt() == 1) {
mUrl = in.readString();
}
if (in.readInt() == 1) {
mStatus = BuildStatus.valueOf(in.readString());
}
}
public static final Creator<ContinuousIntegrationInfo> CREATOR =
new Creator<ContinuousIntegrationInfo>() {
@Override
public ContinuousIntegrationInfo createFromParcel(Parcel in) {
return new ContinuousIntegrationInfo(in);
}
@Override
public ContinuousIntegrationInfo[] newArray(int size) {
return new ContinuousIntegrationInfo[size];
}
};
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel parcel, int i) {
if (!TextUtils.isEmpty(mName)) {
parcel.writeInt(1);
parcel.writeString(mName);
} else {
parcel.writeInt(0);
}
if (!TextUtils.isEmpty(mUrl)) {
parcel.writeInt(1);
parcel.writeString(mUrl);
} else {
parcel.writeInt(0);
}
if (mStatus != null) {
parcel.writeInt(1);
parcel.writeString(mStatus.name());
} else {
parcel.writeInt(0);
}
}
@Override
public int compareTo(@NonNull ContinuousIntegrationInfo ci) {
int compare = mName.compareToIgnoreCase(ci.mName);
if (compare == 0) {
compare = mUrl.compareTo(ci.mUrl);
}
return compare;
}
} | [
"jorge@ruesga.com"
] | jorge@ruesga.com |
e98d3af58163b5bf5ab50a48be9fa733307eda57 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /api-vs-impl-small/domain/src/main/java/org/gradle/testdomain/performancenull_27/Productionnull_2682.java | 0d0fafe3b823b89beac932cb41fc815a0fa16783 | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 591 | java | package org.gradle.testdomain.performancenull_27;
public class Productionnull_2682 {
private final String property;
public Productionnull_2682(String param) {
this.property = param;
}
public String getProperty() {
return property;
}
private String prop0;
public String getProp0() {
return prop0;
}
public void setProp0(String value) {
prop0 = value;
}
private String prop1;
public String getProp1() {
return prop1;
}
public void setProp1(String value) {
prop1 = value;
}
}
| [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
a6b2cb6d118c52c8c687c4885f82e5835bf94c58 | bb2ac247c6dfd4a36076da53db4fb18248f343d9 | /eHour-persistence/src/test/java/net/rrm/ehour/persistence/dao/AbstractAnnotationDaoTest.java | 3977d33d84e6697b8b157b5961112fa3d6bd7f99 | [] | no_license | yelken/ehour | ba49bc68572c70ca0042f0952e0b4a49bcca4c5c | c1cfc7380d4d0e989d99267c1ca3d97b9ca0df3c | refs/heads/master | 2021-01-23T22:38:14.946454 | 2014-08-12T07:58:10 | 2014-08-12T07:58:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,343 | java | package net.rrm.ehour.persistence.dao;
import net.rrm.ehour.config.PersistenceConfig;
import net.rrm.ehour.persistence.dbvalidator.DerbyDbValidator;
import org.dbunit.database.DatabaseConnection;
import org.dbunit.database.IDatabaseConnection;
import org.dbunit.dataset.xml.FlatXmlDataSet;
import org.dbunit.dataset.xml.FlatXmlDataSetBuilder;
import org.dbunit.operation.DatabaseOperation;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.datasource.DataSourceUtils;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
import org.springframework.test.context.support.DirtiesContextTestExecutionListener;
import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.test.context.transaction.TransactionalTestExecutionListener;
import org.springframework.transaction.annotation.Transactional;
import javax.sql.DataSource;
import java.io.File;
import java.sql.Connection;
@RunWith(SpringJUnit4ClassRunner.class)
@TestExecutionListeners(listeners = {DependencyInjectionTestExecutionListener.class, DirtiesContextTestExecutionListener.class, TransactionalTestExecutionListener.class})
@ContextConfiguration(locations = {"classpath:test-context-props.xml",
"classpath:test-context-datasource.xml",
"classpath:context-dbconnectivity.xml",
"classpath:test-context-scanner-repository.xml"})
@Transactional
@TransactionConfiguration(defaultRollback = true)
@DirtiesContext
public abstract class AbstractAnnotationDaoTest {
@Autowired
private DataSource eHourDataSource;
private static FlatXmlDataSet userDataSet;
private String[] additionalDataSetFileNames = new String[0];
static {
try {
userDataSet = new FlatXmlDataSetBuilder().build(new File("src/test/resources/datasets/dataset-users.xml"));
} catch (Exception e) {
throw new IllegalArgumentException(e);
}
}
public AbstractAnnotationDaoTest() {
}
public AbstractAnnotationDaoTest(String dataSetFileNames) {
this(new String[]{dataSetFileNames});
}
public AbstractAnnotationDaoTest(String[] dataSetFileNames) {
this.additionalDataSetFileNames = dataSetFileNames;
}
@Before
public final void setUpDatabase() throws Exception {
DerbyDbValidator validator = new DerbyDbValidator(PersistenceConfig.DB_VERSION, eHourDataSource);
validator.checkDatabaseState();
Connection con = DataSourceUtils.getConnection(eHourDataSource);
IDatabaseConnection connection = new DatabaseConnection(con);
DatabaseOperation.CLEAN_INSERT.execute(connection, userDataSet);
for (String dataSetFileName : additionalDataSetFileNames) {
FlatXmlDataSet additionalDataSet = new FlatXmlDataSetBuilder().build(new File("src/test/resources/datasets/" + dataSetFileName));
DatabaseOperation.CLEAN_INSERT.execute(connection, additionalDataSet);
}
}
}
| [
"thies@te-con.nl"
] | thies@te-con.nl |
ae3900130a8d6916cd8bd0d5a67512098870fa2c | d1bc053defe25899887d38db42d52d71b68cf1e0 | /src/main/java/cn/cherish/blog/web/dto/UserDTO.java | 878acb9f5e97a465700db85a3fc877fab510b2d0 | [] | no_license | CherishCai/blog | 3dfc9b448e8eef327fcb1e731055cad0ff2f36c3 | 44a9db9a8036c26426d4fcd685e919bb1565c464 | refs/heads/master | 2021-09-15T01:04:47.765427 | 2018-05-23T11:34:12 | 2018-05-23T11:34:12 | 78,742,537 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 881 | java | package cn.cherish.blog.web.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class UserDTO implements java.io.Serializable {
private static final long serialVersionUID = 6265204827137964278L;
private Long id;
private String username;
private String password;
private String nickname;
private String telephone;
private String position;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd", timezone="GMT+8")
private Date hiredate;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
private Date createdTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
private Date modifiedTime;
private String description;
private String activeStr;
}
| [
"785427346@qq.com"
] | 785427346@qq.com |
b924505fcd787d46b37340bd6875b23b98760218 | 7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b | /Crawler/data/CodeInt.java | 63a530f341a7bbe3ade2c460fc2caba56440d019 | [] | no_license | NayrozD/DD2476-Project | b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0 | 94dfb3c0a470527b069e2e0fd9ee375787ee5532 | refs/heads/master | 2023-03-18T04:04:59.111664 | 2021-03-10T15:03:07 | 2021-03-10T15:03:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 440 | java | 3
https://raw.githubusercontent.com/RhenaudTheLukark/Lea2C/master/src/fr/ubordeaux/deptinfo/compilation/lea/abstract_syntax/CodeInt.java
package fr.ubordeaux.deptinfo.compilation.lea.abstract_syntax;
import fr.ubordeaux.deptinfo.compilation.lea.type.TypeException;
public interface CodeInt {
// Vérifie le type
void checkType() throws TypeException;
// Produit le code C correspondant
String generateCode() throws CodeException;
}
| [
"veronika.cucorova@gmail.com"
] | veronika.cucorova@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.