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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
73b11f24de4827e09e7acff07e9531775161af9c
|
af6cb688760ffd70603efffa285e8469ecaf7834
|
/springbootfirst/src/test/java/com/faramarz/spring/springbootfirst/SpringbootfirstApplicationTests.java
|
5457ece98b999c9aa0a72d67dd3119d82c92154d
|
[] |
no_license
|
faramarzaf/SpringReference
|
fcf84de7399e14d986c51136aa18a6206d7d282b
|
e953e341c9d43fa04afe850ad2f83876127f0d6a
|
refs/heads/main
| 2023-06-20T18:44:23.564653
| 2021-07-30T08:03:35
| 2021-07-30T08:05:21
| 376,356,228
| 0
| 0
| null | 2021-07-29T20:52:40
| 2021-06-12T18:10:56
|
Java
|
UTF-8
|
Java
| false
| false
| 236
|
java
|
package com.faramarz.spring.springbootfirst;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class SpringbootfirstApplicationTests {
@Test
void contextLoads() {
}
}
|
[
"faramarzafzali@gmail.com"
] |
faramarzafzali@gmail.com
|
52c0853825c8ddebd6c6ec7a1c509e207eb8aa37
|
fec4a09f54f4a1e60e565ff833523efc4cc6765a
|
/Dependencies/work/decompile-00fabbe5/net/minecraft/world/level/levelgen/feature/WorldGenDungeons.java
|
b200edc481ef21c92009fdd6bdc8d453560ef46e
|
[] |
no_license
|
DefiantBurger/SkyblockItems
|
012d2082ae3ea43b104ac4f5bf9eeb509889ec47
|
b849b99bd4dc52ae2f7144ddee9cbe2fd1e6bf03
|
refs/heads/master
| 2023-06-23T17:08:45.610270
| 2021-07-27T03:27:28
| 2021-07-27T03:27:28
| 389,780,883
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,443
|
java
|
package net.minecraft.world.level.levelgen.feature;
import com.mojang.serialization.Codec;
import java.util.Iterator;
import java.util.Random;
import java.util.function.Predicate;
import net.minecraft.SystemUtils;
import net.minecraft.core.BlockPosition;
import net.minecraft.core.EnumDirection;
import net.minecraft.tags.TagsBlock;
import net.minecraft.world.entity.EntityTypes;
import net.minecraft.world.level.GeneratorAccessSeed;
import net.minecraft.world.level.IBlockAccess;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.entity.TileEntity;
import net.minecraft.world.level.block.entity.TileEntityLootable;
import net.minecraft.world.level.block.entity.TileEntityMobSpawner;
import net.minecraft.world.level.block.state.IBlockData;
import net.minecraft.world.level.levelgen.feature.configurations.WorldGenFeatureEmptyConfiguration;
import net.minecraft.world.level.levelgen.structure.StructurePiece;
import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.storage.loot.LootTables;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class WorldGenDungeons extends WorldGenerator<WorldGenFeatureEmptyConfiguration> {
private static final Logger LOGGER = LogManager.getLogger();
private static final EntityTypes<?>[] MOBS = new EntityTypes[]{EntityTypes.SKELETON, EntityTypes.ZOMBIE, EntityTypes.ZOMBIE, EntityTypes.SPIDER};
private static final IBlockData AIR = Blocks.CAVE_AIR.getBlockData();
public WorldGenDungeons(Codec<WorldGenFeatureEmptyConfiguration> codec) {
super(codec);
}
@Override
public boolean generate(FeaturePlaceContext<WorldGenFeatureEmptyConfiguration> featureplacecontext) {
Predicate<IBlockData> predicate = WorldGenerator.a(TagsBlock.FEATURES_CANNOT_REPLACE.a());
BlockPosition blockposition = featureplacecontext.d();
Random random = featureplacecontext.c();
GeneratorAccessSeed generatoraccessseed = featureplacecontext.a();
boolean flag = true;
int i = random.nextInt(2) + 2;
int j = -i - 1;
int k = i + 1;
boolean flag1 = true;
boolean flag2 = true;
int l = random.nextInt(2) + 2;
int i1 = -l - 1;
int j1 = l + 1;
int k1 = 0;
BlockPosition blockposition1;
int l1;
int i2;
int j2;
for (l1 = j; l1 <= k; ++l1) {
for (i2 = -1; i2 <= 4; ++i2) {
for (j2 = i1; j2 <= j1; ++j2) {
blockposition1 = blockposition.c(l1, i2, j2);
Material material = generatoraccessseed.getType(blockposition1).getMaterial();
boolean flag3 = material.isBuildable();
if (i2 == -1 && !flag3) {
return false;
}
if (i2 == 4 && !flag3) {
return false;
}
if ((l1 == j || l1 == k || j2 == i1 || j2 == j1) && i2 == 0 && generatoraccessseed.isEmpty(blockposition1) && generatoraccessseed.isEmpty(blockposition1.up())) {
++k1;
}
}
}
}
if (k1 >= 1 && k1 <= 5) {
for (l1 = j; l1 <= k; ++l1) {
for (i2 = 3; i2 >= -1; --i2) {
for (j2 = i1; j2 <= j1; ++j2) {
blockposition1 = blockposition.c(l1, i2, j2);
IBlockData iblockdata = generatoraccessseed.getType(blockposition1);
if (l1 != j && i2 != -1 && j2 != i1 && l1 != k && i2 != 4 && j2 != j1) {
if (!iblockdata.a(Blocks.CHEST) && !iblockdata.a(Blocks.SPAWNER)) {
this.a(generatoraccessseed, blockposition1, WorldGenDungeons.AIR, predicate);
}
} else if (blockposition1.getY() >= generatoraccessseed.getMinBuildHeight() && !generatoraccessseed.getType(blockposition1.down()).getMaterial().isBuildable()) {
generatoraccessseed.setTypeAndData(blockposition1, WorldGenDungeons.AIR, 2);
} else if (iblockdata.getMaterial().isBuildable() && !iblockdata.a(Blocks.CHEST)) {
if (i2 == -1 && random.nextInt(4) != 0) {
this.a(generatoraccessseed, blockposition1, Blocks.MOSSY_COBBLESTONE.getBlockData(), predicate);
} else {
this.a(generatoraccessseed, blockposition1, Blocks.COBBLESTONE.getBlockData(), predicate);
}
}
}
}
}
l1 = 0;
while (l1 < 2) {
i2 = 0;
while (true) {
if (i2 < 3) {
label100:
{
j2 = blockposition.getX() + random.nextInt(i * 2 + 1) - i;
int k2 = blockposition.getY();
int l2 = blockposition.getZ() + random.nextInt(l * 2 + 1) - l;
BlockPosition blockposition2 = new BlockPosition(j2, k2, l2);
if (generatoraccessseed.isEmpty(blockposition2)) {
int i3 = 0;
Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
while (iterator.hasNext()) {
EnumDirection enumdirection = (EnumDirection) iterator.next();
if (generatoraccessseed.getType(blockposition2.shift(enumdirection)).getMaterial().isBuildable()) {
++i3;
}
}
if (i3 == 1) {
this.a(generatoraccessseed, blockposition2, StructurePiece.a((IBlockAccess) generatoraccessseed, blockposition2, Blocks.CHEST.getBlockData()), predicate);
TileEntityLootable.a((IBlockAccess) generatoraccessseed, random, blockposition2, LootTables.SIMPLE_DUNGEON);
break label100;
}
}
++i2;
continue;
}
}
++l1;
break;
}
}
this.a(generatoraccessseed, blockposition, Blocks.SPAWNER.getBlockData(), predicate);
TileEntity tileentity = generatoraccessseed.getTileEntity(blockposition);
if (tileentity instanceof TileEntityMobSpawner) {
((TileEntityMobSpawner) tileentity).getSpawner().setMobName(this.a(random));
} else {
WorldGenDungeons.LOGGER.error("Failed to fetch mob spawner entity at ({}, {}, {})", blockposition.getX(), blockposition.getY(), blockposition.getZ());
}
return true;
} else {
return false;
}
}
private EntityTypes<?> a(Random random) {
return (EntityTypes) SystemUtils.a((Object[]) WorldGenDungeons.MOBS, random);
}
}
|
[
"joseph.cicalese@gmail.com"
] |
joseph.cicalese@gmail.com
|
1358652d078a2969bdb44b99acf190a75c4d63a5
|
f4fec896b47fd72f9fb81b5fef037bda86d035f7
|
/app/src/main/java/com/example/videoplayer/view/MyViedeoPlayer.java
|
5c707a313049a867875ea5092d58cf31467ea351
|
[] |
no_license
|
zhuandian/videoplayer
|
e313a3cbf73c3317103b6118aa761da6f5d034b0
|
03eccd17d3271905e09448eb8037c0d7baf278a9
|
refs/heads/master
| 2021-01-04T06:47:08.902324
| 2020-02-22T10:54:24
| 2020-02-22T10:54:24
| 240,435,893
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 945
|
java
|
package com.example.videoplayer.view;
import android.content.Context;
import android.util.AttributeSet;
import cn.jzvd.JZVideoPlayer;
import cn.jzvd.JZVideoPlayerStandard;
/**
* desc :
* author:xiedong
* date:2020/02/07
*/
public class MyViedeoPlayer extends JZVideoPlayerStandard {
private OnVideoPlayingListener videoPlayingListener;
public MyViedeoPlayer(Context context) {
this(context, null);
}
public MyViedeoPlayer(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public void onStatePlaying() {
super.onStatePlaying();
if (videoPlayingListener != null) {
videoPlayingListener.onVideoPlaying();
}
}
public void setOnVideoPlayingListener(OnVideoPlayingListener listener) {
this.videoPlayingListener = listener;
}
public interface OnVideoPlayingListener {
void onVideoPlaying();
}
}
|
[
"xiedong11@aliyun.com"
] |
xiedong11@aliyun.com
|
67195c493ed03a483a0894d1a0c34f258ae4831a
|
b84ecda4559551a58658945b78505d0da96f8bc5
|
/develop/source-code/framework/msg-framework/src/com/zte/mos/msg/framework/CommServiceFactory.java
|
34328b564a740dae2b696cc50f3806b51b166619
|
[] |
no_license
|
qingw/mos
|
bb114f0d1fafea4d19ec839309900473075541cb
|
dff2428487293a7cb1ae5f98718f985a6f7362bc
|
refs/heads/master
| 2023-03-16T07:54:18.515765
| 2018-10-18T10:45:01
| 2018-10-18T10:45:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,423
|
java
|
package com.zte.mos.msg.framework;
import com.zte.mos.msg.framework.session.ISessionConfigBuilder;
import com.zte.mos.msg.framework.session.ISessionService;
import com.zte.mos.util.Scan;
import java.lang.reflect.Constructor;
import java.util.Set;
public class CommServiceFactory
{
private static ISouthService service = new SouthService();
public static ISouthService getService() {
return service;
}
public static void setService(ISouthService userService) {
service = userService;
}
public static void stop(){
}
public static void initService() {
Class[] filters = new Class[3];
filters[0] = MsgProcess.class;
filters[1] = ISessionService.class;
filters[2] = ISessionConfigBuilder.class;
Set<Class> set = Scan.getClasses("com.zte.mos.msg.impl", filters);
if (!set.isEmpty()) {
for (Class clazz : set) {
if (MsgProcess.class.isAssignableFrom(clazz)){
Class<? extends MsgProcess> implClazz = clazz.asSubclass(MsgProcess.class);
try {
MsgProcessPool.register(implClazz);
} catch (Exception e) {
e.printStackTrace();
}
}else if(ISessionService.class.isAssignableFrom(clazz)
|| ISessionConfigBuilder.class.isAssignableFrom(clazz)){
try
{
Constructor<?> constructor = clazz.getDeclaredConstructor();
constructor.setAccessible(true);
constructor.newInstance();
} catch (Exception e)
{
e.printStackTrace();
}
}
}
}
// Set<Class<LocalOnly>> increamentalSet =
// Scan.getClasses("com.zte.mos.domain.model.autogen.nr8120.v241.local", LocalOnly.class);
// if (!increamentalSet.isEmpty()) {
// for (Class<LocalOnly> clazz : increamentalSet) {
// Class<? extends LocalOnly> implClazz = clazz.asSubclass(LocalOnly.class);
// try {
// LocalOnlyPool.register(implClazz);
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
// }
}
}
|
[
"liu.wei91@zte.com.cn"
] |
liu.wei91@zte.com.cn
|
f5f51c8e23a377d9cee6ece1d118ea9cbbf9a6f2
|
763b71c5c56bedee02e29fed6bb206556a30a45e
|
/app/src/main/java/com/xyd/red_wine/balance/BalanceActivity.java
|
74bdf713c08cc1a20a004c345dee0bfa7591fe53
|
[] |
no_license
|
zhengyiheng123/Red_wine
|
8d39bacd4e18642d4179cf436b037055cf1d98a6
|
3173de942c29f864ada6d1a70e7033bc28487597
|
refs/heads/master
| 2021-08-28T21:35:18.089452
| 2017-12-13T06:30:35
| 2017-12-13T06:30:35
| 100,663,653
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,355
|
java
|
package com.xyd.red_wine.balance;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.xyd.red_wine.R;
import com.xyd.red_wine.api.MineApi;
import com.xyd.red_wine.base.BaseActivity;
import com.xyd.red_wine.base.BaseApi;
import com.xyd.red_wine.base.BaseModel;
import com.xyd.red_wine.base.BaseObserver;
import com.xyd.red_wine.base.PublicStaticData;
import com.xyd.red_wine.base.RxSchedulers;
import com.xyd.red_wine.glide.GlideUtil;
import com.xyd.red_wine.login.LoginActivity;
import com.xyd.red_wine.login.StartupPageActivity;
import com.xyd.red_wine.main.MainActivity;
import com.xyd.red_wine.personinformation.BindActivity;
import com.xyd.red_wine.personinformation.InfromationModel;
import com.xyd.red_wine.promptdialog.PromptDialog;
import com.xyd.red_wine.view.DrawImageView;
import java.util.Random;
import butterknife.Bind;
import butterknife.ButterKnife;
/**
* @author: zhaoxiaolei
* @date: 2017/7/13
* @time: 16:05
* @description: 账户余额
*/
public class BalanceActivity extends BaseActivity {
@Bind(R.id.base_title_back)
TextView baseTitleBack;
@Bind(R.id.base_title_right)
TextView baseTitleRight;
@Bind(R.id.base_title_title)
TextView baseTitleTitle;
@Bind(R.id.base_title_menu)
ImageView baseTitleMenu;
@Bind(R.id.balance_tv_name)
TextView balanceTvName;
@Bind(R.id.balance_tv_money)
TextView balanceTvMoney;
@Bind(R.id.balance_tv_all)
TextView balanceTvAll;
@Bind(R.id.balance_tv_generalize)
TextView balanceTvGeneralize;
@Bind(R.id.balance_tv_withdraw)
TextView balanceTvWithdraw;
@Bind(R.id.balance_tv_balance)
TextView balanceTvBalance;
@Bind(R.id.balance_tv_top_up)
TextView balanceTvTopUp;
@Bind(R.id.balance_rl)
RelativeLayout balanceRl;
@Bind(R.id.balance_iv_head)
ImageView balanceIvHead;
@Bind(R.id.balance_iv_money)
DrawImageView balanceIvMoney;
@Bind(R.id.base_title_headline)
ImageView mHeadLine;
private BalanceModel model;
@Override
protected int getLayoutId() {
return R.layout.activity_account_balance;
}
@Override
protected void initView() {
mHeadLine.setVisibility(View.GONE);
baseTitleTitle.setText("账户余额");
baseTitleMenu.setVisibility(View.GONE);
baseTitleRight.setVisibility(View.VISIBLE);
baseTitleRight.setText("记录");
getData();
}
@Override
protected void onResume() {
super.onResume();
getData();
}
private void getData() {
BaseApi.getRetrofit()
.create(MineApi.class)
.balance()
.compose(RxSchedulers.<BaseModel<BalanceModel>>compose())
.subscribe(new BaseObserver<BalanceModel>() {
@Override
protected void onHandleSuccess(BalanceModel balanceModel, String msg, int code) {
model = balanceModel;
balanceTvName.setText(balanceModel.getNickname());
GlideUtil.getInstance().loadCircleImage(BalanceActivity.this, balanceIvHead, PublicStaticData.baseUrl + balanceModel.getHead_img());
balanceTvMoney.setText(balanceModel.getTotal() + "");
balanceTvBalance.setText(balanceModel.getAccount_balance() + "");
balanceTvGeneralize.setText(balanceModel.getRevenue_balance() + "");
balanceIvMoney.setAngel(balanceModel.getTotal() / 20);
}
@Override
protected void onHandleError(String msg) {
showToast(msg);
}
});
}
@Override
protected void initEvent() {
baseTitleBack.setOnClickListener(this);
baseTitleMenu.setOnClickListener(this);
balanceTvWithdraw.setOnClickListener(this);
balanceTvTopUp.setOnClickListener(this);
baseTitleRight.setOnClickListener(this);
}
@Override
public void widgetClick(View v) {
switch (v.getId()) {
case R.id.base_title_back:
finish();
break;
case R.id.base_title_menu:
// showTestToast("菜单");
// Random random = new Random();
// balanceIvMoney.setAngel(random.nextInt(360));
break;
case R.id.balance_tv_withdraw:
getUserInfo();
break;
case R.id.balance_tv_top_up:
startActivity(ChongzhiActivity.class);
break;
case R.id.base_title_right:
startActivity(RecordActivity.class);
break;
}
}
//获取用户信息
private void getUserInfo(){
final PromptDialog dialog=new PromptDialog(BalanceActivity.this);
dialog.showLoading("请稍后",false);
BaseApi.getRetrofit()
.create(MineApi.class)
.information()
.compose(RxSchedulers.<BaseModel<InfromationModel>>compose())
.subscribe(new BaseObserver<InfromationModel>() {
@Override
protected void onHandleSuccess(InfromationModel infromationModel, String msg, int code) {
dialog.dismissImmediately();
// login("qiaozhijinhan" + infromationModel.getUserid(), "123456");
if (!TextUtils.isEmpty(infromationModel.getPhone())){
Bundle bundle=new Bundle();
bundle.putDouble(TixianActivity.AVAILAVLE_MONEY,model.getAccount_balance());
bundle.putString(TixianActivity.PHONENUM,infromationModel.getPhone());
startActivity(TixianActivity.class,bundle);
}else {
AlertDialog.Builder builder=new AlertDialog.Builder(BalanceActivity.this);
builder.setTitle("提示");
builder.setMessage("请先绑定手机号码,才能进行提现。");
builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
startActivity(BindActivity.class);
}
});
builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
}
});
builder.show();
}
}
@Override
protected void onHandleError(String msg) {
showTestToast(msg);
dialog.dismissImmediately();
}
});
}
}
|
[
"15621599930@163.com"
] |
15621599930@163.com
|
6e53010da1f7ddbe6bb170a2e36f86e31ac49ebb
|
be8005660700eb1785c91f9c5ac263c8d13ebfd4
|
/javasrc/edu/brown/cs/fait/testgen/TestgenReferenceValue.java
|
88eeddf4d1503c957182ccf16b998968f7986a1c
|
[] |
no_license
|
StevenReiss/fait
|
e1403ae4a2509d92f83e64ebea5e240c58719f51
|
af54cd525ac86ccc07850832eacb99dc3845dfde
|
refs/heads/master
| 2023-08-17T08:00:02.711001
| 2023-08-16T15:30:41
| 2023-08-16T15:30:41
| 183,441,883
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,824
|
java
|
/********************************************************************************/
/* */
/* TestgenReferenceValue.java */
/* */
/* Value that is a reference to a stack/local/field/array */
/* */
/********************************************************************************/
/* Copyright 2013 Brown University -- Steven P. Reiss */
/*********************************************************************************
* Copyright 2013, Brown University, Providence, RI. *
* *
* All Rights Reserved *
* *
* Permission to use, copy, modify, and distribute this software and its *
* documentation for any purpose other than its incorporation into a *
* commercial product is hereby granted without fee, provided that the *
* above copyright notice appear in all copies and that both that *
* copyright notice and this permission notice appear in supporting *
* documentation, and that the name of Brown University not be used in *
* advertising or publicity pertaining to distribution of the software *
* without specific, written prior permission. *
* *
* BROWN UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS *
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND *
* FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT SHALL BROWN UNIVERSITY *
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY *
* DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, *
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS *
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE *
* OF THIS SOFTWARE. *
* *
********************************************************************************/
package edu.brown.cs.fait.testgen;
import java.util.List;
import edu.brown.cs.fait.iface.IfaceControl;
import edu.brown.cs.fait.iface.IfaceField;
import edu.brown.cs.fait.iface.IfaceState;
import edu.brown.cs.fait.iface.IfaceType;
class TestgenReferenceValue extends TestgenValue implements TestgenConstants
{
/********************************************************************************/
/* */
/* Private Storage */
/* */
/********************************************************************************/
private int slot_value;
private int stack_value;
private TestgenValue base_value;
private IfaceField field_ref;
private TestgenValue index_ref;
/********************************************************************************/
/* */
/* Constructors */
/* */
/********************************************************************************/
TestgenReferenceValue(IfaceType t,int slot,boolean var)
{
this(t);
if (var) slot_value = slot;
else stack_value = slot;
}
TestgenReferenceValue(TestgenValue base,IfaceField fld)
{
this(fld.getType());
base_value = base;
field_ref = fld;
}
TestgenReferenceValue(TestgenValue base,TestgenValue idx)
{
this(base.getDataType().getBaseType());
base_value = base;
index_ref = idx;
}
private TestgenReferenceValue(IfaceType t)
{
super(t);
slot_value = -1;
stack_value = -1;
base_value = null;
field_ref = null;
index_ref = null;
}
/********************************************************************************/
/* */
/* Access methods */
/* */
/********************************************************************************/
int getRefStack()
{
return stack_value;
}
IfaceField getRefField()
{
return field_ref;
}
int getRefSlot()
{
return slot_value;
}
/********************************************************************************/
/* */
/* Abstract Method Implementations */
/* */
/********************************************************************************/
@Override protected void updateInternal(IfaceControl fc,IfaceState prior,IfaceState cur,List<TestgenValue> rslt)
{
rslt.add(this);
}
/********************************************************************************/
/* */
/* Output methods */
/* */
/********************************************************************************/
@Override public String toString()
{
StringBuffer buf = new StringBuffer();
buf.append("<^^^");
if (stack_value >= 0) {
buf.append("S");
buf.append(stack_value);
}
else if (slot_value >= 0) {
buf.append("V");
buf.append(slot_value);
}
else {
if (base_value != null) {
buf.append(base_value.toString());
}
if (field_ref != null) {
buf.append(" . ");
buf.append(field_ref.getFullName());
}
else if (index_ref != null) {
buf.append(" [] ");
buf.append(index_ref.toString());
}
}
buf.append(">");
return buf.toString();
}
} // end of class TestgenReferenceValue
/* end of TestgenReferenceValue.java */
|
[
"spr@cs.brown.edu"
] |
spr@cs.brown.edu
|
437f99fd942a339c4147036f97cff3ca6e012a15
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/alibaba--druid/78488b0b1ab0fb312cd0c0ec4c591ed68362f91d/after/Oracle_pl_if_2.java
|
3e76b3edc53a51f2f2b6a3a80096917465ea9270
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,033
|
java
|
/*
* Copyright 1999-2017 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.pl;
import com.alibaba.druid.sql.OracleTest;
import com.alibaba.druid.sql.SQLUtils;
import com.alibaba.druid.sql.ast.SQLStatement;
import com.alibaba.druid.sql.visitor.SchemaStatVisitor;
import com.alibaba.druid.util.JdbcConstants;
import java.util.List;
public class Oracle_pl_if_2 extends OracleTest {
public void test_0() throws Exception {
String sql = "IF l_salary <= 40000\n" +
"THEN\n" +
" give_bonus (l_employee_id, 0);\n" +
"ELSE\n" +
" give_bonus (l_employee_id, 500);\n" +
"END IF;"; //
List<SQLStatement> statementList = SQLUtils.parseStatements(sql, JdbcConstants.ORACLE);
SQLStatement stmt = statementList.get(0);
assertEquals(1, statementList.size());
SchemaStatVisitor visitor = SQLUtils.createSchemaStatVisitor(JdbcConstants.ORACLE);
for (SQLStatement statement : statementList) {
statement.accept(visitor);
}
// System.out.println("Tables : " + visitor.getTables());
// System.out.println("fields : " + visitor.getColumns());
// System.out.println("coditions : " + visitor.getConditions());
// System.out.println("relationships : " + visitor.getRelationships());
// System.out.println("orderBy : " + visitor.getOrderByColumns());
assertEquals(0, visitor.getTables().size());
// Assert.assertTrue(visitor.getTables().containsKey(new TableStat.Name("employees")));
// Assert.assertTrue(visitor.getTables().containsKey(new TableStat.Name("emp_name")));
// Assert.assertEquals(7, visitor.getColumns().size());
// Assert.assertEquals(3, visitor.getConditions().size());
// Assert.assertEquals(1, visitor.getRelationships().size());
// Assert.assertTrue(visitor.getColumns().contains(new TableStat.Column("employees", "salary")));
{
String output = SQLUtils.toOracleString(stmt);
assertEquals("IF l_salary <= 40000 THEN\n" +
"\tgive_bonus(l_employee_id, 0);\n" +
"ELSE\n" +
"\tgive_bonus(l_employee_id, 500);\n" +
"END IF;", //
output);
}
{
String output = SQLUtils.toOracleString(stmt, SQLUtils.DEFAULT_LCASE_FORMAT_OPTION);
assertEquals("if l_salary <= 40000 then\n" +
"\tgive_bonus(l_employee_id, 0);\n" +
"else\n" +
"\tgive_bonus(l_employee_id, 500);\n" +
"end if;", //
output);
}
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
76fc422e44179fee7e8e5de0e6ea4761fd3591fa
|
58f9ed107e610a612af459d8231fbe97dd0c814f
|
/src/main/java/com/ht/extra/pojo/outpbill/ChargeReduceMaster.java
|
afc85cc8e3ace4cac1c48c96ecc8bcc417f25edb
|
[] |
no_license
|
tangguoqiang/htwebExtra
|
3bee6434a87e9333d80eeb391f80dfb72178675d
|
ca9d50a66586905d5164f6087b7778f233a1fd13
|
refs/heads/master
| 2020-03-15T13:13:57.645083
| 2018-08-22T12:54:44
| 2018-08-22T12:54:44
| 132,161,700
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,519
|
java
|
package com.ht.extra.pojo.outpbill;
import java.math.BigDecimal;
import java.util.Date;
public class ChargeReduceMaster {
private Integer serialNo;
private String rcptNo;
private String patientId;
private Short visitId;
private String name;
private String chargeType;
private String unit;
private String cardNo;
private BigDecimal reduceAmount;
private String reduceCause;
private String ratifier;
private String undertaker;
private String undertakerUnit;
private String operNo;
private String operName;
private Date operDateTime;
public Integer getSerialNo() {
return serialNo;
}
public void setSerialNo(Integer serialNo) {
this.serialNo = serialNo;
}
public String getRcptNo() {
return rcptNo;
}
public void setRcptNo(String rcptNo) {
this.rcptNo = rcptNo == null ? null : rcptNo.trim();
}
public String getPatientId() {
return patientId;
}
public void setPatientId(String patientId) {
this.patientId = patientId == null ? null : patientId.trim();
}
public Short getVisitId() {
return visitId;
}
public void setVisitId(Short visitId) {
this.visitId = visitId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getChargeType() {
return chargeType;
}
public void setChargeType(String chargeType) {
this.chargeType = chargeType == null ? null : chargeType.trim();
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit == null ? null : unit.trim();
}
public String getCardNo() {
return cardNo;
}
public void setCardNo(String cardNo) {
this.cardNo = cardNo == null ? null : cardNo.trim();
}
public BigDecimal getReduceAmount() {
return reduceAmount;
}
public void setReduceAmount(BigDecimal reduceAmount) {
this.reduceAmount = reduceAmount;
}
public String getReduceCause() {
return reduceCause;
}
public void setReduceCause(String reduceCause) {
this.reduceCause = reduceCause == null ? null : reduceCause.trim();
}
public String getRatifier() {
return ratifier;
}
public void setRatifier(String ratifier) {
this.ratifier = ratifier == null ? null : ratifier.trim();
}
public String getUndertaker() {
return undertaker;
}
public void setUndertaker(String undertaker) {
this.undertaker = undertaker == null ? null : undertaker.trim();
}
public String getUndertakerUnit() {
return undertakerUnit;
}
public void setUndertakerUnit(String undertakerUnit) {
this.undertakerUnit = undertakerUnit == null ? null : undertakerUnit.trim();
}
public String getOperNo() {
return operNo;
}
public void setOperNo(String operNo) {
this.operNo = operNo == null ? null : operNo.trim();
}
public String getOperName() {
return operName;
}
public void setOperName(String operName) {
this.operName = operName == null ? null : operName.trim();
}
public Date getOperDateTime() {
return operDateTime;
}
public void setOperDateTime(Date operDateTime) {
this.operDateTime = operDateTime;
}
}
|
[
"ttang11@its.jnj.com"
] |
ttang11@its.jnj.com
|
514c5a9c4c74e3d26999d82084c0e560803cc70e
|
b31b2ab93994b59330005d24d2d788e80c4db9dc
|
/PaintDemo/src/com/example/paintdemo/mywidget/TuYaView.java
|
5d194d8ce55ae90b5080d0aca87cb10337de55f7
|
[] |
no_license
|
crazysniper/MyDemoTest
|
31d04f209a1b546fa32f6dfedb678701377512a1
|
a75876319949ab8977d56e5059ee3206e7e61457
|
refs/heads/master
| 2021-01-21T12:43:43.075653
| 2015-08-06T15:20:48
| 2015-08-06T15:20:48
| 33,294,572
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,624
|
java
|
package com.example.paintdemo.mywidget;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.os.Handler;
import android.os.Message;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import com.example.paintdemo.R;
import com.example.paintdemo.TuYa;
public class TuYaView extends View {
private Paint paint = null;
private Bitmap originalBitmap = null;
private Bitmap new1Bitmap = null;
private Bitmap new2Bitmap = null;
private float clickX = 0, clickY = 0;
private float startX = 0, startY = 0;
private boolean isMove = true;
private boolean isClear = false;
private int color = Color.GREEN;
private float strokeWidth = 2.0f;
public Handler handler1;
private Context context;
public TuYaView(Context context, AttributeSet attrs) {
super(context, attrs);
this.context = context;
originalBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.bg).copy(Bitmap.Config.ARGB_8888, true);
new1Bitmap = Bitmap.createBitmap(originalBitmap);
setDrawingCacheEnabled(true);
Log.i("RG", "new1Bitmap--->>>" + new1Bitmap);
}
public void clear() {
isClear = true;
new2Bitmap = Bitmap.createBitmap(originalBitmap);
invalidate();
}
Bitmap saveImage = null;
public Bitmap saveImage() {
if (saveImage == null) {
return null;
}
return saveImage;
}
public void setImge() {
saveImage = null;
}
public void setstyle(float strokeWidth) {
this.strokeWidth = strokeWidth;
}
@SuppressLint("DrawAllocation")
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
canvas.drawBitmap(HandWriting(new1Bitmap), 0, 0, null);
handler1 = new Handler() {
@Override
public void handleMessage(Message msg) {
Log.i("RG", "--------------------");
int what = msg.what;
if (what == 2) {
saveImage = Bitmap.createBitmap(HandWriting(new1Bitmap));
Message msg1 = new Message();
msg1 = Message.obtain(TuYa.hh, 3);
TuYa.hh.sendMessage(msg1);
}
super.handleMessage(msg);
}
};
}
@SuppressLint("HandlerLeak")
Handler handler;
public Bitmap HandWriting(Bitmap originalBitmap) {
handler = new Handler() {
@Override
public void handleMessage(Message msg) {
int what = msg.what;
if (what == 1) {
startX = clickX;
startY = clickY;
}
super.handleMessage(msg);
}
};
Canvas canvas = null;
if (isClear) {
canvas = new Canvas(new2Bitmap);
Log.i("RG", "canvas ");
} else {
canvas = new Canvas(originalBitmap);
}
paint = new Paint();
paint.setStyle(Style.STROKE);
paint.setAntiAlias(true);
paint.setColor(color);
paint.setStrokeWidth(strokeWidth);
Log.i("RG", "startX-->>>>" + startX);
Log.i("RG", "startY-->>>>" + startY);
if (isMove) {
canvas.drawLine(startX, startY, clickX, clickY, paint);
}
if (isClear) {
return new2Bitmap;
}
return originalBitmap;
}
@Override
public boolean onTouchEvent(MotionEvent event) {
Message msg = new Message();
msg = Message.obtain(handler, 1);
handler.sendMessage(msg);
clickX = event.getX();
clickY = event.getY();
if (event.getAction() == MotionEvent.ACTION_DOWN) {
isMove = false;
invalidate();
return true;
} else if (event.getAction() == MotionEvent.ACTION_MOVE) {
isMove = true;
invalidate();
return true;
}
return super.onTouchEvent(event);
}
}
|
[
"1163432768@qq.com"
] |
1163432768@qq.com
|
057bc6277574f501d5a45462167543810c8de63c
|
601582228575ca0d5f61b4c211fd37f9e4e2564c
|
/logisoft_revision1/src/com/gp/cong/logisoft/struts/form/VendorForm.java
|
9a829fdfd663406bfe3d1c3b978c64c66742d338
|
[] |
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
| 4,542
|
java
|
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.gp.cong.logisoft.struts.form;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
/**
* MyEclipse Struts
* Creation date: 09-17-2008
*
* XDoclet definition:
* @struts.form name="vendorForm"
*/
public class VendorForm extends ActionForm {
private String legalname;
private String dba;
private String tin;
private String wfile;
private String apname;
private String phone;
private String fax;
private String email;
private String web;
private String eamanager;
private String credit;
private String climit;
private String cterms;
private String baccount;
private String paymethod;
private String bankname;
private String baddr;
private String vacctname;
private String vacctno;
private String aba;
private String swift;
private String remail;
private String rfax;
private String payemail;
private String buttonValue;
private String deactivate;
public String getAba() {
return aba;
}
public void setAba(String aba) {
this.aba = aba;
}
public String getApname() {
return apname;
}
public void setApname(String apname) {
this.apname = apname;
}
public String getBaccount() {
return baccount;
}
public void setBaccount(String baccount) {
this.baccount = baccount;
}
public String getBaddr() {
return baddr;
}
public void setBaddr(String baddr) {
this.baddr = baddr;
}
public String getVacctname() {
return vacctname;
}
public void setVacctname(String vacctname) {
this.vacctname = vacctname;
}
public String getVacctno() {
return vacctno;
}
public void setVacctno(String vacctno) {
this.vacctno = vacctno;
}
public String getClimit() {
return climit;
}
public void setClimit(String climit) {
this.climit = climit;
}
public String getCredit() {
return credit;
}
public void setCredit(String credit) {
this.credit = credit;
}
public String getCterms() {
return cterms;
}
public void setCterms(String cterms) {
this.cterms = cterms;
}
public String getDba() {
return dba;
}
public void setDba(String dba) {
this.dba = dba;
}
public String getEamanager() {
return eamanager;
}
public void setEamanager(String eamanager) {
this.eamanager = eamanager;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getFax() {
return fax;
}
public void setFax(String fax) {
this.fax = fax;
}
public String getLegalname() {
return legalname;
}
public void setLegalname(String legalname) {
this.legalname = legalname;
}
public String getPayemail() {
return payemail;
}
public void setPayemail(String payemail) {
this.payemail = payemail;
}
public String getPaymethod() {
return paymethod;
}
public void setPaymethod(String paymethod) {
this.paymethod = paymethod;
}
public String getBankname() {
return bankname;
}
public void setBankname(String bankname) {
this.bankname = bankname;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getRemail() {
return remail;
}
public void setRemail(String remail) {
this.remail = remail;
}
public String getRfax() {
return rfax;
}
public void setRfax(String rfax) {
this.rfax = rfax;
}
public String getSwift() {
return swift;
}
public void setSwift(String swift) {
this.swift = swift;
}
public String getTin() {
return tin;
}
public void setTin(String tin) {
this.tin = tin;
}
public String getWeb() {
return web;
}
public void setWeb(String web) {
this.web = web;
}
public String getWfile() {
return wfile;
}
public void setWfile(String wfile) {
this.wfile = wfile;
}
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
// TODO Auto-generated method stub
return null;
}
/**
* Method reset
* @param mapping
* @param request
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
// TODO Auto-generated method stub
}
public String getButtonValue() {
return buttonValue;
}
public void setButtonValue(String buttonValue) {
this.buttonValue = buttonValue;
}
public String getDeactivate() {
return deactivate;
}
public void setDeactivate(String deactivate) {
this.deactivate = deactivate;
}
}
|
[
"omkar@ziletech.com"
] |
omkar@ziletech.com
|
7758807facff64868ec4b8a75c9845ae1bf6bfbf
|
2435ef886043efcaa18eb92e84f9bb8477fb6307
|
/workspace/EjercicioCompra_Notificaciones/src/main/java/com/example/notificaciones/ConfiguracionJms.java
|
73d9e6ad0f75e3a646785780f07b0b09c9260944
|
[] |
no_license
|
victorherrerocazurro/MicroserviciosAccentureOctubre2017
|
ae6c98ac472814e9b25bee0fb7b4b9a98dcfbce4
|
98bceb105d7e692c0614dd53a956f2f110ac5d5d
|
refs/heads/master
| 2021-05-08T01:57:32.454573
| 2017-10-25T15:40:41
| 2017-10-25T15:40:41
| 107,946,621
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,541
|
java
|
package com.example.notificaciones;
import javax.jms.ConnectionFactory;
import org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.jms.config.DefaultJmsListenerContainerFactory;
import org.springframework.jms.config.JmsListenerContainerFactory;
import org.springframework.jms.support.converter.MappingJackson2MessageConverter;
import org.springframework.jms.support.converter.MessageConverter;
import org.springframework.jms.support.converter.MessageType;
@Configuration
@EnableJms
public class ConfiguracionJms {
@Bean
public JmsListenerContainerFactory<?> myFactory(ConnectionFactory connectionFactory,
DefaultJmsListenerContainerFactoryConfigurer configurer) {
DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();
// This provides all boot's default to this factory, including the message
// converter
configurer.configure(factory, connectionFactory);
// You could still override some of Boot's default if necessary.
return factory;
}
@Bean // Serialize message content to json using TextMessage
public MessageConverter jacksonJmsMessageConverter() {
MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter();
converter.setTargetType(MessageType.TEXT);
converter.setTypeIdPropertyName("_type");
return converter;
}
}
|
[
"victorherrerocazurro@gmail.com"
] |
victorherrerocazurro@gmail.com
|
654e6fc2a21dca741f34fab1ded5b14b74a95a27
|
60b3aa0ae501058f26326b77bc5292e1c3a72859
|
/ClassDemo/genericTest/src/genericTest/InterImpl2.java
|
23d7859a0c85757ac577d1436c5a22ccd677ce65
|
[] |
no_license
|
puyanLiu/javaAndAndroidDemo
|
36ea3538ded86be3ad70202f09276e324b4ba173
|
b4c1b8623f6c25fb80c4a1f405c9664f5b399baa
|
refs/heads/master
| 2021-09-28T20:12:23.145754
| 2018-11-20T02:33:13
| 2018-11-20T02:33:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 210
|
java
|
package genericTest;
/**
* @author liupuyan
* 还不确定什么类型
* @param <T>
*/
public class InterImpl2<T> implements Inter<T> {
@Override
public void show(T t) {
System.out.println(t);
}
}
|
[
"814168332@qq.com"
] |
814168332@qq.com
|
2ed17bae9f0c8c572200ba172fd4417926ca6e66
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_45d7524cf40770f04a5a8753395f5a2e8ae8ef3f/GameMenuPopup/2_45d7524cf40770f04a5a8753395f5a2e8ae8ef3f_GameMenuPopup_s.java
|
e290952b51b2533f3ea0b252cb9f9531938432d0
|
[] |
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
| 7,485
|
java
|
/*
##################################################################
# GNU BACKGAMMON MOBILE #
##################################################################
# #
# Authors: Domenico Martella - Davide Saurino #
# E-mail: info@alcacoop.it #
# Date: 19/12/2012 #
# #
##################################################################
# #
# Copyright (C) 2012 Alca Societa' Cooperativa #
# #
# This file is part of GNU BACKGAMMON MOBILE. #
# GNU BACKGAMMON MOBILE 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. #
# #
# GNU BACKGAMMON MOBILE 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 v3 along with this program. #
# If not, see <http://http://www.gnu.org/licenses/> #
# #
##################################################################
*/
package it.alcacoop.backgammon.ui;
import it.alcacoop.backgammon.GnuBackgammon;
import it.alcacoop.backgammon.fsm.BaseFSM.Events;
import it.alcacoop.backgammon.fsm.GameFSM.States;
import it.alcacoop.backgammon.logic.MatchState;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.InputListener;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.actions.Actions;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import com.badlogic.gdx.scenes.scene2d.utils.Drawable;
public final class GameMenuPopup extends Table {
private Table t1;
private Drawable background;
private static TextButton undo;
private static TextButton resign;
private static TextButton abandon;
private TextButton options;
private Actor a;
private Runnable noop;
private boolean visible;
public GameMenuPopup(Stage stage) {
noop = new Runnable(){
@Override
public void run() {
}
};
setWidth(stage.getWidth());
setHeight(stage.getHeight()/(6.8f-GnuBackgammon.ss));
setX(0);
setY(-getHeight());
background = GnuBackgammon.skin.getDrawable("popup-region");
setBackground(background);
a = new Actor();
a.addListener(new InputListener(){
@Override
public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
hide(noop);
return true;
}
});
t1 = new Table();
t1.setFillParent(true);
TextButtonStyle tl = GnuBackgammon.skin.get("button", TextButtonStyle.class);
undo = new TextButton("Undo Move", tl);
undo.addListener(new ClickListener(){
@Override
public void clicked(InputEvent event, float x, float y) {
hide(new Runnable(){
@Override
public void run() {
if (undo.isDisabled()) return;
GnuBackgammon.Instance.board.undoMove();
}});
}
});
resign = new TextButton("Resign Game", tl);
resign.addListener(new ClickListener(){
@Override
public void clicked(InputEvent event, float x, float y) {
hide(new Runnable(){
@Override
public void run() {
if (resign.isDisabled()) return;
GnuBackgammon.fsm.state(States.DIALOG_HANDLER);
GnuBackgammon.fsm.processEvent(Events.ACCEPT_RESIGN, 0);
}});
}
});
abandon = new TextButton("Abandon Match", tl);
abandon.addListener(new ClickListener(){@Override
public void clicked(InputEvent event, float x, float y) {
hide(new Runnable(){
@Override
public void run() {
if (abandon.isDisabled()) return;
GnuBackgammon.fsm.state(States.DIALOG_HANDLER);
UIDialog.getYesNoDialog(
Events.ABANDON_MATCH,
"Really exit this match?",
0.82f,
GnuBackgammon.Instance.board.getStage());
}});
}});
options = new TextButton("Options", tl);
options.addListener(new ClickListener(){@Override
public void clicked(InputEvent event, float x, float y) {
hide(new Runnable(){
@Override
public void run() {
UIDialog.getOptionsDialog(0.82f, GnuBackgammon.Instance.board.getStage());
}});
}});
float pad = getHeight()/15;
float w = getWidth()/3.3f - pad;
add(undo).fill().expand().pad(pad).width(w);
add(resign).fill().expand().pad(pad).width(w);
add(abandon).fill().expand().pad(pad).width(w);
add(options).fill().expand().pad(pad).width(w);
visible = false;
addActor(t1);
}
public static void setDisabledButtons() {
if ((MatchState.matchType==0) && (MatchState.fMove==1)) { //CPU IS PLAYING
undo.setDisabled(true);
resign.setDisabled(true);
abandon.setDisabled(true);
undo.setColor(1,1,1,0.4f);
resign.setColor(1,1,1,0.4f);
abandon.setColor(1,1,1,0.4f);
} else {
undo.setDisabled(false);
resign.setDisabled(false);
abandon.setDisabled(false);
undo.setColor(1,1,1,1);
resign.setColor(1,1,1,1);
abandon.setColor(1,1,1,1);
}
}
private void show() {
visible = true;
addAction(Actions.moveTo(0, 0, 0.1f));
}
private void hide(Runnable r) {
visible = false;
addAction(Actions.sequence(
Actions.moveTo(0, -getHeight(), 0.1f),
Actions.run(r)
));
}
public void toggle() {
if (visible) hide(noop);
else {
GnuBackgammon.Instance.board.points.reset();
if (GnuBackgammon.Instance.board.selected!=null)
GnuBackgammon.Instance.board.selected.highlight(false);
show();
}
}
public Actor hit (float x, float y, boolean touchable) {
Actor hit = super.hit(x, y, touchable);
if (visible) {
if (hit != null) return hit;
else {
return a;
}
} else {
return hit;
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
74307b49a5099633867521038f07918290422cd7
|
27511a2f9b0abe76e3fcef6d70e66647dd15da96
|
/src/com/instagram/android/business/b/a.java
|
882b88c2d30caee0fe670a48d5410367bcd6d720
|
[] |
no_license
|
biaolv/com.instagram.android
|
7edde43d5a909ae2563cf104acfc6891f2a39ebe
|
3fcd3db2c3823a6d29a31ec0f6abcf5ceca995de
|
refs/heads/master
| 2022-05-09T15:05:05.412227
| 2016-07-21T03:48:36
| 2016-07-21T03:48:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,715
|
java
|
package com.instagram.android.business.b;
import android.content.Context;
import android.content.res.Resources;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.facebook.s;
import com.facebook.u;
import com.facebook.w;
import com.github.mikephil.charting.c.k;
import com.github.mikephil.charting.charts.BarChart;
import com.github.mikephil.charting.charts.HorizontalBarChart;
import com.github.mikephil.charting.data.b;
import com.github.mikephil.charting.data.g;
import com.github.mikephil.charting.data.h;
import com.github.mikephil.charting.i.d;
import com.instagram.android.business.c.n;
import com.instagram.android.business.c.o;
import com.instagram.common.z.a.e;
import java.util.List;
public final class a
extends e<g, Void>
{
private final Context a;
public a(Context paramContext)
{
a = paramContext;
}
public final int a()
{
return 1;
}
public final View a(int paramInt, View paramView, ViewGroup paramViewGroup, Object paramObject1, Object paramObject2)
{
paramObject2 = paramView;
if (paramView == null)
{
paramView = a;
paramObject2 = LayoutInflater.from(paramView).inflate(w.horizontal_bar_chart_view, paramViewGroup, false);
paramViewGroup = new o();
a = ((HorizontalBarChart)((View)paramObject2).findViewById(u.chart));
f1 = paramView.getResources().getDimensionPixelOffset(s.horizontal_chart_left_margin);
float f2 = paramView.getResources().getDimensionPixelOffset(s.chart_horizontal_margin);
float f3 = paramView.getResources().getDimensionPixelOffset(s.chart_top_margin);
float f4 = paramView.getResources().getDimensionPixelOffset(s.horizontal_chart_bottom_margin);
a.b(f1, f3, f2, f4);
a.getViewPortHandler().a(f1, f3, f2, f4);
((View)paramObject2).setTag(paramViewGroup);
}
paramView = a;
paramViewGroup = (o)((View)paramObject2).getTag();
paramObject1 = (g)paramObject1;
paramInt = 0;
while (paramInt < ((g)paramObject1).e().size())
{
h localh = (h)((g)paramObject1).c(paramInt);
if (localh != null)
{
localh.a(5.35F);
localh.a(n.a(localh, paramView));
localh.a(false);
}
paramInt += 1;
}
n.a(a, (g)paramObject1, paramView);
float f1 = paramView.getResources().getDimensionPixelOffset(s.horizontal_chart_label_padding) / getResourcesgetDisplayMetricsdensity;
a.getXAxis().b(f1);
a.setData((b)paramObject1);
return (View)paramObject2;
}
}
/* Location:
* Qualified Name: com.instagram.android.business.b.a
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
41a3dc2d9604c36e25f1792c161412c8d70cd23e
|
9410ef0fbb317ace552b6f0a91e0b847a9a841da
|
/src/main/java/com/tencentcloudapi/tcss/v20201101/models/DescribeReverseShellWhiteListDetailRequest.java
|
7c9814e5a85f4c745971b0ccf4bb1be8067a978f
|
[
"Apache-2.0"
] |
permissive
|
TencentCloud/tencentcloud-sdk-java-intl-en
|
274de822748bdb9b4077e3b796413834b05f1713
|
6ca868a8de6803a6c9f51af7293d5e6dad575db6
|
refs/heads/master
| 2023-09-04T05:18:35.048202
| 2023-09-01T04:04:14
| 2023-09-01T04:04:14
| 230,567,388
| 7
| 4
|
Apache-2.0
| 2022-05-25T06:54:45
| 2019-12-28T06:13:51
|
Java
|
UTF-8
|
Java
| false
| false
| 2,138
|
java
|
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.tcss.v20201101.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class DescribeReverseShellWhiteListDetailRequest extends AbstractModel{
/**
* Allowed item ID
*/
@SerializedName("WhiteListId")
@Expose
private String WhiteListId;
/**
* Get Allowed item ID
* @return WhiteListId Allowed item ID
*/
public String getWhiteListId() {
return this.WhiteListId;
}
/**
* Set Allowed item ID
* @param WhiteListId Allowed item ID
*/
public void setWhiteListId(String WhiteListId) {
this.WhiteListId = WhiteListId;
}
public DescribeReverseShellWhiteListDetailRequest() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public DescribeReverseShellWhiteListDetailRequest(DescribeReverseShellWhiteListDetailRequest source) {
if (source.WhiteListId != null) {
this.WhiteListId = new String(source.WhiteListId);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "WhiteListId", this.WhiteListId);
}
}
|
[
"tencentcloudapi@tencent.com"
] |
tencentcloudapi@tencent.com
|
4f587656f60f9b3737a5f9599783f830df175472
|
17a33488736d3f6b84beaacbfcdc15dc43261a9e
|
/support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/jwks/generator/OidcJsonWebKeystoreModifiedEvent.java
|
c1057ce2f9bde99cbc60e3fa8d65b4ecee53d51d
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-free-unknown"
] |
permissive
|
hdeadman/cas
|
68fa815d55ccc36a31b5037f500a8e827b6a566d
|
6d3cf1b64b2d4f9ab1ba07ab1105c9b7c77e8870
|
refs/heads/pr-puppeteerwin2
| 2023-08-06T05:59:12.248532
| 2022-03-16T00:32:45
| 2022-03-16T00:32:45
| 80,761,455
| 1
| 1
|
Apache-2.0
| 2022-03-22T00:15:11
| 2017-02-02T19:38:09
|
Java
|
UTF-8
|
Java
| false
| false
| 629
|
java
|
package org.apereo.cas.oidc.jwks.generator;
import org.apereo.cas.support.events.AbstractCasEvent;
import lombok.Getter;
import lombok.ToString;
import java.io.File;
/**
* This is {@link OidcJsonWebKeystoreModifiedEvent}.
*
* @author Misagh Moayyed
* @since 6.5.0
*/
@ToString(callSuper = true)
@Getter
public class OidcJsonWebKeystoreModifiedEvent extends AbstractCasEvent {
private static final long serialVersionUID = 8059647975948452375L;
private final File file;
public OidcJsonWebKeystoreModifiedEvent(final Object source, final File file) {
super(source);
this.file = file;
}
}
|
[
"mm1844@gmail.com"
] |
mm1844@gmail.com
|
000ecfaf4aa697c962ddef2d13d3ff621cfcbe14
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/9/9_2c5ad38166ecdf5916bbdb345437a6f60b580880/AdministradorOrdenesDespachoBean/9_2c5ad38166ecdf5916bbdb345437a6f60b580880_AdministradorOrdenesDespachoBean_t.java
|
b6eeb4c86bfd61c5ccaebc59afc787e9f6bbf8f8
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,245
|
java
|
package despacho.backend.administradores;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import despacho.backend.entities.*;
@Stateless
public class AdministradorOrdenesDespachoBean implements AdministradorOrdenesDespacho {
@PersistenceContext(unitName="portalweb.despacho")
private EntityManager em;
@Override
public void agregar(OrdenDespacho ordenDespacho) {
this.em.persist(ordenDespacho);
}
@Override
public List<OrdenDespacho> listar() {
@SuppressWarnings("unchecked")
List<OrdenDespacho> ordenesDespacho = this.em.createQuery(" FROM OrdenDespacho").getResultList();
return ordenesDespacho;
}
@Override
public List<OrdenDespacho> listarPorEstado(String estado) {
@SuppressWarnings("unchecked")
List<OrdenDespacho> ordenesDespacho = this.em.createQuery(" FROM OrdenDespacho WHERE estado = '" + estado + "' ORDER BY fecha").getResultList();
return ordenesDespacho;
}
@Override
public void actualizar(OrdenDespacho ordenDespacho) {
this.em.merge(ordenDespacho);
}
@Override
public OrdenDespacho get(int id) {
return this.em.find(OrdenDespacho.class, id);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
39ec6d0932855753ce5c55ac8b7357ba30048e08
|
d74c2ca437a58670dc8bfbf20a3babaecb7d0bea
|
/SAP_858310_lines/Source - 963k/js.webcontainer.service/dev/src/_tc~je~webcontainer/java/com/sap/engine/services/servlets_jsp/server/qos/wcerdresourceprovider.java
|
45c9f83462c066dba3e3f51b08f2d5174c251f27
|
[] |
no_license
|
javafullstackstudens/JAVA_SAP
|
e848e9e1a101baa4596ff27ce1aedb90e8dfaae8
|
f1b826bd8a13d1432e3ddd4845ac752208df4f05
|
refs/heads/master
| 2023-06-05T20:00:48.946268
| 2021-06-30T10:07:39
| 2021-06-30T10:07:39
| 381,657,064
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,466
|
java
|
package com.sap.engine.services.servlets_jsp.server.qos;
import com.sap.engine.lib.rcm.Constraint;
import com.sap.engine.lib.rcm.Notification;
import com.sap.engine.lib.rcm.Resource;
import com.sap.engine.lib.rcm.ResourceContext;
import com.sap.engine.lib.rcm.ResourceManager;
import com.sap.engine.lib.rcm.ResourceProvider;
import com.sap.engine.lib.rcm.impl.ResourceManagerImpl;
import com.sap.engine.services.servlets_jsp.server.LogContext;
import com.sap.engine.services.servlets_jsp.server.ServiceContext;
import com.sap.tc.logging.Severity;
public class WCERDResourceProvider implements ResourceProvider {
private ResourceManager rcm = new ResourceManagerImpl();
private ThreadResource threadResource = null;
private RDUsageMonitor wceMonitor = null;
private RDConstraint constraint;
public WCERDResourceProvider() {
super();
//TODO max per consumer
int maxPerConsumer = ServiceContext.getServiceContext().getWebContainerProperties().getRDThreadCountFactor() *
ServiceContext.getServiceContext().getHttpProvider().getHttpProperties().getFCAServerThreadCount();
threadResource = new ThreadResource("HTTP Worker", 0);
rcm.registerResource(this);
ResourceContext resCxt = rcm.createResourceContext(threadResource.getName(), RequestDispatcherConsumer.WCE_REQUEST_DISPATCHER_CONSUMER);
threadResource.setTotalQuantity(maxPerConsumer);
wceMonitor = new RDUsageMonitor();
resCxt.addNotification(wceMonitor);
constraint = new RDConstraint(wceMonitor);
resCxt.addConstraint(constraint);
}
@Override
public Constraint getDefaultConstrait() {
return constraint;
}
@Override
public Notification getDefaultNotification() {
return wceMonitor;
}
@Override
public Resource getResource() {
return threadResource;
}
public boolean consume(RequestDispatcherConsumer consumer) {
if (LogContext.getLocationQoS().beDebug()) {
LogContext.getLocationQoS().logT(Severity.DEBUG, "WCE RD is consuming by [" + consumer.getId() + "]");
}
return rcm.consume(consumer, threadResource.getName(), 1);
}
public void release(RequestDispatcherConsumer consumer) {
if (LogContext.getLocationQoS().beDebug()) {
LogContext.getLocationQoS().logT(Severity.DEBUG, "WCE RD is released by [" + consumer.getId() + "]");
}
rcm.release(consumer, threadResource.getName(), 1);
}
public RDUsageMonitor getMonitor() {
return wceMonitor;
}
}
|
[
"Yalin.Arie@checkmarx.com"
] |
Yalin.Arie@checkmarx.com
|
9ff3c063f5dc04a852a87029a3c638b3856d33d3
|
d6df0692aa0b048c059ec0b47b53885e8180513c
|
/src/main/java/com/gl365/member/mq/producer/JPushProducer.java
|
45b4cddff34d3dc91977d9cdf07b3eb028760898
|
[] |
no_license
|
pengjianbo3478/member
|
9c4d02d2694060d93fefaa29e7f7272b8f20e555
|
51a4082253adb49eecb10629a2a166fac2abd2ed
|
refs/heads/master
| 2020-03-13T19:36:01.067895
| 2018-04-27T06:43:52
| 2018-04-27T06:43:52
| 131,256,654
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 955
|
java
|
package com.gl365.member.mq.producer;
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import com.gl365.aliyun.ons.OnsProducer;
import com.gl365.member.common.JsonUtils;
import com.gl365.member.dto.mq.push.PushMQ;
import com.gl365.member.mq.consumer.PaymentConsumer;
@Component
public class JPushProducer {
private static final Logger LOG = LoggerFactory.getLogger(PaymentConsumer.class);
@Lazy
@Resource(name = "gl365-jpush-producer")
private OnsProducer jpushProducer;
public void send(PushMQ command) {
String message = JsonUtils.toJsonString(command);
LOG.info("<mq-send>推送通知APP》》》入参:{}", message);
try {
jpushProducer.send(message);
} catch (Exception e) {
LOG.error("<mq-send>推送通知APP》》》错误:{}", e);
}
}
}
|
[
"DEKK@DESKTOP-D6KV7VG"
] |
DEKK@DESKTOP-D6KV7VG
|
397f0868c0a8905c49fe0202db479889696d2461
|
042a45380fb482d86d53623cb809649f7f26868b
|
/hc-pd-dao/src/main/java/com/hc/scm/pd/dao/mapper/PdWorkProcessCategoryMapper.java
|
f617a918fa9eb0dfa939714ee0703034a594138c
|
[] |
no_license
|
lijinxi/hc-pd
|
61aa35fd55a0b99b69a029ab8293af930a28a6ba
|
216a231be5e1b46c05c95ccf75b37bd598509172
|
refs/heads/master
| 2021-01-10T08:42:58.019295
| 2015-12-17T07:35:20
| 2015-12-17T07:35:20
| 47,649,522
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 467
|
java
|
package com.hc.scm.pd.dao.mapper;
import com.hc.scm.common.base.mapper.BaseCrudMapper;
/**
* Description: 请写出类的用途
* All rights Reserved, Designed By hc* Copyright: Copyright(C) 2014-2015
* Company: Wonhigh.
* @author: Administrator
* @date: 2015-04-29 17:34:08
* @version 1.0.0
*/
public interface PdWorkProcessCategoryMapper extends BaseCrudMapper {
public <ModelType> String checkCategoryNo(String workCateCode);
}
|
[
"1767270730@qq.com"
] |
1767270730@qq.com
|
890e2d8284995231d2a15325d0385e3ec459cbd0
|
b0607996d57abfd6d4f057cd65772a14a03ee938
|
/cache2k-jcache/src/main/java/org/cache2k/jcache/provider/JCacheJmxSupport.java
|
85aeebb3810a79d62d998eaace18972c8725bcb1
|
[
"Apache-2.0"
] |
permissive
|
cache2k/cache2k
|
447328703ca7e4a77487a8063881e33998c29669
|
0eaa156bdecd617b2aa4c745d0f8844a32609697
|
refs/heads/master
| 2023-08-01T03:36:51.443163
| 2022-11-01T08:25:04
| 2022-11-01T08:25:04
| 15,289,581
| 684
| 88
|
Apache-2.0
| 2023-04-17T17:40:48
| 2013-12-18T17:25:04
|
Java
|
UTF-8
|
Java
| false
| false
| 3,681
|
java
|
package org.cache2k.jcache.provider;
/*-
* #%L
* cache2k JCache provider
* %%
* Copyright (C) 2000 - 2022 headissue GmbH, Munich
* %%
* 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.
* #L%
*/
import org.cache2k.Cache;
import org.cache2k.annotation.Nullable;
import org.cache2k.event.CacheClosedListener;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import java.lang.management.ManagementFactory;
import java.util.concurrent.CompletableFuture;
/**
* @author Jens Wilke
*/
@SuppressWarnings("WeakerAccess")
public class JCacheJmxSupport implements CacheClosedListener {
private static final MBeanServer PLATFORM_SERVER = ManagementFactory.getPlatformMBeanServer();
public static final JCacheJmxSupport SINGLETON = new JCacheJmxSupport();
private JCacheJmxSupport() { }
@Override
public @Nullable CompletableFuture<Void> onCacheClosed(Cache cache) {
disableStatistics(cache);
disableJmx(cache);
return null;
}
public void enableStatistics(JCacheAdapter c) {
MBeanServer mbs = PLATFORM_SERVER;
String name = createStatisticsObjectName(c.cache);
try {
mbs.registerMBean(
new JCacheJmxStatisticsMXBean(c),
new ObjectName(name));
} catch (Exception e) {
throw new IllegalStateException("Error registering JMX bean, name='" + name + "'", e);
}
}
public void disableStatistics(Cache c) {
MBeanServer mbs = PLATFORM_SERVER;
String name = createStatisticsObjectName(c);
try {
mbs.unregisterMBean(new ObjectName(name));
} catch (InstanceNotFoundException ignore) {
} catch (Exception e) {
throw new IllegalStateException("Error unregister JMX bean, name='" + name + "'", e);
}
}
public void enableJmx(Cache c, javax.cache.Cache ca) {
MBeanServer mbs = PLATFORM_SERVER;
String name = createJmxObjectName(c);
try {
mbs.registerMBean(new JCacheJmxCacheMXBean(ca), new ObjectName(name));
} catch (Exception e) {
throw new IllegalStateException("Error register JMX bean, name='" + name + "'", e);
}
}
public void disableJmx(Cache c) {
MBeanServer mbs = PLATFORM_SERVER;
String name = createJmxObjectName(c);
try {
mbs.unregisterMBean(new ObjectName(name));
} catch (InstanceNotFoundException ignore) {
} catch (Exception e) {
throw new IllegalStateException("Error unregister JMX bean, name='" + name + "'", e);
}
}
public String createStatisticsObjectName(Cache cache) {
return "javax.cache:type=CacheStatistics," +
"CacheManager=" + sanitizeName(cache.getCacheManager().getName()) +
",Cache=" + sanitizeName(cache.getName());
}
public String createJmxObjectName(Cache cache) {
return "javax.cache:type=CacheConfiguration," +
"CacheManager=" + sanitizeName(cache.getCacheManager().getName()) +
",Cache=" + sanitizeName(cache.getName());
}
/**
* Filter illegal chars, same rule as in TCK or RI?
*/
public static String sanitizeName(String string) {
return string == null ? "" : string.replaceAll(":|=|\n|,", ".");
}
}
|
[
"jw_github@headissue.com"
] |
jw_github@headissue.com
|
f96271b1e69c070c861a1fadbdc69be64b482153
|
12ae3500b57ffb09f9d1418a0ecacf3bca425a19
|
/core/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabButtonContainer.java
|
af0b64a3a110d80bd5cde9cb0b02bee410f53ab1
|
[
"MIT"
] |
permissive
|
x4e/darklaf
|
67ce92eab2eaa078e5a47fab43af49ae2a86e862
|
8de4f56c00b6752d6306c815d9bbd63de924f825
|
refs/heads/master
| 2023-01-02T14:33:31.642357
| 2020-10-16T21:12:39
| 2020-10-16T21:12:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,934
|
java
|
/*
* MIT License
*
* Copyright (c) 2020 Jannis Weis
*
* 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 com.github.weisj.darklaf.ui.tabbedpane;
import java.awt.*;
import javax.swing.*;
import javax.swing.plaf.UIResource;
import com.github.weisj.darklaf.util.DarkUIUtil;
public abstract class TabButtonContainer extends JPanel implements UIResource {
protected final JButton button;
protected final DarkTabbedPaneUI ui;
private final Insets borderInsets;
protected TabButtonContainer(final DarkTabbedPaneUI ui) {
this.ui = ui;
borderInsets = UIManager.getInsets("TabbedPane.tabArea.buttonInsets");
button = createButton();
add(button);
setOpaque(false);
setLayout(null);
}
protected abstract JButton createButton();
@Override
public void doLayout() {
Dimension b = button.getPreferredSize();
int w = Math.min(getWidth(), b.width);
int h = Math.min(getHeight(), b.height);
int x = (getWidth() - w) / 2;
int y = (getHeight() - h) / 2;
button.setBounds(x, y, w, h);
}
@Override
public void setBounds(final int x, final int y, final int width, final int height) {
super.setBounds(x, y, width, height);
doLayout();
}
@Override
protected void paintComponent(final Graphics g) {
super.paintComponent(g);
ui.paintTabAreaBorder(g, ui.tabPane.getTabPlacement(), 0, 0, getWidth(), getHeight());
}
@Override
public Dimension getPreferredSize() {
return DarkUIUtil.addInsets(button.getPreferredSize(), getInsets());
}
@Override
public Insets getInsets() {
if (ui.isHorizontalTabPlacement()) {
return new Insets(0, borderInsets.left, 0, borderInsets.right);
} else {
return new Insets(borderInsets.top, 0, borderInsets.bottom, 0);
}
}
}
|
[
"weisj@arcor.de"
] |
weisj@arcor.de
|
64ba57bf72541488eb42702f9ab007b00bf83930
|
7927344fbe02af07ef137a3b3453a9891c586238
|
/net/minecraft/tileentity/TileEntityCommandBlock.java
|
f3cde59db041036aa62f9150870dbde8c3e1eb4c
|
[
"MIT"
] |
permissive
|
Hexeption/How-to-code-an-advanced-hacked-client-for-1.9
|
a9d4df9c1254402c5ccf47912dbd8c6e1d9894c3
|
f23beceb4b2996e0de24b2822aae940dae1fc88e
|
refs/heads/master
| 2021-01-18T22:41:13.800852
| 2016-12-11T18:25:26
| 2016-12-11T18:25:26
| 53,270,980
| 9
| 19
| null | 2016-06-05T07:24:26
| 2016-03-06T19:04:09
|
Java
|
UTF-8
|
Java
| false
| false
| 6,314
|
java
|
package net.minecraft.tileentity;
import io.netty.buffer.ByteBuf;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCommandBlock;
import net.minecraft.block.state.IBlockState;
import net.minecraft.command.CommandResultStats;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
public class TileEntityCommandBlock extends TileEntity
{
private boolean powered;
private boolean auto;
private boolean conditionMet;
private boolean field_184262_h;
private final CommandBlockBaseLogic commandBlockLogic = new CommandBlockBaseLogic()
{
public BlockPos getPosition()
{
return TileEntityCommandBlock.this.pos;
}
public Vec3d getPositionVector()
{
return new Vec3d((double)TileEntityCommandBlock.this.pos.getX() + 0.5D, (double)TileEntityCommandBlock.this.pos.getY() + 0.5D, (double)TileEntityCommandBlock.this.pos.getZ() + 0.5D);
}
public World getEntityWorld()
{
return TileEntityCommandBlock.this.getWorld();
}
public void setCommand(String command)
{
super.setCommand(command);
TileEntityCommandBlock.this.markDirty();
}
public void updateCommand()
{
IBlockState iblockstate = TileEntityCommandBlock.this.worldObj.getBlockState(TileEntityCommandBlock.this.pos);
TileEntityCommandBlock.this.getWorld().notifyBlockUpdate(TileEntityCommandBlock.this.pos, iblockstate, iblockstate, 3);
}
public int func_145751_f()
{
return 0;
}
public void func_145757_a(ByteBuf p_145757_1_)
{
p_145757_1_.writeInt(TileEntityCommandBlock.this.pos.getX());
p_145757_1_.writeInt(TileEntityCommandBlock.this.pos.getY());
p_145757_1_.writeInt(TileEntityCommandBlock.this.pos.getZ());
}
public Entity getCommandSenderEntity()
{
return null;
}
public MinecraftServer getServer()
{
return TileEntityCommandBlock.this.worldObj.getMinecraftServer();
}
};
public void writeToNBT(NBTTagCompound compound)
{
super.writeToNBT(compound);
this.commandBlockLogic.writeDataToNBT(compound);
compound.setBoolean("powered", this.isPowered());
compound.setBoolean("conditionMet", this.isConditionMet());
compound.setBoolean("auto", this.isAuto());
}
public void readFromNBT(NBTTagCompound compound)
{
super.readFromNBT(compound);
this.commandBlockLogic.readDataFromNBT(compound);
this.setPowered(compound.getBoolean("powered"));
this.setConditionMet(compound.getBoolean("conditionMet"));
this.setAuto(compound.getBoolean("auto"));
}
public Packet<?> getDescriptionPacket()
{
if (this.func_184257_h())
{
this.func_184252_d(false);
NBTTagCompound nbttagcompound = new NBTTagCompound();
this.writeToNBT(nbttagcompound);
return new SPacketUpdateTileEntity(this.pos, 2, nbttagcompound);
}
else
{
return null;
}
}
public boolean func_183000_F()
{
return true;
}
public CommandBlockBaseLogic getCommandBlockLogic()
{
return this.commandBlockLogic;
}
public CommandResultStats getCommandResultStats()
{
return this.commandBlockLogic.getCommandResultStats();
}
public void setPowered(boolean p_184250_1_)
{
this.powered = p_184250_1_;
}
public boolean isPowered()
{
return this.powered;
}
public boolean isAuto()
{
return this.auto;
}
public void setAuto(boolean p_184253_1_)
{
boolean flag = this.auto;
this.auto = p_184253_1_;
if (!flag && p_184253_1_ && !this.powered && this.worldObj != null && this.func_184251_i() != TileEntityCommandBlock.Mode.SEQUENCE)
{
Block block = this.getBlockType();
if (block instanceof BlockCommandBlock)
{
BlockPos blockpos = this.getPos();
BlockCommandBlock blockcommandblock = (BlockCommandBlock)block;
this.conditionMet = !this.func_184258_j() || blockcommandblock.func_185562_e(this.worldObj, blockpos, this.worldObj.getBlockState(blockpos));
this.worldObj.scheduleUpdate(blockpos, block, block.tickRate(this.worldObj));
if (this.conditionMet)
{
blockcommandblock.func_185563_c(this.worldObj, blockpos);
}
}
}
}
public boolean isConditionMet()
{
return this.conditionMet;
}
public void setConditionMet(boolean p_184249_1_)
{
this.conditionMet = p_184249_1_;
}
public boolean func_184257_h()
{
return this.field_184262_h;
}
public void func_184252_d(boolean p_184252_1_)
{
this.field_184262_h = p_184252_1_;
}
public TileEntityCommandBlock.Mode func_184251_i()
{
Block block = this.getBlockType();
return block == Blocks.command_block ? TileEntityCommandBlock.Mode.REDSTONE : (block == Blocks.repeating_command_block ? TileEntityCommandBlock.Mode.AUTO : (block == Blocks.chain_command_block ? TileEntityCommandBlock.Mode.SEQUENCE : TileEntityCommandBlock.Mode.REDSTONE));
}
public boolean func_184258_j()
{
IBlockState iblockstate = this.worldObj.getBlockState(this.getPos());
return iblockstate.getBlock() instanceof BlockCommandBlock ? ((Boolean)iblockstate.getValue(BlockCommandBlock.CONDITIONAL)).booleanValue() : false;
}
/**
* validates a tile entity
*/
public void validate()
{
this.blockType = null;
super.validate();
}
public static enum Mode
{
SEQUENCE,
AUTO,
REDSTONE;
}
}
|
[
"minecraftfun201@gmail.com"
] |
minecraftfun201@gmail.com
|
47d6381b741e87e76ca031f53e4c688e12121524
|
44abee7981ec47704f59d0cb9345efc4b909ad4f
|
/src/chap18/textbook/s180504/PrintStreamExample.java
|
0e9af22397a89213ceaa69121072ce892a6840b8
|
[] |
no_license
|
hyojjjin/java20200929
|
ad24e96c2c3837f695951be783c59418559eceee
|
8a2d7b34bc814465c83ae0efa0bd59f29205c738
|
refs/heads/master
| 2023-03-11T22:56:51.890496
| 2021-03-02T01:08:15
| 2021-03-02T01:08:15
| 299,485,576
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 517
|
java
|
package chap18.textbook.s180504;
import java.io.FileOutputStream;
import java.io.PrintStream;
public class PrintStreamExample {
public static void main(String[] args) throws Exception {
FileOutputStream fos = new FileOutputStream("file.txt");
PrintStream ps = new PrintStream(fos);
ps.println("[프린터 보조 스트림");
ps.print("마치");
ps.println("프린터가 출력하는 것처럼");
ps.println("데이터를 출력합니다.");
ps.flush();
ps.close();
fos.close();
}
}
|
[
"hjjin2_@naver.com"
] |
hjjin2_@naver.com
|
9287135457670cda08ce77127249d59495de3063
|
7fe40170bdb9620f51887ec52df2430defd94345
|
/src/main/java/com/ultracart/admin/v2/models/GiftCertificatesResponse.java
|
5669bd24b94efa955ff42e3293a9c85771f6e3ab
|
[
"Apache-2.0"
] |
permissive
|
UltraCart/rest_api_v2_sdk_java
|
15878b91beef97843f2938f3048a7010e7328127
|
bfecb94bb931dfe190d98663d8b1593c6f9dfabb
|
refs/heads/master
| 2023-02-08T13:38:03.769682
| 2023-01-31T20:48:35
| 2023-01-31T20:48:35
| 67,046,576
| 0
| 2
|
Apache-2.0
| 2022-06-23T01:46:12
| 2016-08-31T14:48:01
|
Java
|
UTF-8
|
Java
| false
| false
| 5,352
|
java
|
/*
* UltraCart Rest API V2
* UltraCart REST API Version 2
*
* OpenAPI spec version: 2.0.0
* Contact: support@ultracart.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.ultracart.admin.v2.models;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.ultracart.admin.v2.models.Error;
import com.ultracart.admin.v2.models.GiftCertificate;
import com.ultracart.admin.v2.models.ResponseMetadata;
import com.ultracart.admin.v2.models.Warning;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* GiftCertificatesResponse
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-01-31T15:48:16.171-05:00")
public class GiftCertificatesResponse {
@SerializedName("error")
private Error error = null;
@SerializedName("gift_certificates")
private List<GiftCertificate> giftCertificates = null;
@SerializedName("metadata")
private ResponseMetadata metadata = null;
@SerializedName("success")
private Boolean success = null;
@SerializedName("warning")
private Warning warning = null;
public GiftCertificatesResponse error(Error error) {
this.error = error;
return this;
}
/**
* Get error
* @return error
**/
@ApiModelProperty(value = "")
public Error getError() {
return error;
}
public void setError(Error error) {
this.error = error;
}
public GiftCertificatesResponse giftCertificates(List<GiftCertificate> giftCertificates) {
this.giftCertificates = giftCertificates;
return this;
}
public GiftCertificatesResponse addGiftCertificatesItem(GiftCertificate giftCertificatesItem) {
if (this.giftCertificates == null) {
this.giftCertificates = new ArrayList<GiftCertificate>();
}
this.giftCertificates.add(giftCertificatesItem);
return this;
}
/**
* Get giftCertificates
* @return giftCertificates
**/
@ApiModelProperty(value = "")
public List<GiftCertificate> getGiftCertificates() {
return giftCertificates;
}
public void setGiftCertificates(List<GiftCertificate> giftCertificates) {
this.giftCertificates = giftCertificates;
}
public GiftCertificatesResponse metadata(ResponseMetadata metadata) {
this.metadata = metadata;
return this;
}
/**
* Get metadata
* @return metadata
**/
@ApiModelProperty(value = "")
public ResponseMetadata getMetadata() {
return metadata;
}
public void setMetadata(ResponseMetadata metadata) {
this.metadata = metadata;
}
public GiftCertificatesResponse success(Boolean success) {
this.success = success;
return this;
}
/**
* Indicates if API call was successful
* @return success
**/
@ApiModelProperty(value = "Indicates if API call was successful")
public Boolean isSuccess() {
return success;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public GiftCertificatesResponse warning(Warning warning) {
this.warning = warning;
return this;
}
/**
* Get warning
* @return warning
**/
@ApiModelProperty(value = "")
public Warning getWarning() {
return warning;
}
public void setWarning(Warning warning) {
this.warning = warning;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GiftCertificatesResponse giftCertificatesResponse = (GiftCertificatesResponse) o;
return Objects.equals(this.error, giftCertificatesResponse.error) &&
Objects.equals(this.giftCertificates, giftCertificatesResponse.giftCertificates) &&
Objects.equals(this.metadata, giftCertificatesResponse.metadata) &&
Objects.equals(this.success, giftCertificatesResponse.success) &&
Objects.equals(this.warning, giftCertificatesResponse.warning);
}
@Override
public int hashCode() {
return Objects.hash(error, giftCertificates, metadata, success, warning);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GiftCertificatesResponse {\n");
sb.append(" error: ").append(toIndentedString(error)).append("\n");
sb.append(" giftCertificates: ").append(toIndentedString(giftCertificates)).append("\n");
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
sb.append(" success: ").append(toIndentedString(success)).append("\n");
sb.append(" warning: ").append(toIndentedString(warning)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"perry@ultracart.com"
] |
perry@ultracart.com
|
f72eebea885e402568d656f1d569da1e750f93ce
|
d2df2e68ee1d0bb84243add5dcfd8920fb790333
|
/modules/distribution-service-aws-s3/src/main/java/org/opencastproject/distribution/aws/s3/PresignedUrlMediaPackageSerializer.java
|
f2de22bd49804f56a42cdc9ebea006693723149b
|
[
"LicenseRef-scancode-free-unknown",
"ECL-2.0",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LicenseRef-scancode-unknown"
] |
permissive
|
rfharokh/Opencast
|
ec5603939759c9cc05acb4bd82b378761b9652b8
|
971702a4bbfafda9dfa1aeb0d3723b878bb693b7
|
refs/heads/develop
| 2021-06-18T14:43:21.193592
| 2021-01-26T08:17:30
| 2021-01-26T08:17:30
| 166,364,821
| 1
| 1
|
ECL-2.0
| 2019-03-01T08:26:15
| 2019-01-18T07:40:53
|
Java
|
UTF-8
|
Java
| false
| false
| 2,725
|
java
|
/**
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
*
* The Apereo Foundation licenses this file to you under the Educational
* Community License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License
* at:
*
* http://opensource.org/licenses/ecl2.txt
*
* 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.opencastproject.distribution.aws.s3;
import org.opencastproject.distribution.aws.s3.api.AwsS3DistributionService;
import org.opencastproject.mediapackage.MediaPackageSerializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.URI;
import java.net.URISyntaxException;
/**
* Implementation of a {@link MediaPackageSerializer} that will support presigned URL feature for a Mediapackage
*/
public class PresignedUrlMediaPackageSerializer implements MediaPackageSerializer {
private static final Logger logger = LoggerFactory.getLogger(PresignedUrlMediaPackageSerializer.class);
public static final int RANKING = 10;
/** S3 distribution service used for generate presigned URL */
private AwsS3DistributionService service;
public PresignedUrlMediaPackageSerializer() {
logger.info("Init PresignedUrlMediaPackageSerializer");
}
public void setService(AwsS3DistributionService service) {
this.service = service;
}
/**
* {@inheritDoc}
*
* Generate a presigned URI for the given URI if AwsS3DistributionService is enabled.
*/
@Override
public URI decodeURI(URI uri) throws URISyntaxException {
URI presignedURI = null;
if (service instanceof AwsS3DistributionServiceImpl) {
presignedURI = ((AwsS3DistributionServiceImpl)service).presignedURI(uri);
}
logger.debug("Decode in presigned URL serializer: {} -> {}", uri, presignedURI);
return presignedURI;
}
/**
* {@inheritDoc}
*/
@Override
public URI encodeURI(URI uri) throws URISyntaxException {
URI encodedUri = null;
logger.debug("Encode in presigned URL serializer: {} -> {}", uri, encodedUri);
return uri;
}
/**
* {@inheritDoc}
*/
@Override
public int getRanking() {
return RANKING;
}
}
|
[
"gaojun@fudan.edu.cn"
] |
gaojun@fudan.edu.cn
|
ef2affaae2192937d92c1aa03a5103ecaaf4fc82
|
84e156edb40800866b625d3541119e970acad1e1
|
/bitcamp-java-application4-server/src/main/java/com/eomcs/lms/service/BoardService.java
|
c142c61abb914bb549d799137927f6302242897b
|
[] |
no_license
|
Hecklebot/bitcamp-java-20190527
|
c063803b02015ca0a45ef590b3d5ca1c25201285
|
c22f695c788ab8da21f7148aa09ec477c57b2a50
|
refs/heads/master
| 2020-06-13T20:15:46.420583
| 2019-10-21T08:12:55
| 2019-10-21T08:12:55
| 194,775,337
| 2
| 0
| null | 2020-04-30T11:58:11
| 2019-07-02T02:41:01
|
Java
|
UTF-8
|
Java
| false
| false
| 462
|
java
|
package com.eomcs.lms.service;
import java.util.List;
import com.eomcs.lms.domain.Board;
// 역할:
// => 게시물 관리 업무를 수행
// => 트랜잭션 제어
// => 여러 페이지 컨트롤러가 사용한다.
public interface BoardService {
List<Board> list() throws Exception;
Board get(int no) throws Exception;
void insert(Board board) throws Exception;
void update(Board board) throws Exception;
void delete(int no) throws Exception;
}
|
[
"iuehakdrk@gmail.com"
] |
iuehakdrk@gmail.com
|
4ac73733ffdb153f70e976aafb2f9a0b0d56cd79
|
5e1313cfd708eb29e5baae1d21b9b3c737d33f23
|
/camera/src/com/commonsware/cwac/camera/ImageCleanupTask.java
|
26f28f1cb33ba426f2c6205f37a29e453dd759a7
|
[
"Apache-2.0"
] |
permissive
|
nilsymbol/cwac-camera
|
dc725c65606c98ce6b211b7e517f5ff6b4d906f2
|
9e61fd085e55830b52abdc26ad2ab156be1dbdc1
|
refs/heads/master
| 2021-05-29T06:42:29.218456
| 2014-02-08T22:11:02
| 2014-02-08T22:11:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,914
|
java
|
/***
Copyright (c) 2013-2014 CommonsWare, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.commonsware.cwac.camera;
import android.annotation.TargetApi;
import android.app.ActivityManager;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.hardware.Camera;
import android.os.Build;
import android.util.Log;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import com.android.mms.exif.ExifInterface;
public class ImageCleanupTask extends Thread {
private byte[] data;
private int cameraId;
private PictureTransaction xact=null;
private boolean applyMatrix=true;
ImageCleanupTask(Context ctxt, byte[] data, int cameraId,
PictureTransaction xact) {
this.data=data;
this.cameraId=cameraId;
this.xact=xact;
float heapPct=(float)data.length / calculateHeapSize(ctxt);
applyMatrix=(heapPct < xact.host.maxPictureCleanupHeapUsage());
}
@Override
public void run() {
Camera.CameraInfo info=new Camera.CameraInfo();
Camera.getCameraInfo(cameraId, info);
Matrix matrix=null;
Bitmap cleaned=null;
ExifInterface exif=null;
if (applyMatrix) {
if (info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) {
if (xact.host.getDeviceProfile().portraitFFCFlipped()
&& (xact.displayOrientation == 90 || xact.displayOrientation == 270)) {
matrix=flip(new Matrix());
}
else if (xact.mirrorFFC()) {
matrix=mirror(new Matrix());
}
}
try {
int imageOrientation=0;
if (xact.host.getDeviceProfile().useDeviceOrientation()) {
imageOrientation=xact.displayOrientation;
}
else {
exif=new ExifInterface();
exif.readExif(data);
int exifOrientation=
exif.getTagIntValue(ExifInterface.TAG_ORIENTATION);
if (exifOrientation == 6) {
imageOrientation=90;
}
else if (exifOrientation == 8) {
imageOrientation=270;
}
else if (exifOrientation == 3) {
imageOrientation=180;
}
else if (exifOrientation == 1) {
imageOrientation=0;
}
else {
// imageOrientation=
// xact.host.getDeviceProfile().getDefaultOrientation();
//
// if (imageOrientation == -1) {
// imageOrientation=xact.displayOrientation;
// }
}
}
if (imageOrientation != 0) {
matrix=
rotate((matrix == null ? new Matrix() : matrix),
imageOrientation);
}
}
catch (IOException e) {
Log.e("CWAC-Camera", "Exception parsing JPEG", e);
// TODO: ripple to client
}
if (matrix != null) {
Bitmap original=
BitmapFactory.decodeByteArray(data, 0, data.length);
cleaned=
Bitmap.createBitmap(original, 0, 0, original.getWidth(),
original.getHeight(), matrix, true);
original.recycle();
}
}
if (xact.needBitmap) {
if (cleaned == null) {
cleaned=BitmapFactory.decodeByteArray(data, 0, data.length);
}
xact.host.saveImage(xact, cleaned);
}
if (xact.needByteArray) {
if (matrix != null) {
ByteArrayOutputStream out=new ByteArrayOutputStream();
// if (exif == null) {
cleaned.compress(Bitmap.CompressFormat.JPEG, 100, out);
// }
// else {
// exif.deleteTag(ExifInterface.TAG_ORIENTATION);
//
// try {
// exif.writeExif(cleaned, out);
// }
// catch (IOException e) {
// Log.e("CWAC-Camera", "Exception writing to JPEG", e);
// // TODO: ripple to client
// }
// }
data=out.toByteArray();
try {
out.close();
}
catch (IOException e) {
Log.e(CameraView.TAG, "Exception in closing a BAOS???", e);
}
}
xact.host.saveImage(xact, data);
}
System.gc();
}
// from http://stackoverflow.com/a/8347956/115145
private Matrix mirror(Matrix input) {
float[] mirrorY= { -1, 0, 0, 0, 1, 0, 0, 0, 1 };
Matrix matrixMirrorY=new Matrix();
matrixMirrorY.setValues(mirrorY);
input.postConcat(matrixMirrorY);
return(input);
}
private Matrix flip(Matrix input) {
float[] mirrorY= { -1, 0, 0, 0, 1, 0, 0, 0, 1 };
Matrix matrixMirrorY=new Matrix();
matrixMirrorY.setValues(mirrorY);
input.preScale(1.0f, -1.0f);
input.postConcat(matrixMirrorY);
return(input);
}
private Matrix rotate(Matrix input, int degree) {
input.setRotate(degree);
return(input);
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static int calculateHeapSize(Context ctxt) {
ActivityManager am=
(ActivityManager)ctxt.getSystemService(Context.ACTIVITY_SERVICE);
int memoryClass=am.getMemoryClass();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
if ((ctxt.getApplicationInfo().flags & ApplicationInfo.FLAG_LARGE_HEAP) != 0) {
memoryClass=am.getLargeMemoryClass();
}
}
return(memoryClass * 1048576); // MB * bytes in MB
}
}
|
[
"mmurphy@commonsware.com"
] |
mmurphy@commonsware.com
|
fdf8826ccc3a38ad4b1faacdec829e82bbb6e30e
|
a363c46e7cbb080db2b3a69a70ebf912195e25c7
|
/ls-modules/ls-webservice/src/main/java/cn/lonsun/webservice/vo/indicator/IndicatorVO.java
|
a05b56460adec471f47592a68ada41caa1e58acd
|
[] |
no_license
|
pologood/excms
|
601646dd7ea4f58f8423da007413978192090f8d
|
e1c03f574d0ecbf0200aaffa7facf93841bab02c
|
refs/heads/master
| 2020-05-14T20:07:22.979151
| 2018-10-06T10:51:37
| 2018-10-06T10:51:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,413
|
java
|
package cn.lonsun.webservice.vo.indicator;
import cn.lonsun.core.base.entity.AMockEntity;
/**
* 指示器
*
* @author xujh
*
*/
public class IndicatorVO extends AMockEntity {
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
public enum Type {
Shortcut, // 快捷方式
Menu, // 菜单项
ToolBarButton, // 工具栏按钮
Other// 权限集合(不显示)
}
public enum SizeModel {
Pixel, // 像素
Percent, // 百分比
Max, // 最大化
Adaptation, // 自适应
Define// 指定尺寸
}
/**
* 按钮编码,用于标记操作类型
*
* @author xujh
* @date 2014年9月29日 下午3:13:22
* @version V1.0
*/
public enum OperatorCode {
Add, // 新增
Delete, // 删除
Update, // 修改
Query, // 查询
Enable, // 启用
Unable, // 禁用
Export, // 导出
Move // 移动
}
private Long indicatorId;
// 类型
private String type;
// 指示器编码
private String code;
// 名称
private String name;
// 系统编码,用于标识属于哪个系统
private String systemCode;
//服务器地址
private String host;
// 访问链接
private String uri;
// 资源ID
private Long resourceId;
// 是否可用
private Boolean isEnable = Boolean.TRUE;
// 父菜单的主键
private Long parentId;
// 是否系统定义-用户可以自定义菜单
private Boolean isSystem = Boolean.FALSE;
// 用户ID-用于用户自定义
private Long userId;
// 是否显示子菜单
private Boolean isShowSons = Boolean.FALSE;
// 是否为本引用的首页
private Boolean isIndex = Boolean.FALSE;
private Boolean isShowInDesktop = Boolean.FALSE;
// 序号
private Integer sortNum;
// 业务类别主键
private Long businessTypeId;
//描述
private String description;
// 文字图标
private String textIcon;
// 小图片图标
private String smallIconPath;
// 中图片图标
private String middleIconPath;
// 大图片图标
private String bigIconPath;
// 窗口打开模式,如果type为Define,那么width和height必须大于0,否则忽略这两个属性值
private String sizeModel;
// 窗口宽度,单位为px
private Integer width;
// 窗口高度,单位为px
private Integer height;
//是否是父亲
private Integer isParent = Integer.valueOf(0);
//是否需要推送消息
private Boolean hasMessage = Boolean.FALSE;
//外部用户是否显示
private Boolean isShown4ExternalUser;
//菜单级别
private int menuLevel = 0;
public Long getIndicatorId() {
return indicatorId;
}
public void setIndicatorId(Long indicatorId) {
this.indicatorId = indicatorId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getUri() {
return uri;
}
public void setUri(String uri) {
this.uri = uri;
}
public Long getResourceId() {
return resourceId;
}
public void setResourceId(Long resourceId) {
this.resourceId = resourceId;
}
public Integer getSortNum() {
return sortNum;
}
public void setSortNum(Integer sortNum) {
this.sortNum = sortNum;
}
public Long getBusinessTypeId() {
return businessTypeId;
}
public void setBusinessTypeId(Long businessTypeId) {
this.businessTypeId = businessTypeId;
}
public Boolean getIsEnable() {
return isEnable;
}
public void setIsEnable(Boolean isEnable) {
this.isEnable = isEnable;
}
public Boolean getIsSystem() {
return isSystem;
}
public void setIsSystem(Boolean isSystem) {
this.isSystem = isSystem;
}
public Boolean getIsShowSons() {
return isShowSons;
}
public void setIsShowSons(Boolean isShowSons) {
this.isShowSons = isShowSons;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getTextIcon() {
return textIcon;
}
public void setTextIcon(String textIcon) {
this.textIcon = textIcon;
}
public String getSmallIconPath() {
return smallIconPath;
}
public void setSmallIconPath(String smallIconPath) {
this.smallIconPath = smallIconPath;
}
public String getMiddleIconPath() {
return middleIconPath;
}
public void setMiddleIconPath(String middleIconPath) {
this.middleIconPath = middleIconPath;
}
public String getBigIconPath() {
return bigIconPath;
}
public void setBigIconPath(String bigIconPath) {
this.bigIconPath = bigIconPath;
}
public String getSizeModel() {
return sizeModel;
}
public void setSizeModel(String sizeModel) {
this.sizeModel = sizeModel;
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public Integer getWidth() {
return width;
}
public void setWidth(Integer width) {
this.width = width;
}
public Integer getHeight() {
return height;
}
public void setHeight(Integer height) {
this.height = height;
}
public String getSystemCode() {
return systemCode;
}
public void setSystemCode(String systemCode) {
this.systemCode = systemCode;
}
public Integer getIsParent() {
return isParent;
}
public void setIsParent(Integer isParent) {
this.isParent = isParent;
}
public Boolean getIsIndex() {
return isIndex;
}
public void setIsIndex(Boolean isIndex) {
this.isIndex = isIndex;
}
public Boolean getIsShowInDesktop() {
return isShowInDesktop;
}
public void setIsShowInDesktop(Boolean isShowInDesktop) {
this.isShowInDesktop = isShowInDesktop;
}
public Boolean getHasMessage() {
return hasMessage;
}
public void setHasMessage(Boolean hasMessage) {
this.hasMessage = hasMessage;
}
public Boolean getIsShown4ExternalUser() {
return isShown4ExternalUser;
}
public void setIsShown4ExternalUser(Boolean isShown4ExternalUser) {
this.isShown4ExternalUser = isShown4ExternalUser;
}
public int getMenuLevel() {
return menuLevel;
}
public void setMenuLevel(int menuLevel) {
this.menuLevel = menuLevel;
}
}
|
[
"2885129077@qq.com"
] |
2885129077@qq.com
|
6ae316c59d3fa1334a317dbbcc208eb65f67ab72
|
b85f16dadef1e4118a86b074d11f4508792239c2
|
/src/test/java/com/redhat/cajun/navy/responder/message/serialization/QuotedStringDeserializerTest.java
|
d8d28dfbd5289e5b39dacbe7da22d40b62627305
|
[] |
no_license
|
cgruver-erdemo/responder-service
|
e8a6e1b6b49950b921b97991e26f7729cd10f9dd
|
e00d929fcf31810b2973e2cf074341126bab6b4b
|
refs/heads/master
| 2022-12-07T12:15:41.143663
| 2020-07-28T12:14:30
| 2020-07-28T12:14:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,858
|
java
|
package com.redhat.cajun.navy.responder.message.serialization;
import org.hamcrest.CoreMatchers;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
public class QuotedStringDeserializerTest {
@Test
public void testUnquoted() {
String json = "{\"messageType\":\"IncidentReportedEvent\"," +
"\"id\":\"messageId\"," +
"\"invokingService\":\"messageSender\"," +
"\"timestamp\":1521148332397," +
"\"body\": {\"id\":\"incident123\"," +
"\"lat\": \"34.14338\"," +
"\"lon\": \"-77.86569\"," +
"\"numberOfPeople\": 3," +
"\"medicalNeeded\": true," +
"\"timestamp\": 1521148332350" +
"}}";
QuotedStringDeserializer deserializer = new QuotedStringDeserializer();
byte[] data = json.getBytes();
String deserialized = deserializer.deserialize("test", data);
MatcherAssert.assertThat(deserialized, CoreMatchers.equalTo(json));
}
@Test
public void testQuoted() {
String json = "\"{\\\"messageType\\\":\\\"IncidentReportedEvent\\\"," +
"\\\"id\\\":\\\"messageId\\\"," +
"\\\"invokingService\\\":\\\"messageSender\\\"," +
"\\\"timestamp\\\":1521148332397," +
"\\\"body\\\": {\\\"id\":\\\"incident123\\\"," +
"\\\"lat\\\": \\\"34.14338\\\"," +
"\\\"lon\\\": \\\"-77.86569\\\"," +
"\\\"numberOfPeople\\\": 3," +
"\\\"medicalNeeded\\\": true," +
"\\\"timestamp\\\": 1521148332350" +
"}}\"";
String expected = "{\"messageType\":\"IncidentReportedEvent\"," +
"\"id\":\"messageId\"," +
"\"invokingService\":\"messageSender\"," +
"\"timestamp\":1521148332397," +
"\"body\": {\"id\":\"incident123\"," +
"\"lat\": \"34.14338\"," +
"\"lon\": \"-77.86569\"," +
"\"numberOfPeople\": 3," +
"\"medicalNeeded\": true," +
"\"timestamp\": 1521148332350" +
"}}";
QuotedStringDeserializer deserializer = new QuotedStringDeserializer();
byte[] data = json.getBytes();
String deserialized = deserializer.deserialize("test", data);
MatcherAssert.assertThat(deserialized, CoreMatchers.equalTo(expected));
}
@Test
public void testQuotedUnEscaped() {
String json = "\"{\"messageType\":\"IncidentReportedEvent\"," +
"\"id\":\"messageId\"," +
"\"invokingService\":\"messageSender\"," +
"\"timestamp\":1521148332397," +
"\"body\": {\"id\":\"incident123\"," +
"\"lat\": \"34.14338\"," +
"\"lon\": \"-77.86569\"," +
"\"numberOfPeople\": 3," +
"\"medicalNeeded\": true," +
"\"timestamp\": 1521148332350" +
"}}\"";
String expected = "{\"messageType\":\"IncidentReportedEvent\"," +
"\"id\":\"messageId\"," +
"\"invokingService\":\"messageSender\"," +
"\"timestamp\":1521148332397," +
"\"body\": {\"id\":\"incident123\"," +
"\"lat\": \"34.14338\"," +
"\"lon\": \"-77.86569\"," +
"\"numberOfPeople\": 3," +
"\"medicalNeeded\": true," +
"\"timestamp\": 1521148332350" +
"}}";
QuotedStringDeserializer deserializer = new QuotedStringDeserializer();
byte[] data = json.getBytes();
String deserialized = deserializer.deserialize("test", data);
MatcherAssert.assertThat(deserialized, CoreMatchers.equalTo(expected));
}
}
|
[
"bernard.tison@gmail.com"
] |
bernard.tison@gmail.com
|
fe870f122a50e57bbc7b6e147efebbd2d4b71289
|
b894e7feec5ef4711e9d5f00bffc3effc1294143
|
/src/by/it/gerasimov/calc/ReportBuilder.java
|
5c4a79bbdf658ac83ba602ca65da2e124a81a085
|
[] |
no_license
|
Vladislav7776/JD2020-01-20
|
877e311bfa2be42152424f5f4963deb1b718e7e3
|
2f977ee26b79a97fa37bd1053756c91f344c5757
|
refs/heads/master
| 2020-12-22T21:37:24.187529
| 2020-03-12T20:22:51
| 2020-03-12T20:22:51
| 236,938,743
| 6
| 0
| null | 2020-01-29T08:46:59
| 2020-01-29T08:46:58
| null |
UTF-8
|
Java
| false
| false
| 1,685
|
java
|
package by.it.gerasimov.calc;
import by.it.gerasimov.calc.translate.Globalization;
import by.it.gerasimov.calc.translate.Messages;
import by.it.gerasimov.calc.translate.ResMan;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.Deque;
import java.util.LinkedList;
abstract class ReportBuilder {
Deque<String> logs = new LinkedList<>();
StringBuilder report = new StringBuilder();
abstract void addHeader();
void addRunningTime() {
report.append(Globalization.getCurrentDate()).append('\n');
}
abstract void addLines();
void print() {
System.out.println(report.toString());
}
void readLog() {
try (BufferedReader br = new BufferedReader(new FileReader(Settings.pathToLog))) {
String line;
while ((line = br.readLine()) != null) {
logs.addLast(line);
}
} catch (IOException e) {
System.out.println(e.getMessage());
}
}
}
class ShortReportBuilder extends ReportBuilder {
@Override
void addHeader() {
report.append("Short report:\n");
}
@Override
void addLines() {
readLog();
for (String log : logs) {
if (log.contains(ResMan.INSTANCE.get(Messages.ERROR))) {
report.append(log).append('\n');
}
}
}
}
class FullReportBuilder extends ReportBuilder {
@Override
void addHeader() {
report.append("Full report:\n");
}
@Override
void addLines() {
readLog();
for (String log : logs) {
report.append(log).append('\n');
}
}
}
|
[
"herasimau.jahor@gmail.com"
] |
herasimau.jahor@gmail.com
|
d5ca8690bfe3c21ffe8e9a1dfb016fca3c7a1e33
|
e24c6c940689c19fdcc2e39dd80a5061e0b0b326
|
/org.eclipse.emf.refactor.refactorings.uml24.henshin/src/org/eclipse/emf/refactor/refactorings/uml24/renameattribute/RefactoringGuiHandler.java
|
3fd3db2c37c1c2486081a4d1f45e16844cab399f
|
[] |
no_license
|
ambrusthomas/MeDeR.refactor.examples
|
63cf443045be9907d237d543db3df93e93175752
|
66a35d6f9b2924f7c1172c0fff857badd0e41b8e
|
refs/heads/master
| 2021-01-22T19:09:18.404936
| 2017-03-29T16:24:23
| 2017-03-29T16:24:23
| 85,169,831
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,051
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id: RefactoringGuiHandlerHenshin.javajet,v 1.2 2012/11/26 15:39:38 tarendt Exp $
*/
package org.eclipse.emf.refactor.refactorings.uml24.renameattribute;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.refactor.refactoring.core.Refactoring;
import org.eclipse.emf.refactor.refactoring.interfaces.IGuiHandler;
import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
/**
* Class used for specifying gui topics of a specific model refactoring.
* @generated
*/
public class RefactoringGuiHandler implements IGuiHandler {
/**
* Refactoring supported by the GuiHandler.
* @generated
*/
private Refactoring parent;
/**
* @see org.eclipse.emf.refactor.refactoring.interfaces.IGuiHandler#getParent()
* @generated
*/
@Override
public Refactoring getParent() {
return parent;
}
/**
* @see org.eclipse.emf.refactor.refactoring.interfaces.IGuiHandler#
* setParent(org.eclipse.emf.refactor.refactoring.core.Refactoring)
* @generated
*/
@Override
public void setParent(Refactoring refactoring) {
this.parent = refactoring;
}
/**
* @see org.eclipse.emf.refactor.refactoring.interfaces.IGuiHandler#show()
* @generated
*/
@Override
public RefactoringWizard show() {
return new org.eclipse.emf.refactor.refactorings.uml24.renameattribute.RefactoringWizard
((RefactoringController) this.parent.getController());
}
/**
* @see org.eclipse.emf.refactor.refactoring.interfaces.IGuiHandler#
* showInMenu(java.util.List)
* @generated
*/
@Override
public boolean showInMenu(List<EObject> selection) {
if (selection.size() > 2) return false;
EObject o = selection.get(0);
if(null != o){
if (o instanceof org.eclipse.uml2.uml.Property) {
if (selection.size() == 2) {
EObject eo = selection.get(1);
if (eo.eClass().getName().equals("Diagram")) return true;
} else {
return true;
}
}
}
return false;
}
}
|
[
"tarendt"
] |
tarendt
|
4d8654c9106181a40726adc0750e1c1e9d1c08a6
|
08192e0e593398f42abaf5dc8f51d7726d830839
|
/cqzqjg-services/src/main/java/cn/roilat/cqzqjg/services/system/sevice/impl/SysMenuServiceImpl.java
|
f2dcc01576988da0cd509b58ca0e00e2077f08d7
|
[] |
no_license
|
roilat/zqjg
|
10ffb767ab8af298ca0fc08f2daac79c52aad31d
|
a4630b9b11fe533400a2d9eee0ed91f61604479a
|
refs/heads/master
| 2022-06-29T18:55:50.084405
| 2020-02-29T08:49:54
| 2020-02-29T08:49:54
| 229,590,120
| 0
| 1
| null | 2022-06-17T02:49:35
| 2019-12-22T15:36:55
|
Java
|
UTF-8
|
Java
| false
| false
| 3,229
|
java
|
package cn.roilat.cqzqjg.services.system.sevice.impl;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.roilat.cqzqjg.services.system.constants.SysConstants;
import cn.roilat.cqzqjg.services.system.dao.SysMenuMapper;
import cn.roilat.cqzqjg.services.system.model.SysMenu;
import cn.roilat.cqzqjg.services.system.sevice.SysMenuService;
import cn.roilat.cqzqjg.core.page.MybatisPageHelper;
import cn.roilat.cqzqjg.core.page.PageRequest;
import cn.roilat.cqzqjg.core.page.PageResult;
@Service
public class SysMenuServiceImpl implements SysMenuService {
@Autowired
private SysMenuMapper sysMenuMapper;
@Override
public int save(SysMenu record) {
if(record.getId() == null || record.getId() == 0) {
return sysMenuMapper.insertSelective(record);
}
if(record.getParentId() == null) {
record.setParentId(0L);
}
return sysMenuMapper.updateByPrimaryKeySelective(record);
}
@Override
public int delete(SysMenu record) {
return sysMenuMapper.deleteByPrimaryKey(record.getId());
}
@Override
public int delete(List<SysMenu> records) {
for(SysMenu record:records) {
delete(record);
}
return 1;
}
@Override
public SysMenu findById(Long id) {
return sysMenuMapper.selectByPrimaryKey(id);
}
@Override
public PageResult findPage(PageRequest pageRequest) {
return MybatisPageHelper.findPage(pageRequest, sysMenuMapper);
}
@Override
public List<SysMenu> findTree(String userName, int menuType) {
List<SysMenu> sysMenus = new ArrayList<>();
List<SysMenu> menus = findByUser(userName);
for (SysMenu menu : menus) {
if (menu.getParentId() == null || menu.getParentId() == 0) {
menu.setLevel(0);
if(!exists(sysMenus, menu)) {
sysMenus.add(menu);
}
}
}
sysMenus.sort((o1, o2) -> o1.getOrderNum().compareTo(o2.getOrderNum()));
findChildren(sysMenus, menus, menuType);
return sysMenus;
}
@Override
public List<SysMenu> findByUser(String userName) {
if(userName == null || "".equals(userName) || SysConstants.ADMIN.equalsIgnoreCase(userName)) {
return sysMenuMapper.findAll();
}
return sysMenuMapper.findByUserName(userName);
}
private void findChildren(List<SysMenu> SysMenus, List<SysMenu> menus, int menuType) {
for (SysMenu SysMenu : SysMenus) {
List<SysMenu> children = new ArrayList<>();
for (SysMenu menu : menus) {
if(menuType == 1 && menu.getType() == 2) {
// 如果是获取类型不需要按钮,且菜单类型是按钮的,直接过滤掉
continue ;
}
if (SysMenu.getId() != null && SysMenu.getId().equals(menu.getParentId())) {
menu.setParentName(SysMenu.getName());
menu.setLevel(SysMenu.getLevel() + 1);
if(!exists(children, menu)) {
children.add(menu);
}
}
}
SysMenu.setChildren(children);
children.sort((o1, o2) -> o1.getOrderNum().compareTo(o2.getOrderNum()));
findChildren(children, menus, menuType);
}
}
private boolean exists(List<SysMenu> sysMenus, SysMenu sysMenu) {
boolean exist = false;
for(SysMenu menu:sysMenus) {
if(menu.getId().equals(sysMenu.getId())) {
exist = true;
}
}
return exist;
}
}
|
[
"123456"
] |
123456
|
bd43fef75eaa09f9573b9fb966880b4ff7cac3d2
|
4e647c158096ca953086856f6d0fc4346566503c
|
/module/lang/src/main/java/net/fluance/commons/lang/FluancePrintingMap.java
|
2255c5acd9414893a85a618e36776e8265024af6
|
[] |
no_license
|
Fluance/fec-mw-common-libraries
|
c192b33875e2b930d7c04c324236db93dcaf6644
|
4d3b4b9244f2c7182ac051eb58c271f8d274b60a
|
refs/heads/master
| 2022-11-18T21:23:26.302125
| 2021-03-17T15:14:08
| 2021-03-17T15:14:08
| 245,970,279
| 0
| 0
| null | 2022-11-16T09:29:16
| 2020-03-09T07:30:51
|
Java
|
UTF-8
|
Java
| false
| false
| 1,142
|
java
|
package net.fluance.commons.lang;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
public class FluancePrintingMap<K, V> {
private Map<K, V> map;
public FluancePrintingMap(Map<K, V> map) {
this.map = map;
}
/**
* Returns a string representation of the Map
*/
@Override
public String toString() {
StringBuilder stringBuilder = new StringBuilder();
Iterator<Entry<K, V>> iterator = map.entrySet().iterator();
while (iterator.hasNext()) {
Entry<K, V> entry = iterator.next();
stringBuilder.append(entry.getKey());
stringBuilder.append('=');
if(entry.getValue() instanceof String[]){
String[] values = (String[]) entry.getValue();
stringBuilder.append("[");
for(int i=0; i<values.length; i++){
stringBuilder.append(values[i]);
if (i<values.length-1){
stringBuilder.append(',');
}
}
stringBuilder.append("]");
} else {
stringBuilder.append(entry.getValue());
}
if (iterator.hasNext()) {
stringBuilder.append(',').append(' ');
}
}
return stringBuilder.toString();
}
public Map<K, V> getMap(){
return this.map;
}
}
|
[
"zroncevic@flunace.ch"
] |
zroncevic@flunace.ch
|
9f9d8b962a59858c66beaa75e3754a74382e88d9
|
d5e36650e5c9dbd43e356dd3a52f410068389b4c
|
/src/main/java/org/cyberpwn/factionsplus/FA.java
|
33ced29b02f8650607a402a770c521c55006eb22
|
[] |
no_license
|
cyberpwnn/FactionsPlus
|
29cf680796a8a41267e2c1685b98525b3f08c13c
|
92ec4c974f5834227c523bda2ac7d5bb5dde684f
|
refs/heads/master
| 2021-01-19T10:54:54.979693
| 2016-11-23T09:15:36
| 2016-11-23T09:15:36
| 70,333,398
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,670
|
java
|
package org.cyberpwn.factionsplus;
import java.util.HashSet;
import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.phantomapi.lang.GList;
import org.phantomapi.world.W;
import com.massivecraft.factions.Board;
import com.massivecraft.factions.FLocation;
import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.FPlayers;
import com.massivecraft.factions.Faction;
import com.massivecraft.factions.struct.Role;
public class FA
{
public static boolean isClaimed(Faction f)
{
return !f.isWilderness() && !f.isSafeZone() && !f.isWarZone();
}
public static boolean isWild(Faction f)
{
return f.isWilderness();
}
public static boolean isClaimed(Location l)
{
return isClaimed(getFaction(l));
}
public static boolean isClaimed(Chunk c)
{
return isClaimed(getFaction(c));
}
public static Faction getFaction(Player p)
{
return getFPlayer(p).getFaction();
}
public static FPlayer getFPlayer(Player p)
{
return FPlayers.getInstance().getByPlayer(p);
}
public static Faction getFaction(Location l)
{
return Board.getInstance().getFactionAt(new FLocation(l));
}
public static Faction getFaction(Chunk c)
{
return getFaction(c.getBlock(0, 0, 0).getLocation());
}
public static Chunk getChunk(FLocation fchunk)
{
return fchunk.getWorld().getChunkAt((int) fchunk.getX(), (int) fchunk.getZ());
}
public static FLocation getFLocation(Chunk c)
{
return new FLocation(c.getWorld().getName(), c.getX(), c.getZ());
}
public static GList<Chunk> getClaims(Player p)
{
return getClaims(getFaction(p));
}
public static boolean isOwnFaction(Player p, Chunk c)
{
return isClaimed(c) && getFaction(c).equals(getFaction(p));
}
public static boolean isOwner(Player p, Faction f)
{
return f.getFPlayerAdmin().getName().equals(p.getName());
}
public static boolean isOwner(Player p)
{
return isOwner(p, getFaction(p));
}
public static boolean isModerator(Player p)
{
return getFPlayer(p).getRole().equals(Role.MODERATOR);
}
public static boolean isAdmin(Player p)
{
return getFPlayer(p).getRole().equals(Role.ADMIN);
}
public static boolean isStaffed(Player p)
{
return isAdmin(p) || isModerator(p);
}
public static boolean isWithFaction(Player p, Faction f)
{
return getPlayers(f).contains(p);
}
public static GList<Chunk> getClaims(Faction f)
{
GList<Chunk> cx = new GList<Chunk>();
for(FLocation i : f.getAllClaims())
{
cx.add(getChunk(i));
}
return cx;
}
public static GList<Chunk> getClaims(Faction f, Location c, int rad)
{
GList<Chunk> cx = getClaims(f);
GList<Chunk> cs = W.chunkRadius(c.getChunk(), rad);
for(Chunk i : cx.copy())
{
if(!cs.contains(i))
{
cx.remove(i);
}
}
return cx;
}
public static GList<Player> getPlayers(Faction f)
{
GList<Player> p = new GList<Player>();
for(FPlayer i : f.getFPlayers())
{
if(i.isOnline())
{
p.add(i.getPlayer());
}
}
return p;
}
public static void addOwnership(Player p, Chunk c)
{
if(isOwnFaction(p, c))
{
FLocation l = getFLocation(c);
Faction f = getFaction(p);
if(!f.getClaimOwnership().containsKey(l))
{
f.getClaimOwnership().put(l, new HashSet<String>());
}
f.getClaimOwnership().get(l).add(p.getUniqueId().toString());
}
}
public static void removeOwnership(Player p, Chunk c)
{
if(isOwnFaction(p, c))
{
FLocation l = getFLocation(c);
Faction f = getFaction(p);
if(!f.getClaimOwnership().containsKey(l))
{
return;
}
f.getClaimOwnership().get(l).remove(p.getUniqueId().toString());
}
}
}
|
[
"danielmillst@gmail.com"
] |
danielmillst@gmail.com
|
927e9f55d80ab3041ef9ba59d6b76e00a49dd3b3
|
02507a5e6c42af839370c63870be8ada9599a941
|
/skin/src/main/java/com/easy/skin/SkinFactory.java
|
e34169067dfc3a56e67c7c01782dbf427a30406c
|
[] |
no_license
|
EasyDevWork/EasyAndroid2
|
42128245c2a1c3f4e483f8e83e101e7dd2130c20
|
8e70ef7389805f7504525a23aadcb8fda020aee3
|
refs/heads/master
| 2021-04-04T16:45:36.535233
| 2021-02-26T02:51:02
| 2021-02-26T02:51:02
| 248,472,146
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,027
|
java
|
package com.easy.skin;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.reflect.Constructor;
import java.util.HashMap;
import java.util.Observable;
import java.util.Observer;
public class SkinFactory implements LayoutInflater.Factory2, Observer {
/**
* 属性处理类
*/
private SkinAttribute mSkinAttribute;
AppCompatViewInflater2 inflater2;
/**
* 保存view的构造方法
*/
private static final HashMap<String, Constructor<? extends View>> sConstructorMap = new HashMap<>();
private static final Class<?>[] mConstructorSignature = new Class[]{Context.class, AttributeSet.class};
public final String[] a = new String[]{
"android.widget.",
"android.view.",
"android.webkit."
};
public SkinFactory() {
mSkinAttribute = new SkinAttribute();
inflater2 = new AppCompatViewInflater2();
}
/**
* AppCompatViewInflater
*
* @param parent
* @param name
* @param context
* @param attributeSet
* @return
*/
@Nullable
@Override
public View onCreateView(@Nullable View parent, @NonNull String name, @NonNull Context context, @NonNull AttributeSet attributeSet) {
View view = inflater2.createView(parent, name, context, attributeSet, false, false, true, false);
if (view != null) {
mSkinAttribute.loadView(view, attributeSet);
}
return view;
}
@Override
public void update(Observable observable, Object o) {
//接受到换肤请求
mSkinAttribute.applySkin();
}
public SkinAttribute getSkinAttribute() {
return mSkinAttribute;
}
@Nullable
@Override
public View onCreateView(@NonNull String s, @NonNull Context context, @NonNull AttributeSet attributeSet) {
return null;
}
}
|
[
"caishuxing@linggan.com"
] |
caishuxing@linggan.com
|
8da5abe192ba787b3f7452c584e71a74bcd965e9
|
cd1f70fcb84e82667f4969093feed9138a94499a
|
/java8-streams/map/jbr/java8/streams/map/StreamsMapMapExample.java
|
74961d08c46c33c5f04eb3b45158971169a9ad19
|
[] |
no_license
|
javabyranjith/java8
|
e866d743b9f9acb6c59bfd45c08fcddbd2280b44
|
01bc66f40629714bff12c81c252cc52f77d2884e
|
refs/heads/master
| 2021-06-18T17:59:17.539222
| 2020-02-20T17:34:28
| 2020-02-20T17:34:28
| 89,729,670
| 1
| 3
| null | 2020-10-13T02:44:44
| 2017-04-28T17:33:44
|
Java
|
UTF-8
|
Java
| false
| false
| 1,544
|
java
|
package jbr.java8.streams.map;
import java.util.HashMap;
import java.util.Map;
public class StreamsMapMapExample {
public static void main(String[] args) {
Map<String, Object> input = new HashMap<>();
input.put("A", "Anbu");
input.put("C", "Chandru");
input.put("B", "Bala");
Map<String, String> innerMap = new HashMap<>();
innerMap.put("E", "Edward");
innerMap.put("D", "Dinesh");
input.put("G", innerMap);
// print the map
System.out.println("===Original Map");
for (Map.Entry<String, Object> map : input.entrySet()) {
System.out.println("Key: " + map.getKey() + ", Value: " + map.getValue());
}
System.out.println("\n===Print Map Keys");
input.entrySet()
.stream()
.map(p -> p.getKey())
.forEach(System.out::println);
System.out.println("\n===Print Map Values");
input.entrySet()
.stream()
.map(p -> p.getValue())
.forEach(System.out::println);
System.out.println("\n===Print Inner Map Keys");
input.entrySet()
.stream()
.filter(v -> v.getKey()
.equals("G"))
// .flatMap(a -> a.) TODO
.forEach(System.out::println);
System.out.println("\n===Print Inner Map Values");
input.entrySet()
.stream()
.filter(v -> v.getKey()
.equals("G"))
.flatMap(a -> ((Map<String, String>) a.getValue()).values()
.stream())
.forEach(System.out::println);
}
}
|
[
"java2ranjith@gmail.com"
] |
java2ranjith@gmail.com
|
fdb421f65894d325d99b536769312e94e7600fbc
|
74f723bee36229fa9d447e63d99c70d2a62dc193
|
/roncoo-education-course/roncoo-education-course-common/src/main/java/com/roncoo/education/course/common/bean/qo/AdvQO.java
|
dcbf6da42b5ea7fcf58882664b4199b80ac1b1ee
|
[
"MIT"
] |
permissive
|
Arronzheng/roncoo-education
|
714568d864d5098052c44b34d9c4f730fc551af9
|
1afb481d4269597e1cebc339a8d257caaad9279a
|
refs/heads/master
| 2022-09-13T13:45:22.315597
| 2020-07-29T01:52:22
| 2020-07-29T01:52:22
| 220,367,025
| 1
| 0
|
MIT
| 2022-09-01T23:15:24
| 2019-11-08T02:05:26
|
Java
|
UTF-8
|
Java
| false
| false
| 1,207
|
java
|
package com.roncoo.education.course.common.bean.qo;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 广告信息
*/
@Data
@Accessors(chain = true)
public class AdvQO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当前页
*/
private int pageCurrent;
/**
* 每页记录数
*/
private int pageSize;
/**
* 主键
*/
private Long id;
/**
* 创建时间
*/
private Date gmtCreate;
/**
* 修改时间
*/
private Date gmtModified;
/**
* 状态(1:正常,0:禁用)
*/
private Integer statusId;
/**
* 排序
*/
private Integer sort;
/**
* 广告标题
*/
private String advTitle;
/**
* 广告图片
*/
private String advImg;
/**
* 广告链接
*/
private String advUrl;
/**
* 广告跳转方式
*/
private String advTarget;
/**
* 广告位置(1首页轮播)
*/
private Integer advLocation;
/**
* 开始时间
*/
private Date beginTime;
/**
* 结束时间
*/
private Date endTime;
/**
* 位置(0电脑端,1微信端)
*/
private Integer platShow;
private String beginTimeString;
private String endTimeString;
}
|
[
"1175674846@qq.com"
] |
1175674846@qq.com
|
501e7993a3c352cc6818b983c43c3edc232cf9d8
|
bead5c9388e0d70156a08dfe86d48f52cb245502
|
/MyNotes/thread/c3/c_3_1/c_3_1_3/a11/T1.java
|
370c2d65ca832b73bdd634ee5d9b31f260d9b75c
|
[] |
no_license
|
LinZiYU1996/Learning-Java
|
bd96e2af798c09bc52a56bf21e13f5763bb7a63d
|
a0d9f538c9d373c3a93ccd890006ce0e5e1f2d5d
|
refs/heads/master
| 2020-11-28T22:22:56.135760
| 2020-05-03T01:24:57
| 2020-05-03T01:24:57
| 229,930,586
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,059
|
java
|
package thread.c3.c_3_1.c_3_1_3.a11;
/**
* \* Created with IntelliJ IDEA.
* \* User: LinZiYu
* \* Date: 2020/1/18
* \* Time: 18:12
* \* Description:
* \
*/
public class T1 {
public static void main(String[] args) {
System.out.println("使用关键字静态synchronized");
SyncThread syncThread = new SyncThread();
Thread thread1 = new Thread(syncThread, "SyncThread1");
Thread thread2 = new Thread(syncThread, "SyncThread2");
thread1.start();
thread2.start();
}
}
class SyncThread implements Runnable {
private static int count;
public SyncThread() {
count = 0;
}
public synchronized static void method() {
for (int i = 0; i < 5; i ++) {
try {
System.out.println(Thread.currentThread().getName() + ":" + (count++));
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
public synchronized void run() {
method();
}
}
|
[
"2669093302@qq.com"
] |
2669093302@qq.com
|
b135bf45b706250a2a5e22793ec812ed41cfc84b
|
41bac86d728e5f900e3d60b5a384e7f00c966f5b
|
/communote/plugins/rest-api/3.0/implementation/src/main/java/com/communote/plugins/api/rest/v30/resource/lastmodificationdate/LastModificationDateResourceHandler.java
|
7dabbaee0079fe0fdc3653d2cde2116fc5163a95
|
[
"Apache-2.0"
] |
permissive
|
Communote/communote-server
|
f6698853aa382a53d43513ecc9f7f2c39f527724
|
e6a3541054baa7ad26a4eccbbdd7fb8937dead0c
|
refs/heads/master
| 2021-01-20T19:13:11.466831
| 2019-02-02T18:29:16
| 2019-02-02T18:29:16
| 61,822,650
| 27
| 4
|
Apache-2.0
| 2018-12-08T19:19:06
| 2016-06-23T17:06:40
|
Java
|
UTF-8
|
Java
| false
| false
| 3,308
|
java
|
package com.communote.plugins.api.rest.v30.resource.lastmodificationdate;
import java.util.List;
import javax.ws.rs.core.Request;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import com.communote.plugins.api.rest.v30.resource.DefaultParameter;
import com.communote.plugins.api.rest.v30.resource.DefaultResourceHandler;
import com.communote.plugins.api.rest.v30.resource.user.UserResource;
import com.communote.plugins.api.rest.v30.response.ResponseHelper;
import com.communote.plugins.api.rest.v30.service.IllegalRequestParameterException;
import com.communote.server.api.ServiceLocator;
import com.communote.server.api.core.security.AuthorizationException;
import com.communote.server.core.lastmodifieddate.LastModificationDateManagement;
/**
* Handler for {@link UserResource}
*
* @author Communote GmbH - <a href="http://www.communote.com/">http://www.communote.com/</a>
*/
public class LastModificationDateResourceHandler
extends
DefaultResourceHandler<DefaultParameter, DefaultParameter, DefaultParameter, DefaultParameter,
GetCollectionLastModificationDateParameter> {
private final LastModificationDateResourceFactory lastModificationDateResourceFactory = new LastModificationDateResourceFactory();
private final LastModificationDateManagement lastModificationDateManagement = ServiceLocator
.findService(LastModificationDateManagement.class);
private List<LastModificationDateResource> getAttachmentLastModificationDates()
throws AuthorizationException {
return lastModificationDateManagement
.getAttachmentCrawlLastModificationDates(lastModificationDateResourceFactory);
}
private List<LastModificationDateResource> getNoteLastModificationDates()
throws AuthorizationException {
return lastModificationDateManagement
.getNoteCrawlLastModificationDates(lastModificationDateResourceFactory);
}
private List<LastModificationDateResource> getTopicLastModificationDates()
throws AuthorizationException {
return lastModificationDateManagement
.getTopicCrawlLastModificationDates(lastModificationDateResourceFactory);
}
@Override
protected Response handleListInternally(
GetCollectionLastModificationDateParameter listParameter, String requestedMimeType,
UriInfo uriInfo, String requestSessionId, Request request) throws Exception {
List<LastModificationDateResource> dates;
if (listParameter.getType() == null) {
throw new IllegalRequestParameterException("type", "null", "Invalid value.");
}
switch (listParameter.getType()) {
case ATTACHMENT:
dates = getAttachmentLastModificationDates();
break;
case NOTE:
dates = getNoteLastModificationDates();
break;
case TOPIC:
dates = getTopicLastModificationDates();
break;
default:
throw new IllegalRequestParameterException("type", String.valueOf(listParameter
.getType()), "Unknown type.");
}
return ResponseHelper.buildSuccessResponse(dates, request);
}
}
|
[
"ronny.winkler@communote.com"
] |
ronny.winkler@communote.com
|
2cf538385a12f7ebc07783e290c195a091b227f5
|
09c12d179be0ddd27311820dcbc5dc0190b0e1b2
|
/jonix-common/src/main/java/com/tectonica/jonix/common/struct/JonixFundingIdentifier.java
|
49331c79b88fa8ce6a82746b2f37c07c68083c92
|
[
"Apache-2.0"
] |
permissive
|
zach-m/jonix
|
3a2053309d8df96f406b0eca93de6b25b4aa3e98
|
c7586ed7669ced7f26e937d98b4b437513ec1ea9
|
refs/heads/master
| 2023-08-23T19:42:15.570453
| 2023-07-31T19:02:35
| 2023-07-31T19:02:35
| 32,450,400
| 67
| 23
|
Apache-2.0
| 2023-06-01T03:43:12
| 2015-03-18T09:47:36
|
Java
|
UTF-8
|
Java
| false
| false
| 1,997
|
java
|
/*
* Copyright (C) 2012-2023 Zach Melamed
*
* Latest version available online at https://github.com/zach-m/jonix
* Contact me at zach@tectonica.co.il
*
* 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.tectonica.jonix.common.struct;
import com.tectonica.jonix.common.JonixKeyedStruct;
import com.tectonica.jonix.common.JonixStruct;
import com.tectonica.jonix.common.codelist.GrantIdentifierTypes;
import java.io.Serializable;
/*
* NOTE: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT MANUALLY
*/
/**
* This class is a {@link JonixStruct} that represents Onix3 <code><FundingIdentifier></code>.
* <p>
* It can be retrieved from the composite by invoking its <code>asStruct()</code> method.
*/
@SuppressWarnings("serial")
public class JonixFundingIdentifier implements JonixKeyedStruct<GrantIdentifierTypes>, Serializable {
public static final JonixFundingIdentifier EMPTY = new JonixFundingIdentifier();
/**
* the key of this struct (by which it can be looked up)
*/
public GrantIdentifierTypes fundingIDType;
/**
* Raw Format: Variable length text, suggested maximum 100 characters
* <p>
* (type: dt.NonEmptyString)
*/
public String idTypeName;
/**
* Raw Format: According to the identifier type specified in <SenderIDType>
* <p>
* (type: dt.NonEmptyString)
*/
public String idValue;
@Override
public GrantIdentifierTypes key() {
return fundingIDType;
}
}
|
[
"zach@tectonica.co.il"
] |
zach@tectonica.co.il
|
a4e2ff16881a880a0401435213454d7a06292882
|
c0d1f639768a0d6dcc607fe1d721bab44b2cdb2c
|
/windingapp/app/src/main/java/app/winding/com/windingapp/util/CProgressDialogUtils.java
|
fa967e1a01defe2c66d8aa8ee37a16a31a8f5f30
|
[] |
no_license
|
weijiaqi/-windingapp
|
87f2e9f834422271b4cc25214c6a5c0ad651dffd
|
45c22d29b75503e5d8c172faaff72f7e3a4b6532
|
refs/heads/master
| 2022-12-07T14:17:50.857021
| 2020-08-26T12:15:31
| 2020-08-26T12:15:31
| 290,486,308
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,155
|
java
|
package app.winding.com.windingapp.util;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.DialogInterface;
/**
* Created by Vector on 2016/8/12 0012.
*/
public class CProgressDialogUtils {
private static final String TAG = CProgressDialogUtils.class.getSimpleName();
private static ProgressDialog sCircleProgressDialog;
private CProgressDialogUtils() {
throw new UnsupportedOperationException("cannot be instantiated");
}
public static void showProgressDialog(Activity activity) {
showProgressDialog(activity, "加载中", false, null);
}
public static void showProgressDialog(Activity activity, DialogInterface.OnCancelListener listener) {
showProgressDialog(activity, "加载中", true, listener);
}
public static void showProgressDialog(Activity activity, String msg) {
showProgressDialog(activity, msg, false, null);
}
public static void showProgressDialog(Activity activity, String msg, DialogInterface.OnCancelListener listener) {
showProgressDialog(activity, msg, true, listener);
}
public static void showProgressDialog(final Activity activity, String msg, boolean cancelable, DialogInterface.OnCancelListener listener) {
if (activity == null || activity.isFinishing()) {
return;
}
if (sCircleProgressDialog == null) {
sCircleProgressDialog = new ProgressDialog(activity);
sCircleProgressDialog.setMessage(msg);
sCircleProgressDialog.setOwnerActivity(activity);
sCircleProgressDialog.setOnCancelListener(listener);
sCircleProgressDialog.setCancelable(cancelable);
} else {
if (activity.equals(sCircleProgressDialog.getOwnerActivity())) {
sCircleProgressDialog.setMessage(msg);
sCircleProgressDialog.setCancelable(cancelable);
sCircleProgressDialog.setOnCancelListener(listener);
} else {
//不相等,所以取消任何ProgressDialog
cancelProgressDialog();
sCircleProgressDialog = new ProgressDialog(activity);
sCircleProgressDialog.setMessage(msg);
sCircleProgressDialog.setCancelable(cancelable);
sCircleProgressDialog.setOwnerActivity(activity);
sCircleProgressDialog.setOnCancelListener(listener);
}
}
if (!sCircleProgressDialog.isShowing()) {
sCircleProgressDialog.show();
}
}
public static void cancelProgressDialog(Activity activity) {
if (sCircleProgressDialog != null && sCircleProgressDialog.isShowing()) {
if (sCircleProgressDialog.getOwnerActivity() == activity) {
sCircleProgressDialog.cancel();
sCircleProgressDialog = null;
}
}
}
public static void cancelProgressDialog() {
if (sCircleProgressDialog != null && sCircleProgressDialog.isShowing()) {
sCircleProgressDialog.cancel();
sCircleProgressDialog = null;
}
}
}
|
[
"84362113@qq.com"
] |
84362113@qq.com
|
78bdf8af3e94fb06b8995873a912f3ee003da1d4
|
482fe32082940c1c2b6b78fedfcf967022564c6e
|
/Object_Oriented_Software_Construction/Assignment3/report/answers/a3_q1_samples/a.java
|
323b4f2f785fee96129f6fa0972cf43a00c010cd
|
[] |
no_license
|
ulfet/RWTH-Informatik
|
9f33b3b8afca8d738119c25a6341b4707f3d8b32
|
38ae6779f97287b838d20caac1706ac3a1e8a183
|
refs/heads/main
| 2023-02-11T14:05:18.356824
| 2021-01-16T17:55:26
| 2021-01-16T17:55:26
| 330,211,701
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 170
|
java
|
public class Singleton<T> {
public T getInstance() {
if (instance == null)
instance = new Singleton<T>();
return instance;
}
private T instance = null;
}
|
[
"ulfet.rwth@gmail.com"
] |
ulfet.rwth@gmail.com
|
d1c35d9c9cacd611daec8c12989babc65178c263
|
ac97058c3a9dceab0e2173aafa6ce0caa69d1c07
|
/javaSE/src/main/java/com.silinx/source/effectivejava/chapter2/item9/trywithresources/TopLine.java
|
b5c307043388a1fb5c616cfaf851a9ff38dd51b7
|
[
"Apache-2.0"
] |
permissive
|
Swagger-Ranger/JavaSrc
|
069d9ff800813df9b1000c2181027b956f6afd7c
|
4ea91254e4910f67e322a941c81939196b0ea106
|
refs/heads/master
| 2023-05-26T18:30:08.714889
| 2022-04-23T15:14:41
| 2022-04-23T15:14:41
| 252,048,639
| 1
| 1
|
Apache-2.0
| 2023-05-17T17:02:27
| 2020-04-01T02:14:31
|
Java
|
UTF-8
|
Java
| false
| false
| 628
|
java
|
package com.silinx.source.effectivejava.chapter2.item9.trywithresources;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public class TopLine {
// try-with-resources - the the best way to close resources! (Page 35)
static String firstLineOfFile(String path) throws IOException {
try (BufferedReader br = new BufferedReader(
new FileReader(path))) {
return br.readLine();
}
}
public static void main(String[] args) throws IOException {
String path = args[0];
System.out.println(firstLineOfFile(path));
}
}
|
[
"liufei32@outlook.com"
] |
liufei32@outlook.com
|
d4f13f3ad1049b9c38de99f11c17aa73c302050b
|
f841dc4362e616ab60cc8e6ba550f05fe5529ddd
|
/src/main/java/com/terraforged/api/material/state/States.java
|
623c01e00b6a3ffd5a7f93b8ca3dc5c48a91f9eb
|
[
"MIT"
] |
permissive
|
Sejjaa290/TerraForged
|
c3ff03bb781d557de056e4bf56123437ac6c7a4c
|
cf722a369253657664ef2689a33d92a49e6fa0b8
|
refs/heads/0.1.x
| 2023-02-17T11:52:24.047668
| 2020-12-18T10:46:15
| 2020-12-18T10:46:15
| 331,132,429
| 0
| 0
|
MIT
| 2021-01-19T23:00:30
| 2021-01-19T23:00:29
| null |
UTF-8
|
Java
| false
| false
| 2,734
|
java
|
/*
*
* MIT License
*
* Copyright (c) 2020 TerraForged
*
* 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 com.terraforged.api.material.state;
public class States {
public static final StateSupplier BEDROCK = DefaultState.of("minecraft:bedrock").cache();
public static final StateSupplier COARSE_DIRT = DefaultState.of("minecraft:coarse_dirt").cache();
public static final StateSupplier DIRT = DefaultState.of("minecraft:dirt").cache();
public static final StateSupplier GRASS_BLOCK = DefaultState.of("minecraft:grass_block").cache();
public static final StateSupplier PODZOL = DefaultState.of("minecraft:podzol").cache();
public static final StateSupplier CLAY = DefaultState.of("minecraft:clay").cache();
public static final StateSupplier GRAVEL = DefaultState.of("minecraft:gravel").cache();
public static final StateSupplier LAVA = DefaultState.of("minecraft:lava").cache();
public static final StateSupplier PACKED_ICE = DefaultState.of("minecraft:packed_ice").cache();
public static final StateSupplier SAND = DefaultState.of("minecraft:sand").cache();
public static final StateSupplier SMOOTH_SANDSTONE = DefaultState.of("minecraft:smooth_sandstone").cache();
public static final StateSupplier SMOOTH_RED_SANDSTONE = DefaultState.of("minecraft:smooth_red_sandstone").cache();
public static final StateSupplier SNOW_BLOCK = DefaultState.of("minecraft:snow_block").cache();
public static final StateSupplier STONE = DefaultState.of("minecraft:stone").cache();
public static final StateSupplier WATER = DefaultState.of("minecraft:water").cache();
public static void invalidate() {
CachedState.clearAll();
}
}
|
[
"dags@dags.me"
] |
dags@dags.me
|
93a5e1fc6d24047f81665c28c145f8ac5956e256
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-new-fitness/results/TIME-7b-3-1-Single_Objective_GGA-WeightedSum-BasicBlockCoverage/org/joda/time/format/DateTimeParserBucket$SavedField_ESTest.java
|
9d1977ec27a535e8f0dc63bde90eb0c1564a68ec
|
[
"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
| 1,428
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri May 15 12:20:30 UTC 2020
*/
package org.joda.time.format;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.joda.time.DateTimeField;
import org.joda.time.chrono.BuddhistChronology;
import org.joda.time.field.DelegatedDateTimeField;
import org.joda.time.format.DateTimeParserBucket;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DateTimeParserBucket$SavedField_ESTest extends DateTimeParserBucket$SavedField_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstance();
buddhistChronology0.getZone();
BuddhistChronology buddhistChronology1 = BuddhistChronology.getInstance();
DateTimeField dateTimeField0 = buddhistChronology1.dayOfMonth();
DelegatedDateTimeField delegatedDateTimeField0 = new DelegatedDateTimeField(dateTimeField0);
DateTimeParserBucket.SavedField dateTimeParserBucket_SavedField0 = new DateTimeParserBucket.SavedField(dateTimeField0, 4152);
boolean boolean0 = true;
// Undeclared exception!
dateTimeParserBucket_SavedField0.set((-1765L), true);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
d243ac7ada08f4da49b5c278a8995934d5c02307
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/29/org/apache/commons/math3/geometry/partitioning/utilities/AVLTree_insert_61.java
|
4536b1890f1f14c25272759dc6c3f17c6e251542
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,246
|
java
|
org apach common math3 geometri partit util
avl tree
purpos sort element allow
duplic element code equal
code sort set sortedset
specif need null element allow
code equal method suffici
differenti element link delet delet method
implement equal oper
order mark method provid
semant
code sort set sortedset name
code add replac link insert insert
code remov replac link delet
delet
base implement georg kraml put
domain
href www purist org georg avltre index html page
exist
param type element
version
avl tree avltre compar
insert element tree
param element element insert silent
insert element
element
top
top node element
top insert element
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
d4858e296f14fa46fb0dd0e99bdb8d2101f059d8
|
c45813bc216e4646caa5d654e7a6dd3cf0cdaeb7
|
/engine/src/main/java/com/kinglloy/album/engine/video/VideoWallpaper.java
|
b69054b3c9a4e56dbc1d58a8a9c67cd4aab74ea8
|
[] |
no_license
|
paijwar/LWA
|
732f5d0e44b3316bd538c0442cd4440fc12fd215
|
550ec5b6389ffee4a4b8e621970d7ebe4db89dc7
|
refs/heads/master
| 2022-03-24T04:57:39.346402
| 2019-09-30T07:40:54
| 2019-09-30T07:40:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 930
|
java
|
package com.kinglloy.album.engine.video;
import android.content.Context;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import com.badlogic.gdx.backends.android.AndroidLiveWallpaperService;
import com.yalin.style.engine.GDXWallpaperServiceProxy;
import org.jetbrains.annotations.NotNull;
/**
* @author jinyalin
* @since 2017/11/8.
*/
public class VideoWallpaper extends GDXWallpaperServiceProxy {
private String filePath;
public VideoWallpaper(@NotNull Context host, String filePath) {
super(host);
this.filePath = filePath;
}
@Override
public void onCreateApplication() {
super.onCreateApplication();
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
config.useGLSurfaceView20API18 = true;
config.useAccelerometer = false;
initialize(new VideoRenderer(this, filePath), config);
}
}
|
[
"jinyalin@baidu.com"
] |
jinyalin@baidu.com
|
9818c3778256cfba7c549169a9527dfccddaaab3
|
5ec06dab1409d790496ce082dacb321392b32fe9
|
/clients/java-undertow-server/generated/src/main/java/org/openapitools/model/ComDayCqReplicationImplContentDurboBinaryLessContentBuilderInfo.java
|
a67975fdf4c5fe85d0e63f58d13962d258d073b2
|
[
"Apache-2.0"
] |
permissive
|
shinesolutions/swagger-aem-osgi
|
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
|
c2f6e076971d2592c1cbd3f70695c679e807396b
|
refs/heads/master
| 2022-10-29T13:07:40.422092
| 2021-04-09T07:46:03
| 2021-04-09T07:46:03
| 190,217,155
| 3
| 3
|
Apache-2.0
| 2022-10-05T03:26:20
| 2019-06-04T14:23:28
| null |
UTF-8
|
Java
| false
| false
| 4,160
|
java
|
package org.openapitools.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.ComDayCqReplicationImplContentDurboBinaryLessContentBuilderProperties;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaUndertowServerCodegen", date = "2019-08-05T00:56:20.785Z[GMT]")
public class ComDayCqReplicationImplContentDurboBinaryLessContentBuilderInfo {
private String pid = null;
private String title = null;
private String description = null;
private ComDayCqReplicationImplContentDurboBinaryLessContentBuilderProperties properties = null;
/**
**/
public ComDayCqReplicationImplContentDurboBinaryLessContentBuilderInfo pid(String pid) {
this.pid = pid;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("pid")
public String getPid() {
return pid;
}
public void setPid(String pid) {
this.pid = pid;
}
/**
**/
public ComDayCqReplicationImplContentDurboBinaryLessContentBuilderInfo title(String title) {
this.title = title;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("title")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
/**
**/
public ComDayCqReplicationImplContentDurboBinaryLessContentBuilderInfo description(String description) {
this.description = description;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("description")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
/**
**/
public ComDayCqReplicationImplContentDurboBinaryLessContentBuilderInfo properties(ComDayCqReplicationImplContentDurboBinaryLessContentBuilderProperties properties) {
this.properties = properties;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("properties")
public ComDayCqReplicationImplContentDurboBinaryLessContentBuilderProperties getProperties() {
return properties;
}
public void setProperties(ComDayCqReplicationImplContentDurboBinaryLessContentBuilderProperties properties) {
this.properties = properties;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ComDayCqReplicationImplContentDurboBinaryLessContentBuilderInfo comDayCqReplicationImplContentDurboBinaryLessContentBuilderInfo = (ComDayCqReplicationImplContentDurboBinaryLessContentBuilderInfo) o;
return Objects.equals(pid, comDayCqReplicationImplContentDurboBinaryLessContentBuilderInfo.pid) &&
Objects.equals(title, comDayCqReplicationImplContentDurboBinaryLessContentBuilderInfo.title) &&
Objects.equals(description, comDayCqReplicationImplContentDurboBinaryLessContentBuilderInfo.description) &&
Objects.equals(properties, comDayCqReplicationImplContentDurboBinaryLessContentBuilderInfo.properties);
}
@Override
public int hashCode() {
return Objects.hash(pid, title, description, properties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ComDayCqReplicationImplContentDurboBinaryLessContentBuilderInfo {\n");
sb.append(" pid: ").append(toIndentedString(pid)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"cliffano@gmail.com"
] |
cliffano@gmail.com
|
8d903c925c9b40d34e319958a6d4eb7f48fe5cb3
|
682bfd40c3cc651a6196e8e368696e930370a618
|
/kartoteks-service/src/main/java/ekol/kartoteks/domain/dto/CustomerServiceRepAuthorizedCompany.java
|
423bb791360c307384c1f57992d4f0dd8f3e47f3
|
[] |
no_license
|
seerdaryilmazz/OOB
|
3b27b67ce1cbf3f411f7c672d0bed0d71bc9b127
|
199f0c18b82d04569d26a08a1a4cd8ee8c7ba42d
|
refs/heads/master
| 2022-12-30T09:23:25.061974
| 2020-10-09T13:14:39
| 2020-10-09T13:14:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,480
|
java
|
package ekol.kartoteks.domain.dto;
import ekol.hibernate5.domain.embeddable.DateWindow;
import ekol.kartoteks.domain.Company;
import ekol.kartoteks.domain.CompanyEmployeeRelation;
/**
* Created by kilimci on 23/09/16.
*/
public class CustomerServiceRepAuthorizedCompany {
private Long relationId;
private Company company;
private DateWindow validDates;
public static CustomerServiceRepAuthorizedCompany withCompanyEmployeeRelation(CompanyEmployeeRelation relation){
CustomerServiceRepAuthorizedCompany authorizedCompany = new CustomerServiceRepAuthorizedCompany();
authorizedCompany.setCompany(relation.getCompanyRole().getCompany());
authorizedCompany.setRelationId(relation.getId());
DateWindow validDates = relation.getValidDates();
if(validDates == null){
validDates = relation.getCompanyRole().getDateRange();
}
authorizedCompany.setValidDates(validDates);
return authorizedCompany;
}
public Long getRelationId() {
return relationId;
}
public void setRelationId(Long relationId) {
this.relationId = relationId;
}
public Company getCompany() {
return company;
}
public void setCompany(Company company) {
this.company = company;
}
public DateWindow getValidDates() {
return validDates;
}
public void setValidDates(DateWindow validDates) {
this.validDates = validDates;
}
}
|
[
"dogukan.sahinturk@ekol.com"
] |
dogukan.sahinturk@ekol.com
|
c33dabf75eed3cd8315f3ffea434d3c6f18fd649
|
6cc2595fb4fce1646d623a702ff37a20598da7a4
|
/schema/ab-products/solutions/common/src/test/org/springframework/security/providers/ldap/ad/AllTestsRealServer.java
|
7268ce2c294b300a2612203386414f4f7b50b70f
|
[] |
no_license
|
ShyLee/gcu
|
31581b4ff583c04edc64ed78132c0505b4820b89
|
21a3f9a0fc6e4902ea835707a1ec01823901bfc3
|
refs/heads/master
| 2020-03-13T11:43:41.450995
| 2018-04-27T04:51:27
| 2018-04-27T04:51:27
| 131,106,455
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 702
|
java
|
package org.springframework.security.providers.ldap.ad;
import junit.framework.*;
/**
*
* <p>
* Uses real LDAP/ActiveDirectory server. {See AbstractLdapIntegrationTests}
*
* @author Valery Tydykov
*
*/
public class AllTestsRealServer extends TestCase {
public AllTestsRealServer(String s) {
super(s);
}
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(org.springframework.security.providers.ldap.ad.populator.AllTestsRealServer
.suite());
suite
.addTest(org.springframework.security.providers.ldap.ad.authenticator.AllTestsRealServer
.suite());
return suite;
}
}
|
[
"lixinwo@vip.qq.com"
] |
lixinwo@vip.qq.com
|
10c0b1b54113aac5ce2515c2713f80e83fa39e33
|
da181f89e0b26ffb3fc5f9670a3a5f8f1ccf0884
|
/CoreGestionTextilLevel/src/ar/com/textillevel/modulos/personal/entidades/contratos/Contrato.java
|
0916688a82fee4c7f4f81c4eaffb511f35d6cad7
|
[] |
no_license
|
nacho270/GTL
|
a1b14b5c95f14ee758e6b458de28eae3890c60e1
|
7909ed10fb14e24b1536e433546399afb9891467
|
refs/heads/master
| 2021-01-23T15:04:13.971161
| 2020-09-18T00:58:24
| 2020-09-18T00:58:24
| 34,962,369
| 2
| 1
| null | 2016-08-22T22:12:57
| 2015-05-02T20:31:49
|
Java
|
UTF-8
|
Java
| false
| false
| 2,358
|
java
|
package ar.com.textillevel.modulos.personal.entidades.contratos;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import javax.persistence.Transient;
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "TIPO", discriminatorType = DiscriminatorType.STRING)
@Table(name = "T_PERS_CONTRATO")
public abstract class Contrato implements Serializable {
private static final long serialVersionUID = -5568165283881971480L;
private Integer id;
private String pathArchivoContrato;
private Integer idTipoContrato;
@Id
@Column(name="P_ID")
@GeneratedValue(strategy=GenerationType.AUTO)
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Transient
public ETipoContrato getTipoContrato() {
return ETipoContrato.getById(getIdTipoContrato());
}
@Override
@Transient
public String toString(){
return getTipoContrato().getDescripcion();
}
@Column(name="A_PATH_ARCHIVO",nullable=true)
public String getPathArchivoContrato() {
return pathArchivoContrato;
}
public void setPathArchivoContrato(String pathArchivoContrato) {
this.pathArchivoContrato = pathArchivoContrato;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Contrato other = (Contrato) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
@Column(name="A_ID_TIPO_CONTRATO",nullable=false)
protected Integer getIdTipoContrato() {
return idTipoContrato;
}
protected void setIdTipoContrato(Integer idTipoContrato) {
this.idTipoContrato = idTipoContrato;
}
}
|
[
"ignaciocicero@gmail.com@9de48aec-ec99-11dd-b2d9-215335d0b316"
] |
ignaciocicero@gmail.com@9de48aec-ec99-11dd-b2d9-215335d0b316
|
bf3c7b7fa38cf0524d1820405ce13631dcb0f795
|
7653e008384de73b57411b7748dab52b561d51e6
|
/SrcGame/dwo/gameserver/handler/bypasses/ManorManager.java
|
1381ff729b1fbcf85653db124df4d2cc656be204
|
[] |
no_license
|
BloodyDawn/Ertheia
|
14520ecd79c38acf079de05c316766280ae6c0e8
|
d90d7f079aa370b57999d483c8309ce833ff8af0
|
refs/heads/master
| 2021-01-11T22:10:19.455110
| 2017-01-14T12:15:56
| 2017-01-14T12:15:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,648
|
java
|
package dwo.gameserver.handler.bypasses;
import dwo.gameserver.handler.BypassHandlerParams;
import dwo.gameserver.handler.CommandHandler;
import dwo.gameserver.handler.TextCommand;
import dwo.gameserver.instancemanager.castle.CastleManager;
import dwo.gameserver.instancemanager.castle.CastleManorManager;
import dwo.gameserver.model.actor.L2Npc;
import dwo.gameserver.model.actor.instance.L2PcInstance;
import dwo.gameserver.model.world.residence.castle.Castle;
import dwo.gameserver.network.game.components.SystemMessageId;
import dwo.gameserver.network.game.serverpackets.BuyListSeed;
import dwo.gameserver.network.game.serverpackets.SystemMessage;
import dwo.gameserver.network.game.serverpackets.packet.show.ExShowCropInfo;
import dwo.gameserver.network.game.serverpackets.packet.show.ExShowCropSetting;
import dwo.gameserver.network.game.serverpackets.packet.show.ExShowManorDefaultInfo;
import dwo.gameserver.network.game.serverpackets.packet.show.ExShowProcureCropDetail;
import dwo.gameserver.network.game.serverpackets.packet.show.ExShowSeedInfo;
import dwo.gameserver.network.game.serverpackets.packet.show.ExShowSeedSetting;
import dwo.gameserver.network.game.serverpackets.packet.show.ExShowSellCropList;
import org.apache.log4j.Level;
/**
* Manor functions handler.
*
* @author L2J
* @author GODWORLD
* @author Yorie
*/
public class ManorManager extends CommandHandler<String>
{
@TextCommand("manor_menu_select")
public boolean manorMenu(BypassHandlerParams params)
{
L2PcInstance activeChar = params.getPlayer();
L2Npc manager = activeChar.getLastFolkNPC();
if(!activeChar.isInsideRadius(manager, L2Npc.INTERACTION_DISTANCE, true, false))
{
return false;
}
try
{
Castle castle = manager.getCastle();
if(CastleManorManager.getInstance().isUnderMaintenance())
{
activeChar.sendActionFailed();
activeChar.sendPacket(SystemMessageId.THE_MANOR_SYSTEM_IS_CURRENTLY_UNDER_MAINTENANCE);
return true;
}
int ask = Integer.parseInt(params.getQueryArgs().get("ask"));
int state = Integer.parseInt(params.getQueryArgs().get("state"));
int time = Integer.parseInt(params.getQueryArgs().get("time"));
int castleId;
castleId = state < 0 ? castle.getCastleId() : state;
switch(ask)
{
case 1: // Seed purchase
if(castleId == castle.getCastleId())
{
activeChar.sendPacket(new BuyListSeed(activeChar.getAdenaCount(), castleId, castle.getSeedProduction(CastleManorManager.PERIOD_CURRENT)));
}
else
{
activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.HERE_YOU_CAN_BUY_ONLY_SEEDS_OF_S1_MANOR).addString(manager.getCastle().getName()));
}
break;
case 2: // Crop sales
activeChar.sendPacket(new ExShowSellCropList(activeChar, castleId, castle.getCropProcure(CastleManorManager.PERIOD_CURRENT)));
break;
case 3: // Current seeds (Manor info)
if(time == 1 && !CastleManager.getInstance().getCastleById(castleId).isNextPeriodApproved())
{
activeChar.sendPacket(new ExShowSeedInfo(castleId, null));
}
else
{
activeChar.sendPacket(new ExShowSeedInfo(castleId, CastleManager.getInstance().getCastleById(castleId).getSeedProduction(time)));
}
break;
case 4: // Current crops (Manor info)
if(time == 1 && !CastleManager.getInstance().getCastleById(castleId).isNextPeriodApproved())
{
activeChar.sendPacket(new ExShowCropInfo(castleId, null));
}
else
{
activeChar.sendPacket(new ExShowCropInfo(castleId, CastleManager.getInstance().getCastleById(castleId).getCropProcure(time)));
}
break;
case 5: // Basic info (Manor info)
activeChar.sendPacket(new ExShowManorDefaultInfo());
break;
case 6: // Buy harvester
manager.showBuyList(activeChar, 0);
break;
case 7: // Edit seed setup
if(castle.isNextPeriodApproved())
{
activeChar.sendPacket(SystemMessageId.A_MANOR_CANNOT_BE_SET_UP_BETWEEN_6_AM_AND_8_PM);
}
else
{
activeChar.sendPacket(new ExShowSeedSetting(castle.getCastleId()));
}
break;
case 8: // Edit crop setup
if(castle.isNextPeriodApproved())
{
activeChar.sendPacket(SystemMessageId.A_MANOR_CANNOT_BE_SET_UP_BETWEEN_6_AM_AND_8_PM);
}
else
{
activeChar.sendPacket(new ExShowCropSetting(castle.getCastleId()));
}
break;
case 9: // Edit sales (Crop sales)
activeChar.sendPacket(new ExShowProcureCropDetail(state));
break;
default:
return false;
}
return true;
}
catch(Exception e)
{
log.log(Level.ERROR, e);
}
return false;
}
}
|
[
"echipachenko@gmail.com"
] |
echipachenko@gmail.com
|
6ff8580224ebb8a29ce201e727b90fc5a0ebead6
|
6b23d8ae464de075ad006c204bd7e946971b0570
|
/WEB-INF/plugin/api/src/jp/groupsession/v2/api/schedule/prefarence/worktime/ApiSchPrefWorkTimeForm.java
|
b5b3e313fd8277cc1c7499b8186bcf15c0aff1da
|
[] |
no_license
|
kosuke8/gsession
|
a259c71857ed36811bd8eeac19c456aa8f96c61e
|
edd22517a22d1fb2c9339fc7f2a52e4122fc1992
|
refs/heads/master
| 2021-08-20T05:43:09.431268
| 2017-11-28T07:10:08
| 2017-11-28T07:10:08
| 112,293,459
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,267
|
java
|
package jp.groupsession.v2.api.schedule.prefarence.worktime;
import jp.groupsession.v2.api.AbstractApiForm;
import jp.groupsession.v2.api.GSValidateApi;
import jp.groupsession.v2.struts.msg.GsMessage;
import org.apache.struts.action.ActionErrors;
/**
*
* <br>[機 能] スケジュール日間表示時間帯設定取得WEBAPIフォーム
* <br>[解 説]
* <br>[備 考]
*
* @author JTS
*/
public class ApiSchPrefWorkTimeForm extends AbstractApiForm {
/** ユーザSID*/
private String usrSid__;
/**
* <p>usrSid を取得します。
* @return usrSid
*/
public String getUsrSid() {
return usrSid__;
}
/**
* <p>usrSid をセットします。
* @param usrSid usrSid
*/
public void setUsrSid(String usrSid) {
usrSid__ = usrSid;
}
/**
*
* <br>[機 能] 入力チェック
* <br>[解 説]
* <br>[備 考]
* @param gsMsg GsMessage
* @return errors
*/
public ActionErrors validateCheck(
GsMessage gsMsg) {
ActionErrors errors = new ActionErrors();
GSValidateApi.validateSid(errors, usrSid__, "usrSid",
"usrSid", false);
return errors;
}
}
|
[
"PK140601-29@PK140601-29"
] |
PK140601-29@PK140601-29
|
c62a486855264843f647afce3ae5d40643fdf6a0
|
d092c182f763daf53fb5f5fb973e4fcaaf2fb3cc
|
/ble-common/src/main/java/no/nordicsemi/android/ble/common/profile/bp/BloodPressureMeasurementCallback.java
|
e810731f4cfa59e76434e68d9906dd98267173e1
|
[
"BSD-3-Clause"
] |
permissive
|
NethunterJack/Android-BLE-Common-Library
|
7a6c487ca63a6eff1f03bb5d3eb28c56f8a42f09
|
68804b065c23d8d04155a80267d3146d1a70bfd8
|
refs/heads/master
| 2020-04-11T01:42:28.557487
| 2018-11-08T11:33:11
| 2018-11-08T11:33:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,398
|
java
|
/*
* Copyright (c) 2018, Nordic Semiconductor
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright 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 no.nordicsemi.android.ble.common.profile.bp;
import android.bluetooth.BluetoothDevice;
import android.support.annotation.FloatRange;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import java.util.Calendar;
@SuppressWarnings("unused")
public interface BloodPressureMeasurementCallback extends BloodPressureTypes {
/**
* Callback called when Blood Pressure Measurement packet has been received.
* Use {@link #toKPa(float, int)} or {@link #toMmHg(float, int)} to convert pressure units.
*
* @param device the target device.
* @param systolic the systolic compound of blood pressure measurement.
* @param diastolic the diastolic compound of blood pressure measurement.
* @param meanArterialPressure the mean arterial pressure compound of blood pressure measurement.
* @param unit the measurement unit, one of {@link #UNIT_mmHg} or {@link #UNIT_kPa}.
* @param pulseRate an optional pulse rate in beats per minute.
* @param userID an optional user ID. Value 255 means 'unknown user'.
* @param status an optional measurement status.
* @param calendar an optional measurement timestamp.
*/
void onBloodPressureMeasurementReceived(@NonNull final BluetoothDevice device,
@FloatRange(from = 0) final float systolic,
@FloatRange(from = 0) final float diastolic,
@FloatRange(from = 0) final float meanArterialPressure,
@BloodPressureUnit final int unit,
@Nullable @FloatRange(from = 0) final Float pulseRate,
@Nullable @IntRange(from = 0, to = 255) final Integer userID,
@Nullable final BPMStatus status,
@Nullable final Calendar calendar);
}
|
[
"aleksander.nowakowski@nordicsemi.no"
] |
aleksander.nowakowski@nordicsemi.no
|
317ea09da25e60a7a82b7095b2bf208361ab5857
|
fb41c04a4ead3b79625d0eb30ca85f0fd1c2d4c9
|
/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/SelectOverheadParameters.java
|
55f1b57f927177d4f896b69b90c455879a2f6800
|
[
"Apache-2.0",
"LicenseRef-scancode-takuya-ooura"
] |
permissive
|
thhart/BoofCV
|
899dcf1b4302bb9464520c36a9e54c6fe35969c7
|
43f25488673dc27590544330323c676f61c1a17a
|
refs/heads/SNAPSHOT
| 2023-08-18T10:19:50.269999
| 2023-07-15T23:13:25
| 2023-07-15T23:13:25
| 90,468,259
| 0
| 0
|
Apache-2.0
| 2018-10-26T08:47:44
| 2017-05-06T14:24:01
|
Java
|
UTF-8
|
Java
| false
| false
| 5,071
|
java
|
/*
* Copyright (c) 2021, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.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 boofcv.alg.sfm.overhead;
import boofcv.struct.calib.CameraPinholeBrown;
import boofcv.struct.image.ImageBase;
import boofcv.struct.image.ImageType;
import georegression.struct.point.Point2D_F64;
import georegression.struct.se.Se3_F64;
/**
* Give a camera's intrinsic and extrinsic parameters, selects a reasonable overhead view to render the image onto. It
* attempts to maximize viewing area. The user can crop the height of the overhead view to reduce the amount of
* unusable image space in the map. This is particularly useful for cameras at an acute angle relative to the
* ground plane. Overhead cameras pointed downward should set it to 1.0
*
* @author Peter Abeles
*/
public class SelectOverheadParameters {
// used to project pixels onto the plane
CameraPlaneProjection proj = new CameraPlaneProjection();
// the selected overhead map values
int overheadWidth;
int overheadHeight;
double centerX;
double centerY;
// --- User specified parameters
// size of cells on the plane
double cellSize;
// determines the minimum resolution
double maxCellsPerPixel;
// used to crop the views's height. Specifies the fraction of the "optimal" height which is actually used.
double viewHeightFraction;
// local variables
Point2D_F64 plane0 = new Point2D_F64();
Point2D_F64 plane1 = new Point2D_F64();
/**
* Configure algorithm.
*
* @param cellSize Size of cells in plane in world units
* @param maxCellsPerPixel Specifies minimum resolution of a region in overhead image. A pixel in the camera
* can't overlap more than this number of cells. Higher values allow lower
* resolution regions. Try 4.
* @param viewHeightFraction Reduce the view height by this fraction to avoid excessive unusable image space. Set to
* 1.0 to maximize the viewing area and any value less than one to crop it.
*/
public SelectOverheadParameters( double cellSize, double maxCellsPerPixel, double viewHeightFraction ) {
this.cellSize = cellSize;
this.maxCellsPerPixel = maxCellsPerPixel;
this.viewHeightFraction = viewHeightFraction;
}
/**
* Computes the view's characteristics
*
* @param intrinsic Intrinsic camera parameters
* @param planeToCamera Extrinsic camera parameters which specify the plane
* @return true if successful or false if it failed
*/
public boolean process( CameraPinholeBrown intrinsic, Se3_F64 planeToCamera ) {
proj.setPlaneToCamera(planeToCamera, true);
proj.setIntrinsic(intrinsic);
// find a bounding rectangle on the ground which is visible to the camera and at a high enough resolution
double x0 = Double.MAX_VALUE;
double y0 = Double.MAX_VALUE;
double x1 = -Double.MAX_VALUE;
double y1 = -Double.MAX_VALUE;
for (int y = 0; y < intrinsic.height; y++) {
for (int x = 0; x < intrinsic.width; x++) {
if (!checkValidPixel(x, y))
continue;
if (plane0.x < x0)
x0 = plane0.x;
if (plane0.x > x1)
x1 = plane0.x;
if (plane0.y < y0)
y0 = plane0.y;
if (plane0.y > y1)
y1 = plane0.y;
}
}
if (x0 == Double.MAX_VALUE)
return false;
// compute parameters with the intent of maximizing viewing area
double mapWidth = x1 - x0;
double mapHeight = y1 - y0;
overheadWidth = (int)Math.floor(mapWidth/cellSize);
overheadHeight = (int)Math.floor(mapHeight*viewHeightFraction/cellSize);
centerX = -x0;
centerY = -(y0 + mapHeight*(1 - viewHeightFraction)/2.0);
return true;
}
/**
* Creates a new instance of the overhead view
*/
public <T extends ImageBase<T>> OverheadView createOverhead( ImageType<T> imageType ) {
OverheadView ret = new OverheadView();
ret.image = imageType.createImage(overheadWidth, overheadHeight);
ret.cellSize = cellSize;
ret.centerX = centerX;
ret.centerY = centerY;
return ret;
}
private boolean checkValidPixel( int x, int y ) {
if (!proj.pixelToPlane(x, y, plane0))
return false;
if (!proj.pixelToPlane(x + 1, y + 1, plane1))
return false;
double width = Math.abs(plane0.x - plane1.x);
double height = Math.abs(plane0.y - plane1.y);
if (width > maxCellsPerPixel*cellSize)
return false;
return !(height > maxCellsPerPixel*cellSize);
}
public int getOverheadWidth() {
return overheadWidth;
}
public int getOverheadHeight() {
return overheadHeight;
}
public double getCenterX() {
return centerX;
}
public double getCenterY() {
return centerY;
}
}
|
[
"peter.abeles@gmail.com"
] |
peter.abeles@gmail.com
|
a3eed9e126ae85b56ad7772d244931b00b3379ae
|
3a2878d17af4fbd8e3c1304e1e20a3101833fc18
|
/src/org/nova/game/player/content/dungeoneering/DungeonPartyManager.java
|
224ae61d1f99dc86afceac1098bd42eaa45fcca7
|
[] |
no_license
|
karimshan/nova-server
|
452f2cdc1bd87c560d3e1ff7422e211cd12f976c
|
861f9daa812372d74cfe7f45fceb8cab2853b4ca
|
refs/heads/master
| 2021-05-14T17:40:34.624397
| 2018-01-02T21:06:29
| 2018-01-02T21:06:29
| 116,051,463
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,697
|
java
|
package org.nova.game.player.content.dungeoneering;
import java.util.concurrent.CopyOnWriteArrayList;
import org.nova.game.player.Player;
import org.nova.game.player.Skills;
public final class DungeonPartyManager {
private String leader;
private int floor;
private int complexity;
private CopyOnWriteArrayList<DungeonPartyPlayer> team;
private DungeonManager dungeon;
public DungeonPartyManager(Player player) {
setLeader(player.getUsername());
team = new CopyOnWriteArrayList<DungeonPartyPlayer>();
team.add(new DungeonPartyPlayer(player));
setDefaults();
start(DungeonConstants.SMALL_DUNGEON); // temporary
}
public void setDefaults() {
floor = 1;
complexity = 1;
}
public void start(int size) {
if (dungeon != null)
return;
dungeon = new DungeonManager(this, size);
}
public int getComplexity() {
return complexity;
}
public int getFloor() {
return floor;
}
public int getFloorType() {
return DungeonUtils.getFloorType(floor);
}
public int getDungeoneeringLevel() {
int level = 120;
for (DungeonPartyPlayer player : team) {
int playerLevel = player.getPlayer().getSkills()
.getLevelFromXP(Skills.DUNGEONEERING);
if (playerLevel < level)
level = playerLevel;
}
return level;
}
public DungeonPartyPlayer getDPlayer(Player player) {
for (DungeonPartyPlayer p : team)
if (p.getPlayer() == player)
return p;
return null;
}
public CopyOnWriteArrayList<DungeonPartyPlayer> getTeam() {
return team;
}
public String getLeader() {
return leader;
}
public void setLeader(String leader) {
this.leader = leader;
}
}
|
[
"karim@192.168.1.236"
] |
karim@192.168.1.236
|
3bb8afb13426575ad521e64c716c8d7bd146fde6
|
599262c06e227882cdd74a132623f4eddbda5c72
|
/src/main/java/com/db/quoters/TerminatorQuoter.java
|
b9232a3202630f60fde2e5ac1c083770a090531f
|
[] |
no_license
|
Jeka1978/springdemo_forDB
|
21f593a707647ded79641739032340c275304d59
|
440bea6f1ad1a5c2698c5776291af902bdc6e63a
|
refs/heads/master
| 2021-01-21T02:19:46.567281
| 2017-09-01T15:32:26
| 2017-09-01T15:32:26
| 101,887,660
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,117
|
java
|
package com.db.quoters;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
import javax.annotation.PreDestroy;
import java.util.Arrays;
import java.util.List;
/**
* Created by Evegeny on 30/08/2017.
*/
@Component
public class TerminatorQuoter implements Quoter {
private List<String> messages;
@Value("${terminator}")
private void setMessages(String[] messages, @Value("${JAVA_HOME}") String javaHome) {
System.out.println("javaHome = " + javaHome);
this.messages = Arrays.asList(messages);
}
@Override
public void sayQuote() {
messages.forEach(System.out::println);
throw new DBRuntimeException("я встретил сам себя");
}
public void killAll() {
System.out.println("your are terminated....");
}
}
|
[
"papakita2009"
] |
papakita2009
|
f5f169b754dd146c48e736bdd3d993020807e82f
|
3726265f8005bbacd826f32b6c434c2540b6599e
|
/uml/java/Model/personnes/Abonné.java
|
6d4c681784f0d51965206747330300bfc35b2dbb
|
[] |
no_license
|
didier-tp/poe-pega2
|
11bd93bd93c9b9d9dfd10a107f1e6fd5c7db0ef2
|
1f1cdc9ae4d466c40f6a2193c6e17cb56e04daee
|
refs/heads/main
| 2023-07-11T02:24:09.617289
| 2021-08-20T15:21:18
| 2021-08-20T15:21:18
| 394,204,364
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 373
|
java
|
package personnes;
import java.util.*;
/**
*
*/
public class Abonné extends Personne {
/**
* Default constructor
*/
public Abonné() {
}
/**
*
*/
private Integer numero;
/**
*
*/
private Date dateAbonnement;
/**
*
*/
public void sePresenter() {
// TODO implement here
}
}
|
[
"didier@d-defrance.fr"
] |
didier@d-defrance.fr
|
344f0435d69f0967376a4dc679d1ee09281e51a3
|
97d95ad49efb83a2e5be5df98534dc777a955154
|
/applications/plugins/org.csstudio.swt.widgets/src/org/csstudio/swt/widgets/datadefinition/IntArrayWrapper.java
|
da629e5644e9c0acd342b54e4df5950afb154073
|
[] |
no_license
|
bekumar123/cs-studio
|
61aa64d30bce53b22627a3d98237d40531cf7789
|
bc24a7e2d248522af6b2983588be3b72d250505f
|
refs/heads/master
| 2021-01-21T16:39:14.712040
| 2014-01-27T15:30:23
| 2014-01-27T15:30:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 418
|
java
|
package org.csstudio.swt.widgets.datadefinition;
/**A wrapper for int[].
* @author Xihui Chen
*
*/
public class IntArrayWrapper implements IPrimaryArrayWrapper {
private int[] data;
public IntArrayWrapper(int[] data) {
this.data = data;
}
public void setData(int[] data) {
this.data = data;
}
public double get(int i) {
return data[i];
}
public int getSize() {
return data.length;
}
}
|
[
"jan.hatje@desy.de"
] |
jan.hatje@desy.de
|
0f2b3857b02ea46a2a19889d9639e7b326180cfa
|
731f38f02c581aba08248228a695014220ce474e
|
/widgetalarm/app/src/main/java/com/daeseong/widgetalarm/AlarmWidget.java
|
8dd0681cfba7db9624174ebbb78f2c2f19c03f4a
|
[] |
no_license
|
ImDaeseong/WidgetNService_test
|
5a4ec704baf5b8f55ec10ca1f3f4d746fd56692f
|
aa621626f96756f81635f1b82cfd40f032a8e3da
|
refs/heads/master
| 2022-10-11T03:45:14.049051
| 2022-09-21T22:16:07
| 2022-09-21T22:16:07
| 215,185,753
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,555
|
java
|
package com.daeseong.widgetalarm;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.RemoteViews;
import java.text.SimpleDateFormat;
import java.util.Date;
public class AlarmWidget extends AppWidgetProvider {
private static final String TAG = AlarmWidget.class.getSimpleName();
private PendingIntent pendingIntent = null;
private long lMin = 1000 * 60 * 1;// Millisec * Second * Minute
static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId) {
Log.i(TAG, "updateAppWidget");
try {
RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.alarm_widget);
remoteViews.setTextViewText(R.id.tv1, getTimeDate());
appWidgetManager.updateAppWidget(appWidgetId, remoteViews);
}catch (Exception ex){
Log.i(TAG, ex.getMessage().toString());
}
}
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
Log.i(TAG, "onUpdate");
try {
for (int appWidgetId : appWidgetIds) {
updateAppWidget(context, appWidgetManager, appWidgetId);
}
Intent intent = new Intent(context, AlarmReceiver.class);
pendingIntent = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), lMin, pendingIntent);
}catch (Exception ex){
Log.i(TAG, ex.getMessage().toString());
}
}
@Override
public void onEnabled(Context context) {
Log.i(TAG, "onEnabled");
}
@Override
public void onDisabled(Context context) {
Log.i(TAG, "onDisabled");
try {
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
alarmManager.cancel(pendingIntent);
}catch (Exception ex){
Log.i(TAG, ex.getMessage().toString());
}
}
private static String getTimeDate() {
SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
return dateFormat.format(new Date());
}
}
|
[
"cs93059@gmail.com"
] |
cs93059@gmail.com
|
bf3586caecf2c031d47a8bfdb53e35c0db30bbeb
|
89a09e9daa8c5c817d129404d381f1c5fec61c08
|
/eHour-wicketweb/src/main/java/net/rrm/ehour/ui/report/page/GlobalReportPage.java
|
aa23616e2326ee8f4c5e2d9ccbeb47f1e1c6a56c
|
[] |
no_license
|
nolith/ehour
|
6a57c5661c6dcef595722053ae656e265d680a4c
|
dbb1b9c128383aff0aed4454866d7aee90492415
|
refs/heads/master
| 2021-01-15T22:52:37.986322
| 2012-05-09T23:11:42
| 2012-05-09T23:11:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,905
|
java
|
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package net.rrm.ehour.ui.report.page;
import java.util.ArrayList;
import java.util.List;
import net.rrm.ehour.report.criteria.ReportCriteria;
import net.rrm.ehour.ui.common.event.AjaxEvent;
import net.rrm.ehour.ui.common.model.KeyResourceModel;
import net.rrm.ehour.ui.report.page.command.DefaultGlobalReportPageAggregateCommand;
import net.rrm.ehour.ui.report.page.command.DefaultGlobalReportPageDetailedCommand;
import net.rrm.ehour.ui.report.page.command.GlobalReportPageAggregateCommand;
import net.rrm.ehour.ui.report.page.command.GlobalReportPageDetailedCommand;
import net.rrm.ehour.ui.report.panel.criteria.ReportCriteriaAjaxEventType;
import net.rrm.ehour.ui.report.panel.criteria.ReportCriteriaBackingBean;
import net.rrm.ehour.ui.report.panel.criteria.ReportCriteriaPanel;
import net.rrm.ehour.ui.report.panel.criteria.ReportTabbedPanel;
import net.rrm.ehour.ui.report.panel.criteria.type.ReportType;
import org.apache.wicket.authorization.strategies.role.annotations.AuthorizeInstantiation;
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
import org.apache.wicket.extensions.markup.html.tabs.ITab;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
/**
* Reporting
**/
@AuthorizeInstantiation("ROLE_CONSULTANT")
public class GlobalReportPage extends AbstractReportPage<ReportCriteriaBackingBean>
{
private static final long serialVersionUID = 6614404841734599622L;
private ReportTabbedPanel tabPanel;
private GlobalReportPageAggregateCommand aggregateCommand;
private GlobalReportPageDetailedCommand detailedCommand;
public GlobalReportPage()
{
this(new DefaultGlobalReportPageAggregateCommand(), new DefaultGlobalReportPageDetailedCommand());
}
public GlobalReportPage(GlobalReportPageAggregateCommand aggregateCommand, GlobalReportPageDetailedCommand detailedCommand)
{
super(new ResourceModel("report.global.title"));
this.aggregateCommand = aggregateCommand;
this.detailedCommand = detailedCommand;
final ReportCriteria reportCriteria = getReportCriteria();
final IModel<ReportCriteriaBackingBean> model = new CompoundPropertyModel<ReportCriteriaBackingBean>(new ReportCriteriaBackingBean(reportCriteria));
setDefaultModel(model);
List<ITab> tabList = new ArrayList<ITab>();
tabList.add(new AbstractTab(new KeyResourceModel("report.criteria.title"))
{
private static final long serialVersionUID = 1L;
@SuppressWarnings("unchecked")
@Override
public Panel getPanel(String panelId)
{
return new ReportCriteriaPanel(panelId, model);
}
});
tabPanel = new ReportTabbedPanel("reportContainer", tabList);
add(tabPanel);
}
@Override
public boolean ajaxEventReceived(AjaxEvent ajaxEvent)
{
if (ajaxEvent.getEventType() == ReportCriteriaAjaxEventType.CRITERIA_UPDATED)
{
ReportCriteriaBackingBean backingBean = (ReportCriteriaBackingBean)getDefaultModelObject();
clearTabs();
if (backingBean.getReportType().equals(ReportType.AGGREGATE))
{
addAggregateReportPanelTabs (backingBean);
}
else
{
addDetailedReportPanelTabs(backingBean);
}
ajaxEvent.getTarget().addComponent(tabPanel);
}
return false;
}
/**
* Clear tabs except for the first one
*/
private void clearTabs()
{
List<ITab> tabs = tabPanel.getTabs();
while (tabs.size() > 1)
{
tabs.remove(1);
}
}
private void addAggregateReportPanelTabs(ReportCriteriaBackingBean backingBean)
{
List<ITab> tabs = aggregateCommand.createAggregateReportTabs(backingBean);
addTabs(tabs);
tabPanel.setSelectedTab(1);
}
private void addTabs(List<ITab> tabs)
{
for (ITab iTab : tabs)
{
tabPanel.addTab(iTab);
}
}
private void addDetailedReportPanelTabs(ReportCriteriaBackingBean backingBean)
{
List<ITab> tabs = detailedCommand.createDetailedReportTabs(backingBean);
addTabs(tabs);
tabPanel.setSelectedTab(1);
}
}
|
[
"thies@te-con.nl"
] |
thies@te-con.nl
|
e596fe90c6b36cb4d91bbee511bce188f2e30e0a
|
69011b4a6233db48e56db40bc8a140f0dd721d62
|
/log/com/jshx/log/web/UserBehaviorLogAction.java
|
d0f6d9f0b755aed9f430934685706dc2a08009f7
|
[] |
no_license
|
gechenrun/scysuper
|
bc5397e5220ee42dae5012a0efd23397c8c5cda0
|
e706d287700ff11d289c16f118ce7e47f7f9b154
|
refs/heads/master
| 2020-03-23T19:06:43.185061
| 2018-06-10T07:51:18
| 2018-06-10T07:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,088
|
java
|
package com.jshx.log.web;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import net.sf.json.JsonConfig;
import net.sf.json.util.PropertyFilter;
import org.springframework.beans.factory.annotation.Autowired;
import com.jshx.core.base.action.BaseAction;
import com.jshx.core.base.vo.Pagination;
import com.jshx.log.entity.UserBehaviorLog;
import com.jshx.log.service.UserBehaviorLogService;
public class UserBehaviorLogAction extends BaseAction
{
private static final long serialVersionUID = 3456585809753588018L;
/**
* 主键ID列表,用于接收页面提交的多条主键ID信息
*/
private String ids;
/**
* 实体类
*/
private UserBehaviorLog userBehaviorLog = new UserBehaviorLog();
/**
* 业务类
*/
@Autowired
private UserBehaviorLogService userBehaviorLogService;
/**
* 修改新增标记,add为新增、mod为修改
*/
private String flag;
/**
* 分页信息
*/
private Pagination pagination;
private Date queryLoggedDateStart;
private Date queryLoggedDateEnd;
/**
* 执行查询的方法,返回json数据
*
*/
public void list() throws Exception{
Map<String, Object> paraMap = new HashMap<String, Object>();
if(pagination==null)
pagination = new Pagination(this.getRequest());
if(null != userBehaviorLog){
paraMap.put("behaviorId", userBehaviorLog.getBehavior().getId());
}
paraMap.put("queryLoggedDateStart", queryLoggedDateStart);
paraMap.put("queryLoggedDateEnd", queryLoggedDateEnd);
pagination = userBehaviorLogService.findByPage(pagination, paraMap);
final String filter = "loggedDate|id|logContent|user|displayName|time|remoteIp|";
JsonConfig config = new JsonConfig();
config.setJsonPropertyFilter(new PropertyFilter(){
public boolean apply(Object source, String name, Object value) {
if(filter.indexOf(name+"|")!=-1)
return false;
else
return true;
}
});
try{
convObjectToJson(pagination,config);
}catch(Exception e){
e.printStackTrace();
}
}
public String userBehaviorLogList(){
return SUCCESS;
}
/**
* 查看详细信息
*/
public String view() throws Exception{
if((null != userBehaviorLog)&&(null != userBehaviorLog.getId()))
userBehaviorLog = userBehaviorLogService.getById(userBehaviorLog.getId());
return VIEW;
}
/**
* 初始化修改信息
*/
public String initEdit() throws Exception{
view();
return EDIT;
}
/**
* 保存信息(包括新增和修改)
*/
public String save() throws Exception{
if ("add".equalsIgnoreCase(this.flag)){
userBehaviorLog.setDeptId(this.getLoginUserDepartmentId());
userBehaviorLog.setDelFlag(0);
userBehaviorLogService.save(userBehaviorLog);
}else{
userBehaviorLogService.update(userBehaviorLog);
}
return RELOAD;
}
/**
* 删除信息
*/
public String delete() throws Exception{
try{
userBehaviorLogService.deleteWithFlag(ids);
this.getResponse().getWriter().println("{\"result\":\"true\"}");
}catch(Exception e){
this.getResponse().getWriter().println("{\"result\":\"false\"}");
}
return null;
}
public String getIds(){
return ids;
}
public void setIds(String ids){
this.ids = ids;
}
public Pagination getPagination(){
return pagination;
}
public void setPagination(Pagination pagination){
this.pagination = pagination;
}
public UserBehaviorLog getUserBehaviorLog(){
return this.userBehaviorLog;
}
public void setUserBehaviorLog(UserBehaviorLog userBehaviorLog){
this.userBehaviorLog = userBehaviorLog;
}
public String getFlag(){
return flag;
}
public void setFlag(String flag){
this.flag = flag;
}
public Date getQueryLoggedDateStart(){
return this.queryLoggedDateStart;
}
public void setQueryLoggedDateStart(Date queryLoggedDateStart){
this.queryLoggedDateStart = queryLoggedDateStart;
}
public Date getQueryLoggedDateEnd(){
return this.queryLoggedDateEnd;
}
public void setQueryLoggedDateEnd(Date queryLoggedDateEnd){
this.queryLoggedDateEnd = queryLoggedDateEnd;
}
}
|
[
"shellchange@sina.com"
] |
shellchange@sina.com
|
3c657464fbfe07ffab49875a459a193d613e8700
|
4bb83687710716d91b5da55054c04f430474ee52
|
/dsrc/sku.0/sys.server/compiled/game/script/structure/structure_rollup.java
|
c218ee1a0d17d8b6b25cee92d6cd9b83779ea354
|
[] |
no_license
|
geralex/SWG-NGE
|
0846566a44f4460c32d38078e0a1eb115a9b08b0
|
fa8ae0017f996e400fccc5ba3763e5bb1c8cdd1c
|
refs/heads/master
| 2020-04-06T11:18:36.110302
| 2018-03-19T15:42:32
| 2018-03-19T15:42:32
| 157,411,938
| 1
| 0
| null | 2018-11-13T16:35:01
| 2018-11-13T16:35:01
| null |
UTF-8
|
Java
| false
| false
| 6,798
|
java
|
package script.structure;
import script.*;
import script.base_class.*;
import script.combat_engine.*;
import java.util.Arrays;
import java.util.Hashtable;
import java.util.Vector;
import script.base_script;
import script.library.utils;
import script.library.player_structure;
import script.library.city;
import script.library.prose;
import script.library.trace;
import script.library.vendor_lib;
public class structure_rollup extends script.base_script
{
public structure_rollup()
{
}
public int OnDoStructureRollup(obj_id self, obj_id player, boolean warnOnly) throws InterruptedException
{
String structName = player_structure.getStructureName(self);
if (structName.length() < 1)
{
structName = "Structure";
}
location where = getLocation(self);
if (warnOnly)
{
string_id subject = new string_id("player_structure", "structure_purge_warning_subject");
string_id body = new string_id("player_structure", "structure_purge_warning_body");
prose_package pp = new prose_package();
prose.setStringId(pp, body);
prose.setTO(pp, getPlayerFullName(player));
String body_oob = chatMakePersistentMessageOutOfBandBody(null, pp);
String subject_str = "@" + subject.toString();
body_oob = chatAppendPersistentMessageWaypointData(body_oob, where.area, where.x, where.z, null, structName);
String[] admins = player_structure.getAdminListNames(self);
for (int i = 0; i < admins.length; ++i)
{
chatSendPersistentMessage("Galactic Housing Authority", admins[i], subject_str, null, body_oob);
}
if (city.isInCity(self))
{
int cityId = city.getStructureCityId(self);
if (cityId != 0)
{
obj_id mayor = cityGetLeader(cityId);
if (mayor != obj_id.NULL_ID)
{
chatSendPersistentMessage("Galactic Housing Authority", mayor, subject_str, null, body_oob);
}
}
}
obj_id nameTarget = self;
if (player_structure.isBuilding(nameTarget))
{
obj_id sign = getObjIdObjVar(nameTarget, player_structure.VAR_SIGN_ID);
if (isIdValid(sign))
{
nameTarget = sign;
}
}
String abandoned = " \\#FF0000\\(Abandoned)";
setName(nameTarget, structName + abandoned);
if (nameTarget != self)
{
setObjVar(self, player_structure.VAR_SIGN_NAME, structName + abandoned);
}
}
else
{
if (player_structure.isBuilding(self))
{
obj_id[] players = player_structure.getPlayersInBuilding(self);
if (players != null)
{
for (int i = 0; i < players.length; i++)
{
expelFromBuilding(players[i]);
}
}
String[] cells = getCellNames(self);
if (cells != null)
{
for (int i = 0; i < cells.length; i++)
{
obj_id cellid = getCellId(self, cells[i]);
obj_id contents[] = getContents(cellid);
if (contents != null)
{
for (int j = 0; j < contents.length; j++)
{
if (hasCondition(contents[j], CONDITION_VENDOR))
{
obj_id owner = getObjIdObjVar(contents[j], "vendor_owner");
if (!isIdValid(owner))
{
owner = getOwner(contents[j]);
}
vendor_lib.finalizePackUp(owner, contents[j], player, player_structure.isAbandoned(self));
}
}
}
}
}
}
obj_id scd = createObject("object/intangible/house/generic_house_control_device.iff", where);
setName(scd, structName);
setOwner(scd, player);
if (!persistObject(scd))
{
LOG("LOG_CHANNEL", "structure_rollup.OnDoStructureRollup persist SCD failed!");
return SCRIPT_CONTINUE;
}
attachScript(scd, "structure.house_control_device");
if (hasObjVar(self, player_structure.VAR_WAYPOINT_STRUCTURE))
{
obj_id waypoint = getObjIdObjVar(self, player_structure.VAR_WAYPOINT_STRUCTURE);
if (isIdValid(waypoint))
{
destroyWaypointInDatapad(waypoint, player);
removeObjVar(self, player_structure.VAR_WAYPOINT_STRUCTURE);
}
}
player_structure.destroyStructureSign(self);
if (player_structure.isResidence(self, player))
{
setHouseId(player, obj_id.NULL_ID);
removeObjVar(self, player_structure.VAR_RESIDENCE_BUILDING);
city.removeCitizen(player, self);
}
city.removeStructureFromCity(self);
String template = getTemplateName(self);
player_structure.setDeedTemplate(scd, template);
if (isIdValid(player) && exists(player))
{
obj_id lotOverlimitStructure = getObjIdObjVar(player, "lotOverlimit.structure_id");
if (isIdValid(lotOverlimitStructure) && (lotOverlimitStructure == self))
{
setObjVar(player, "lotOverlimit.structure_location", "Datapad");
}
}
putIn(self, scd);
if (hasObjVar(self, "purge_process.rollup_on_load"))
{
removeObjVar(self, "purge_process.rollup_on_load");
}
final int maxDepth = player_structure.isFactory(self) ? 101 : 1;
moveToOfflinePlayerDatapadAndUnload(scd, player, maxDepth + 1);
fixLoadWith(self, player, maxDepth);
trace.log("housepackup", getPlayerFullName(player) + "(" + player + ") had their house rolled up by the purge process (" + self + ", loc " + where.toString() + ") into structure control device " + scd, player, trace.TL_CS_LOG);
}
return SCRIPT_CONTINUE;
}
}
|
[
"tmoflash@gmail.com"
] |
tmoflash@gmail.com
|
72d6536f185a44966f94d7f3d7051dcf6c444889
|
489dbf038dc81578ee3d1f3465e10d2148a7d3d5
|
/web-ide/src/name/martingeisse/webide/nodejs/AbstractNodejsServer.java
|
97b7ab981bb755c06b53220cf6096a2a4e8bb908
|
[
"MIT"
] |
permissive
|
MartinGeisse/public
|
9b3360186be7953d2185608da883916622ec84e3
|
57b905485322222447187ae78a5a56bf3ce67900
|
refs/heads/master
| 2023-01-21T03:00:43.350628
| 2016-03-20T16:30:09
| 2016-03-20T16:30:09
| 4,472,103
| 1
| 0
|
NOASSERTION
| 2022-12-27T14:45:54
| 2012-05-28T15:56:16
|
Java
|
UTF-8
|
Java
| false
| false
| 3,056
|
java
|
/**
* Copyright (c) 2010 Martin Geisse
*
* This file is distributed under the terms of the MIT license.
*/
package name.martingeisse.webide.nodejs;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import name.martingeisse.webide.application.Configuration;
import org.apache.commons.exec.CommandLine;
import org.apache.commons.exec.DefaultExecutor;
import org.apache.commons.exec.ExecuteException;
import org.apache.commons.exec.ExecuteResultHandler;
import org.apache.commons.exec.ExecuteStreamHandler;
import org.apache.commons.exec.Executor;
import org.apache.commons.exec.PumpStreamHandler;
import org.apache.commons.exec.ShutdownHookProcessDestroyer;
/**
* Base class for NodeJS server processes. Each subclass should
* have an associated Javascript file (which is inherited and
* can be overridden) that is passed to the NodeJS command-line
* tool. The server is started by the start() method.
*/
public abstract class AbstractNodejsServer {
/**
* Constructor.
*/
public AbstractNodejsServer() {
}
/**
* Starts this server.
*/
public void start() {
// determine the path of the associated script
URL url = getScriptUrl();
if (!url.getProtocol().equals("file")) {
throw new RuntimeException("unsupported protocol for associated script URL: " + url);
}
File scriptFile = new File(url.getPath());
// build the command line
CommandLine commandLine = new CommandLine(Configuration.getBashPath());
commandLine.addArgument("--login");
commandLine.addArgument("-c");
commandLine.addArgument("node " + scriptFile.getName(), false);
// build I/O streams
ByteArrayInputStream inputStream = null;
OutputStream outputStream = System.err;
OutputStream errorStream = System.err;
ExecuteStreamHandler streamHandler = new PumpStreamHandler(outputStream, errorStream, inputStream);
// build an environment map that contains the path to the node_modules
Map<String, String> environment = new HashMap<String, String>();
environment.put("NODE_PATH", new File("lib/node_modules").getAbsolutePath());
// run Node.js
Executor executor = new DefaultExecutor();
executor.setProcessDestroyer(new ShutdownHookProcessDestroyer());
executor.setStreamHandler(streamHandler);
try {
executor.setWorkingDirectory(scriptFile.getParentFile());
executor.execute(commandLine, environment, new ExecuteResultHandler() {
@Override
public void onProcessFailed(ExecuteException e) {
}
@Override
public void onProcessComplete(int exitValue) {
}
});
} catch (IOException e) {
throw new RuntimeException(e);
}
}
protected URL getScriptUrl() {
for (Class<?> c = getClass(); c != null; c = c.getSuperclass()) {
URL url = c.getResource(c.getSimpleName() + ".js");
if (url != null) {
return url;
}
}
throw new RuntimeException("no associated script for NodeJS server could be found");
}
}
|
[
"martingeisse@googlemail.com"
] |
martingeisse@googlemail.com
|
9ba1b8d16f2d0db89615e5114e4d2ed001d52526
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/commons-lang/learning/7940/MutableBoolean.java
|
3ab39214c7c643aa6ebcbd5ddcf41abbc7f580b4
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,155
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.lang3.mutable;
import java.io.Serializable;
import org.apache.commons.lang3.BooleanUtils;
/**
* A mutable <code>boolean</code> wrapper.
* <p>
* Note that as MutableBoolean does not extend Boolean, it is not treated by String.format as a Boolean parameter.
*
* @see Boolean
* @since 2.2
*/
public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparable<MutableBoolean> {
/**
* Required for serialization support.
*
* @see java.io.Serializable
*/
private static final long serialVersionUID = -4830728138360036487L;
/** The mutable value. */
private boolean value;
/**
* Constructs a new MutableBoolean with the default value of false.
*/
public MutableBoolean() {
super();
}
/**
* Constructs a new MutableBoolean with the specified value.
*
* @param value the initial value to store
*/
public MutableBoolean(final boolean value) {
super();
this.value = value;
}
/**
* Constructs a new MutableBoolean with the specified value.
*
* @param value the initial value to store, not null
* @throws NullPointerException if the object is null
*/
public MutableBoolean(final Boolean value) {
super();
this.value = value.booleanValue();
}
//-----------------------------------------------------------------------
/**
* Gets the value as a Boolean instance.
*
* @return the value as a Boolean, never null
*/
@Override
public Boolean getValue() {
return Boolean.valueOf(this.value);
}
/**
* Sets the value.
*
* @param value the value to set
*/
public void setValue(final boolean value) {
this.value = value;
}
/**
* Sets the value to false.
*
* @since 3.3
*/
public void setFalse() {
this.value = false;
}
/**
* Sets the value to true.
*
* @since 3.3
*/
public void setTrue() {
this.value = true;
}
/**
* Sets the value from any Boolean instance.
*
* @param value the value to set, not null
* @throws NullPointerException if the object is null
*/
@Override
public void setValue(final Boolean value) {
this.value = value.booleanValue();
}
//-----------------------------------------------------------------------
/**
* Checks if the current value is <code>true</code>.
*
* @return <code>true</code> if the current value is <code>true</code>
* @since 2.5
*/
public boolean isTrue() {
return value;
}
/**
* Checks if the current value is <code>false</code>.
*
* @return <code>true</code> if the current value is <code>false</code>
* @since 2.5
*/
public boolean isFalse() {
return !value;
}
//-----------------------------------------------------------------------
/**
* Returns the value of this MutableBoolean as a boolean.
*
* @return the boolean value represented by this object.
*/
public boolean booleanValue() {
return value;
}
//-----------------------------------------------------------------------
/**
* Gets this mutable as an instance of Boolean.
*
* @return a Boolean instance containing the value from this mutable, never null
* @since 2.5
*/
public Boolean toBoolean() {
return Boolean.valueOf(booleanValue());
}
//-----------------------------------------------------------------------
/**
* Compares this object to the specified object. The result is <code>true</code> if and only if the argument is
* not <code>null</code> and is an <code>MutableBoolean</code> object that contains the same
* <code>boolean</code> value as this object.
*
* @param obj the object to compare with, null returns false
* @return <code>true</code> if the objects are the same; <code>false</code> otherwise.
*/
@Override
public boolean equals(final Object obj) {
if (obj instanceof MutableBoolean) {
return value == ((MutableBoolean) obj).booleanValue();
}
return false;
}
/**
* Returns a suitable hash code for this mutable.
*
* @return the hash code returned by <code>Boolean.TRUE</code> or <code>Boolean.FALSE</code>
*/
@Override
public int hashCode() {
return value ? Boolean.TRUE.hashCode() : Boolean.FALSE.hashCode();
}
//-----------------------------------------------------------------------
/**
* Compares this mutable to another in ascending order.
*
* @param other the other mutable to compare to, not null
* @return negative if this is less, zero if equal, positive if greater
* where false is less than true
*/
@Override
public int compareTo(final MutableBoolean other) {
return BooleanUtils.compare(this.value, other.value);
}
//-----------------------------------------------------------------------
/**
* Returns the String value of this mutable.
*
* @return the mutable value as a string
*/
@Override
public String toString() {
return String.valueOf(value);
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
ddc5f5523dd6bebb8f0543d00b63137fc7175904
|
7c2ae7375b00e66838ea5c5ff1f1569cce47760a
|
/profiler-test/src/main/java/com/navercorp/pinpoint/test/classloader/TestClassLoader.java
|
741e9a96ebdd90f612ac4ea15fb2c9d97dcc4b9f
|
[
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"DOC",
"CC-BY-3.0",
"GPL-1.0-or-later",
"CC-PDDC",
"MIT",
"CC0-1.0",
"GPL-2.0-only",
"LicenseRef-scancode-public-domain"
] |
permissive
|
tank1314/pinpoint
|
1bb74822a144d317ed58c434b222ed67468deaa4
|
ad8b4ffeb50e29969f6be806699fcd7e9ef5b07c
|
refs/heads/master
| 2020-03-26T22:54:12.392621
| 2018-08-21T07:40:38
| 2018-08-21T07:40:38
| 118,546,232
| 0
| 0
|
Apache-2.0
| 2018-05-12T03:08:35
| 2018-01-23T02:32:45
|
Java
|
UTF-8
|
Java
| false
| false
| 6,277
|
java
|
/*
* Copyright 2016 NAVER Corp.
*
* 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.navercorp.pinpoint.test.classloader;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentContext;
import com.navercorp.pinpoint.profiler.instrument.InstrumentEngine;
import com.navercorp.pinpoint.profiler.instrument.ASMEngine;
import com.navercorp.pinpoint.profiler.instrument.classloading.ClassInjector;
import com.navercorp.pinpoint.profiler.instrument.classloading.DebugTransformerClassInjector;
import com.navercorp.pinpoint.profiler.instrument.JavassistEngine;
import com.navercorp.pinpoint.profiler.plugin.ClassFileTransformerLoader;
import com.navercorp.pinpoint.profiler.plugin.MatchableClassFileTransformerGuardDelegate;
import com.navercorp.pinpoint.profiler.plugin.PluginInstrumentContext;
import com.navercorp.pinpoint.test.MockApplicationContext;
import javassist.ClassPool;
import com.navercorp.pinpoint.bootstrap.config.ProfilerConfig;
import com.navercorp.pinpoint.bootstrap.instrument.matcher.Matcher;
import com.navercorp.pinpoint.bootstrap.instrument.matcher.Matchers;
import com.navercorp.pinpoint.bootstrap.instrument.transformer.TransformCallback;
import com.navercorp.pinpoint.common.util.Asserts;
/**
* @author emeroad
* @author hyungil.jeong
*/
public class TestClassLoader extends TransformClassLoader {
private final Logger logger = Logger.getLogger(TestClassLoader.class.getName());
private final MockApplicationContext applicationContext;
private Translator instrumentTranslator;
private final List<String> delegateClass;
private final ClassFileTransformerLoader classFileTransformerLoader;
private final InstrumentContext instrumentContext;
public TestClassLoader(MockApplicationContext applicationContext) {
Asserts.notNull(applicationContext, "applicationContext");
this.applicationContext = applicationContext;
this.classFileTransformerLoader = new ClassFileTransformerLoader(applicationContext.getProfilerConfig(), applicationContext.getDynamicTransformTrigger());
// ClassInjector classInjector = new LegacyProfilerPluginClassInjector(getClass().getClassLoader());
ClassInjector classInjector = new DebugTransformerClassInjector();
this.instrumentContext = new PluginInstrumentContext(applicationContext.getProfilerConfig(), applicationContext.getInstrumentEngine(),
applicationContext.getDynamicTransformTrigger(), classInjector, classFileTransformerLoader);
this.delegateClass = new ArrayList<String>();
}
public void addDelegateClass(String className) {
if (className == null) {
throw new NullPointerException("className must not be null");
}
this.delegateClass.add(className);
}
@Override
protected Class<?> findClass(String name) throws ClassNotFoundException {
if (logger.isLoggable(Level.FINE)) {
logger.fine("findClass className:{}" + name);
}
return super.findClass(name);
}
public void initialize() {
addDefaultDelegateLoadingOf();
addCustomDelegateLoadingOf();
addTranslator();
}
private void addCustomDelegateLoadingOf() {
for (String className : delegateClass) {
this.delegateLoadingOf(className);
}
}
public ProfilerConfig getProfilerConfig() {
return applicationContext.getProfilerConfig();
}
public void addTransformer(final String targetClassName, final TransformCallback transformer) {
if (logger.isLoggable(Level.FINE)) {
logger.fine("addTransformer targetClassName:{}" + targetClassName + " callback:{}" + transformer);
}
final Matcher matcher = Matchers.newClassNameMatcher(targetClassName);
final MatchableClassFileTransformerGuardDelegate guard = new MatchableClassFileTransformerGuardDelegate(applicationContext.getProfilerConfig(), instrumentContext, matcher, transformer);
this.instrumentTranslator.addTransformer(guard);
}
private void addDefaultDelegateLoadingOf() {
TestClassList testClassList = new TestClassList();
for (String className : testClassList.getTestClassList()) {
this.delegateLoadingOf(className);
}
}
@Override
protected Class<?> loadClassByDelegation(String name) throws ClassNotFoundException {
if (logger.isLoggable(Level.FINE)) {
logger.fine("loadClassByDelegation className:{}" + name);
}
return super.loadClassByDelegation(name);
}
public void addTranslator() {
final InstrumentEngine instrumentEngine = applicationContext.getInstrumentEngine();
if (instrumentEngine instanceof JavassistEngine) {
logger.info("JAVASSIST BCI engine");
ClassPool classPool = ((JavassistEngine) instrumentEngine).getClassPool(this);
this.instrumentTranslator = new JavassistTranslator(this, classPool, applicationContext.getClassFileTransformerDispatcher());
this.addTranslator(instrumentTranslator);
} else if (instrumentEngine instanceof ASMEngine) {
logger.info("ASM BCI engine");
this.instrumentTranslator = new DefaultTranslator(this, applicationContext.getClassFileTransformerDispatcher());
this.addTranslator(instrumentTranslator);
} else {
logger.info("Unknown BCI engine");
this.instrumentTranslator = new DefaultTranslator(this, applicationContext.getClassFileTransformerDispatcher());
this.addTranslator(instrumentTranslator);
}
}
}
|
[
"kun.tan@baozun.com"
] |
kun.tan@baozun.com
|
7105ee117daf2f60045c06b8dbfa38139e9d681a
|
eaec4795e768f4631df4fae050fd95276cd3e01b
|
/src/cmps252/HW4_2/UnitTesting/record_4312.java
|
413212301a9e13d3dae8fad778fd9830bd63592b
|
[
"MIT"
] |
permissive
|
baraabilal/cmps252_hw4.2
|
debf5ae34ce6a7ff8d3bce21b0345874223093bc
|
c436f6ae764de35562cf103b049abd7fe8826b2b
|
refs/heads/main
| 2023-01-04T13:02:13.126271
| 2020-11-03T16:32:35
| 2020-11-03T16:32:35
| 307,839,669
| 1
| 0
|
MIT
| 2020-10-27T22:07:57
| 2020-10-27T22:07:56
| null |
UTF-8
|
Java
| false
| false
| 2,442
|
java
|
package cmps252.HW4_2.UnitTesting;
import static org.junit.jupiter.api.Assertions.*;
import java.io.FileNotFoundException;
import java.util.List;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import cmps252.HW4_2.Customer;
import cmps252.HW4_2.FileParser;
@Tag("38")
class Record_4312 {
private static List<Customer> customers;
@BeforeAll
public static void init() throws FileNotFoundException {
customers = FileParser.getCustomers(Configuration.CSV_File);
}
@Test
@DisplayName("Record 4312: FirstName is Jake")
void FirstNameOfRecord4312() {
assertEquals("Jake", customers.get(4311).getFirstName());
}
@Test
@DisplayName("Record 4312: LastName is Fidel")
void LastNameOfRecord4312() {
assertEquals("Fidel", customers.get(4311).getLastName());
}
@Test
@DisplayName("Record 4312: Company is Dazor Manufacturing Corp")
void CompanyOfRecord4312() {
assertEquals("Dazor Manufacturing Corp", customers.get(4311).getCompany());
}
@Test
@DisplayName("Record 4312: Address is 499 Cooper Landing Rd")
void AddressOfRecord4312() {
assertEquals("499 Cooper Landing Rd", customers.get(4311).getAddress());
}
@Test
@DisplayName("Record 4312: City is Cherry Hill")
void CityOfRecord4312() {
assertEquals("Cherry Hill", customers.get(4311).getCity());
}
@Test
@DisplayName("Record 4312: County is Camden")
void CountyOfRecord4312() {
assertEquals("Camden", customers.get(4311).getCounty());
}
@Test
@DisplayName("Record 4312: State is NJ")
void StateOfRecord4312() {
assertEquals("NJ", customers.get(4311).getState());
}
@Test
@DisplayName("Record 4312: ZIP is 8002")
void ZIPOfRecord4312() {
assertEquals("8002", customers.get(4311).getZIP());
}
@Test
@DisplayName("Record 4312: Phone is 856-667-8903")
void PhoneOfRecord4312() {
assertEquals("856-667-8903", customers.get(4311).getPhone());
}
@Test
@DisplayName("Record 4312: Fax is 856-667-6617")
void FaxOfRecord4312() {
assertEquals("856-667-6617", customers.get(4311).getFax());
}
@Test
@DisplayName("Record 4312: Email is jake@fidel.com")
void EmailOfRecord4312() {
assertEquals("jake@fidel.com", customers.get(4311).getEmail());
}
@Test
@DisplayName("Record 4312: Web is http://www.jakefidel.com")
void WebOfRecord4312() {
assertEquals("http://www.jakefidel.com", customers.get(4311).getWeb());
}
}
|
[
"mbdeir@aub.edu.lb"
] |
mbdeir@aub.edu.lb
|
b449ab3e2e498dbf806392f6fc88846c12ddd775
|
72cbd420d57f970a6bfbf9cf4dc62f662e6a0ebb
|
/plugin/core/src/com/perl5/lang/perl/idea/configuration/settings/sdk/wrappers/Perl5RealSdkWrapper.java
|
d90f435685bfaa7bad561509c9f80c9ab12793d1
|
[
"Apache-2.0"
] |
permissive
|
xcodejoy/Perl5-IDEA
|
e36061de84cc1780ed76711190bb5ce4b05fa3f0
|
2179a9ab2e9006d4c5501a878f484293220046ac
|
refs/heads/master
| 2020-09-19T09:15:35.960543
| 2019-11-23T08:46:28
| 2019-11-23T08:46:28
| 224,215,081
| 1
| 0
|
NOASSERTION
| 2019-11-26T14:44:56
| 2019-11-26T14:44:55
| null |
UTF-8
|
Java
| false
| false
| 3,181
|
java
|
/*
* Copyright 2015-2019 Alexandr Evstigneev
*
* 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.perl5.lang.perl.idea.configuration.settings.sdk.wrappers;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.projectRoots.SdkType;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.ui.ColoredListCellRenderer;
import com.intellij.ui.SimpleTextAttributes;
import com.perl5.lang.perl.idea.sdk.host.PerlHostData;
import com.perl5.lang.perl.idea.sdk.versionManager.PerlVersionManagerData;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class Perl5RealSdkWrapper implements Perl5SdkWrapper {
@NotNull
private final Sdk mySdk;
public Perl5RealSdkWrapper(@NotNull Sdk sdk) {
mySdk = sdk;
}
@Override
public void customizeRenderer(@NotNull ColoredListCellRenderer<Perl5SdkWrapper> renderer) {
SdkType sdkType = (SdkType)mySdk.getSdkType();
renderer.setIcon(sdkType.getIcon());
appendSdkString(renderer, mySdk);
}
@NotNull
public Sdk getSdk() {
return mySdk;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof Perl5RealSdkWrapper)) return false;
Perl5RealSdkWrapper wrapper = (Perl5RealSdkWrapper)o;
return getSdk().equals(wrapper.getSdk());
}
@Override
public int hashCode() {
return getSdk().hashCode();
}
@Override
public String toString() {
return "SDK: " + mySdk;
}
public static void appendSdkString(@NotNull ColoredListCellRenderer<Perl5SdkWrapper> renderer, @NotNull Sdk sdk) {
PerlHostData hostData = PerlHostData.notNullFrom(sdk);
renderPair(renderer, hostData.getPrimaryShortName(), hostData.getSecondaryShortName());
PerlVersionManagerData<?, ?> versionManagerData = PerlVersionManagerData.notNullFrom(sdk);
renderPair(renderer, versionManagerData.getPrimaryShortName(), versionManagerData.getSecondaryShortName());
renderer.append(StringUtil.notNullize(sdk.getVersionString()));
}
private static void renderPair(@NotNull ColoredListCellRenderer<Perl5SdkWrapper> renderer,
@NotNull String primary,
@Nullable String secondary) {
renderer.append(StringUtil.capitalize(primary));
if (secondary != null) {
renderer.append(secondary, SimpleTextAttributes.GRAY_ATTRIBUTES);
}
renderer.append(", ");
}
@Contract("null->null;!null->!null")
@Nullable
public static Perl5RealSdkWrapper create(@Nullable Sdk sdk) {
return sdk == null ? null : new Perl5RealSdkWrapper(sdk);
}
}
|
[
"hurricup@gmail.com"
] |
hurricup@gmail.com
|
81bd256604cfdc0ca60f2d9b893e587145f2aae9
|
1328303f5adc79c093e97788b198faff347c8069
|
/springannotation/src/test/java/com/ntuzy/test/IOTest_Property.java
|
c047f7ce4fd502a0affa06e305c8d26f26e00116
|
[] |
no_license
|
IamZY/Spring
|
850bebaf851b34fac5dc5e38039894aee0a9ec69
|
0254ae7361e997f6bf3deef281cd9c464b0cb073
|
refs/heads/master
| 2022-12-12T12:20:42.520179
| 2020-07-15T03:50:59
| 2020-07-15T03:50:59
| 241,874,223
| 1
| 0
| null | 2022-12-09T01:14:46
| 2020-02-20T12:06:48
|
Java
|
UTF-8
|
Java
| false
| false
| 721
|
java
|
package com.ntuzy.test;
import com.ntuzy.bean.Car;
import com.ntuzy.bean.Person;
import com.ntuzy.config.MainConfigOfLifeCycle;
import com.ntuzy.config.MainConfig_Pro;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
/**
* @Author IamZY
* @create 2020/2/20 20:43
*/
public class IOTest_Property {
@Test
public void test() {
AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(MainConfig_Pro.class);
Person person = (Person) annotationConfigApplicationContext.getBean("person");
System.out.println(person);
annotationConfigApplicationContext.close();
}
}
|
[
"562018301@qq.com"
] |
562018301@qq.com
|
f435a7d1b55db95601f9ef0df3b0adfbf1a2d50c
|
160a34361073a54d39ffa14fdae6ce3cbc7d6e6b
|
/src/main/java/com/alipay/api/domain/StandardCategoryInfo.java
|
5b44136dce789c219615269cdd95a0c7002cac93
|
[
"Apache-2.0"
] |
permissive
|
appbootup/alipay-sdk-java-all
|
6a5e55629b9fc77e61ee82ea2c4cdab2091e0272
|
9ae311632a4053b8e5064b83f97cf1503a00147b
|
refs/heads/master
| 2020-05-01T09:45:44.940180
| 2019-03-15T09:52:14
| 2019-03-15T09:52:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,932
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 口碑标准后台类目
*
* @author auto create
* @since 1.0, 2017-06-06 11:40:51
*/
public class StandardCategoryInfo extends AlipayObject {
private static final long serialVersionUID = 7447165982567425265L;
/**
* 后台类目ID,类目信息的主键;商品类目ID,发布/修改商品的时候,需要填写商品所属的类目ID
*/
@ApiField("category_id")
private String categoryId;
/**
* 是否为叶子类目,商品只能够发布在叶子类目下
*/
@ApiField("is_leaf")
private String isLeaf;
/**
* 类目名称
*/
@ApiField("name")
private String name;
/**
* 本类目的上一级类目ID,如果本类目是一级类目,上一级类目ID为空
*/
@ApiField("parent_id")
private String parentId;
/**
* 类目路径,递归父一级类目ID的列表,依次按照一级、二级、三级...顺序排列
*/
@ApiField("path")
private String path;
/**
* 类目所属一级类目的ID,若本类目是一级类目,值为本类目的ID
*/
@ApiField("root_id")
private String rootId;
public String getCategoryId() {
return this.categoryId;
}
public void setCategoryId(String categoryId) {
this.categoryId = categoryId;
}
public String getIsLeaf() {
return this.isLeaf;
}
public void setIsLeaf(String isLeaf) {
this.isLeaf = isLeaf;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getParentId() {
return this.parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public String getPath() {
return this.path;
}
public void setPath(String path) {
this.path = path;
}
public String getRootId() {
return this.rootId;
}
public void setRootId(String rootId) {
this.rootId = rootId;
}
}
|
[
"liuqun.lq@alibaba-inc.com"
] |
liuqun.lq@alibaba-inc.com
|
2bae16e3a285e4b5541f8094cda1fb6203e75cf2
|
4a14000f60919ca75d7a3200116f5b181f298806
|
/src/com/test/unit9/VerifierTest.java
|
d877e8d363a9aa067e17b39ef93913ce96ee1c56
|
[] |
no_license
|
Gitrenzhijiang/JavaCoreDemo
|
5b0f19fea5116e1186c16bdab11c5f2aab4af5df
|
36bf1e9d41e977c941ee7d23a239ab71ffb3f94e
|
refs/heads/master
| 2020-04-23T15:32:55.923512
| 2019-02-18T11:13:05
| 2019-02-18T11:13:05
| 171,269,498
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,235
|
java
|
package com.test.unit9;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.nio.file.Paths;
/**
* Java SecurityManager 测试实例
* @author REN
*
*/
public class VerifierTest {
public static void main(String[] args) throws Exception {
System.setProperty("java.security.policy", "MyApp.policy");
SecurityManager sm = new SecurityManager();
System.setSecurityManager(sm); // 安装安全管理器
System.out.println(sm);
File file = Paths.get("D://a/123.txt").toFile();
try (
PrintWriter pw = new PrintWriter(
new OutputStreamWriter(
new FileOutputStream(file, true)));
){
pw.append("hello,world");
}
}
static int fun()
{
int m = 1;
int n;
m = 1;
n = 2; // 在n=2,的字节码变成m=2;
int r = m + n;
return r;
}
}
|
[
"781386910@qq.com"
] |
781386910@qq.com
|
94c9dd33ace703c06c56040af4b42c65b860f1a7
|
e306ba2d2ff8ca1945291f011bef28deba026b80
|
/zhouchao/Exercise0425/src/cn/hfxt/entity/ZC.java
|
277712e09e86fa1920b4a1738c5e04cd54aef77e
|
[] |
no_license
|
SunYongLi12/SunYL
|
e7a80d0e79c1d57d7a36ae54b90ae9b79faaba7f
|
634e88975c3d03d084a5d7b2a8c31238fcf563f5
|
refs/heads/master
| 2023-04-14T11:39:19.355638
| 2021-04-28T04:35:03
| 2021-04-28T04:35:03
| 362,008,601
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 278
|
java
|
package cn.hfxt.entity;
public class ZC {
private int id;
private String rank;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getRank() {
return rank;
}
public void setRank(String rank) {
this.rank = rank;
}
}
|
[
"goodMorning_pro@at.bdqn.com"
] |
goodMorning_pro@at.bdqn.com
|
7a9239e845c90489ff7daa80d0475b60fd380fd8
|
fea07f0dd2555f7b51e3cdd15e96812820499aea
|
/hedera-node/src/test/java/com/hedera/test/factories/accounts/MockFCMapFactory.java
|
0998e9636a9ef4f0c616de1580894e99c0911b27
|
[
"Apache-2.0"
] |
permissive
|
Vinci-zZ/hedera-services
|
e663c3dc1aae8742d92b0031727861c5fb323c97
|
afa3afb5041a908a783fc0b91c61facc532a7463
|
refs/heads/master
| 2023-02-28T03:44:11.524812
| 2021-02-06T06:26:00
| 2021-02-06T06:26:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,295
|
java
|
package com.hedera.test.factories.accounts;
/*-
*
* Hedera Services Node
*
* Copyright (C) 2018 - 2020 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import com.hedera.services.state.merkle.MerkleEntityId;
import com.hedera.services.state.merkle.MerkleAccount;
import com.swirlds.fcmap.FCMap;
import static com.hedera.test.utils.IdUtils.asContract;
import static org.mockito.BDDMockito.*;
import static com.hedera.test.utils.IdUtils.asAccount;
import static com.hedera.test.factories.accounts.MerkleAccountFactory.newAccount;
import static com.hedera.test.factories.txns.SignedTxnFactory.*;
public class MockFCMapFactory {
public static final long NODE_BALANCE = 1_000_000_000L;
public static final long GENESIS_BALANCE = 50_000_000_000_000L;
private final FCMap mock = mock(FCMap.class);
private MockFCMapFactory() {}
public static MockFCMapFactory newAccounts() {
return new MockFCMapFactory();
}
public static MockFCMapFactory newAccountsWithDefaults() throws Exception {
return newAccounts()
.withAccount(DEFAULT_NODE_ID, newAccount().balance(NODE_BALANCE).get())
.withAccount(DEFAULT_PAYER_ID, newAccount().balance(GENESIS_BALANCE).accountKeys(DEFAULT_PAYER_KT).get());
}
public MockFCMapFactory withAccount(String id, MerkleAccount meta) {
MerkleEntityId account = MerkleEntityId.fromAccountId(asAccount(id));
given(mock.get(account)).willReturn(meta);
return this;
}
public MockFCMapFactory withContract(String id, MerkleAccount meta) {
MerkleEntityId contract = MerkleEntityId.fromContractId(asContract(id));
given(mock.get(contract)).willReturn(meta);
return this;
}
public FCMap<MerkleEntityId, MerkleAccount> get() {
return (FCMap<MerkleEntityId, MerkleAccount>)mock;
}
}
|
[
"michael.tinker@hedera.com"
] |
michael.tinker@hedera.com
|
04174ab64cfe9c7c40de3ee2179c44c9794f2296
|
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
|
/DrJava/rev4989-5058/base-trunk-4989/src/edu/rice/cs/drjava/model/debug/DebugEventNotifier.java
|
ba8294b324138206e2f6f161d2febc545f535c13
|
[] |
no_license
|
joliebig/featurehouse_fstmerge_examples
|
af1b963537839d13e834f829cf51f8ad5e6ffe76
|
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
|
refs/heads/master
| 2016-09-05T10:24:50.974902
| 2013-03-28T16:28:47
| 2013-03-28T16:28:47
| 9,080,611
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,801
|
java
|
package edu.rice.cs.drjava.model.debug;
import edu.rice.cs.drjava.model.EventNotifier;
import edu.rice.cs.drjava.model.OpenDefinitionsDocument;
import java.awt.EventQueue;
public class DebugEventNotifier extends EventNotifier<DebugListener> implements DebugListener {
public void debuggerStarted() {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) {
_listeners.get(i).debuggerStarted();
}
}
finally { _lock.endRead(); }
}
public void debuggerShutdown() {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) {
_listeners.get(i).debuggerShutdown();
}
}
finally { _lock.endRead(); }
}
public void threadLocationUpdated(OpenDefinitionsDocument doc, int lineNumber, boolean shouldHighlight) {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) {
_listeners.get(i).threadLocationUpdated(doc, lineNumber, shouldHighlight);
}
}
finally { _lock.endRead(); }
}
public void regionAdded(Breakpoint bp) {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) { _listeners.get(i).regionAdded(bp); }
}
finally { _lock.endRead(); }
}
public void breakpointReached(Breakpoint bp) {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) {
_listeners.get(i).breakpointReached(bp);
}
}
finally {
_lock.endRead();
}
}
public void regionChanged(Breakpoint bp) {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) {
_listeners.get(i).regionChanged(bp);
}
}
finally {
_lock.endRead();
}
}
public void watchSet(DebugWatchData w) {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) { _listeners.get(i).watchSet(w); }
}
finally { _lock.endRead(); }
}
public void watchRemoved(DebugWatchData w) {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) { _listeners.get(i).watchRemoved(w); }
}
finally { _lock.endRead(); }
}
public void regionRemoved(Breakpoint bp) {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) _listeners.get(i).regionRemoved(bp);
}
finally { _lock.endRead(); }
}
public void stepRequested() {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) _listeners.get(i).stepRequested();
}
finally { _lock.endRead(); }
}
public void currThreadSuspended() {
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) _listeners.get(i).currThreadSuspended();
}
finally { _lock.endRead(); }
}
public void currThreadResumed() {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) _listeners.get(i).currThreadResumed();
}
finally { _lock.endRead(); }
}
public void threadStarted() {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) _listeners.get(i).threadStarted();
}
finally { _lock.endRead(); }
}
public void currThreadDied() {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) _listeners.get(i).currThreadDied();
}
finally { _lock.endRead(); }
}
public void nonCurrThreadDied() {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) _listeners.get(i).nonCurrThreadDied();
}
finally { _lock.endRead(); }
}
public void currThreadSet(DebugThreadData thread) {
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) {
_listeners.get(i).currThreadSet(thread);
}
}
finally { _lock.endRead(); }
}
}
|
[
"joliebig@fim.uni-passau.de"
] |
joliebig@fim.uni-passau.de
|
ca6821a1c7fc67e8d841cd4358f3f5c444842273
|
e048cb9cd0a7d49bb284dcc3d9a0871713127c48
|
/leasing-company-parent/leasing-company-service/src/main/java/com/cloudkeeper/leasing/company/repository/AttendanceRepository.java
|
cb28675eb899e0de952e14535c5686ddb46a327a
|
[] |
no_license
|
lzj1995822/GuSuCommunityApi
|
65b97a0c9f8bdeb608f887970f4d2e99d2306785
|
51348b26b9b0c0017dca807847695b3740aaf2e8
|
refs/heads/master
| 2020-04-23T19:18:18.348991
| 2019-04-28T02:56:21
| 2019-04-28T02:56:21
| 171,398,689
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 253
|
java
|
package com.cloudkeeper.leasing.company.repository;
import com.cloudkeeper.leasing.base.repository.BaseRepository;
import com.cloudkeeper.leasing.company.domain.Attendance;
public interface AttendanceRepository extends BaseRepository<Attendance> {
}
|
[
"243485908@qq.com"
] |
243485908@qq.com
|
cf1d4049197759a12add8762486d70713f6d201e
|
cf0b2e2fcd3838e470cb4c205dda8cc05ac11628
|
/hotils-inject/src/main/java/org/hotilsframework/inject/annotation/Inject.java
|
af51933cb27f2a0a61061c4c8f7aa4574924e21f
|
[] |
no_license
|
hireny/hotils
|
b216b2991c7f3ad6447dbcc8433a9a771e8be1e3
|
0b59a3853d5e636a4a499cca8e7799d540ece62b
|
refs/heads/master
| 2021-09-10T02:05:54.275527
| 2021-08-26T14:44:08
| 2021-08-26T14:44:08
| 225,169,822
| 0
| 0
| null | 2020-10-13T20:59:23
| 2019-12-01T13:54:30
|
Java
|
UTF-8
|
Java
| false
| false
| 423
|
java
|
package org.hotilsframework.inject.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Inject注解,相当于Spring的@Autowired
* @author hireny
* @className Inject
* @create 2020-04-01 20:15
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Inject {
}
|
[
"910502500@qq.com"
] |
910502500@qq.com
|
d0031958994f0c808cab10fe5e27530a91d5de76
|
61dea18460df6f2bc1fe19af8bfa6e0809406885
|
/ecmoban/src/main/java/com/ecjia/view/adapter/DataBindingAdapter.java
|
1e1eaff9d779f3bfec13591f934059bac174fd52
|
[] |
no_license
|
hackerlc/SJQ_ECSHOP_MJ_NEW
|
a006261856124671bceaf92d1f65d4905dc35078
|
2c8ac3f2464c4536c079ac067ec761adcd9c267e
|
refs/heads/master
| 2021-08-31T11:01:29.247522
| 2017-12-21T03:55:09
| 2017-12-21T03:55:09
| 114,960,406
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 444
|
java
|
package com.ecjia.view.adapter;
import android.databinding.BindingAdapter;
import android.widget.ImageView;
import com.ecjia.util.ImageLoaderForLV;
/**
* SJQ_ECSHOP_MJ_NEW
* Created by YichenZ on 2017/2/22 13:32.
*/
public class DataBindingAdapter {
@BindingAdapter("android:src")
public static void setImageUrl(ImageView view, String url){
ImageLoaderForLV.getInstance(view.getContext()).setImageRes(view, url);
}
}
|
[
"812405389@qq.com"
] |
812405389@qq.com
|
35698160e29652501fef334dbd7f4b08f1be6295
|
7c7c660e45be16b60f74d5cc5daa3f7c71fe45d4
|
/ecolls-j/src/main/java/xyz/cofe/collection/UnionMap.java
|
de0b4865ef02c6f6acbfd00a85a86efc46fc74e3
|
[
"MIT"
] |
permissive
|
gochaorg/cofe.xyz-next
|
9f160e6726d5af9d6efd5eda8b86b381c9d62824
|
02cb327222d113fd53e773bd61c3a0aeef24b9b2
|
refs/heads/master
| 2022-11-27T05:52:42.549697
| 2022-10-15T22:13:51
| 2022-10-15T22:13:51
| 200,032,063
| 0
| 0
|
MIT
| 2022-11-15T23:42:12
| 2019-08-01T10:45:09
|
Java
|
UTF-8
|
Java
| false
| false
| 9,113
|
java
|
/*
* The MIT License
*
* Copyright 2014 Kamnev Georgiy (nt.gocha@gmail.com).
*
* Данная лицензия разрешает, безвозмездно, лицам, получившим копию данного программного
* обеспечения и сопутствующей документации (в дальнейшем именуемыми "Программное Обеспечение"),
* использовать Программное Обеспечение без ограничений, включая неограниченное право на
* использование, копирование, изменение, объединение, публикацию, распространение, сублицензирование
* и/или продажу копий Программного Обеспечения, также как и лицам, которым предоставляется
* данное Программное Обеспечение, при соблюдении следующих условий:
*
* Вышеупомянутый копирайт и данные условия должны быть включены во все копии
* или значимые части данного Программного Обеспечения.
*
* ДАННОЕ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ «КАК ЕСТЬ», БЕЗ ЛЮБОГО ВИДА ГАРАНТИЙ,
* ЯВНО ВЫРАЖЕННЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, ВКЛЮЧАЯ, НО НЕ ОГРАНИЧИВАЯСЬ ГАРАНТИЯМИ ТОВАРНОЙ ПРИГОДНОСТИ,
* СООТВЕТСТВИЯ ПО ЕГО КОНКРЕТНОМУ НАЗНАЧЕНИЮ И НЕНАРУШЕНИЯ ПРАВ. НИ В КАКОМ СЛУЧАЕ АВТОРЫ
* ИЛИ ПРАВООБЛАДАТЕЛИ НЕ НЕСУТ ОТВЕТСТВЕННОСТИ ПО ИСКАМ О ВОЗМЕЩЕНИИ УЩЕРБА, УБЫТКОВ
* ИЛИ ДРУГИХ ТРЕБОВАНИЙ ПО ДЕЙСТВУЮЩИМ КОНТРАКТАМ, ДЕЛИКТАМ ИЛИ ИНОМУ, ВОЗНИКШИМ ИЗ, ИМЕЮЩИМ
* ПРИЧИНОЙ ИЛИ СВЯЗАННЫМ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ ИЛИ ИСПОЛЬЗОВАНИЕМ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ
* ИЛИ ИНЫМИ ДЕЙСТВИЯМИ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ.
*/
package xyz.cofe.collection;
import xyz.cofe.iter.ArrayIterable;
import java.util.Collection;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Карта для записи в несколько других карт и чтение из указанной
* @author gocha
*/
public class UnionMap<K,V> implements Map<K, V>{
//<editor-fold defaultstate="collapsed" desc="log Функции">
private static void logFine(String message,Object ... args){
Logger.getLogger(UnionMap.class.getName()).log(Level.FINE, message, args);
}
private static void logFiner(String message,Object ... args){
Logger.getLogger(UnionMap.class.getName()).log(Level.FINER, message, args);
}
private static void logInfo(String message,Object ... args){
Logger.getLogger(UnionMap.class.getName()).log(Level.INFO, message, args);
}
private static void logWarning(String message,Object ... args){
Logger.getLogger(UnionMap.class.getName()).log(Level.WARNING, message, args);
}
private static void logSevere(String message,Object ... args){
Logger.getLogger(UnionMap.class.getName()).log(Level.SEVERE, message, args);
}
private static void logException(Throwable ex){
Logger.getLogger(UnionMap.class.getName()).log(Level.SEVERE, null, ex);
}
//</editor-fold>
protected Map<K,V> readMap = null;
protected Iterable<Map> writeMaps = null;
/**
* Возвращает карту из которой произодит чтение
* @return карта для чтения
*/
public Map<K, V> getReadMap() {
return readMap;
}
/**
* Указывает карту из которой произодит чтение
* @param readMap карта для чтения
*/
public void setReadMap(Map<K, V> readMap) {
this.readMap = readMap;
}
/**
* Возвращает карты в которые производит запись
* @return карты для записи
*/
public Iterable<Map> getWriteMaps() {
return writeMaps;
}
/**
* Указывет карты в которые производит запись
* @param writeMaps карты для записи
*/
public void setWriteMaps(Iterable<Map> writeMaps) {
this.writeMaps = writeMaps;
}
/**
* Указывет карты в которые производит запись
* @param maps карты для записи
*/
public void setWriteMaps(Map ... maps){
this.writeMaps = new ArrayIterable<>(maps);
}
/**
* Возвращает размер карты
* @return размер карты
*/
@Override
public int size() {
if( readMap==null )return 0;
return readMap.size();
}
/**
* Проверяет что карта пустая
* @return true - нет элементов
*/
@Override
public boolean isEmpty() {
if( readMap==null )return true;
return readMap.isEmpty();
}
/**
* Проверяет наличие ключа в карте
* @param key ключ
* @return true - есть в карте
*/
@Override
public boolean containsKey(Object key) {
if( readMap==null )return false;
return readMap.containsKey(key);
}
/**
* ПРоверяет наличие значения в карте
* @param value значение
* @return true - есть значение
*/
@Override
public boolean containsValue(Object value) {
if( readMap==null )return false;
return readMap.containsValue(value);
}
/**
* Возвращает значение по ключу
* @param key ключ
* @return значение
*/
@Override
public V get(Object key) {
if( readMap==null )return null;
return readMap.get(key);
}
/**
* Устанавливает ключ/значение
* @param key ключ
* @param value значние
* @return предыдущее (последнее) значение
*/
@Override
public V put(K key, V value) {
V r = null;
if( writeMaps!=null ){
for( Map<K,V> m : writeMaps ){
if( m!=null ){
r = m.put(key, value);
}
}
}
return r;
}
/**
* Удаляет ключ/значение
* @param key ключ
* @return предыдущее значение
*/
@Override
public V remove(Object key) {
V r = null;
if( writeMaps!=null ){
for( Map<K,V> m : writeMaps ){
if( m!=null ){
r = m.remove(key);
}
}
}
return r;
}
/**
* Добавляет значения
* @param ms значения
*/
@Override
public void putAll(Map<? extends K, ? extends V> ms) {
if( writeMaps!=null ){
for( Map<K,V> m : writeMaps ){
if( m!=null ){
m.putAll(ms);
}
}
}
}
/**
* Удялет все значения
*/
@Override
public void clear() {
if( writeMaps!=null ){
for( Map<K,V> m : writeMaps ){
if( m!=null ){
m.clear();
}
}
}
}
/**
* Возвращает все ключи карты
* @return ключи
*/
@Override
public Set<K> keySet() {
if( readMap==null )return new HashSet<K>();
return readMap.keySet();
}
/**
* Возвращает значения карты
* @return значения
*/
@Override
public Collection<V> values() {
if( readMap==null )return new HashSet<V>();
return readMap.values();
}
/**
* Возвращает пары ключ/значние
* @return пары ключ/значние
*/
@Override
public Set<Entry<K, V>> entrySet() {
if( readMap==null )return new HashSet<Entry<K, V>>();
return readMap.entrySet();
}
}
|
[
"nt.gocha@gmail.com"
] |
nt.gocha@gmail.com
|
61dbc5f1c4683ed6ad2faae8438527ca56253fa8
|
3ee9187e459512f33ff1c4231e9edfb321380d08
|
/src/main/java/org/spongepowered/common/event/tracking/context/transaction/effect/RemoveTileEntityFromChunkEffect.java
|
cc118789df8e64b3807ea415793000e80c329b5a
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
SpongePowered/Sponge
|
37ef5f6c77cdbbdb007d6e68f4c5a1be0e56441e
|
5d39e239d8de5e746efdb82725854ee1f57a34a5
|
refs/heads/api-10
| 2023-08-17T05:53:40.685621
| 2023-06-17T21:01:13
| 2023-06-17T21:01:13
| 33,791,453
| 171
| 97
|
MIT
| 2023-09-12T11:49:33
| 2015-04-11T20:38:48
|
Java
|
UTF-8
|
Java
| false
| false
| 2,578
|
java
|
/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.common.event.tracking.context.transaction.effect;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import org.spongepowered.common.event.tracking.context.transaction.pipeline.BlockPipeline;
import org.spongepowered.common.event.tracking.context.transaction.pipeline.PipelineCursor;
import org.spongepowered.common.world.SpongeBlockChangeFlag;
public final class RemoveTileEntityFromChunkEffect implements ProcessingSideEffect {
private static final class Holder {
static final RemoveTileEntityFromChunkEffect INSTANCE = new RemoveTileEntityFromChunkEffect();
}
public static RemoveTileEntityFromChunkEffect getInstance() {
return RemoveTileEntityFromChunkEffect.Holder.INSTANCE;
}
RemoveTileEntityFromChunkEffect() {}
@Override
public EffectResult processSideEffect(final BlockPipeline pipeline, final PipelineCursor oldState, final BlockState newState,
final SpongeBlockChangeFlag flag, final int limit
) {
final BlockEntity tileEntity = oldState.tileEntity;
if (tileEntity == null) {
return EffectResult.NULL_RETURN;
}
pipeline.getAffectedChunk().removeBlockEntity(oldState.pos);
return EffectResult.NULL_RETURN;
}
}
|
[
"gabizou@me.com"
] |
gabizou@me.com
|
d64ed7927fee679883a9d1e23d2ccc998c53ce05
|
ada0c9168deedece91162b5c2a3908c61626caaa
|
/src/telas/NotaSaida/ListaProdutoSaidaBeanTableModel.java
|
4e4e5f895cf408fc871dbd9ca8c363c751882462
|
[] |
no_license
|
julioizidoro/jgdynamic
|
52464107c48c43708eb91637ee82dad7d321bc89
|
11735a498712f902409688d30963a79a7c990c9d
|
refs/heads/master
| 2020-04-12T01:33:54.980169
| 2019-04-25T18:54:38
| 2019-04-25T18:54:38
| 30,019,734
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,160
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package telas.NotaSaida;
import Regras.Formatacao;
import java.util.List;
import javax.swing.table.AbstractTableModel;
/**
*
* @author wolverine
*/
public class ListaProdutoSaidaBeanTableModel extends AbstractTableModel{
private List<NotaSaidaProdutoBean> listaProdutoBean;
private String[] colunas ={"Código", "Descrição", "Unidade", "NCM", "CEST", "Quantidade", "Valor Unitário", "Valor Total", "Valor Desconto", "Valor Outros" ,"Situação"};
public ListaProdutoSaidaBeanTableModel(List<NotaSaidaProdutoBean> listaProdutoBean) {
this.listaProdutoBean = listaProdutoBean;
}
public int getRowCount() {
return listaProdutoBean.size();
}
public int getColumnCount() {
return colunas.length;
}
public Object getValueAt(int rowIndex, int columnIndex) {
if (columnIndex==0){
return listaProdutoBean.get(rowIndex).getProduto().getReferencia();
}else if (columnIndex==1){
return listaProdutoBean.get(rowIndex).getProduto().getDescricao();
}else if (columnIndex==2){
return listaProdutoBean.get(rowIndex).getProduto().getUnidade();
}else if (columnIndex==3){
return listaProdutoBean.get(rowIndex).getProduto().getNcm();
}else if (columnIndex==4){
return listaProdutoBean.get(rowIndex).getProduto().getCest();
}else if (columnIndex==5){
return Formatacao.foramtarQuantidade(listaProdutoBean.get(rowIndex).getQuantidade());
}else if (columnIndex==6){
return Formatacao.foramtarDoubleString(listaProdutoBean.get(rowIndex).getValorUnitario());
}else if (columnIndex==7){
return Formatacao.foramtarDoubleString(listaProdutoBean.get(rowIndex).getValortotal());
}else if (columnIndex==8){
return Formatacao.foramtarDoubleString(listaProdutoBean.get(rowIndex).getValorDesconto());
}else if (columnIndex==9){
return Formatacao.foramtarDoubleString(listaProdutoBean.get(rowIndex).getValoracessorios());
}else return listaProdutoBean.get(rowIndex).getSituacao();
}
@Override
public String getColumnName(int column) {
return colunas[column];
}
@Override
public Class<?> getColumnClass(int columnIndex) {
if (columnIndex==0){
return Integer.class;
} else if (columnIndex==1){
return String.class;
}else if (columnIndex==2){
return String.class;
}else if (columnIndex==3){
return String.class;
}else if (columnIndex==4){
return String.class;
}else if (columnIndex==5){
return String.class;
}else if (columnIndex==6){
return String.class;
}else if (columnIndex==7){
return String.class;
}else if (columnIndex==8){
return String.class;
}else return String.class;
}
}
|
[
"jizidoro@globo.com"
] |
jizidoro@globo.com
|
524faebb173e39c8c07fb42007ff5655e806c916
|
9b9c3236cc1d970ba92e4a2a49f77efcea3a7ea5
|
/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/quests/Q00365_DevilsLegacy/Q00365_DevilsLegacy.java
|
55ad11451bf2356d015dbc384494c77d085a61e3
|
[] |
no_license
|
BETAJIb/ikol
|
73018f8b7c3e1262266b6f7d0a7f6bbdf284621d
|
f3709ea10be2d155b0bf1dee487f53c723f570cf
|
refs/heads/master
| 2021-01-05T10:37:17.831153
| 2019-12-24T22:23:02
| 2019-12-24T22:23:02
| 240,993,482
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,058
|
java
|
/*
* This file is part of the L2J Mobius 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 quests.Q00365_DevilsLegacy;
import java.util.HashMap;
import java.util.Map;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
/**
* Devil's Legacy (365)
* @author Adry_85
*/
public class Q00365_DevilsLegacy extends Quest
{
// NPCs
private static final int COLLOB = 30092;
private static final int RANDOLF = 30095;
// Item
private static final int PIRATES_TREASURE_CHEST = 5873;
// Rewards
private static final int ENCHANT_WEAPON_C = 951;
private static final int ENCHANT_ARMOR_C = 952;
private static final int ENCHANT_WEAPON_D = 955;
private static final int ENCHANT_ARMOR_D = 956;
private static final int THREAD = 1868;
private static final int ANIMAL_BONE = 1872;
private static final int COKES = 1879;
private static final int STEEL = 1880;
private static final int COARSE_BONE_POWDER = 1881;
private static final int LEATHER = 1882;
private static final int CORD = 1884;
// Misc
private static final int MIN_LEVEL = 39;
// Skill
private static SkillHolder POISON = new SkillHolder(4035, 2);
// Mobs
private static final Map<Integer, Double> MOBS = new HashMap<>();
static
{
MOBS.put(20836, 0.47); // pirates_zombie
MOBS.put(20845, 0.40); // pirates_zombie_captain
MOBS.put(21629, 0.40); // pirates_zombie_captain_1
MOBS.put(21630, 0.40); // pirates_zombie_captain_2
}
public Q00365_DevilsLegacy()
{
super(365);
addStartNpc(RANDOLF);
addTalkId(RANDOLF, COLLOB);
addKillId(MOBS.keySet());
registerQuestItems(PIRATES_TREASURE_CHEST);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
final QuestState qs = getQuestState(player, false);
String htmltext = null;
if (qs == null)
{
return htmltext;
}
switch (event)
{
case "30095-02.htm":
{
qs.startQuest();
qs.setMemoState(1);
htmltext = event;
break;
}
case "30095-05.html":
{
qs.exitQuest(true, true);
htmltext = event;
break;
}
case "30095-06.html":
{
htmltext = event;
break;
}
case "REWARD":
{
if (!qs.isMemoState(1))
{
htmltext = "30092-04.html";
}
else if (!hasQuestItems(player, PIRATES_TREASURE_CHEST))
{
htmltext = "30092-02.html";
}
else if (player.getAdena() < 600)
{
htmltext = "30092-03.html";
}
else
{
final int itemId;
final int chance;
if (getRandom(100) < 80)
{
chance = getRandom(100);
if (chance < 1)
{
itemId = ENCHANT_WEAPON_D;
}
else if (chance < 4)
{
itemId = ENCHANT_ARMOR_D;
}
else if (chance < 36)
{
itemId = THREAD;
}
else if (chance < 68)
{
itemId = CORD;
}
else
{
itemId = ANIMAL_BONE;
}
htmltext = "30092-05.html";
}
else
{
chance = getRandom(1000);
if (chance < 10)
{
itemId = ENCHANT_WEAPON_C;
}
else if (chance < 40)
{
itemId = ENCHANT_ARMOR_C;
}
else if (chance < 60)
{
itemId = ENCHANT_WEAPON_D;
}
else if (chance < 260)
{
itemId = ENCHANT_ARMOR_D;
}
else if (chance < 445)
{
itemId = COKES;
}
else if (chance < 630)
{
itemId = STEEL;
}
else if (chance < 815)
{
itemId = LEATHER;
}
else
{
itemId = COARSE_BONE_POWDER;
}
npc.setTarget(player);
npc.doCast(POISON.getSkill());
npc.setCurrentMp(npc.getMaxMp());
qs.setMemoState(2);
htmltext = "30092-06.html";
}
takeItems(player, PIRATES_TREASURE_CHEST, 1);
takeItems(player, Inventory.ADENA_ID, 600);
rewardItems(player, itemId, 1);
}
break;
}
}
return htmltext;
}
@Override
public String onKill(Npc npc, PlayerInstance player, boolean isSummon)
{
final QuestState qs = getRandomPartyMemberState(player, -1, 3, npc);
if (qs != null)
{
giveItemRandomly(qs.getPlayer(), npc, PIRATES_TREASURE_CHEST, 1, 0, MOBS.get(npc.getId()), true);
}
return super.onKill(npc, player, isSummon);
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (npc.getId())
{
case RANDOLF:
{
if (qs.isCreated())
{
htmltext = ((player.getLevel() >= MIN_LEVEL) ? "30095-01.htm" : "30095-03.html");
}
else if (qs.isStarted())
{
if (hasQuestItems(player, PIRATES_TREASURE_CHEST))
{
final long chestCount = getQuestItemsCount(player, PIRATES_TREASURE_CHEST);
giveAdena(player, (chestCount * 400) + 19800, true);
takeItems(player, PIRATES_TREASURE_CHEST, -1);
htmltext = "30095-04.html";
}
else
{
htmltext = "30095-07.html";
}
}
break;
}
case COLLOB:
{
if (qs.isStarted())
{
htmltext = (qs.isMemoState(1) ? "30092-01.html" : "30092-07.html");
}
break;
}
}
return htmltext;
}
}
|
[
"mobius@cyber-wizard.com"
] |
mobius@cyber-wizard.com
|
ba76695a649be616b1337912febc162ab96e53d8
|
f860e709ba232caffe4f8f77bfa9d7c91822df3b
|
/src/java/controller/Hanggiuacontroller.java
|
d10ca2986957b2fecf1d3bae50c3463cdfdb1f0f
|
[] |
no_license
|
theanhhp/asm_Front-End-Frameworks
|
cbde4ce82ef31687ded57eac94400d4c5747d3da
|
2ef548530c7fc186ede20f4797e65b91a57f500b
|
refs/heads/master
| 2020-06-06T07:13:16.459868
| 2019-06-19T06:52:53
| 2019-06-19T06:52:53
| 192,674,682
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,980
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package controller;
import entity.Hanggiua;
import java.util.List;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
/**
*
* @author trant
*/
@Transactional
@Controller
@RequestMapping("/Hanggiua")
public class Hanggiuacontroller {
@Autowired
SessionFactory factory;
@RequestMapping()
public String index(ModelMap model) {
model.addAttribute("Hanggiua", new Hanggiua());
model.addAttribute("Hanggiuas", getHanggiua());
return "Hanggiua";
}
@RequestMapping(params = "btnInsert")
public String insert(ModelMap model, @ModelAttribute("Hanggiua") Hanggiua Hanggiua , Integer id) {
Session session = factory.openSession();
Transaction t = session.beginTransaction();
try {
if (id < 8) {
session.save(Hanggiua);
t.commit();
model.addAttribute("message", "Thêm mới thành công !");
} else {
t.rollback();
model.addAttribute("message", "Thêm mới thất bại !");
}
} catch (Exception e) {
e.printStackTrace();
} finally {
session.close();
}
model.addAttribute("Hanggiuas", getHanggiua());
return "Hanggiua";
}
@RequestMapping(params = "btnUpdate")
public String update(ModelMap model, @ModelAttribute("Hanggiua") Hanggiua Hanggiua) {
Session session = factory.openSession();
Transaction t = session.beginTransaction();
try {
session.update(Hanggiua);
t.commit();
model.addAttribute("message", "Cập nhật thành công !");
} catch (Exception e) {
t.rollback();
model.addAttribute("message", "Cập nhật thành công !");
} finally {
session.close();
}
model.addAttribute("Hanggiuas", getHanggiua());
return "Hanggiua";
}
@RequestMapping(params = "btnDelete")
public String delete(ModelMap model, Hanggiua Hanggiua) {
Session session = factory.openSession();
Transaction t = session.beginTransaction();
try {
session.delete(Hanggiua);
t.commit();
model.addAttribute("message", "Xóa thành công !");
} catch (Exception e) {
t.rollback();
model.addAttribute("message", "Xóa thất bại !");
} finally {
session.close();
}
model.addAttribute("Hanggiua", new Hanggiua());
model.addAttribute("Hanggiuas", getHanggiua());
return "Hanggiua";
}
@RequestMapping("{id}")
public String edit(ModelMap model, @PathVariable("id") Integer id) {
Session session = factory.openSession();
Hanggiua Hanggiua = (Hanggiua) session.get(Hanggiua.class, id);
model.addAttribute("Hanggiua", Hanggiua);
model.addAttribute("Hanggiuas", getHanggiua());
return "Hanggiua";
}
@ModelAttribute("Hanggiuas")
@SuppressWarnings("unchecked")
public List<Hanggiua> getHanggiua() {
Session session = factory.openSession();
String hql = "FROM Hanggiua";
Query query = session.createQuery(hql);
List<Hanggiua> list = query.list();
return list;
}
}
|
[
"="
] |
=
|
8c3d3c567dfb2f651179f1f1a82527b8cb92971f
|
be55285edbca96a3cdcf1c945e4363aa8455f15e
|
/src/main/java/co/iay/leetcode/Tester/Easy/TestConvertANumberToHexadecimal.java
|
06757bef013489ac21f4150987ce040560c776e8
|
[] |
no_license
|
liaoaoyang/LeetCode
|
03ce3ddfdf55968f719c857bc9f42f0cdd40e20f
|
338f8137c3223b4f1d73b9b96f85637ea54975f9
|
refs/heads/master
| 2021-01-16T23:41:42.275307
| 2019-04-25T00:05:16
| 2019-04-25T00:05:16
| 55,667,787
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,323
|
java
|
package co.iay.leetcode.Tester.Easy;
import co.iay.leetcode.Easy.ConvertANumberToHexadecimal;
import org.junit.Assert;
import org.junit.Test;
/**
* Created by ng on 16/10/1.
*/
public class TestConvertANumberToHexadecimal {
private ConvertANumberToHexadecimal c = new ConvertANumberToHexadecimal();
@Test
public void testTestConvertANumberToHexadecimalCase1() {
Assert.assertEquals("1", c.toHex(1));
}
@Test
public void testTestConvertANumberToHexadecimalCase2() {
Assert.assertEquals("a", c.toHex(10));
}
@Test
public void testTestConvertANumberToHexadecimalCase3() {
Assert.assertEquals("b", c.toHex(11));
}
@Test
public void testTestConvertANumberToHexadecimalCase4() {
Assert.assertEquals("1a", c.toHex(26));
}
@Test
public void testTestConvertANumberToHexadecimalCase5() {
Assert.assertEquals("ffffffff", c.toHex(-1));
}
@Test
public void testTestConvertANumberToHexadecimalCase6() {
Assert.assertEquals("fffffffe", c.toHex(-2));
}
@Test
public void testTestConvertANumberToHexadecimalCase7() {
Assert.assertEquals("10", c.toHex(16));
}
@Test
public void testTestConvertANumberToHexadecimalCase8() {
Assert.assertEquals("0", c.toHex(0));
}
}
|
[
"liaoaoyang@gmail.com"
] |
liaoaoyang@gmail.com
|
c86c16e0fab5a90c7ed90823435051d1b2a5c100
|
8341549a002086aa2ef3c9294a5f15bfec219199
|
/message/src/main/java/com/ydzb/message/service/ISmsLogService.java
|
05a731e2e9b39ae5b35daaa2b2fa5a6de64991e8
|
[] |
no_license
|
songziyang/ydzb
|
2498204b9ee3d8e101a64ee7e366d8115514908c
|
e8483e26efab94a110821a7612fbaee3b08e66d5
|
refs/heads/master
| 2021-01-19T22:41:01.600194
| 2017-04-20T09:20:24
| 2017-04-20T09:20:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 188
|
java
|
package com.ydzb.message.service;
import com.ydzb.core.service.IBaseService;
import com.ydzb.sms.entity.SmsLog;
public interface ISmsLogService extends IBaseService<SmsLog, Long> {
}
|
[
"447587850@qq.com"
] |
447587850@qq.com
|
fdcf4e5227a2666fd72fd8d6129758b87a0f533d
|
51d05106ddd3494f0b6098cc97653ffac4896b70
|
/motorMain/src/main/java/test/ZipTest.java
|
f345810ab39c709aa0e1ed5ac3523b2fc1067e7a
|
[] |
no_license
|
cyf120209/motor
|
f6ed18d334abba370f5794d20a0328f0f56188de
|
c3f2a0c83439e5447c77bb0966744654d849d899
|
refs/heads/master
| 2021-09-22T14:33:26.528610
| 2018-08-30T08:26:46
| 2018-08-30T08:26:46
| 103,228,108
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,121
|
java
|
package test;
import java.io.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream;
public class ZipTest {
public static void main(String[] args) {
ZipTest zipTest = new ZipTest();
zipTest.readZip();
}
/**
* 读取zip文件内容
*/
private void readZip() {
File fil = new File("D:\\Android\\Android.zip");
ZipInputStream zipIn = null;
try {
zipIn = new ZipInputStream(new FileInputStream(fil));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
ZipEntry zipEn = null;
/**
* 需要读取zip文件项的内容时,需要ZipFile类的对象的getInputStream方法取得该项的内容,
* 然后传递给InputStreamReader的构造方法创建InputStreamReader对象,
* 最后使用此InputStreamReader对象创建BufferedReader实例
* 至此已把zip文件项的内容读出到缓存中,可以遍历其内容
*/
ZipFile zfil = null;
try {
zfil = new ZipFile("D:\\Android\\Android.zip");
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
while ((zipEn = zipIn.getNextEntry()) != null) {
if (!zipEn.isDirectory()) { // 判断此zip项是否为目录
System.out.println(zipEn.getName() + ":\t");
/**
* 把是文件的zip项读出缓存,
* zfil.getInputStream(zipEn):返回输入流读取指定zip文件条目的内容 zfil:new
* ZipFile();供阅读的zip文件 zipEn:zip文件中的某一项
*/
// BufferedReader buff = new BufferedReader(
// new InputStreamReader(zfil.getInputStream(zipEn)));
// String str;
// while ((str = buff.readLine()) != null) {
// System.out.println("\t" + str);
// }
// buff.close();
long size = zipEn.getSize();
byte[] b = new byte[(int) size];
InputStream is = zfil.getInputStream(zipEn);
BufferedInputStream bis = new BufferedInputStream(is);
while (bis.available()>0){
bis.read(b);
}
String s = new String(b);
System.out.println("\t"+s);
bis.close();
}
zipIn.closeEntry();// 关闭当前打开的项
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
try {
zfil.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
|
[
"2445940439@qq.com"
] |
2445940439@qq.com
|
5406d98c6b134cf3bfd8f94afe9891ca661222a9
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/1/1_07b90692d7708c480911010589e0ce4fc203329a/RemoveRegionDialog/1_07b90692d7708c480911010589e0ce4fc203329a_RemoveRegionDialog_s.java
|
d3afb8bfff43fd1f06186dd5d20c8b98c874908f
|
[] |
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,001
|
java
|
package org.dawb.workbench.plotting.system.dialog;
import org.dawb.common.ui.plot.region.IRegion;
import org.dawb.workbench.plotting.system.swtxy.RegionArea;
import org.dawb.workbench.plotting.system.swtxy.XYRegionGraph;
import org.dawb.workbench.plotting.system.swtxy.selection.AbstractSelectionRegion;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
/**The dialog for removing annotation.
* @author Xihui Chen
* @author Kay Kasemir layout tweaks
*/
public class RemoveRegionDialog extends Dialog {
private XYRegionGraph xyGraph;
private Combo regionCombo;
private AbstractSelectionRegion removedRegion;
public RemoveRegionDialog(Shell parentShell, XYRegionGraph xyGraph) {
super(parentShell);
this.xyGraph = xyGraph;
// Allow resize
setShellStyle(getShellStyle() | SWT.RESIZE);
}
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setText("Remove Region");
}
@Override
protected Control createDialogArea(Composite parent) {
final Composite parent_composite = (Composite) super.createDialogArea(parent);
final Composite composite = new Composite(parent_composite, SWT.NONE);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
composite.setLayout(new GridLayout(1, false));
final Label removeLabel = new Label(composite, SWT.None);
removeLabel.setLayoutData(new GridData());
if(((RegionArea)xyGraph.getPlotArea()).getRegionMap().size() > 0){
removeLabel.setText("Select the region to be removed: ");
regionCombo = new Combo(composite, SWT.DROP_DOWN);
regionCombo.setLayoutData(new GridData(SWT.FILL, 0, true, false));
final RegionArea regArea = (RegionArea)xyGraph.getPlotArea();
for (String name : regArea.getRegionMap().keySet()) {
final AbstractSelectionRegion region = regArea.getRegion(name);
regionCombo.add(region.getName());
}
regionCombo.select(0);
}else{
removeLabel.setText("There are no selection regions on the graph.");
}
return parent_composite;
}
@Override
protected void okPressed() {
if(regionCombo != null) {
final int index = regionCombo.getSelectionIndex();
removedRegion = ((RegionArea)xyGraph.getPlotArea()).getRegions().get(index);
}
super.okPressed();
}
/**
* @return the annotation to be removed.
*/
public AbstractSelectionRegion getRegion() {
return removedRegion;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
ccce4f6c8d2e40f02d4f7675df9d55567d479c2e
|
a5d1355228908daf110db93a8641f212f5e9fbb1
|
/src/main/java/gov/va/oit/vistaevolution/mailman/ws/xma2r/model/AbstractXMA2RRequest.java
|
a65798700486e46b145933091f4b4b70398cf3a0
|
[] |
no_license
|
MillerTom/Evolution
|
24d10c0cad9887fcfeee5266a69fa9d98df66334
|
448a3136fa2205c12f135a432f7912317195482a
|
refs/heads/master
| 2016-08-12T16:56:18.896488
| 2016-01-01T01:53:03
| 2016-01-01T01:53:03
| 48,867,152
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,737
|
java
|
package gov.va.oit.vistaevolution.mailman.ws.xma2r.model;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
/**
* @author Tom Miller<tom.miller@dbitpro.com>
*
*/
public abstract class AbstractXMA2RRequest {
/**
* duz:
*
* (optional) User's DUZ. If DUZ is not defined, it defaults to the
* Postmaster. This is who is really sending the message.
*
* xmduz:
*
* (required) User's DUZ or FREE TEXT. This is from whom the message will
* appear to be. If it is not defined, it defaults to DUZ. (If DUZ is not
* defined, it defaults to Postmaster.) If it is FREE TEXT, it must not be
* more than 70 characters.
*
* xmsub:
*
* (required) Subject of the message, It should be from 3 to 65 characters
* in length.
*
* xmtext :
*
* (required) The name of the array (in open format) containing the text of
* the message. The array itself may be a local or a global variable, and it
* must be in a format acceptable to VA FileMan WORD-PROCESSING fields.
*
* xmz :
*
* (required) Message IEN in the MESSAGE file (#3.9)
*
* xmstrip :
*
* (optional) String containing characters that should be removed from the
* answer text. Default is none.
*/
@XmlElement(required = false)
protected String duz;
@XmlElement(required = true)
protected String xmduz;
@XmlElement(required = true)
protected String xmsub;
@XmlElementWrapper(name = "text")
@XmlElement(name = "entry", required = true)
protected List<String> xmtext;
@XmlElement(required = true)
protected String xmz;
@XmlElement(required = false)
protected String xmstrip;
/**
* Default Empty Constructor
*/
public AbstractXMA2RRequest() {
super();
}
/**
*
* Parameterised Constructor
*
* @param duz
* @param xmduz
* @param xmsub
* @param xmtext
* @param xmz
* @param xmstrip
*/
public AbstractXMA2RRequest(String duz, String xmduz, String xmsub,
List<String> xmtext, String xmz, String xmstrip) {
super();
this.duz = duz;
this.xmduz = xmduz;
this.xmsub = xmsub;
this.xmtext = xmtext;
this.xmz = xmz;
this.xmstrip = xmstrip;
}
/**
* Mandatory Parameters Constructor
*
* @param xmduz
* @param xmsub
* @param xmtext
* @param xmz
*/
public AbstractXMA2RRequest(String xmduz, String xmsub,
List<String> xmtext, String xmz) {
super();
this.xmduz = xmduz;
this.xmsub = xmsub;
this.xmtext = xmtext;
this.xmz = xmz;
}
/**
* @return the duz
*/
public String getDuz() {
return duz;
}
/**
* @param duz
* the duz to set
*/
protected void setDuz(String duz) {
this.duz = duz;
}
/**
* @return the xmduz
*/
public String getXmduz() {
return xmduz;
}
/**
* @param xmduz
* the xmduz to set
*/
protected void setXmduz(String xmduz) {
this.xmduz = xmduz;
}
/**
* @return the xmsub
*/
public String getXmsub() {
return xmsub;
}
/**
* @param xmsub
* the xmsub to set
*/
protected void setXmsub(String xmsub) {
this.xmsub = xmsub;
}
/**
* @return the xmtext
*/
public List<String> getXmtext() {
return xmtext;
}
/**
* @param xmtext
* the xmtext to set
*/
protected void setXmtext(List<String> xmtext) {
this.xmtext = xmtext;
}
/**
* @return the xmz
*/
public String getXmz() {
return xmz;
}
/**
* @param xmz
* the xmz to set
*/
protected void setXmz(String xmz) {
this.xmz = xmz;
}
/**
* @return the xmstrip
*/
public String getXmstrip() {
return xmstrip;
}
/**
* @param xmstrip
* the xmstrip to set
*/
protected void setXmstrip(String xmstrip) {
this.xmstrip = xmstrip;
}
}
|
[
"tom.a.miller@gmail.com"
] |
tom.a.miller@gmail.com
|
32ced481ac43231bdec544e02e1ea93746410d5b
|
6eb9945622c34e32a9bb4e5cd09f32e6b826f9d3
|
/src/com/inponsel/android/v2/RoomChatActivity$15.java
|
b601166be6a8a6f382320840c7ff085e1d94362c
|
[] |
no_license
|
alexivaner/GadgetX-Android-App
|
6d700ba379d0159de4dddec4d8f7f9ce2318c5cc
|
26c5866be12da7b89447814c05708636483bf366
|
refs/heads/master
| 2022-06-01T09:04:32.347786
| 2020-04-30T17:43:17
| 2020-04-30T17:43:17
| 260,275,241
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 774
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.inponsel.android.v2;
import android.content.DialogInterface;
// Referenced classes of package com.inponsel.android.v2:
// RoomChatActivity
class this._cls0
implements android.content.ickListener
{
final RoomChatActivity this$0;
public void onClick(DialogInterface dialoginterface, int i)
{
dialoginterface.dismiss();
statJoinChat = "0";
RoomChatActivity.access$17(RoomChatActivity.this, RoomChatActivity.user_id, codename, "0", t, bottom_id);
}
ner()
{
this$0 = RoomChatActivity.this;
super();
}
}
|
[
"hutomoivan@gmail.com"
] |
hutomoivan@gmail.com
|
a55a416d42e488d944b3633c36425adc6c88b30a
|
649850df39bab4b699a9be75b7bb428f7a90aaf6
|
/app/src/main/java/cn/dlc/wifilistdemo/PasswordDialog.java
|
0aa9c81f7e72819f0577788e90f51ea1bd13c208
|
[] |
no_license
|
DlcAndroidTeam123456/WifiConnection
|
1f6f2ad9744ffb12343dd6548183642530c5bfe6
|
45ce4927f2258fc64804d89fe140373936afe6e8
|
refs/heads/master
| 2020-09-14T07:42:58.471956
| 2019-11-21T02:19:06
| 2019-11-21T02:19:06
| 223,068,250
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,645
|
java
|
package cn.dlc.wifilistdemo;
import android.app.Dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* Created by John on 2018/3/28.
*/
public class PasswordDialog extends Dialog {
@BindView(R.id.et_password)
EditText mEtPassword;
@BindView(R.id.btn_cancel)
Button mBtnCancel;
@BindView(R.id.btn_connect)
Button mBtnConnect;
private OnClickConnectListener mListener;
public interface OnClickConnectListener {
void toConnect(PasswordDialog dialog, String password);
}
public PasswordDialog(@NonNull Context context) {
super(context, R.style.CommonDialogStyle);
setContentView(R.layout.dialog_password);
ButterKnife.bind(this);
}
@OnClick({ R.id.btn_cancel, R.id.btn_connect })
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.btn_cancel:
dismiss();
break;
case R.id.btn_connect:
String password = mEtPassword.getText().toString();
if (mListener != null) {
mListener.toConnect(this, password);
}
break;
}
}
public void show(OnClickConnectListener listener) {
mListener = listener;
super.show();
}
@Override
public void show() {
super.show();
throw new RuntimeException("不要调用这个方法");
}
}
|
[
"licheedev@foxmail.com"
] |
licheedev@foxmail.com
|
6e424894eb787a5b8dabc78748ff9e956b777441
|
8b9facbaf9c57ee998aba63d57b14d93a5d95b8e
|
/src/org/xpande/financial/model/MZMedioPagoMotivoRep.java
|
8798b623e04e0ecafd3acbfee981ba515bc36604
|
[] |
no_license
|
gvilauy/XpandeFinancial
|
e5270094176d43da3017e7213ef75d634426627a
|
4a69c6203b54d685af686be630b18b7d79378cd9
|
refs/heads/master
| 2023-06-30T07:32:45.286633
| 2023-06-15T12:07:47
| 2023-06-15T12:07:47
| 98,096,052
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 638
|
java
|
package org.xpande.financial.model;
import java.sql.ResultSet;
import java.util.Properties;
/**
* Modelo para motivos de reemplazo de medios de pago.
* Product: Adempiere ERP & CRM Smart Business Solution. Localization : Uruguay - Xpande
* Xpande. Created by Gabriel Vila on 9/21/17.
*/
public class MZMedioPagoMotivoRep extends X_Z_MedioPagoMotivoRep {
public MZMedioPagoMotivoRep(Properties ctx, int Z_MedioPagoMotivoRep_ID, String trxName) {
super(ctx, Z_MedioPagoMotivoRep_ID, trxName);
}
public MZMedioPagoMotivoRep(Properties ctx, ResultSet rs, String trxName) {
super(ctx, rs, trxName);
}
}
|
[
"gabrielvila13@gmail.com"
] |
gabrielvila13@gmail.com
|
fc4da1de74e56851d83b1615c570658302b5bd25
|
f4fd782488b9cf6d99d4375d5718aead62b63c69
|
/com/planet_ink/coffee_mud/Races/Centaur.java
|
8f19dfed5eda25ef201d1458f980d250896e5fc4
|
[
"Apache-2.0"
] |
permissive
|
sfunk1x/CoffeeMud
|
89a8ca1267ecb0c2ca48280e3b3930ee1484c93e
|
0ac2a21c16dfe3e1637627cb6373d34615afe109
|
refs/heads/master
| 2021-01-18T11:20:53.213200
| 2015-09-17T19:16:30
| 2015-09-17T19:16:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,444
|
java
|
package com.planet_ink.coffee_mud.Races;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2001-2015 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.
*/
public class Centaur extends StdRace
{
@Override public String ID(){ return "Centaur"; }
@Override public String name(){ return "Centaur"; }
@Override public int shortestMale(){return 60;}
@Override public int shortestFemale(){return 60;}
@Override public int heightVariance(){return 12;}
@Override public int lightestWeight(){return 1150;}
@Override public int weightVariance(){return 400;}
@Override public long forbiddenWornBits(){return Wearable.WORN_WAIST|Wearable.WORN_LEGS|Wearable.WORN_FEET;}
@Override public String racialCategory(){return "Equine";}
@Override public boolean useRideClass() { return true; }
private final String[]culturalAbilityNames={"Elvish","Foraging"};
private final int[]culturalAbilityProficiencies={75,50};
@Override public String[] culturalAbilityNames(){return culturalAbilityNames;}
@Override public int[] culturalAbilityProficiencies(){return culturalAbilityProficiencies;}
// an ey ea he ne ar ha to le fo no gi mo wa ta wi
private static final int[] parts={0 ,2 ,2 ,1 ,1 ,2 ,2 ,1 ,4 ,4 ,1 ,0 ,1 ,1 ,1 ,0 };
@Override public int[] bodyMask(){return parts;}
protected static Vector<RawMaterial> resources=new Vector<RawMaterial>();
@Override public int availabilityCode(){return Area.THEME_FANTASY;}
@Override
public void affectPhyStats(Physical affected, PhyStats affectableStats)
{
super.affectPhyStats(affected,affectableStats);
affectableStats.setSensesMask(affectableStats.sensesMask()|PhyStats.CAN_SEE_INFRARED);
}
@Override
public void affectCharStats(MOB affectedMOB, CharStats affectableStats)
{
super.affectCharStats(affectedMOB, affectableStats);
affectableStats.setStat(CharStats.STAT_STRENGTH,affectableStats.getStat(CharStats.STAT_STRENGTH)+1);
affectableStats.setStat(CharStats.STAT_MAX_STRENGTH_ADJ,affectableStats.getStat(CharStats.STAT_MAX_STRENGTH_ADJ)+1);
affectableStats.setStat(CharStats.STAT_INTELLIGENCE,affectableStats.getStat(CharStats.STAT_INTELLIGENCE)+1);
affectableStats.setStat(CharStats.STAT_MAX_INTELLIGENCE_ADJ,affectableStats.getStat(CharStats.STAT_MAX_INTELLIGENCE_ADJ)+1);
affectableStats.setStat(CharStats.STAT_CHARISMA,affectableStats.getStat(CharStats.STAT_CHARISMA)-1);
affectableStats.setStat(CharStats.STAT_MAX_CHARISMA_ADJ,affectableStats.getStat(CharStats.STAT_MAX_CHARISMA_ADJ)-1);
affectableStats.setStat(CharStats.STAT_WISDOM,affectableStats.getStat(CharStats.STAT_WISDOM)-1);
affectableStats.setStat(CharStats.STAT_MAX_WISDOM_ADJ,affectableStats.getStat(CharStats.STAT_MAX_WISDOM_ADJ)-1);
}
@Override
public Weapon myNaturalWeapon()
{
if(naturalWeapon==null)
{
naturalWeapon=CMClass.getWeapon("StdWeapon");
naturalWeapon.setName(L("a pair of hooves"));
naturalWeapon.setMaterial(RawMaterial.RESOURCE_BONE);
naturalWeapon.setUsesRemaining(1000);
naturalWeapon.setWeaponType(Weapon.TYPE_BASHING);
}
return naturalWeapon;
}
@Override
public String makeMobName(char gender, int age)
{
switch(age)
{
case Race.AGE_INFANT:
case Race.AGE_TODDLER:
return name().toLowerCase()+" foal";
case Race.AGE_CHILD:
case Race.AGE_YOUNGADULT:
switch(gender)
{
case 'M': case 'm': return name().toLowerCase()+" colt";
case 'F': case 'f': return name().toLowerCase()+" filly";
default: return "young "+name().toLowerCase();
}
case Race.AGE_MATURE:
case Race.AGE_MIDDLEAGED:
default:
switch(gender)
{
case 'M': case 'm': return "male "+name().toLowerCase();
case 'F': case 'f': return "female "+name().toLowerCase();
default: return name().toLowerCase();
}
case Race.AGE_OLD:
case Race.AGE_VENERABLE:
case Race.AGE_ANCIENT:
switch(gender)
{
case 'M': case 'm': return "old male "+name().toLowerCase();
case 'F': case 'f': return "old female "+name().toLowerCase();
default: return "old "+name().toLowerCase();
}
}
}
@Override
public String healthText(MOB viewer, MOB mob)
{
final double pct=(CMath.div(mob.curState().getHitPoints(),mob.maxState().getHitPoints()));
if(pct<.10)
return L("^r@x1^r is hovering on deaths door!^N",mob.name(viewer));
else
if(pct<.20)
return L("^r@x1^r is covered in blood and matted hair.^N",mob.name(viewer));
else
if(pct<.30)
return L("^r@x1^r is bleeding badly from lots of wounds.^N",mob.name(viewer));
else
if(pct<.40)
return L("^y@x1^y has large patches of bloody matted fur.^N",mob.name(viewer));
else
if(pct<.50)
return L("^y@x1^y has some bloody matted fur.^N",mob.name(viewer));
else
if(pct<.60)
return L("^p@x1^p has a lot of cuts and gashes.^N",mob.name(viewer));
else
if(pct<.70)
return L("^p@x1^p has a few cut patches.^N",mob.name(viewer));
else
if(pct<.80)
return L("^g@x1^g has a cut patch of fur.^N",mob.name(viewer));
else
if(pct<.90)
return L("^g@x1^g has some disheveled fur.^N",mob.name(viewer));
else
if(pct<.99)
return L("^g@x1^g has some misplaced hairs.^N",mob.name(viewer));
else
return L("^c@x1^c is in perfect health.^N",mob.name(viewer));
}
@Override
public List<RawMaterial> myResources()
{
synchronized(resources)
{
if(resources.size()==0)
{
resources.addElement(makeResource
(""+name().toLowerCase()+" mane",RawMaterial.RESOURCE_FUR));
for(int i=0;i<2;i++)
resources.addElement(makeResource
("a strip of "+name().toLowerCase()+" leather",RawMaterial.RESOURCE_LEATHER));
resources.addElement(makeResource
("a pound of "+name().toLowerCase()+" meat",RawMaterial.RESOURCE_BEEF));
resources.addElement(makeResource
("some "+name().toLowerCase()+" blood",RawMaterial.RESOURCE_BLOOD));
resources.addElement(makeResource
("a pile of "+name().toLowerCase()+" bones",RawMaterial.RESOURCE_BONE));
}
}
return resources;
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
a5b0949e792b0840e004fdc5e890caf282795b2f
|
3fa72fe5e9366d6c79b438811d8625bd354aa36d
|
/pyramus/src/main/java/fi/pyramus/util/dataimport/DataImportUtils.java
|
8d0bc05a96a04f43beb0b21c1422c8b69af54579
|
[] |
no_license
|
myrtti/pyramus
|
4f486d90c109b898a3a1a53c8c9b354a182066f1
|
b95ce66441925c94d13168f3842993eb7a61e8fe
|
refs/heads/master
| 2021-01-09T06:58:56.067323
| 2014-02-18T07:23:48
| 2014-02-18T07:23:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,170
|
java
|
package fi.pyramus.util.dataimport;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import org.apache.commons.lang.math.NumberUtils;
import fi.internetix.smvc.SmvcRuntimeException;
import fi.pyramus.domainmodel.base.VariableType;
import fi.pyramus.domainmodel.projects.ProjectModuleOptionality;
import fi.pyramus.domainmodel.students.Sex;
import fi.pyramus.domainmodel.students.StudentContactLogEntryType;
import fi.pyramus.domainmodel.users.Role;
import fi.pyramus.framework.PyramusStatusCode;
import fi.pyramus.framework.UserRole;
import fi.pyramus.persistence.usertypes.MonetaryAmount;
public class DataImportUtils {
/**
*
* @param pojo
* @param methodName
* @param params
* @return
*/
public static Method getMethod(Object pojo, String methodName, Class<?>[] params) {
Method method = null;
Class<?> cClass = pojo.getClass();
while (cClass != null && method == null) {
try {
method = cClass.getDeclaredMethod(methodName, params);
} catch (NoSuchMethodException nsf) {
cClass = cClass.getSuperclass();
}
}
return method;
}
/**
*
* @param pojo
* @param property
* @param value
* @throws SecurityException
* @throws NoSuchFieldException
* @throws IllegalArgumentException
* @throws IllegalAccessException
*/
public static void setValue(Object pojo, String property, Object value) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
Field field = getField(pojo, property);
Class<?> fieldType = field.getType();
ValueInterpreter<?> valueInterpreter = DataImportUtils.getValueInterpreter(fieldType);
if (valueInterpreter != null)
setFieldValue(pojo, field, valueInterpreter.interpret(value));
else
throw new SmvcRuntimeException(PyramusStatusCode.UNDEFINED, "Value interpreter for " + fieldType + " is not implemented yet");
}
/**
*
* @param pojo
* @param property
* @return
*/
public static Field getField(Object pojo, String property) {
Field field = null;
Class<?> cClass = pojo.getClass();
while (cClass != null && field == null) {
try {
field = cClass.getDeclaredField(property);
} catch (NoSuchFieldException nsf) {
cClass = cClass.getSuperclass();
}
}
return field;
}
/**
*
* @param pojo
* @param field
* @param value
* @throws SecurityException
* @throws NoSuchFieldException
* @throws IllegalArgumentException
* @throws IllegalAccessException
*/
public static void setFieldValue(Object pojo, Field field, Object value) throws SecurityException, NoSuchFieldException, IllegalArgumentException,
IllegalAccessException {
field.setAccessible(true);
field.set(pojo, value);
}
/**
* Returns Value Interpreter for given type
*
* @param fieldType
* @return
*/
public static ValueInterpreter<?> getValueInterpreter(Class<?> fieldType) {
return interpreters.get(fieldType);
}
private static Map<Class<?>, ValueInterpreter<?>> interpreters = new HashMap<Class<?>, ValueInterpreter<?>>();
static {
interpreters.put(String.class, new ValueInterpreter<String>() {
public String interpret(Object o) {
return (String) o;
}
});
interpreters.put(Long.class, new ValueInterpreter<Long>() {
public Long interpret(Object o) {
return NumberUtils.createLong((String) o);
}
});
interpreters.put(Double.class, new ValueInterpreter<Double>() {
public Double interpret(Object o) {
return NumberUtils.createDouble((String) o);
}
});
interpreters.put(Boolean.class, new ValueInterpreter<Boolean>() {
public Boolean interpret(Object o) {
return "true".equals(o) ? Boolean.TRUE : Boolean.FALSE;
}
});
interpreters.put(Date.class, new ValueInterpreter<Date>() {
public Date interpret(Object o) {
if ("NOW".equals(o))
return new Date(System.currentTimeMillis());
String s = (String) o;
if (s.contains("-")) {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
try {
return df.parse(s);
} catch (ParseException e) {
e.printStackTrace();
throw new SmvcRuntimeException(e);
}
}
if (s.contains(".")) {
DateFormat df = new SimpleDateFormat("dd.MM.yyyy");
try {
return df.parse(s);
} catch (ParseException e) {
e.printStackTrace();
throw new SmvcRuntimeException(e);
}
}
return new Date(NumberUtils.createLong(s));
}
});
interpreters.put(UserRole.class, new ValueInterpreter<UserRole>() {
public UserRole interpret(Object o) {
return UserRole.getRole(NumberUtils.createInteger((String) o));
}
});
interpreters.put(Role.class, new ValueInterpreter<Role>() {
public Role interpret(Object o) {
return Role.getRole(NumberUtils.createInteger((String) o));
}
});
interpreters.put(MonetaryAmount.class, new ValueInterpreter<MonetaryAmount>() {
public MonetaryAmount interpret(Object o) {
return new MonetaryAmount(NumberUtils.createDouble((String) o));
}
});
interpreters.put(Sex.class, new ValueInterpreter<Sex>() {
public Sex interpret(Object o) {
return "male".equalsIgnoreCase((String) o) ? Sex.MALE : Sex.FEMALE;
}
});
interpreters.put(ProjectModuleOptionality.class, new ValueInterpreter<ProjectModuleOptionality>() {
public ProjectModuleOptionality interpret(Object o) {
return ProjectModuleOptionality.getOptionality(NumberUtils.createInteger((String) o));
}
});
interpreters.put(VariableType.class, new ValueInterpreter<VariableType>() {
public VariableType interpret(Object o) {
return VariableType.getType(NumberUtils.createInteger((String) o));
}
});
interpreters.put(StudentContactLogEntryType.class, new ValueInterpreter<StudentContactLogEntryType>() {
public StudentContactLogEntryType interpret(Object o) {
return StudentContactLogEntryType.getType(NumberUtils.createInteger((String) o));
}
});
interpreters.put(Locale.class, new ValueInterpreter<Locale>() {
public Locale interpret(Object o) {
return new Locale((String) o);
}
});
interpreters.put(Integer.class, new ValueInterpreter<Integer>() {
public Integer interpret(Object o) {
return NumberUtils.createInteger((String) o);
}
});
}
}
|
[
"antti.leppa@foyt.fi"
] |
antti.leppa@foyt.fi
|
d6a796f71323c4958f838ecdc9ee2f20a501ca62
|
6ee92ecc85ba29f13769329bc5a90acea6ef594f
|
/bizcore/WEB-INF/retailscm_core_src/com/doublechaintech/retailscm/provincecenteremployee/CandidateProvinceCenterEmployee.java
|
3aca5e681f774f5aca81c2a1972afe855c56600d
|
[] |
no_license
|
doublechaintech/scm-biz-suite
|
b82628bdf182630bca20ce50277c41f4a60e7a08
|
52db94d58b9bd52230a948e4692525ac78b047c7
|
refs/heads/master
| 2023-08-16T12:16:26.133012
| 2023-05-26T03:20:08
| 2023-05-26T03:20:08
| 162,171,043
| 1,387
| 500
| null | 2023-07-08T00:08:42
| 2018-12-17T18:07:12
|
Java
|
UTF-8
|
Java
| false
| false
| 222
|
java
|
package com.doublechaintech.retailscm.provincecenteremployee;
import com.doublechaintech.retailscm.BaseCandidateEntity;
public class CandidateProvinceCenterEmployee extends BaseCandidateEntity<ProvinceCenterEmployee> {}
|
[
"zhangxilai@doublechaintech.com"
] |
zhangxilai@doublechaintech.com
|
b0cd0cde0eb0689f982bdaf223221ac53a2263cf
|
0ba903ad259e346fb880e78dcca23660be0dce4b
|
/wfe-web/src/main/java/ru/runa/common/web/portlet/impl/ReturnHomeExceptionHandler.java
|
8bdc492f94de1418831f8908c0f30fbef3078186
|
[] |
no_license
|
ARyaskov/runawfe-server
|
c61eaff10945c99a8dab423c55faa1b5b6159e1d
|
f721a7613da95b9dd3ac2bf5a86d3cac7bca683e
|
refs/heads/master
| 2021-05-03T06:09:36.209627
| 2017-02-06T13:19:47
| 2017-02-06T13:19:47
| 70,156,281
| 0
| 0
| null | 2016-10-06T13:25:41
| 2016-10-06T13:25:41
| null |
UTF-8
|
Java
| false
| false
| 2,223
|
java
|
/*
* This file is part of the RUNA WFE project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; version 2.1
* of the License.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
package ru.runa.common.web.portlet.impl;
import java.io.IOException;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.Globals;
import org.apache.struts.action.ActionMessages;
import ru.runa.common.web.ActionExceptionHelper;
import ru.runa.common.web.portlet.PortletExceptionHandler;
public class ReturnHomeExceptionHandler implements PortletExceptionHandler {
@Override
public boolean processError(Exception exception, ServletContext servletContext, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
ActionExceptionHelper.addException(getActionErrors(request), exception);
String thinInterfacePage = (String) request.getAttribute("runawfe.thin.interface.page");
if (thinInterfacePage == null) {
thinInterfacePage = "/start.do";
}
servletContext.getRequestDispatcher(thinInterfacePage).forward(request, response);
return true;
}
private static ActionMessages getActionErrors(HttpServletRequest request) {
ActionMessages messages = (ActionMessages) request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
request.setAttribute(Globals.ERROR_KEY, messages);
}
return messages;
}
}
|
[
"tarwirdur@ya.ru"
] |
tarwirdur@ya.ru
|
02e5edd2eaac4a5591c13593767e6d1dfe2aec07
|
7bea7fb60b5f60f89f546a12b43ca239e39255b5
|
/src/java/util/Stack.java
|
f8248f4cc1957300bca0bfa0e46a9ade84aa9d94
|
[] |
no_license
|
sorakeet/fitcorejdk
|
67623ab26f1defb072ab473f195795262a8ddcdd
|
f946930a826ddcd688b2ddbb5bc907d2fc4174c3
|
refs/heads/master
| 2021-01-01T05:52:19.696053
| 2017-07-15T01:33:41
| 2017-07-15T01:33:41
| 97,292,673
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 930
|
java
|
/**
* Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package java.util;
public class Stack<E> extends Vector<E>{
private static final long serialVersionUID=1224463164541339165L;
public Stack(){
}
public E push(E item){
addElement(item);
return item;
}
public synchronized E pop(){
E obj;
int len=size();
obj=peek();
removeElementAt(len-1);
return obj;
}
public synchronized E peek(){
int len=size();
if(len==0)
throw new EmptyStackException();
return elementAt(len-1);
}
public boolean empty(){
return size()==0;
}
public synchronized int search(Object o){
int i=lastIndexOf(o);
if(i>=0){
return size()-i;
}
return -1;
}
}
|
[
"panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7"
] |
panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7
|
2547b9d70b319712c9753b4a2866328ee4c4a71a
|
fe06f97c2cf33a8b4acb7cb324b79a6cb6bb9dac
|
/java/po/impl/FTZC_AP/PreIndtlPo.java
|
f3355cabb5d3b80499545bd4342409cba50d57ee
|
[] |
no_license
|
HeimlichLin/TableSchema
|
3f67dae0b5b169ee3a1b34837ea9a2d34265f175
|
64b66a2968c3a169b75d70d9e5cf75fa3bb65354
|
refs/heads/master
| 2023-02-11T09:42:47.210289
| 2023-02-01T02:58:44
| 2023-02-01T02:58:44
| 196,526,843
| 0
| 0
| null | 2022-06-29T18:53:55
| 2019-07-12T07:03:58
|
Java
|
UTF-8
|
Java
| false
| false
| 3,918
|
java
|
package com.doc.common.po.impl;
public class PreIndtlPo implements IPreIndtlPo {
public enum COLUMNS {
BF_NO("null"), //
GOODS_CODE("null"), //
COMMODITY_NO("null"), //
GOODS_UNIT("null"), //
IN_STORAGE_AREA("null"), //
GOODS_QTY("null"), //
GOODS_DESC("null"), //
DECL_NO("null"), //
GUID("null"), //
DECL_TYPE("null"), //
IN_DATE("null"), //
ITEM_NO("null"), //
DUTY_TYPE("null"), //
STAT_MODE("null"), //
BOM_NO("null"), //
BOM_VER("null"), //
PRDT_MARK("null") //
;
private final String comment;
private COLUMNS(final String comment) {
this.comment = comment;
}
public String getComment() {
return this.comment;
}
}
private String bfNo;
private String goodsCode;
private String commodityNo;
private String goodsUnit;
private String inStorageArea;
private BigDecimal goodsQty;
private String goodsDesc;
private String declNo;
private String guid;
private String declType;
private String inDate;
private BigDecimal itemNo;
private String dutyType;
private String statMode;
private String bomNo;
private String bomVer;
private String prdtMark;
@Override
public String getBfNo() {
return this.bfNo;
}
@Override
public void setBfNo(final String bfNo) {
this.bfNo = bfNo;
}
@Override
public String getGoodsCode() {
return this.goodsCode;
}
@Override
public void setGoodsCode(final String goodsCode) {
this.goodsCode = goodsCode;
}
@Override
public String getCommodityNo() {
return this.commodityNo;
}
@Override
public void setCommodityNo(final String commodityNo) {
this.commodityNo = commodityNo;
}
@Override
public String getGoodsUnit() {
return this.goodsUnit;
}
@Override
public void setGoodsUnit(final String goodsUnit) {
this.goodsUnit = goodsUnit;
}
@Override
public String getInStorageArea() {
return this.inStorageArea;
}
@Override
public void setInStorageArea(final String inStorageArea) {
this.inStorageArea = inStorageArea;
}
@Override
public BigDecimal getGoodsQty() {
return this.goodsQty;
}
@Override
public void setGoodsQty(final BigDecimal goodsQty) {
this.goodsQty = goodsQty;
}
@Override
public String getGoodsDesc() {
return this.goodsDesc;
}
@Override
public void setGoodsDesc(final String goodsDesc) {
this.goodsDesc = goodsDesc;
}
@Override
public String getDeclNo() {
return this.declNo;
}
@Override
public void setDeclNo(final String declNo) {
this.declNo = declNo;
}
@Override
public String getGuid() {
return this.guid;
}
@Override
public void setGuid(final String guid) {
this.guid = guid;
}
@Override
public String getDeclType() {
return this.declType;
}
@Override
public void setDeclType(final String declType) {
this.declType = declType;
}
@Override
public String getInDate() {
return this.inDate;
}
@Override
public void setInDate(final String inDate) {
this.inDate = inDate;
}
@Override
public BigDecimal getItemNo() {
return this.itemNo;
}
@Override
public void setItemNo(final BigDecimal itemNo) {
this.itemNo = itemNo;
}
@Override
public String getDutyType() {
return this.dutyType;
}
@Override
public void setDutyType(final String dutyType) {
this.dutyType = dutyType;
}
@Override
public String getStatMode() {
return this.statMode;
}
@Override
public void setStatMode(final String statMode) {
this.statMode = statMode;
}
@Override
public String getBomNo() {
return this.bomNo;
}
@Override
public void setBomNo(final String bomNo) {
this.bomNo = bomNo;
}
@Override
public String getBomVer() {
return this.bomVer;
}
@Override
public void setBomVer(final String bomVer) {
this.bomVer = bomVer;
}
@Override
public String getPrdtMark() {
return this.prdtMark;
}
@Override
public void setPrdtMark(final String prdtMark) {
this.prdtMark = prdtMark;
}
}
|
[
"jerry.l@acer.com"
] |
jerry.l@acer.com
|
a5f85dc91178171bf5f6d47d6d27916fc2ac46cf
|
32f38cd53372ba374c6dab6cc27af78f0a1b0190
|
/app/src/main/java/com/autonavi/jni/ae/pos/LocDRPos.java
|
5e714c977a517290c13658159b4ef6542c6a8bee
|
[] |
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
| 970
|
java
|
package com.autonavi.jni.ae.pos;
public class LocDRPos {
public int DRStatus;
public float alt;
public float altAcc;
public float course;
public float courseAcc;
public int day;
public float deltaAlt;
public float deltaAltAcc;
public char ew;
public int gpsStatus;
public float hdop;
public int hour;
public boolean isDeltaAltAccValid;
public boolean isDeltaAltValid;
public boolean isMoveDistValid;
public boolean isSlopeAccValid;
public boolean isSlopeValueValid;
public int lat;
public int lon;
public int minute;
public int month;
public double moveDist;
public int moveStatus;
public char ns;
public float pdop;
public float posAcc;
public int satnum;
public int second;
public float slopeAcc;
public float slopeValue;
public float speed;
public float speedAcc;
public long ticktime64;
public float vdop;
public int year;
}
|
[
"hubert.yang@nf-3.com"
] |
hubert.yang@nf-3.com
|
ccd45532a0897a08cc92c0a1045d5471c3466c9a
|
0b1d57269ca8f9ae789c02b55d2f6b1c460b3be7
|
/src/TermServer/src/main/generated/clamlBindingXSD/ModifiedBy.java
|
8a98341e43932ed3492205a94d04bc7a2a8490d7
|
[
"Apache-2.0"
] |
permissive
|
FHDortmund/Termserver
|
b5e4110c39ec39aec0fee5ddb6dc3c5ada21cf3f
|
716982054eec5dddabbdfdccaec25593e2544312
|
refs/heads/master
| 2021-01-15T15:47:13.578210
| 2018-05-14T13:15:00
| 2018-05-14T13:15:00
| 18,755,910
| 6
| 4
| null | 2014-07-28T08:55:59
| 2014-04-14T09:50:04
| null |
UTF-8
|
Java
| false
| false
| 6,909
|
java
|
//
// Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 generiert
// Siehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Änderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren.
// Generiert: 2018.04.09 um 11:53:09 AM CEST
//
package clamlBindingXSD;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlIDREF;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>Java-Klasse für anonymous complex type.
*
* <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{}Meta" maxOccurs="unbounded" minOccurs="0"/>
* <element ref="{}ValidModifierClass" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="position" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="variants" type="{http://www.w3.org/2001/XMLSchema}IDREFS" />
* <attribute name="all" default="true">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
* <enumeration value="true"/>
* <enumeration value="false"/>
* </restriction>
* </simpleType>
* </attribute>
* <attribute name="code" use="required" type="{http://www.w3.org/2001/XMLSchema}NMTOKEN" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"meta",
"validModifierClass"
})
@XmlRootElement(name = "ModifiedBy")
public class ModifiedBy {
@XmlElement(name = "Meta")
protected List<Meta> meta;
@XmlElement(name = "ValidModifierClass")
protected List<ValidModifierClass> validModifierClass;
@XmlAttribute(name = "position")
protected String position;
@XmlAttribute(name = "variants")
@XmlIDREF
@XmlSchemaType(name = "IDREFS")
protected List<Object> variants;
@XmlAttribute(name = "all")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
protected String all;
@XmlAttribute(name = "code", required = true)
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "NMTOKEN")
protected String code;
/**
* Gets the value of the meta property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the meta property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getMeta().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Meta }
*
*
*/
public List<Meta> getMeta() {
if (meta == null) {
meta = new ArrayList<Meta>();
}
return this.meta;
}
/**
* Gets the value of the validModifierClass property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the validModifierClass property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getValidModifierClass().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ValidModifierClass }
*
*
*/
public List<ValidModifierClass> getValidModifierClass() {
if (validModifierClass == null) {
validModifierClass = new ArrayList<ValidModifierClass>();
}
return this.validModifierClass;
}
/**
* Ruft den Wert der position-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPosition() {
return position;
}
/**
* Legt den Wert der position-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPosition(String value) {
this.position = value;
}
/**
* Gets the value of the variants property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the variants property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getVariants().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Object }
*
*
*/
public List<Object> getVariants() {
if (variants == null) {
variants = new ArrayList<Object>();
}
return this.variants;
}
/**
* Ruft den Wert der all-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAll() {
if (all == null) {
return "true";
} else {
return all;
}
}
/**
* Legt den Wert der all-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAll(String value) {
this.all = value;
}
/**
* Ruft den Wert der code-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCode() {
return code;
}
/**
* Legt den Wert der code-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCode(String value) {
this.code = value;
}
}
|
[
"robert.muetzner@fh-dortmund.de"
] |
robert.muetzner@fh-dortmund.de
|
4fce5bb97bc1d1be66b3f7003d8218ca55db0ab3
|
072216667ef59e11cf4994220ea1594538db10a0
|
/xiaomi/yellowpages/android/support/a/a/h.java
|
594e61d8a4e579142625a76f1f1ebb7491a3d9d6
|
[] |
no_license
|
jackTang11/REMIUI
|
896037b74e90f64e6f7d8ddfda6f3731a8db6a74
|
48d65600a1b04931a510e1f036e58356af1531c0
|
refs/heads/master
| 2021-01-18T05:43:37.754113
| 2015-07-03T04:01:06
| 2015-07-03T04:01:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,047
|
java
|
package android.support.a.a;
import android.app.Fragment;
import android.app.Fragment.SavedState;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.v4.view.D;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
/* compiled from: FragmentStatePagerAdapter */
public abstract class h extends D {
private FragmentTransaction Mf;
private ArrayList Mg;
private ArrayList Mh;
private Fragment Mi;
private final FragmentManager mFragmentManager;
public abstract Fragment r(int i);
public h(FragmentManager fragmentManager) {
this.Mf = null;
this.Mg = new ArrayList();
this.Mh = new ArrayList();
this.Mi = null;
this.mFragmentManager = fragmentManager;
}
public void startUpdate(ViewGroup viewGroup) {
}
public Object instantiateItem(ViewGroup viewGroup, int i) {
if (this.Mh.size() > i) {
Fragment fragment = (Fragment) this.Mh.get(i);
if (fragment != null) {
return fragment;
}
}
if (this.Mf == null) {
this.Mf = this.mFragmentManager.beginTransaction();
}
Fragment r = r(i);
if (this.Mg.size() > i) {
SavedState savedState = (SavedState) this.Mg.get(i);
if (savedState != null) {
r.setInitialSavedState(savedState);
}
}
while (this.Mh.size() <= i) {
this.Mh.add(null);
}
d.b(r, false);
d.a(r, false);
this.Mh.set(i, r);
this.Mf.add(viewGroup.getId(), r);
return r;
}
public void destroyItem(ViewGroup viewGroup, int i, Object obj) {
Fragment fragment = (Fragment) obj;
if (this.Mf == null) {
this.Mf = this.mFragmentManager.beginTransaction();
}
while (this.Mg.size() <= i) {
this.Mg.add(null);
}
this.Mg.set(i, this.mFragmentManager.saveFragmentInstanceState(fragment));
this.Mh.set(i, null);
this.Mf.remove(fragment);
}
public void setPrimaryItem(ViewGroup viewGroup, int i, Object obj) {
Fragment fragment = (Fragment) obj;
if (fragment != this.Mi) {
if (this.Mi != null) {
d.b(this.Mi, false);
d.a(this.Mi, false);
}
if (fragment != null) {
d.b(fragment, true);
d.a(fragment, true);
}
this.Mi = fragment;
}
}
public void finishUpdate(ViewGroup viewGroup) {
if (this.Mf != null) {
this.Mf.commitAllowingStateLoss();
this.Mf = null;
this.mFragmentManager.executePendingTransactions();
}
}
public boolean isViewFromObject(View view, Object obj) {
return ((Fragment) obj).getView() == view;
}
public Parcelable saveState() {
Bundle bundle = null;
if (this.Mg.size() > 0) {
bundle = new Bundle();
Parcelable[] parcelableArr = new SavedState[this.Mg.size()];
this.Mg.toArray(parcelableArr);
bundle.putParcelableArray("states", parcelableArr);
}
Parcelable parcelable = bundle;
for (int i = 0; i < this.Mh.size(); i++) {
Fragment fragment = (Fragment) this.Mh.get(i);
if (fragment != null) {
if (parcelable == null) {
parcelable = new Bundle();
}
this.mFragmentManager.putFragment(parcelable, "f" + i, fragment);
}
}
return parcelable;
}
public void restoreState(Parcelable parcelable, ClassLoader classLoader) {
if (parcelable != null) {
Bundle bundle = (Bundle) parcelable;
bundle.setClassLoader(classLoader);
Parcelable[] parcelableArray = bundle.getParcelableArray("states");
this.Mg.clear();
this.Mh.clear();
if (parcelableArray != null) {
for (Parcelable parcelable2 : parcelableArray) {
this.Mg.add((SavedState) parcelable2);
}
}
for (String str : bundle.keySet()) {
if (str.startsWith("f")) {
int parseInt = Integer.parseInt(str.substring(1));
Fragment fragment = this.mFragmentManager.getFragment(bundle, str);
if (fragment != null) {
while (this.Mh.size() <= parseInt) {
this.Mh.add(null);
}
d.b(fragment, false);
this.Mh.set(parseInt, fragment);
} else {
Log.w("FragmentStatePagerAdapter", "Bad fragment at key " + str);
}
}
}
}
}
}
|
[
"songjd@putao.com"
] |
songjd@putao.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.