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
7e0ec75e022bad283d6e9e454195602529634085
b74ced03fae6fbe125c980d3de5f85feee7ace87
/src/com/yidao/jdbc/designpattern/mediator/PersistentFile.java
7b90a2985c800ff4e6a574020515c76bf6403818
[]
no_license
hanks7/JavaWebLearn
f1749734d2bac9fd658c0841a1ccb7c81e0aedd6
808582fe3bc7d98b3eb0b6a843aadbf15947b4b2
refs/heads/master
2021-07-06T01:00:10.694566
2020-09-10T02:32:36
2020-09-10T02:32:36
166,959,565
0
1
null
null
null
null
UTF-8
Java
false
false
436
java
package com.yidao.jdbc.designpattern.mediator; //具体同事 public class PersistentFile implements IPersistent{ private Object data; @Override public void getData(Object data, Midiator midiator) { getData(data); midiator.notifyOther(this, data); } @Override public void saveData() { System.out.println(data + " 已保存到文件"); } @Override public void getData(Object data) { this.data = data; saveData(); } }
[ "474664736@qq.com" ]
474664736@qq.com
6e03cdaea7e514a5a9aaaaba1c7c2e58f0969fba
e4cb4b84c7742b21622103945f390bdaaf82617e
/trunk/zuigoo/src/com/jemmyee/framework/utils/DBUtils.java
d6c670e84711cdd47b921b28292ba04c25e21416
[]
no_license
BGCX262/zuigoo-svn-to-git
aeec71bafdd7662726859ba2676095c26cc81f33
ea60f620d968281b2ae3847fdf24ebba95f5279f
refs/heads/master
2021-01-13T01:49:11.481786
2015-08-23T06:49:40
2015-08-23T06:49:40
41,259,580
0
0
null
null
null
null
UTF-8
Java
false
false
1,238
java
package com.jemmyee.framework.utils; import com.jemmyee.framework.web.Constants; /** * @Description:数据库操作相关的工具类 * @author:jemmyee@gmail.com * @date:2011-3-30 * @version:v1.0 */ public class DBUtils { /** * @Description:根据实体名得到表名 * @author:jemmyee@gmail.com * @date:2011-3-30 */ public static String getTableName(String entityName) { StringBuffer sb=new StringBuffer(); int i=0; Character chUpper=null;//第二个大写字母作为分隔符 for(char ch:entityName.toCharArray()) { if(Character.isUpperCase(ch)) { if(i==0) { ++i; continue; } else{ chUpper=ch; break; } } } String temp[]=entityName.split(chUpper.toString()); sb.append(Constants.DB_TABLE_PREFIX); sb.append(temp[0].toLowerCase()).append("_").append(chUpper.toString().toLowerCase()).append(temp[1].toLowerCase()); return sb.toString(); } public static void main(String[] args) { String name="GroupAdmin"; System.out.println(getTableName(name)); } }
[ "you@example.com" ]
you@example.com
2d588eab13dc825960a764ec3a3d0819b392ff77
abca99fffaa50a279609fba197867c89f0e8779e
/src/test/java/com/lethanh98/performance/tpscount/MainTestTpsCountMultiple.java
bdb2afeb5b598faf2b9f855f3cc39c7c981f9f7f
[]
no_license
solitarysp/tps-performance-spring-boot
1ca4b0956240ebdbd505ddf25f550455175e9bd3
1007a58bf041f91d81c5f6eb09383514ad906592
refs/heads/master
2023-02-10T04:58:56.249473
2020-12-25T11:01:45
2020-12-25T11:01:45
323,390,354
0
0
null
null
null
null
UTF-8
Java
false
false
995
java
package com.lethanh98.performance.tpscount; import com.lethanh98.performance.Main; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.ApplicationContext; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,classes = Main.class) @TestPropertySource(properties = {"application.properties"}) public class MainTestTpsCountMultiple { @Autowired ApplicationContext applicationContext; @Autowired TestTpsCountMultipleService singletonService; @Test public void testTpsCountMultiple() throws InterruptedException { for (int i = 0; i < 5000; i++) { singletonService.test(); } Thread.sleep(11000); } }
[ "lethanh9398@gmail.com" ]
lethanh9398@gmail.com
5748adaff57e566ee77c807bc01b9d41cda191e0
4ef602cd041411e7d4324517a5e6e43a1df4d21a
/factory-supplier-service/src/main/java/com/wode/factory/supplier/dao/ProductSpecificationValueDao.java
d8aec53fef57e43e73d81eaed0e0bc8cc0e6c003
[]
no_license
beijingwode/myFactory
08d847d5c35a8900d7374227a67078a2bd0f78b8
43795f28318b8c9a7f37c407621134490c37d649
refs/heads/master
2021-05-11T00:24:22.127891
2018-01-26T06:39:22
2018-01-26T06:39:22
118,300,323
0
0
null
null
null
null
UTF-8
Java
false
false
1,415
java
/* * Powered By [rapid-framework] * Web Site: http://www.rapid-framework.org.cn * Google Code: http://code.google.com/p/rapid-framework/ * Since 2008 - 2015 */ package com.wode.factory.supplier.dao; import java.util.List; import java.util.Map; import cn.org.rapid_framework.page.Page; import com.wode.common.frame.base.EntityDao; import com.wode.factory.model.ProductSpecificationValue; import com.wode.factory.supplier.query.ProductSpecificationValueQuery; public interface ProductSpecificationValueDao extends EntityDao<ProductSpecificationValue,Long>{ public Page findPage(ProductSpecificationValueQuery query); public void saveOrUpdate(ProductSpecificationValue entity); /** * 删除该商品对应的所有规格(isDelete=1) * @param productid */ public void removeAllByProductid(Map map); /** * 商品list * @param productid */ public List<ProductSpecificationValue> findAllBymap(Map map); public void insert(ProductSpecificationValue productSpecificationValue); public List<ProductSpecificationValue> selectByModel(ProductSpecificationValue productSpecificationValue); public int copyFromOther(Long productId, Long oId,Long nId); public int updateFromOther(Long productId, Long oId,Long nId); public List<ProductSpecificationValue> getByProductId(Long productId); public void deleteApprRelation(Long productId); }
[ "gyj@wo-de.com" ]
gyj@wo-de.com
0c23438fdb1e790180410c36af9e27b79b4d94e5
36ba7792e0cccfe9c217a2fe58700292af6d2204
/in_dev_npc_combat_b/Zombie24_62Combat.java
88b891ae233cbe3a6c9ae27e42a41fec5badac12
[]
no_license
danielsojohn/BattleScape-Server-NoMaven
92a678ab7d0e53a68b10d047638c580c902673cb
793a1c8edd7381a96db0203b529c29ddf8ed8db9
refs/heads/master
2020-09-09T01:55:54.517436
2019-11-15T05:08:02
2019-11-15T05:08:02
221,307,980
0
0
null
2019-11-12T20:41:54
2019-11-12T20:41:53
null
UTF-8
Java
false
false
5,536
java
package script.npc.combat; import java.util.Arrays; import java.util.List; import com.palidino.osrs.io.cache.NpcId; import com.palidino.osrs.model.npc.combat.NpcCombatDefinition; import com.palidino.osrs.model.npc.combat.NpcCombatDrop; import com.palidino.osrs.model.npc.combat.NpcCombatDropTable; import com.palidino.osrs.model.npc.combat.NpcCombatDropTableDrop; import com.palidino.osrs.model.item.RandomItem; import com.palidino.osrs.io.cache.ItemId; import com.palidino.osrs.model.npc.combat.NpcCombatHitpoints; import com.palidino.osrs.model.npc.combat.NpcCombatStats; import com.palidino.osrs.model.npc.combat.NpcCombatAggression; import com.palidino.osrs.model.npc.combat.NpcCombatType; import com.palidino.osrs.model.npc.combat.style.NpcCombatStyle; import com.palidino.osrs.model.npc.combat.style.NpcCombatStyleType; import com.palidino.osrs.model.CombatBonus; import com.palidino.osrs.model.npc.combat.style.NpcCombatDamage; import com.palidino.osrs.model.npc.combat.style.NpcCombatProjectile; import com.palidino.osrs.model.npc.combat.NpcCombat; import lombok.var; public class Zombie24_62Combat extends NpcCombat { @Override public List<NpcCombatDefinition> getCombatDefinitions() { var drop = NpcCombatDrop.builder(); var dropTable = NpcCombatDropTable.builder().chance(NpcCombatDropTable.CHANCE_RARE); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.RANARR_WEED))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.IRIT_LEAF))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.AVANTOE))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.KWUARM))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.CADANTINE))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.LANTADYME))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.DWARF_WEED))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.MITHRIL_SCIMITAR))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.LAW_RUNE, 2))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.BRAINDEATH_RUM))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.EARTH_WARRIOR_CHAMPION_SCROLL))); drop.table(dropTable.build()); dropTable = NpcCombatDropTable.builder().chance(NpcCombatDropTable.CHANCE_UNCOMMON); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.HARRALANDER))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.MITHRIL_DAGGER))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.WATER_RUNE, 23))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.BODY_RUNE, 6))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.CHAOS_RUNE, 7))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.COSMIC_RUNE, 5))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.KARAMTHULHU))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.IRON_ORE))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.RUSTY_SCIMITAR))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.BRONZE_AXE))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.IRON_AXE))); drop.table(dropTable.build()); dropTable = NpcCombatDropTable.builder().chance(NpcCombatDropTable.CHANCE_COMMON); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GUAM_LEAF))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.MARRENTILL))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.TARROMIN))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.STEEL_BOLTS, 2, 12))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.AIR_RUNE, 3))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.COINS, 38, 46))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.FISHING_BAIT, 10))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.ZOMBIE_BONE))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.BRONZE_AXE))); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.IRON_AXE))); drop.table(dropTable.build()); dropTable = NpcCombatDropTable.builder().chance(NpcCombatDropTable.CHANCE_ALWAYS); dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.BONES))); drop.table(dropTable.build()); var combat = NpcCombatDefinition.builder(); combat.id(NpcId.ZOMBIE_24_62); combat.hitpoints(NpcCombatHitpoints.total(30)); combat.stats(NpcCombatStats.builder().attackLevel(19).defenceLevel(16).build()); combat.aggression(NpcCombatAggression.PLAYERS); combat.type(NpcCombatType.UNDEAD).deathAnimation(5575).blockAnimation(5574); combat.drop(drop.build()); var style = NpcCombatStyle.builder(); style.type(NpcCombatStyleType.melee(CombatBonus.ATTACK_CRUSH)); style.damage(NpcCombatDamage.maximum(3)); style.animation(5581).attackSpeed(5); style.projectile(NpcCombatProjectile.id(335)); combat.style(style.build()); return Arrays.asList(combat.build()); } }
[ "palidino@Daltons-MacBook-Air.local" ]
palidino@Daltons-MacBook-Air.local
209555c30f863abb9ee7b954aa3952e32ebdb29b
b4411446333338ca76273283a8bd2a20a89e0f9f
/app/src/main/java/com/razerdp/demo/PagerTransformer.java
168db177990ac7b1753521e2a4b6d52209648b06
[ "Apache-2.0" ]
permissive
fossabot/AnimatedPieView
e521cf69d304c46a139fb9d5d1f5a5c4358c73ea
bbc5327f28e57c1d02e0e5896879661b68825659
refs/heads/master
2022-12-22T21:03:13.831776
2020-09-25T12:43:22
2020-09-25T12:43:22
298,569,822
0
0
Apache-2.0
2020-09-25T12:43:22
2020-09-25T12:43:21
null
UTF-8
Java
false
false
957
java
package com.razerdp.demo; import android.support.v4.view.ViewPager; import android.view.View; /** * Created by 大灯泡 on 2019/2/15. */ public class PagerTransformer implements ViewPager.PageTransformer { private static final float MAX_SCALE = 1f; private static final float MIN_SCALE = 0.85f; @Override public void transformPage(View page, float position) { if (position <= 1) { // 1.2f + (1-1)*(1.2-1.0) float scaleFactor = MIN_SCALE + (1 - Math.abs(position)) * (MAX_SCALE - MIN_SCALE); page.setScaleX(scaleFactor); //缩放效果 if (position > 0) { page.setTranslationX(-scaleFactor * 2); } else if (position < 0) { page.setTranslationX(scaleFactor * 2); } page.setScaleY(scaleFactor); } else { page.setScaleX(MIN_SCALE); page.setScaleY(MIN_SCALE); } } }
[ "razerdp123@gmail.com" ]
razerdp123@gmail.com
d76d6d9f4a5f3c474012c517b8690b8eacd2ea9b
00f13802a6f6923ace91beefb0632fa70f89a0b2
/01-teach-spring/src/main/java/com/imooc/spring/aop/schema/advice/biz/AspectBiz.java
f1c4a3f01bb13337db63d39c9044274a1d4d2c6c
[]
no_license
wxzt-IT/study-imooc
90d6bfcc02b1485314e9dfd6772476be73c5cc4f
07e166cd636693e5841289e729cefadc993d681b
refs/heads/master
2021-01-01T04:46:43.998293
2017-07-13T15:07:43
2017-07-13T15:07:43
97,240,953
2
0
null
2017-07-14T14:13:24
2017-07-14T14:13:24
null
UTF-8
Java
false
false
298
java
package com.imooc.spring.aop.schema.advice.biz; public class AspectBiz { public void biz() { System.out.println("AspectBiz biz."); // throw new RuntimeException(); } public void init(String bizName, int times) { System.out.println("AspectBiz init : " + bizName + " " + times); } }
[ "zccoder@aliyun.com" ]
zccoder@aliyun.com
9b51538e70ffe57ad5ea6feab1d2a8c7245b5437
6fc69fcdf2b1cb41ae2804e1a0a7a519ea10455c
/android/support/design/widget/FloatingActionButtonImpl.java
2586c48fcdbb4bf3878cfe5cd96246daa4f6842c
[]
no_license
earlisreal/aPPwareness
2c168843f0bd32e3c885f9bab68917dd324991f0
f538ef69f16099a85c2f1a8782d977a5715d65f4
refs/heads/master
2021-01-13T14:44:54.007944
2017-01-19T17:17:14
2017-01-19T17:17:14
79,504,981
1
0
null
null
null
null
UTF-8
Java
false
false
6,603
java
package android.support.design.widget; import android.content.res.ColorStateList; import android.content.res.Resources; import android.graphics.PorterDuff.Mode; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.support.annotation.Nullable; import android.support.design.C0000R; import android.view.ViewTreeObserver.OnPreDrawListener; import android.view.animation.Interpolator; abstract class FloatingActionButtonImpl { static final Interpolator ANIM_INTERPOLATOR; static final int ANIM_STATE_HIDING = 1; static final int ANIM_STATE_NONE = 0; static final int ANIM_STATE_SHOWING = 2; static final int[] EMPTY_STATE_SET; static final int[] ENABLED_STATE_SET; static final int[] FOCUSED_ENABLED_STATE_SET; static final long PRESSED_ANIM_DELAY = 100; static final long PRESSED_ANIM_DURATION = 100; static final int[] PRESSED_ENABLED_STATE_SET; static final int SHOW_HIDE_ANIM_DURATION = 200; int mAnimState; final Creator mAnimatorCreator; CircularBorderDrawable mBorderDrawable; Drawable mContentBackground; float mElevation; private OnPreDrawListener mPreDrawListener; float mPressedTranslationZ; Drawable mRippleDrawable; final ShadowViewDelegate mShadowViewDelegate; Drawable mShapeDrawable; private final Rect mTmpRect; final VisibilityAwareImageButton mView; interface InternalVisibilityChangedListener { void onHidden(); void onShown(); } /* renamed from: android.support.design.widget.FloatingActionButtonImpl.1 */ class C00231 implements OnPreDrawListener { C00231() { } public boolean onPreDraw() { FloatingActionButtonImpl.this.onPreDraw(); return true; } } abstract float getElevation(); abstract void getPadding(Rect rect); abstract void hide(@Nullable InternalVisibilityChangedListener internalVisibilityChangedListener, boolean z); abstract void jumpDrawableToCurrentState(); abstract void onCompatShadowChanged(); abstract void onDrawableStateChanged(int[] iArr); abstract void onElevationsChanged(float f, float f2); abstract void setBackgroundDrawable(ColorStateList colorStateList, Mode mode, int i, int i2); abstract void setBackgroundTintList(ColorStateList colorStateList); abstract void setBackgroundTintMode(Mode mode); abstract void setRippleColor(int i); abstract void show(@Nullable InternalVisibilityChangedListener internalVisibilityChangedListener, boolean z); static { ANIM_INTERPOLATOR = AnimationUtils.FAST_OUT_LINEAR_IN_INTERPOLATOR; PRESSED_ENABLED_STATE_SET = new int[]{16842919, 16842910}; FOCUSED_ENABLED_STATE_SET = new int[]{16842908, 16842910}; int[] iArr = new int[ANIM_STATE_HIDING]; iArr[ANIM_STATE_NONE] = 16842910; ENABLED_STATE_SET = iArr; EMPTY_STATE_SET = new int[ANIM_STATE_NONE]; } FloatingActionButtonImpl(VisibilityAwareImageButton view, ShadowViewDelegate shadowViewDelegate, Creator animatorCreator) { this.mAnimState = ANIM_STATE_NONE; this.mTmpRect = new Rect(); this.mView = view; this.mShadowViewDelegate = shadowViewDelegate; this.mAnimatorCreator = animatorCreator; } final void setElevation(float elevation) { if (this.mElevation != elevation) { this.mElevation = elevation; onElevationsChanged(elevation, this.mPressedTranslationZ); } } final void setPressedTranslationZ(float translationZ) { if (this.mPressedTranslationZ != translationZ) { this.mPressedTranslationZ = translationZ; onElevationsChanged(this.mElevation, translationZ); } } final Drawable getContentBackground() { return this.mContentBackground; } final void updatePadding() { Rect rect = this.mTmpRect; getPadding(rect); onPaddingUpdated(rect); this.mShadowViewDelegate.setShadowPadding(rect.left, rect.top, rect.right, rect.bottom); } void onPaddingUpdated(Rect padding) { } void onAttachedToWindow() { if (requirePreDrawListener()) { ensurePreDrawListener(); this.mView.getViewTreeObserver().addOnPreDrawListener(this.mPreDrawListener); } } void onDetachedFromWindow() { if (this.mPreDrawListener != null) { this.mView.getViewTreeObserver().removeOnPreDrawListener(this.mPreDrawListener); this.mPreDrawListener = null; } } boolean requirePreDrawListener() { return false; } CircularBorderDrawable createBorderDrawable(int borderWidth, ColorStateList backgroundTint) { Resources resources = this.mView.getResources(); CircularBorderDrawable borderDrawable = newCircularDrawable(); borderDrawable.setGradientColors(resources.getColor(C0000R.color.design_fab_stroke_top_outer_color), resources.getColor(C0000R.color.design_fab_stroke_top_inner_color), resources.getColor(C0000R.color.design_fab_stroke_end_inner_color), resources.getColor(C0000R.color.design_fab_stroke_end_outer_color)); borderDrawable.setBorderWidth((float) borderWidth); borderDrawable.setBorderTint(backgroundTint); return borderDrawable; } CircularBorderDrawable newCircularDrawable() { return new CircularBorderDrawable(); } void onPreDraw() { } private void ensurePreDrawListener() { if (this.mPreDrawListener == null) { this.mPreDrawListener = new C00231(); } } GradientDrawable createShapeDrawable() { GradientDrawable d = new GradientDrawable(); d.setShape(ANIM_STATE_HIDING); d.setColor(-1); return d; } boolean isOrWillBeShown() { if (this.mView.getVisibility() != 0) { if (this.mAnimState == ANIM_STATE_SHOWING) { return true; } return false; } else if (this.mAnimState == ANIM_STATE_HIDING) { return false; } else { return true; } } boolean isOrWillBeHidden() { if (this.mView.getVisibility() == 0) { if (this.mAnimState == ANIM_STATE_HIDING) { return true; } return false; } else if (this.mAnimState == ANIM_STATE_SHOWING) { return false; } else { return true; } } }
[ "earl.savadera@lpunetwork.edu.ph" ]
earl.savadera@lpunetwork.edu.ph
faeb7a44ce7506fdef810a83b0bb3c93daf19e8e
0f113a0ce22286fc312a462c12544f38b0c52a24
/h2/src/main/org/h2/value/CompareModeDefault.java
9bae995cf29ef1fa4594747bc5dd4556fc5d502c
[ "Apache-2.0" ]
permissive
andersonbisconsin/tradutor
e488c408a2f87a57b1033b0a4721775cfb2accd8
b33aebfedb1c175c59f303649612c6be0655cd8a
refs/heads/master
2021-07-11T00:17:59.723945
2020-03-13T16:51:13
2020-03-13T16:51:13
247,068,521
0
0
Apache-2.0
2021-06-07T18:42:25
2020-03-13T12:40:44
Java
UTF-8
Java
false
false
2,243
java
/* * Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0, * and the EPL 1.0 (https://h2database.com/html/license.html). * Initial Developer: H2 Group */ package org.h2.value; import java.text.CollationKey; import java.text.Collator; import org.h2.engine.SysProperties; import org.h2.message.DbException; import org.h2.util.SmallLRUCache; /** * The default implementation of CompareMode. It uses java.text.Collator. */ public class CompareModeDefault extends CompareMode { private final Collator collator; private final SmallLRUCache<String, CollationKey> collationKeys; protected CompareModeDefault(String name, int strength, boolean binaryUnsigned, boolean uuidUnsigned) { super(name, strength, binaryUnsigned, uuidUnsigned); collator = CompareMode.getCollator(name); if (collator == null) { throw DbException.throwInternalError(name); } collator.setStrength(strength); int cacheSize = SysProperties.COLLATOR_CACHE_SIZE; if (cacheSize != 0) { collationKeys = SmallLRUCache.newInstance(cacheSize); } else { collationKeys = null; } } @Override public int compareString(String a, String b, boolean ignoreCase) { if (ignoreCase) { // this is locale sensitive a = a.toUpperCase(); b = b.toUpperCase(); } int comp; if (collationKeys != null) { CollationKey aKey = getKey(a); CollationKey bKey = getKey(b); comp = aKey.compareTo(bKey); } else { comp = collator.compare(a, b); } return comp; } @Override public boolean equalsChars(String a, int ai, String b, int bi, boolean ignoreCase) { return compareString(a.substring(ai, ai + 1), b.substring(bi, bi + 1), ignoreCase) == 0; } private CollationKey getKey(String a) { synchronized (collationKeys) { CollationKey key = collationKeys.get(a); if (key == null) { key = collator.getCollationKey(a); collationKeys.put(a, key); } return key; } } }
[ "ander@LAPTOP-FND853L8" ]
ander@LAPTOP-FND853L8
f719327ad21a91a27c3efd6e608bde5efa762147
d485ff113a05e3d23f545c03f0e1fe7efb5b4a24
/wssec_samsung_snb/target/generated-sources/cxf/org/onvif/ver10/schema/DynamicDNSInformation.java
9e9d1364a799e1888725a7d2e12cd2591fca5600
[]
no_license
raghunaik2009/itce-team8-2012
4692d487facee59e5fcae6952f42d15294aa83b9
6fffd0358de888f2da03693a834732b89fb8cae1
refs/heads/master
2021-01-10T04:54:17.635220
2013-08-09T06:21:06
2013-08-09T06:21:06
36,277,080
1
1
null
null
null
null
UTF-8
Java
false
false
4,743
java
package org.onvif.ver10.schema; import java.util.HashMap; import java.util.Map; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import javax.xml.datatype.Duration; import javax.xml.namespace.QName; /** * <p>Java class for DynamicDNSInformation complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="DynamicDNSInformation"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Type" type="{http://www.onvif.org/ver10/schema}DynamicDNSType"/> * &lt;element name="Name" type="{http://www.onvif.org/ver10/schema}DNSName" minOccurs="0"/> * &lt;element name="TTL" type="{http://www.w3.org/2001/XMLSchema}duration" minOccurs="0"/> * &lt;element name="Extension" type="{http://www.onvif.org/ver10/schema}DynamicDNSInformationExtension" minOccurs="0"/> * &lt;/sequence> * &lt;anyAttribute processContents='lax'/> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "DynamicDNSInformation", propOrder = { "type", "name", "ttl", "extension" }) public class DynamicDNSInformation { @XmlElement(name = "Type", required = true) protected DynamicDNSType type; @XmlElement(name = "Name") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String name; @XmlElement(name = "TTL") protected Duration ttl; @XmlElement(name = "Extension") protected DynamicDNSInformationExtension extension; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the type property. * * @return * possible object is * {@link DynamicDNSType } * */ public DynamicDNSType getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link DynamicDNSType } * */ public void setType(DynamicDNSType value) { this.type = value; } /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } /** * Gets the value of the ttl property. * * @return * possible object is * {@link Duration } * */ public Duration getTTL() { return ttl; } /** * Sets the value of the ttl property. * * @param value * allowed object is * {@link Duration } * */ public void setTTL(Duration value) { this.ttl = value; } /** * Gets the value of the extension property. * * @return * possible object is * {@link DynamicDNSInformationExtension } * */ public DynamicDNSInformationExtension getExtension() { return extension; } /** * Sets the value of the extension property. * * @param value * allowed object is * {@link DynamicDNSInformationExtension } * */ public void setExtension(DynamicDNSInformationExtension value) { this.extension = value; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } }
[ "hiepnh.vtt@gmail.com@120febe0-a655-af85-dc0f-037a25d1ef83" ]
hiepnh.vtt@gmail.com@120febe0-a655-af85-dc0f-037a25d1ef83
c5c87cdc0dcf45b13b10e6f2c21e31fbffefef28
e6d7727f309768b5987bc3976f9a4f60c79833a2
/BriskBenchmarks/src/main/java/brisk/queue/MPMCController.java
46fa2a2a6af1a95a8b1d501cb299d11d3d34f3d8
[ "Apache-2.0" ]
permissive
aqifhamid786/briskstream
2eab0b2c5789b1978c5bffb8e821dbf1a21e30d2
05c591f6df59c6e06797c58eb431a52d160bc724
refs/heads/master
2023-05-09T21:53:46.263197
2019-06-23T15:24:44
2019-06-23T15:24:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,058
java
package brisk.queue; import applications.util.OsUtils; import brisk.execution.ExecutionNode; import org.jctools.queues.MpmcArrayQueue; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.HashMap; import java.util.Queue; /** * Created by shuhaozhang on 11/7/16. * There's one PC per pair of "downstream, downstream operator". * PC is owned by streamController, which is owned by each executor. */ public class MPMCController extends QueueController { private static final Logger LOG = LoggerFactory.getLogger(MPMCController.class); private static final long serialVersionUID = -6960892992068055878L; private Queue outputQueue;//<Downstream executor ID, corresponding output queue> /** * This is where partition ratio is being updated. * * @param downExecutor_list */ public MPMCController(HashMap<Integer, ExecutionNode> downExecutor_list) { super(downExecutor_list); } public boolean isEmpty() { return outputQueue.isEmpty(); } /** * Allocate memory for queue structure here. * * @param linked * @param desired_elements_epoch_per_core */ public void allocate_queue(boolean linked, int desired_elements_epoch_per_core) { //clean_executorInformation the queue if it exist if (outputQueue != null) { // if(queue instanceof P1C1Queue) LOG.info("relax_reset the old queue"); outputQueue.clear(); System.gc(); } if (OsUtils.isWindows()) { outputQueue = new MpmcArrayQueue(1024); } else if (OsUtils.isMac()) { outputQueue = new MpmcArrayQueue(1024); } else { if (linked) { LOG.info("There is no linked implementation for MPMC queue."); System.exit(-1); } else { outputQueue = new MpmcArrayQueue((int) Math.pow(2, 16)); } } } public Queue get_queue(int executor) { return outputQueue; } }
[ "IDSZS@nus.edu.sg" ]
IDSZS@nus.edu.sg
15dc062db234de7bf48213451318e8e70710a9ca
01d4416163c2c8beace93930a8e7c3c7281cbc36
/The Source Engine/src/projects/slimeVolleyBall/client/MessageHandler.java
23de8c90d1e304f340c15efca45e1646c9edb3e3
[]
no_license
cubeman99/old-eclipse-workspace
639c7a6540545b68b4068159872c3986f81925d0
e6001ce0e9e657abfbe8e8ec5fb9e3d956251d39
refs/heads/master
2020-08-03T08:03:01.258280
2019-09-29T14:41:31
2019-09-29T14:41:31
211,675,002
0
0
null
null
null
null
UTF-8
Java
false
false
1,123
java
package projects.slimeVolleyBall.client; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.net.Socket; import projects.slimeVolleyBall.common.Message; public class MessageHandler extends Thread { static Socket socket; static String name; public static DataInputStream in; public static DataOutputStream out; public MessageHandler(Socket aSocket) { socket = aSocket; start(); } public void startReader() throws IOException { in = new DataInputStream(socket.getInputStream()); out = new DataOutputStream(socket.getOutputStream()); boolean running = true; while (running) { String messageText = in.readUTF(); MessageDecoderClient.decodeMessage(messageText); } } public static synchronized void sendMessage(Message message) { try { out.writeUTF(message.getText()); } catch (IOException e) { System.out.println("Error sending message: " + e); } } public void run() { try { startReader(); } catch (IOException e) { System.out.println("Lost connection to server."); // Main.beginShutDown(); } } }
[ "jordand95@gmail.com" ]
jordand95@gmail.com
bea732e652eaa79308b36f8a24174086989284e5
446a56b68c88df8057e85f424dbac90896f05602
/support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/token/BaseOidcJwtCipherExecutor.java
ce211ab838fa83922af667f168979eabfedef9e7
[ "Apache-2.0", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
apereo/cas
c29deb0224c52997cbfcae0073a4eb65ebf41205
5dc06b010aa7fd1b854aa1ae683d1ab284c09367
refs/heads/master
2023-09-01T06:46:11.062065
2023-09-01T01:17:22
2023-09-01T01:17:22
2,352,744
9,879
3,935
Apache-2.0
2023-09-14T14:06:17
2011-09-09T01:36:42
Java
UTF-8
Java
false
false
3,970
java
package org.apereo.cas.oidc.token; import org.apereo.cas.oidc.issuer.OidcIssuerService; import org.apereo.cas.oidc.jwks.OidcJsonWebKeyCacheKey; import org.apereo.cas.oidc.jwks.OidcJsonWebKeyUsage; import org.apereo.cas.util.cipher.BaseStringCipherExecutor; import org.apereo.cas.util.cipher.BasicIdentifiableKey; import com.github.benmanes.caffeine.cache.LoadingCache; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import lombok.val; import org.jose4j.jwe.ContentEncryptionAlgorithmIdentifiers; import org.jose4j.jwe.KeyManagementAlgorithmIdentifiers; import org.jose4j.jwk.JsonWebKey; import org.jose4j.jwk.JsonWebKeySet; import org.jose4j.jwk.PublicJsonWebKey; import java.io.Serializable; import java.util.Objects; import java.util.Optional; /** * This is {@link BaseOidcJwtCipherExecutor}. * * @author Misagh Moayyed * @since 6.4.0 */ @Getter @RequiredArgsConstructor @Slf4j public abstract class BaseOidcJwtCipherExecutor extends BaseStringCipherExecutor { /** * The default keystore for OIDC tokens. */ protected final LoadingCache<OidcJsonWebKeyCacheKey, Optional<JsonWebKeySet>> defaultJsonWebKeystoreCache; /** * OIDC issuer. */ protected final OidcIssuerService oidcIssuerService; @Override public boolean isEnabled() { val signing = isSigningEnabled() && getJsonWebKeyFor(OidcJsonWebKeyUsage.SIGNING).stream().findAny().isPresent(); val enc = isEncryptionEnabled() && getJsonWebKeyFor(OidcJsonWebKeyUsage.ENCRYPTION).stream().findAny().isPresent(); return signing || enc; } @Override public String encode(final Serializable value, final Object[] parameters) { prepareKeysForSigningAndEncryption(); return super.encode(value, parameters); } private void prepareKeysForSigningAndEncryption() { getJsonWebKeyFor(OidcJsonWebKeyUsage.SIGNING) .map(jwks -> jwks.getJsonWebKeys().get(0)) .map(PublicJsonWebKey.class::cast) .ifPresent(key -> setSigningKey(new BasicIdentifiableKey(key.getKeyId(), key.getPrivateKey()))); getJsonWebKeyFor(OidcJsonWebKeyUsage.ENCRYPTION) .map(jwks -> jwks.getJsonWebKeys().get(0)) .ifPresent(key -> { setEncryptionKey(new BasicIdentifiableKey(key.getKeyId(), key.getKey())); configureEncryptionSettingsFor(key); }); } protected void configureEncryptionSettingsFor(final JsonWebKey key) { setContentEncryptionAlgorithmIdentifier(ContentEncryptionAlgorithmIdentifiers.AES_128_CBC_HMAC_SHA_256); setEncryptionAlgorithm(KeyManagementAlgorithmIdentifiers.RSA_OAEP_256); } @Override public String decode(final Serializable value, final Object[] parameters) { prepareKeysForDecryptionAndVerification(); return super.decode(value, parameters); } private void prepareKeysForDecryptionAndVerification() { getJsonWebKeyFor(OidcJsonWebKeyUsage.ENCRYPTION) .map(jwks -> jwks.getJsonWebKeys().get(0)) .map(PublicJsonWebKey.class::cast) .ifPresent(key -> { setEncryptionKey(new BasicIdentifiableKey(key.getKeyId(), key.getPrivateKey())); configureEncryptionSettingsFor(key); }); getJsonWebKeyFor(OidcJsonWebKeyUsage.SIGNING) .map(jwks -> jwks.getJsonWebKeys().get(0)) .map(PublicJsonWebKey.class::cast) .ifPresent(key -> setSigningKey(new BasicIdentifiableKey(key.getKeyId(), key.getKey()))); } private Optional<JsonWebKeySet> getJsonWebKeyFor(final OidcJsonWebKeyUsage usage) { val issuer = oidcIssuerService.determineIssuer(Optional.empty()); LOGGER.trace("Determined issuer [{}] to fetch the JSON web key", issuer); return Objects.requireNonNull(defaultJsonWebKeystoreCache.get(new OidcJsonWebKeyCacheKey(issuer, usage))); } }
[ "mm1844@gmail.com" ]
mm1844@gmail.com
cee5b54828f7c1b4c0f9d9bf11fc1aeb2c3811a8
51ecf85d14d660373720d5ec1179caa7b6ae8dc1
/src/main/java/com/commafeed/frontend/model/request/FeedInfoRequest.java
9da780e607c0939b1440d2b239da15cb9b8dac22
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
ojhunt/commafeed
464247b4a9a6f071178646222028490e5113350e
e8ba4cfe7a664de28d85221bae624d441d22058d
refs/heads/master
2021-01-18T09:52:59.074540
2013-09-04T23:31:00
2013-09-04T23:31:00
10,673,146
1
0
null
null
null
null
UTF-8
Java
false
false
421
java
package com.commafeed.frontend.model.request; import java.io.Serializable; import lombok.Data; import com.wordnik.swagger.annotations.ApiClass; import com.wordnik.swagger.annotations.ApiProperty; @SuppressWarnings("serial") @ApiClass("Feed information request") @Data public class FeedInfoRequest implements Serializable { @ApiProperty(value = "feed url", required = true) private String url; }
[ "jeremiepanzer@gmail.com" ]
jeremiepanzer@gmail.com
b74d387d1c7f7977105143d07536f545daaae419
2288357cf540728af8a4dd4758b55fb208cecf2f
/Kippin_Ocr/src/main/java/com/kippin/performbook/adapter/CurrencyAdapter.java
8e1b3cb5f5b26df5e83bd4669a0bd26be4e84178
[]
no_license
NTRsolutions/KippinProduction
d74951678246f368eb92cd6b50da52a54eb08686
31f789577aaf83390f90be3d64f034bf18a6b327
refs/heads/master
2020-03-27T08:46:31.514866
2018-08-18T10:25:24
2018-08-18T10:25:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,273
java
package com.kippin.performbook.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import com.kippin.kippin.R; import com.kippin.webclient.model.ModelCurrency; import com.kippin.webclient.model.ProvinceModel; import java.util.ArrayList; /** * Created by dilip.singh on 2/4/2016. */ public class CurrencyAdapter extends ArrayAdapter<ModelCurrency> { private LayoutInflater mInflater; Context mContext; ArrayList<ModelCurrency> arrayList; public CurrencyAdapter(Context context, int resource, ArrayList<ModelCurrency> objects) { super(context, resource, objects); mContext = context; arrayList = objects; mInflater = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } @Override public View getDropDownView(int position, View convertView, ViewGroup parent) { return getView( position, convertView, parent); } @Override public int getCount() { return arrayList.size(); } @Override public long getItemId(int position) { return position; } @Override public View getView(final int position, View convertView, ViewGroup parent) { final ViewHolder holder; if (convertView == null) { convertView = mInflater.inflate(R.layout.layout_spinner_textview, null); holder = new ViewHolder(); holder.textViewName = (TextView)convertView.findViewById(R.id.spinner_text); convertView.setTag(holder); } else { holder = (ViewHolder)convertView.getTag(); convertView.setTag(holder); } if(arrayList.get(position).getCurrencyType()!=null) { holder.textViewName.setText(arrayList.get(position).getCurrencyType()); } else{ holder.textViewName.setText(arrayList.get(position).getSymbolCode()); } return convertView; } /** * View holder class */ public static class ViewHolder{ TextView textViewName; } }
[ "amit@ucreate.co.in" ]
amit@ucreate.co.in
cc16d457797dacc4077ea876c5efaefd25528b1a
094dfea97886b09bdf8365e5e766cb1a3d31231f
/app/src/main/java/com/example/qyh/joe/theme/attr/SkinView.java
a71c3a7f45822d09aecfefc6dc12f23b775d124e
[]
no_license
xiongzhuo/MvpBase-master
101128d96c31798be46c213e2f74dfdbdafc4a67
666fb3c1c468b7dd6d7c002cf164e928a8cad29d
refs/heads/master
2020-12-02T21:21:14.002172
2017-07-05T09:05:56
2017-07-05T09:05:56
96,299,212
0
0
null
null
null
null
UTF-8
Java
false
false
519
java
package com.example.qyh.joe.theme.attr; import android.view.View; import java.util.List; public class SkinView { // SoftReference<View> viewRef; View view ; List<SkinAttr> attrs; public SkinView(View view, List<SkinAttr> skinAttrs) { this.view = view; this.attrs = skinAttrs; } public void apply() { // View view = viewRef.get(); if (view == null) return; for (SkinAttr attr : attrs) { attr.apply(view); } } }
[ "15388953585@163.com" ]
15388953585@163.com
efb9db9f2a1d25dc1131ed8b89aabf3b5aa3b928
01ee7172ed0a95c38abe1714d42306fb2da0c6f1
/src/main/java/com/ltsllc/miranda/node/ConversationMessage.java
0bddcfdf8b5a4a21e93814e3b1b1025844d52912
[ "Apache-2.0" ]
permissive
pbj23000/miranda
c61d9513e2228d32b40b75e70db30941bb8b2f55
679d305f8e2c6806222873696bf98e06086b95ad
refs/heads/master
2021-06-22T14:41:54.602461
2017-08-21T21:24:58
2017-08-21T21:24:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,370
java
package com.ltsllc.miranda.node; import com.ltsllc.miranda.Message; /** * A decorator that adds a key to a message. * * <p> * This class marks a message as being part of a {@link Conversation} by * adding a key to the message. Interested parties send a {@link com.ltsllc.miranda.node.messages.StartConversationMessage} * to the node and whenever a message comes through with a matching key, * the message is forwarded on to the recipient. * </p> * * <h3>PROPERTIES</h3> * * <p> * <table border="1"> * <th> * <td>Name</td> * <td>Type</td> * <td>Description</td> * </th> * <tr> * <td>key</td> * <td>String</td> * <td>The key (conversation) that the message is associated with.</td> * </tr> * <tr> * <td>message</td> * <td>Message</td> * <td>The message that is part of the conversation.</td> * </tr> * </table> * </p> */ public class ConversationMessage { private String key; private Message message; public ConversationMessage (String key, Message message) { this.key = key; this.message = message; } public Message getMessage() { return message; } public String getKey() { return key; } }
[ "clark.hobbie@gmail.com" ]
clark.hobbie@gmail.com
ee191788af6a0a8d1224a3eca47a855afc655222
f54180f9b04404117f1ab7726e7155268a5bb0fd
/src/ua/artcode/algo/rec/intro/RecIntro.java
4e6ded10349895fc2f0453833e9ad196da5758f0
[]
no_license
VladyslavTaran/ACO11
005b6d84d71e580752ce074fccb51e4765a0902d
3e0caea89a8a1b60249dd194d17c2bd8af5d20f1
refs/heads/master
2021-01-18T05:45:54.247685
2016-02-07T14:26:45
2016-02-07T14:26:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
594
java
package ua.artcode.algo.rec.intro; /** * Created by serhii on 07.02.16. */ public class RecIntro { public static void main(String[] args) { int res = fibb(6); } public static void foo(){ foo(); } public static int iter(int i){ if(i == 11){ return i; } else { return i + iter(i); } } public static int fibb(int num){ if(num == 1 || num == 2){ return 1; } int prev1 = fibb(num - 1); int prev2 = fibb(num - 2); return prev1 + prev2; } }
[ "presly808@gmail.com" ]
presly808@gmail.com
d29fa4a5a2bdc43b9bac6a65ad27fb9947ebb9ee
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/com/google/common/jimfs/AclAttributeProviderTest.java
3692d1b9d1b1b089135fcd9af4052a3d58eca0b1
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
3,414
java
/** * Copyright 2013 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.common.jimfs; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import java.io.IOException; import java.nio.file.attribute.AclEntry; import java.nio.file.attribute.AclEntryFlag; import java.nio.file.attribute.AclEntryPermission; import java.nio.file.attribute.AclEntryType; import java.nio.file.attribute.AclFileAttributeView; import java.nio.file.attribute.FileAttributeView; import java.nio.file.attribute.UserPrincipal; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; /** * Tests for {@link AclAttributeProvider}. * * @author Colin Decker */ @RunWith(JUnit4.class) public class AclAttributeProviderTest extends AbstractAttributeProviderTest<AclAttributeProvider> { private static final UserPrincipal USER = UserLookupService.createUserPrincipal("user"); private static final UserPrincipal FOO = UserLookupService.createUserPrincipal("foo"); private static final ImmutableList<AclEntry> defaultAcl = new ImmutableList.Builder<AclEntry>().add(AclEntry.newBuilder().setType(AclEntryType.ALLOW).setFlags(AclEntryFlag.DIRECTORY_INHERIT).setPermissions(AclEntryPermission.DELETE, AclEntryPermission.APPEND_DATA).setPrincipal(AclAttributeProviderTest.USER).build()).add(AclEntry.newBuilder().setType(AclEntryType.ALLOW).setFlags(AclEntryFlag.DIRECTORY_INHERIT).setPermissions(AclEntryPermission.DELETE, AclEntryPermission.APPEND_DATA).setPrincipal(AclAttributeProviderTest.FOO).build()).build(); @Test public void testInitialAttributes() { assertThat(provider.get(file, "acl")).isEqualTo(AclAttributeProviderTest.defaultAcl); } @Test public void testSet() { assertSetAndGetSucceeds("acl", ImmutableList.of()); assertSetFailsOnCreate("acl", ImmutableList.of()); assertSetFails("acl", ImmutableSet.of()); assertSetFails("acl", ImmutableList.of("hello")); } @Test public void testView() throws IOException { AclFileAttributeView view = provider.view(fileLookup(), ImmutableMap.<String, FileAttributeView>of("owner", new OwnerAttributeProvider().view(fileLookup(), AbstractAttributeProviderTest.NO_INHERITED_VIEWS))); Assert.assertNotNull(view); assertThat(view.name()).isEqualTo("acl"); assertThat(view.getAcl()).isEqualTo(AclAttributeProviderTest.defaultAcl); view.setAcl(ImmutableList.<AclEntry>of()); view.setOwner(AclAttributeProviderTest.FOO); assertThat(view.getAcl()).isEqualTo(ImmutableList.<AclEntry>of()); assertThat(view.getOwner()).isEqualTo(AclAttributeProviderTest.FOO); assertThat(file.getAttribute("acl", "acl")).isEqualTo(ImmutableList.<AclEntry>of()); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
e86e6a4ee559c1338be291dda2d8b3d6b578a125
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/132/473/CWE191_Integer_Underflow__long_rand_sub_54c.java
275d9c76bc1dc8d53770090ac5edbf00880d3465
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
1,313
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE191_Integer_Underflow__long_rand_sub_54c.java Label Definition File: CWE191_Integer_Underflow.label.xml Template File: sources-sinks-54c.tmpl.java */ /* * @description * CWE: 191 Integer Underflow * BadSource: rand Set data to result of rand() * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: sub * GoodSink: Ensure there will not be an underflow before subtracting 1 from data * BadSink : Subtract 1 from data, which can cause an Underflow * Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package * * */ public class CWE191_Integer_Underflow__long_rand_sub_54c { public void badSink(long data ) throws Throwable { (new CWE191_Integer_Underflow__long_rand_sub_54d()).badSink(data ); } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink(long data ) throws Throwable { (new CWE191_Integer_Underflow__long_rand_sub_54d()).goodG2BSink(data ); } /* goodB2G() - use badsource and goodsink */ public void goodB2GSink(long data ) throws Throwable { (new CWE191_Integer_Underflow__long_rand_sub_54d()).goodB2GSink(data ); } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
151c24cb5047d4531e734252b8fbcb571d845a86
2b675fd33d8481c88409b2dcaff55500d86efaaa
/radargun/framework/src/main/java/org/radargun/btree/DistCallable.java
b660bee3a9f6fb23dc9d8e9b8a74efa9725a2a82
[ "Apache-2.0" ]
permissive
nmldiegues/stibt
d3d761464aaf97e41dcc9cc1d43f0e3234a1269b
1ee662b7d4ed1f80e6092c22e235a3c994d1d393
refs/heads/master
2022-12-21T23:08:11.452962
2015-09-30T16:01:43
2015-09-30T16:01:43
42,459,902
0
2
Apache-2.0
2022-12-13T19:15:31
2015-09-14T16:02:52
Java
UTF-8
Java
false
false
1,358
java
package org.radargun.btree; import java.io.Serializable; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Random; import java.util.concurrent.Callable; import java.util.concurrent.Future; import org.radargun.CacheWrapper; import org.radargun.CallableWrapper; import org.radargun.DEF; import org.radargun.DEFTask; import org.radargun.LocatedKey; import org.radargun.stressors.AbstractCacheWrapperStressor; public class DistCallable implements Callable<Boolean>, Serializable { private static final long serialVersionUID = -7433902731655964700L; private final int k; private final int id; private final int keysSize; private final int opPerTx; public DistCallable(int k, int id, int keysSize, int opPerTx) { this.k = k; this.id = id; this.keysSize = keysSize; this.opPerTx = opPerTx; } @Override public Boolean call() throws Exception { for (int i = 0; i < opPerTx; ++i) { LocatedKey key = BTreeStressor.cache.createGroupingKey("key"+ ((k + i) % keysSize), id); String res = (String) BTreeStressor.cache.get(null, key); if (res == null) { System.err.println("Problem: " + key + " " + key.getGroup() + " " + key.getKey() + " is null" + " id " + this.id); Thread.sleep(1); return true; } } return true; } }
[ "nmld@ist.utl.pt" ]
nmld@ist.utl.pt
0fe45ca4672f61b9bb9a8ab170e6b4070a6e8ca4
0214aadd5265a9a280c73e7e5a0950104e9c5ecb
/template-maven/ums365/app/tiaotiaogift-common-dal/src/test/java/com/tiaotiaogift/common/dal/test/DocTest.java
c91e4f1e96c1ae47fee42431c0482f7f5343596d
[]
no_license
foodoon-guda/guda
d78d7375895cc7e0edfa2496d3f2df986cceaf30
df7fd7eaa50b0d610b050d588455aeb120b85aed
refs/heads/master
2016-09-05T12:25:23.620070
2014-07-28T05:14:00
2014-07-28T05:14:00
21,302,564
0
2
null
null
null
null
UTF-8
Java
false
false
1,077
java
/** * zoneland.net Inc. * Copyright (c) 2002-2012 All Rights Reserved. */ package com.tiaotiaogift.common.dal.test; import java.util.List; import java.util.UUID; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.transaction.TransactionConfiguration; import com.tiaotiaogift.common.dal.DocMapper; import com.tiaotiaogift.common.mysql.dataobject.Doc; /** * * @author gag * @version $Id: DocTest.java, v 0.1 2012-12-12 下午2:08:48 gag Exp $ */ @TransactionConfiguration(defaultRollback = false) public class DocTest extends BaseDaoTest { @Autowired private DocMapper docMapper; public void testInsert() { Doc d = new Doc(); d.setId(UUID.randomUUID().toString()); d.setCode("123"); d.setContent("test"); d.setTitle("网关"); d.setType("news"); docMapper.insert(d); } @Test public void testSelect() { List<Doc> list = docMapper.selectByPageId(0); System.out.println(list.size()); } }
[ "foodoon@qq.com" ]
foodoon@qq.com
8ad2aee26ea2e621a740022a163666b2bbf658cb
171cb57eb0b4b1f37da86ff3a191fa1af76d6ee9
/src/AcessingOtherclassVariablesandMethods/Getotherclassandmethods.java
e993ff5cfd343134c74777a2941bc42753981fe4
[]
no_license
VeeraPrathapSelenium/Seleniun_-15Batch
fbfa653f6f3b7ec90f066dd70ccb4cb12e587e5a
bb00714802bc636c7f9f294a7bd9e98e5816e394
refs/heads/master
2021-01-18T20:48:31.261135
2017-09-29T03:04:39
2017-09-29T03:04:39
100,551,838
0
0
null
null
null
null
UTF-8
Java
false
false
389
java
package AcessingOtherclassVariablesandMethods; import Methods.InstanceMethodWithParameters; public class Getotherclassandmethods { public static void main(String[] args) { // TODO Auto-generated method stub InstanceMethodWithParameters obj=new InstanceMethodWithParameters(); System.out.println(obj.name); System.out.println(obj.age); } }
[ "prathap.ufttest@gmail.com" ]
prathap.ufttest@gmail.com
2af3a49b5f702e5a9e7d142da733b3932b30fedc
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
/classes6/ijl.java
64f960424128246aa333880257e8b5bf4b88ded6
[]
no_license
meeidol-luo/qooq
588a4ca6d8ad579b28dec66ec8084399fb0991ef
e723920ac555e99d5325b1d4024552383713c28d
refs/heads/master
2020-03-27T03:16:06.616300
2016-10-08T07:33:58
2016-10-08T07:33:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,331
java
import android.os.SystemClock; import android.text.TextUtils; import com.tencent.biz.common.util.ZipUtils; import com.tencent.biz.qqstory.base.download.DownloadProgressListener; import com.tencent.biz.qqstory.base.download.Downloader; import com.tencent.biz.qqstory.base.download.DownloaderImp; import com.tencent.biz.qqstory.model.DoodleEmojiManager; import com.tencent.biz.qqstory.model.DoodleEmojiManager.DoodleEmojiDownloadEvent; import com.tencent.biz.qqstory.model.item.DoodleEmojiItem; import com.tencent.biz.qqstory.support.logging.SLog; import com.tencent.biz.qqstory.support.report.StoryReportor; import com.tencent.mobileqq.hotpatch.NotVerifyClass; import com.tribe.async.async.JobContext; import com.tribe.async.async.SimpleJob; import com.tribe.async.dispatch.Dispatcher; import com.tribe.async.dispatch.Dispatchers; import java.io.File; public class ijl extends SimpleJob implements DownloadProgressListener { protected long a; private final Downloader jdField_a_of_type_ComTencentBizQqstoryBaseDownloadDownloader; private final DoodleEmojiItem jdField_a_of_type_ComTencentBizQqstoryModelItemDoodleEmojiItem; public ijl(DoodleEmojiItem paramDoodleEmojiItem) { boolean bool = NotVerifyClass.DO_VERIFY_CLASS; if (paramDoodleEmojiItem == null) { throw new IllegalArgumentException("doodleEmojiItem should not be null"); } this.jdField_a_of_type_ComTencentBizQqstoryBaseDownloadDownloader = new DownloaderImp(); this.jdField_a_of_type_ComTencentBizQqstoryBaseDownloadDownloader.a(this); this.jdField_a_of_type_ComTencentBizQqstoryModelItemDoodleEmojiItem = paramDoodleEmojiItem; } protected DoodleEmojiItem a(JobContext paramJobContext, Void... paramVarArgs) { this.jdField_a_of_type_ComTencentBizQqstoryBaseDownloadDownloader.a(this.jdField_a_of_type_ComTencentBizQqstoryModelItemDoodleEmojiItem.e, DoodleEmojiManager.a(this.jdField_a_of_type_ComTencentBizQqstoryModelItemDoodleEmojiItem.a), 0L); return this.jdField_a_of_type_ComTencentBizQqstoryModelItemDoodleEmojiItem; } public void a(String paramString, int paramInt) { DoodleEmojiItem localDoodleEmojiItem1 = this.jdField_a_of_type_ComTencentBizQqstoryModelItemDoodleEmojiItem; if (paramInt == 0) { paramString = DoodleEmojiManager.a(localDoodleEmojiItem1.a); String str = DoodleEmojiManager.b(localDoodleEmojiItem1.a); SLog.b("DoodleEmojiManager", "DownloadListener onDownloadFinish zip = " + paramString); SLog.b("DoodleEmojiManager", "DownloadListener onDownloadFinish folder = " + str); try { int i = ZipUtils.a(paramString, str); if (i == 0) { long l1 = SystemClock.uptimeMillis(); long l2 = this.jdField_a_of_type_Long; StoryReportor.b("edit_video", "face_download_timecost", 0, 0, new String[] { localDoodleEmojiItem1.a, l1 - l2 + "" }); StoryReportor.b("edit_video", "face_download_success", 0, 0, new String[] { localDoodleEmojiItem1.a }); SLog.c("DoodleEmojiManager", "DownloadListener onDownloadFinish success, unZip success"); localDoodleEmojiItem1.a(str); new File(str).setLastModified(System.currentTimeMillis()); Dispatchers.get().dispatch(new DoodleEmojiManager.DoodleEmojiDownloadEvent(localDoodleEmojiItem1, paramInt, true, 0L, 0L)); } for (;;) { return; SLog.d("DoodleEmojiManager", "DownloadListener onDownloadFinish unZip failed, treat it as download failed"); Dispatchers.get().dispatch(new DoodleEmojiManager.DoodleEmojiDownloadEvent(localDoodleEmojiItem1, i, false, 0L, 0L)); StoryReportor.b("edit_video", "face_download_success", 0, i, new String[] { localDoodleEmojiItem1.a }); } SLog.e("DoodleEmojiManager", "DownloadListener onDownloadFinish error = " + paramInt + ", url = " + paramString); } finally { new File(paramString).delete(); } } Dispatchers.get().dispatch(new DoodleEmojiManager.DoodleEmojiDownloadEvent(localDoodleEmojiItem2, paramInt, true, 0L, 0L)); StoryReportor.b("edit_video", "face_download_success", 0, paramInt, new String[] { localDoodleEmojiItem2.a }); } public void a(String paramString, long paramLong1, long paramLong2) { DoodleEmojiItem localDoodleEmojiItem = this.jdField_a_of_type_ComTencentBizQqstoryModelItemDoodleEmojiItem; if (!TextUtils.equals(localDoodleEmojiItem.e, paramString)) { SLog.d("DoodleEmojiManager", "DownloadListener onProgress error : " + localDoodleEmojiItem); SLog.d("DoodleEmojiManager", "DownloadListener onProgress error : call back url = " + paramString); return; } SLog.a("DoodleEmojiManager", "DownloadListener onProgress " + paramLong1 + " / " + paramLong2); Dispatchers.get().dispatch(new DoodleEmojiManager.DoodleEmojiDownloadEvent(localDoodleEmojiItem, 0, false, paramLong2, paramLong1)); } public void a(String paramString1, String paramString2) { SLog.b("DoodleEmojiManager", "onDownloadStart : url = " + paramString1 + ", path = " + paramString2); this.jdField_a_of_type_Long = SystemClock.uptimeMillis(); } } /* Location: E:\apk\QQ_91\classes6-dex2jar.jar!\ijl.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
fa0b583c760522c8f22f3d08900032f1e5ccd33b
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/com/avito/android/remote/parse/adapter/OrderMessageDeserializer.java
1cbf5db44e3513779197bf667ebcc5f773cc1382
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
3,852
java
package com.avito.android.remote.parse.adapter; import a2.b.a.a.a; import com.avito.android.deep_linking.links.DeepLink; import com.avito.android.remote.model.Action; import com.avito.android.remote.model.OrderMessage; import com.facebook.share.internal.ShareConstants; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import java.lang.reflect.Type; import kotlin.Metadata; import kotlin.jvm.internal.Intrinsics; import org.jetbrains.annotations.NotNull; @Metadata(bv = {1, 0, 3}, d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B\u0007¢\u0006\u0004\b\u000b\u0010\fJ'\u0010\t\u001a\u00020\u00022\u0006\u0010\u0004\u001a\u00020\u00032\u0006\u0010\u0006\u001a\u00020\u00052\u0006\u0010\b\u001a\u00020\u0007H\u0016¢\u0006\u0004\b\t\u0010\n¨\u0006\r"}, d2 = {"Lcom/avito/android/remote/parse/adapter/OrderMessageDeserializer;", "Lcom/google/gson/JsonDeserializer;", "Lcom/avito/android/remote/model/OrderMessage;", "Lcom/google/gson/JsonElement;", "json", "Ljava/lang/reflect/Type;", "typeOfT", "Lcom/google/gson/JsonDeserializationContext;", "context", "deserialize", "(Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializationContext;)Lcom/avito/android/remote/model/OrderMessage;", "<init>", "()V", "models_release"}, k = 1, mv = {1, 4, 2}) public final class OrderMessageDeserializer implements JsonDeserializer<OrderMessage> { @Override // com.google.gson.JsonDeserializer @NotNull public OrderMessage deserialize(@NotNull JsonElement jsonElement, @NotNull Type type, @NotNull JsonDeserializationContext jsonDeserializationContext) { Action action; JsonObject I1 = a.I1(jsonElement, "json", type, "typeOfT", jsonDeserializationContext, "context"); JsonElement jsonElement2 = I1.getAsJsonArray("actions").get(0); Intrinsics.checkNotNullExpressionValue(jsonElement2, "jsonObject\n .…ons\")\n .get(0)"); JsonObject asJsonObject = jsonElement2.getAsJsonObject(); JsonElement jsonElement3 = I1.get("title"); Intrinsics.checkNotNullExpressionValue(jsonElement3, "jsonObject[\"title\"]"); String asString = jsonElement3.getAsString(); Intrinsics.checkNotNullExpressionValue(asString, "jsonObject[\"title\"].asString"); JsonElement jsonElement4 = I1.get("description"); Intrinsics.checkNotNullExpressionValue(jsonElement4, "jsonObject[\"description\"]"); String asString2 = jsonElement4.getAsString(); Intrinsics.checkNotNullExpressionValue(asString2, "jsonObject[\"description\"].asString"); Intrinsics.checkNotNullExpressionValue(asJsonObject, "actionObject"); String x2 = a.x2(asJsonObject, "title", "jsonObject[\"title\"]"); JsonElement jsonElement5 = asJsonObject.get(ShareConstants.MEDIA_URI); Intrinsics.checkNotNullExpressionValue(jsonElement5, "jsonObject[\"uri\"]"); Object deserialize = jsonDeserializationContext.deserialize(jsonElement5, DeepLink.class); Intrinsics.checkNotNullExpressionValue(deserialize, "deserialize(json, T::class.java)"); DeepLink deepLink = (DeepLink) deserialize; if (asJsonObject.has("type")) { Intrinsics.checkNotNullExpressionValue(x2, "title"); action = new Action(x2, deepLink, null, x2, null, null, 48, null); } else { Intrinsics.checkNotNullExpressionValue(x2, "title"); action = new Action(x2, deepLink, null, deepLink.getPath(), null, null, 48, null); } return new OrderMessage(asString, asString2, action); } }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
0ec08da20d0dd1564dfacb2aa306006731a3936b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_7d43fea9c0c25371561224b045f7f93e0e178c43/PixMindGame/5_7d43fea9c0c25371561224b045f7f93e0e178c43_PixMindGame_s.java
8774f62e64850dc41bfba7c280c752dbe5b49c9d
[]
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,755
java
package com.pix.mind; import com.badlogic.gdx.Game; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Screen; import com.badlogic.gdx.assets.AssetManager; import com.badlogic.gdx.scenes.scene2d.ui.Skin; import com.pix.mind.levels.FirstLevel; import com.pix.mind.levels.SecondLevel; import com.pix.mind.screens.InterLevelScreen; import com.pix.mind.screens.SplashScreen; public class PixMindGame extends Game { private FirstLevel firstLevel; private SecondLevel secondLevel; private InterLevelScreen interLevel; private SplashScreen splashScreen; public static final float WORLD_TO_BOX = 0.01f; public static final float BOX_TO_WORLD = 100f; public static float h = 480; public static float w = 800; private AssetManager assetManager; private static Skin skin; @Override public void create() { // TODO Auto-generated method stub w = h * Gdx.graphics.getWidth()/Gdx.graphics.getHeight(); assetManager = new AssetManager(); firstLevel = new FirstLevel(this); secondLevel = new SecondLevel(this); splashScreen = new SplashScreen(this); this.setScreen(getSplashScreen()); } public FirstLevel getFirstLevel() { return firstLevel; } public SplashScreen getSplashScreen() { return splashScreen; } public void changeLevel(Screen screen){ interLevel = new InterLevelScreen(screen, this); this.setScreen(interLevel); } public AssetManager getAssetManager() { return assetManager; } public static Skin getSkin() { return skin; } public void setSkin(Skin skin) { PixMindGame.skin = skin; } public SecondLevel getSecondLevel() { return secondLevel; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
9dcc4f153c980d5a376afd29be51de3a540377f4
1730530528a2ae03abb48a97d5b7452517bf2cba
/drooms-game-impl/src/main/java/org/drooms/impl/DefaultEdge.java
953e61c9a60ad364b0feefde52aec8334fde59e1
[ "Apache-2.0" ]
permissive
triceo/drooms
f026715a0226c88ad04cedd3bcf8e492d2e9661c
68bb7dafd48e1742b571ec7628e3def63a823490
refs/heads/master
2020-06-09T00:59:48.378300
2015-09-28T10:49:19
2015-09-28T10:49:19
6,524,231
0
0
null
2015-08-09T11:31:28
2012-11-03T21:12:22
Java
UTF-8
Java
false
false
2,691
java
package org.drooms.impl; import org.drooms.api.Edge; import org.drooms.api.Node; class DefaultEdge implements Edge { @Override public Node getFirstNode() { return firstNode; } @Override public Node getSecondNode() { return secondNode; } private final Node firstNode, secondNode; /** * A {@link Node} is considered larger than the other if it has a bigger {@link Node#getY()}. In case these equal, * larger {@link Node#getX()} wins. Otherwise the nodes are equal. */ private static boolean isNodeLarger(final Node isLarger, final Node target) { if (isLarger.getY() > target.getY()) { return true; } else if (isLarger.getY() == target.getY()) { if (isLarger.getX() > target.getX()) { return true; } else if (isLarger.getX() == target.getX()) { return false; } else { return false; } } else { return false; } } /** * Make two nodes immediately adjacent. * * @param firstNode * One node. * @param secondNode * The other. */ protected DefaultEdge(final Node firstNode, final Node secondNode) { if (firstNode == null || secondNode == null) { throw new IllegalArgumentException("Neither nodes can be null."); } else if (firstNode.equals(secondNode)) { throw new IllegalArgumentException( "Edges between the same node make no sense."); } if (!DefaultEdge.isNodeLarger(firstNode, secondNode)) { this.firstNode = firstNode; this.secondNode = secondNode; } else { this.firstNode = secondNode; this.secondNode = firstNode; } } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || this.getClass() != o.getClass()) return false; DefaultEdge that = (DefaultEdge) o; if (this.firstNode != null ? !this.firstNode.equals(that.firstNode) : that.firstNode != null) return false; return !(this.secondNode != null ? !this.secondNode.equals(that.secondNode) : that.secondNode != null); } @Override public int hashCode() { int result = this.firstNode != null ? this.firstNode.hashCode() : 0; result = 31 * result + (this.secondNode != null ? this.secondNode.hashCode() : 0); return result; } @Override public String toString() { return "DefaultEdge [firstNode=" + this.firstNode + ", secondNode=" + this.secondNode + ']'; } }
[ "lpetrovi@redhat.com" ]
lpetrovi@redhat.com
69f61db8815f19e17e3d179266f21ab1244d74c4
dc25b23f8132469fd95cee14189672cebc06aa56
/frameworks/base/packages/SystemUI/extcb/com/mediatek/systemui/statusbar/extcb/ISignalClusterInfo.java
a1f02971f48779f3565c067512f496654447026d
[ "LicenseRef-scancode-unicode", "Apache-2.0" ]
permissive
nofearnohappy/alps_mm
b407d3ab2ea9fa0a36d09333a2af480b42cfe65c
9907611f8c2298fe4a45767df91276ec3118dd27
refs/heads/master
2020-04-23T08:46:58.421689
2019-03-28T21:19:33
2019-03-28T21:19:33
171,048,255
1
5
null
2020-03-08T03:49:37
2019-02-16T20:25:00
Java
UTF-8
Java
false
false
886
java
package com.mediatek.systemui.statusbar.extcb; /** * SignalCluster common Info to support ISignalClusterExt. */ public interface ISignalClusterInfo { /** * Whether wifi indicators is visible. * * @return true If wifi indicators is visible. */ boolean isWifiIndicatorsVisible(); /** * Whether show No Sims info. * * @return true If show No Sims info. */ boolean isNoSimsVisible(); /** * Whether Airplane Mode. * * @return true If is Airplane Mode. */ boolean isAirplaneMode(); /** * Get widetype icon start padding value. * * @return WideType icon start padding value. */ int getWideTypeIconStartPadding(); /** * Get secondary telephony padding value. * * @return Secondary telephony padding value. */ int getSecondaryTelephonyPadding(); }
[ "fetpoh@mail.ru" ]
fetpoh@mail.ru
5acff54273c6340cb7e7ee97261365211429f79f
e4d553ac65f9d3968ca848b2fccb91cf306240ae
/flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/ArchivedExecutionGraphStore.java
f5c1c16c9ee45678ec84bc20d60845bb99b6e970
[]
no_license
cshang2017/myread
57ad6e6012ea234109b71d4f3b75d7fdb41b121a
7c510bdc1144931a7a08ae74483d6ee3ead27bea
refs/heads/main
2023-05-07T04:05:24.938688
2021-05-27T01:40:17
2021-05-27T01:40:17
362,284,939
0
1
null
null
null
null
UTF-8
Java
false
false
1,973
java
package org.apache.flink.runtime.dispatcher; import org.apache.flink.api.common.JobID; import org.apache.flink.runtime.executiongraph.ArchivedExecutionGraph; import org.apache.flink.runtime.messages.webmonitor.JobDetails; import org.apache.flink.runtime.messages.webmonitor.JobsOverview; import javax.annotation.Nullable; import java.io.Closeable; import java.io.IOException; import java.util.Collection; /** * Interface for a {@link ArchivedExecutionGraph} store. */ public interface ArchivedExecutionGraphStore extends Closeable { /** * Returns the current number of stored {@link ArchivedExecutionGraph}. * * @return Current number of stored {@link ArchivedExecutionGraph} */ int size(); /** * Get the {@link ArchivedExecutionGraph} for the given job id. Null if it isn't stored. * * @param jobId identifying the serializable execution graph to retrieve * @return The stored serializable execution graph or null */ @Nullable ArchivedExecutionGraph get(JobID jobId); /** * Store the given {@link ArchivedExecutionGraph} in the store. * * @param archivedExecutionGraph to store * @throws IOException if the serializable execution graph could not be stored in the store */ void put(ArchivedExecutionGraph archivedExecutionGraph) throws IOException; /** * Return the {@link JobsOverview} for all stored/past jobs. * * @return Jobs overview for all stored/past jobs */ JobsOverview getStoredJobsOverview(); /** * Return the collection of {@link JobDetails} of all currently stored jobs. * * @return Collection of job details of all currently stored jobs */ Collection<JobDetails> getAvailableJobDetails(); /** * Return the {@link JobDetails}} for the given job. * * @param jobId identifying the job for which to retrieve the {@link JobDetails} * @return {@link JobDetails} of the requested job or null if the job is not available */ @Nullable JobDetails getAvailableJobDetails(JobID jobId); }
[ "shangcs@yahoo.com" ]
shangcs@yahoo.com
ce46db896aa7fc842aead8993e04bb1d57ba782f
a40103c44d81bb6afb163a546adeaf87263c012a
/experiments/readwrite/ana/jnicopy/JNICopy.java
4433c4dadbc76b8ba3f71b3a9581cff2551c0b5e
[ "Apache-2.0" ]
permissive
songweijia/hdfsrs
05551d39bd26424e255213cecfbd73a3524cf893
94cf078c3fbd1b84cf1acd3816e206ceb7327b66
refs/heads/master
2021-01-18T20:49:44.367691
2018-12-13T09:59:54
2018-12-13T09:59:54
25,851,102
2
0
null
null
null
null
UTF-8
Java
false
false
280
java
public class JNICopy{ static byte arr[]=new byte[1<<28]; static{ System.loadLibrary("JNICopy"); } static native void javatoc(byte [] arr); static native void ctojava(byte [] arr); public static void main(String args[]){ ctojava(arr); javatoc(arr); } }
[ "ws393@cornell.edu" ]
ws393@cornell.edu
4d178b4feaef4cdc3549a428a00230e53d38779b
84abf44f04e7e19cc07eb4b8c8fe14db1ccb9b22
/trunk/src/main/java/healthmanager/modelo/service/Via_ingreso_contratadasService.java
e0d74bff10de14dcccc7c3a1e5eea46261637e4f
[]
no_license
BGCX261/zkmhealthmanager-svn-to-git
3183263172355b7ac0884b793c1ca3143a950411
bb626589f101034137a2afa62d8e8bfe32bf7d47
refs/heads/master
2021-01-22T02:57:49.394471
2015-08-25T15:32:48
2015-08-25T15:32:48
42,323,197
0
1
null
null
null
null
UTF-8
Java
false
false
2,875
java
/* * AdminServiceImpl.java * * Generado Automaticamente . * Tecnologos: Ferney Jimenez Lopez Luis Hernadez Perez Dario Perez Campillo */ package healthmanager.modelo.service; import healthmanager.exception.HealthmanagerException; import healthmanager.modelo.bean.Via_ingreso_contratadas; import healthmanager.modelo.dao.Via_ingreso_contratadasDao; import java.io.Serializable; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.ScopedProxyMode; import org.springframework.stereotype.Service; @Service("via_ingreso_contratadasService") @Scope(value="singleton",proxyMode=ScopedProxyMode.TARGET_CLASS) public class Via_ingreso_contratadasService implements Serializable{ @Autowired private Via_ingreso_contratadasDao via_ingreso_contratadasDao; public void crear(Via_ingreso_contratadas via_ingreso_contratadas) { try { via_ingreso_contratadasDao.crear(via_ingreso_contratadas); } catch (Exception e) { throw new HealthmanagerException(e.getMessage(), e); } } public int actualizar(Via_ingreso_contratadas via_ingreso_contratadas) { try { return via_ingreso_contratadasDao .actualizar(via_ingreso_contratadas); } catch (Exception e) { throw new HealthmanagerException(e.getMessage(), e); } } public Via_ingreso_contratadas consultar( Via_ingreso_contratadas via_ingreso_contratadas) { try { return via_ingreso_contratadasDao .consultar(via_ingreso_contratadas); } catch (Exception e) { throw new HealthmanagerException(e.getMessage(), e); } } public Via_ingreso_contratadas consultar_informacion( Via_ingreso_contratadas via_ingreso_contratadas) { try { return via_ingreso_contratadasDao .consultar_informacion(via_ingreso_contratadas); } catch (Exception e) { throw new HealthmanagerException(e.getMessage(), e); } } public int eliminar(Via_ingreso_contratadas via_ingreso_contratadas) { try { return via_ingreso_contratadasDao.eliminar(via_ingreso_contratadas); } catch (Exception e) { throw new HealthmanagerException(e.getMessage(), e); } } public List<Via_ingreso_contratadas> listar(Map<String, Object> parameter) { try { return via_ingreso_contratadasDao.listar(parameter); } catch (Exception e) { throw new HealthmanagerException(e.getMessage(), e); } } public boolean existe(Map<String, Object> parameters) { try { return via_ingreso_contratadasDao.existe(parameters); } catch (Exception e) { throw new HealthmanagerException(e.getMessage(), e); } } public List<Map<String, Object>> verificarDuplicados() { try { return via_ingreso_contratadasDao.verificarDuplicados(); } catch (Exception e) { throw new HealthmanagerException(e.getMessage(), e); } } }
[ "you@example.com" ]
you@example.com
d7de6dbd78d5c768b51d395b06777d8a369f13fb
74fa4023d7846a0dab608b00f9b6f0974130340e
/ecs-20140526/java/src/main/java/com/aliyun/ecs20140526/models/AuthorizeSecurityGroupRequest.java
bb1291888e2b85b701a975b55a493da342245b29
[ "Apache-2.0" ]
permissive
plusxp/alibabacloud-sdk
b36811a6df7d5697800ae0f7be22b73bd43d203e
3b7dcc63434bf6df6342c54fcd2ae933486a1c92
refs/heads/master
2023-03-10T10:05:44.907699
2021-02-28T11:28:00
2021-02-28T11:28:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,641
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.ecs20140526.models; import com.aliyun.tea.*; public class AuthorizeSecurityGroupRequest extends TeaModel { @NameInMap("RegionId") @Validation(required = true) public String regionId; @NameInMap("SecurityGroupId") @Validation(required = true) public String securityGroupId; @NameInMap("IpProtocol") @Validation(required = true) public String ipProtocol; @NameInMap("PortRange") @Validation(required = true) public String portRange; @NameInMap("SourceGroupId") public String sourceGroupId; @NameInMap("SourceGroupOwnerId") public Long sourceGroupOwnerId; @NameInMap("SourceGroupOwnerAccount") public String sourceGroupOwnerAccount; @NameInMap("SourceCidrIp") public String sourceCidrIp; @NameInMap("Ipv6SourceCidrIp") public String ipv6SourceCidrIp; @NameInMap("SourcePortRange") public String sourcePortRange; @NameInMap("DestCidrIp") public String destCidrIp; @NameInMap("Ipv6DestCidrIp") public String ipv6DestCidrIp; @NameInMap("Policy") public String policy; @NameInMap("Priority") public String priority; @NameInMap("NicType") public String nicType; @NameInMap("ClientToken") public String clientToken; @NameInMap("Description") public String description; public static AuthorizeSecurityGroupRequest build(java.util.Map<String, ?> map) throws Exception { AuthorizeSecurityGroupRequest self = new AuthorizeSecurityGroupRequest(); return TeaModel.build(map, self); } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
f772894de736913bf5ab18e9eb10d9a00d7e8251
c428e8318ad9af03758b227af3475cd210a753cd
/src/exceptions/DynamicFields.java
338c5642d7c02bbaa32a43336d1dfcaec2869e5e
[]
no_license
McLoy/thinkingInJava
f42d8b33c8e462e4c25828b12d993cceccbce96c
6bc550e93944e251026a232bd5c2cecefc674ef3
refs/heads/master
2021-01-10T16:17:10.433786
2016-03-11T14:42:09
2016-03-11T14:42:09
45,954,594
0
0
null
null
null
null
UTF-8
Java
false
false
3,098
java
package exceptions; /** * Created by Ostin on 20.11.2015. */ class DynamicFieldsException extends Exception{} public class DynamicFields { private Object[][] fields; public DynamicFields(int initialSize){ fields = new Object[initialSize][2]; for (int i = 0; i <initialSize; i++) fields[i] = new Object[]{null, null}; } public String toString(){ StringBuilder result = new StringBuilder(); for (Object[] obj:fields){ result.append(obj[0]); result.append(", "); result.append(obj[1]); result.append("\n"); } return result.toString(); } private int hasField(String id){ for (int i = 0; i<fields.length;i++) if (id.equals(fields[i][0])) return i; return -1; } private int getFieldNumber(String id)throws NoSuchFieldException{ int fieldNum = hasField(id); if (fieldNum == -1) throw new NoSuchFieldException(); return fieldNum; } private int makeField(String id){ for (int i= 0;i<fields.length;i++) if (fields[i][0] == null){ fields[i][0] = id; return i; } Object[][] tmp = new Object[fields.length+1][2]; for (int i = 0; i < fields.length; i++) tmp[i] = fields[i]; for (int i = fields.length; i<tmp.length; i++) tmp[i] = new Object[]{null, null}; fields = tmp; return makeField(id); } public Object getField(String id) throws NoSuchFieldException{ return fields[getFieldNumber(id)][1]; } public Object setField(String id, Object value) throws DynamicFieldsException{ if (value == null) { DynamicFieldsException dfe = new DynamicFieldsException(); dfe.initCause(new DynamicFieldsException()); throw dfe; } int fieldNumber = hasField(id); if (fieldNumber == -1) fieldNumber = makeField(id); Object result = null; try{ result = getField(id); } catch(NoSuchFieldException e) { throw new RuntimeException(e); } fields[fieldNumber][1] = value; return result; } public static void main(String[] args) { DynamicFields df = new DynamicFields(3); System.out.println(df); try{ df.setField("d", "Значение d"); df.setField("число", 47); df.setField("число2", 48); System.out.println(df); df.setField("d", "Новое значение d"); df.setField("число3", 11); System.out.println("df: " + df); System.out.println("df.getField(\"d\"): " + df.getField("d")); Object field = df.setField("d", null); }catch (NoSuchFieldException e){ e.printStackTrace(System.out); }catch (DynamicFieldsException e){ e.printStackTrace(System.out); } } }
[ "tkachenko.vlad@hotmail.com" ]
tkachenko.vlad@hotmail.com
fd2eeaf112f5d988e422786fafa8060696ed0754
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/mapstruct/learning/7769/SourceRHS.java
1665506c3f601cbe00f5230076cd34d7582bbab9
[]
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
4,726
java
/* * Copyright MapStruct Authors. * * Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ package org.mapstruct.ap.internal.model.common; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Set; import java.util.stream.Stream; import org.mapstruct.ap.internal.util.Strings; import static org.mapstruct.ap.internal.util.Collections.first; /** * SourceRHS Assignment. Right Hand Side (RHS), source part of the assignment. * * This class contains all information on the source side of an assignment needed for common use in the mapping. * * @author Sjaak Derksen */ public class SourceRHS extends ModelElement implements Assignment { private final String sourceReference; private final Type sourceType; private String sourceLocalVarName; private final Set<String> existingVariableNames; private final String sourceErrorMessagePart; private final String sourcePresenceCheckerReference; private boolean useElementAsSourceTypeForMatching = false; private final String sourceParameterName; public SourceRHS(String sourceReference, Type sourceType, Set<String> existingVariableNames, String sourceErrorMessagePart ) { this( sourceReference, sourceReference, null, sourceType, existingVariableNames, sourceErrorMessagePart ); } public SourceRHS(String sourceParameterName, String sourceReference, String sourcePresenceCheckerReference, Type sourceType, Set<String> existingVariableNames, String sourceErrorMessagePart ) { this.sourceReference = sourceReference; this.sourceType = sourceType; this.existingVariableNames = existingVariableNames; this.sourceErrorMessagePart = sourceErrorMessagePart; this.sourcePresenceCheckerReference = sourcePresenceCheckerReference; this.sourceParameterName = sourceParameterName; } @Override public String getSourceReference() { return sourceReference; } @Override public boolean isSourceReferenceParameter() { return sourceReference.equals( sourceParameterName ); } @Override public String getSourcePresenceCheckerReference() { return sourcePresenceCheckerReference; } @Override public Type getSourceType() { return sourceType; } @Override public String createLocalVarName(String desiredName) { String result = Strings.getSafeVariableName( desiredName, existingVariableNames ); existingVariableNames. add( result ); return result; } @Override public String getSourceLocalVarName() { return sourceLocalVarName; } @Override public void setSourceLocalVarName(String sourceLocalVarName) { this.sourceLocalVarName = sourceLocalVarName; } @Override public Set<Type> getImportTypes() { return Collections.emptySet(); } @Override public List<Type> getThrownTypes() { return Collections.emptyList(); } @Override public void setAssignment( Assignment assignment ) { throw new UnsupportedOperationException( "Not supported." ); } @Override public AssignmentType getType() { return AssignmentType.DIRECT; } @Override public boolean isCallingUpdateMethod() { return false; } @Override public String toString() { return sourceReference; } public String getSourceErrorMessagePart() { return sourceErrorMessagePart; } /** * The source type that is to be used when resolving the mapping from source to target. * * @return the source type to be used in the matching process. */ public Type getSourceTypeForMatching() { if ( useElementAsSourceTypeForMatching ) { if ( sourceType.isCollectionType() ) { return first( sourceType.determineTypeArguments( Collection.class ) ); } else if ( sourceType.isStreamType() ) { return first( sourceType.determineTypeArguments( Stream.class ) ); } } return sourceType; } /** * For collection type, use element as source type to find a suitable mapping method. * * @param useElementAsSourceTypeForMatching uses the element of a collection as source type for the matching process */ public void setUseElementAsSourceTypeForMatching(boolean useElementAsSourceTypeForMatching) { this.useElementAsSourceTypeForMatching = useElementAsSourceTypeForMatching; } @Override public String getSourceParameterName() { return sourceParameterName; } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
4d6eba07b33be6a4e208775a6c47f36988214014
689cdf772da9f871beee7099ab21cd244005bfb2
/classes/com/android/dazhihui/ui/screen/stock/a/u.java
c8c8229c5cf9abbc048f50f3f179bea0aaa34a0d
[]
no_license
waterwitness/dazhihui
9353fd5e22821cb5026921ce22d02ca53af381dc
ad1f5a966ddd92bc2ac8c886eb2060d20cf610b3
refs/heads/master
2020-05-29T08:54:50.751842
2016-10-08T08:09:46
2016-10-08T08:09:46
70,314,359
2
4
null
null
null
null
UTF-8
Java
false
false
3,165
java
package com.android.dazhihui.ui.screen.stock.a; import android.content.res.Resources; import android.support.v4.app.FragmentActivity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import com.android.dazhihui.ui.model.stock.market.MarketStockVo; import com.android.dazhihui.ui.screen.y; import java.util.ArrayList; import java.util.HashMap; class u extends BaseAdapter { u(l paraml) {} public void a(y paramy) { notifyDataSetChanged(); } public int getCount() { ArrayList localArrayList = (ArrayList)this.a.C.get(Integer.valueOf(this.a.j.length)); if ((localArrayList != null) && (localArrayList.size() > 0)) { return localArrayList.size(); } return this.a.y.length; } public Object getItem(int paramInt) { return null; } public long getItemId(int paramInt) { return 0L; } public View getView(int paramInt, View paramView, ViewGroup paramViewGroup) { if (paramView == null) { paramViewGroup = new v(this); paramView = LayoutInflater.from(this.a.getActivity()).inflate(2130903267, null); v.a(paramViewGroup, (TextView)paramView.findViewById(2131559807)); v.b(paramViewGroup, (TextView)paramView.findViewById(2131559808)); v.c(paramViewGroup, (TextView)paramView.findViewById(2131559810)); v.d(paramViewGroup, (TextView)paramView.findViewById(2131559811)); v.a(paramViewGroup, paramView.findViewById(2131559809)); v.a(paramViewGroup).setVisibility(0); paramView.setTag(paramViewGroup); if (l.a(this.a) != y.b) { break label330; } v.b(paramViewGroup).setTextColor(this.a.getActivity().getResources().getColor(2131493609)); } for (;;) { ArrayList localArrayList = (ArrayList)this.a.C.get(Integer.valueOf(this.a.j.length)); if ((localArrayList == null) || (localArrayList.size() <= 0)) { break label355; } v.b(paramViewGroup).setText(((MarketStockVo)localArrayList.get(paramInt)).getStockName()); v.c(paramViewGroup).setText(((MarketStockVo)localArrayList.get(paramInt)).getZx()); v.d(paramViewGroup).setText(((MarketStockVo)localArrayList.get(paramInt)).getZd()); v.e(paramViewGroup).setText(((MarketStockVo)localArrayList.get(paramInt)).getZf()); v.c(paramViewGroup).setTextColor(((MarketStockVo)localArrayList.get(paramInt)).getColor()); v.d(paramViewGroup).setTextColor(((MarketStockVo)localArrayList.get(paramInt)).getColor()); v.e(paramViewGroup).setTextColor(((MarketStockVo)localArrayList.get(paramInt)).getColor()); return paramView; paramViewGroup = (v)paramView.getTag(); break; label330: v.b(paramViewGroup).setTextColor(this.a.getActivity().getResources().getColor(2131493546)); } label355: v.b(paramViewGroup).setText(this.a.y[paramInt]); return paramView; } } /* Location: E:\apk\dazhihui2\classes-dex2jar.jar!\com\android\dazhihui\ui\screen\stock\a\u.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
a282dec3b6826b4d51c6519e59631e6a6efa0fdb
aa15f9df4b59e733b3e7aaf666f4d61311a0d5d1
/src/leetcode/algorithms/SortColors.java
dda6f2c080b039b0c17596cf10e7c0237b76b830
[]
no_license
ifhuang/Problems
7a7343b0bb0d2b4af94d35f3b978b2c81b71026b
36fd59f159f416bd9104c1d7f1d250c5bc7f32b8
refs/heads/master
2021-01-17T09:30:08.102953
2016-05-14T12:36:29
2016-05-14T12:36:29
23,748,984
1
1
null
null
null
null
UTF-8
Java
false
false
830
java
package leetcode.algorithms; // https://leetcode.com/problems/sort-colors/ public class SortColors { // time O(n), space O(1) public void sortColors(int[] nums) { int[] c = new int[3]; for (int num : nums) { c[num]++; } for (int i = 0; i < nums.length; i++) { if (c[0] > 0) { nums[i] = 0; c[0]--; } else if (c[1] > 0) { nums[i] = 1; c[1]--; } else { nums[i] = 2; c[2]--; } } } // time O(n), space O(1) public void sortColors2(int[] nums) { int z = 0, o = 0, t = 0; for (int num : nums) { if (num == 0) { nums[t++] = 2; nums[o++] = 1; nums[z++] = 0; } else if (num == 1) { nums[t++] = 2; nums[o++] = 1; } else { nums[t++] = 2; } } } }
[ "ifhuang91@gmail.com" ]
ifhuang91@gmail.com
50fb1819a2517526bd45208c621437abd2f7c863
9769b86196e5ee363cda278988ab3e5c2fe748d0
/src/com/vz/hackathon/MainActivity.java
ada778c505a1b568c13fe9813cc30e5f638bcce1
[]
no_license
sebastinnaveen/Mobilecode
98d55ccbddf758052b38d79e64c8174a5e622ed3
c540739d76bea6e5329fe8c291190de6a7570383
refs/heads/master
2021-01-10T04:55:24.571244
2015-11-14T17:08:27
2015-11-14T17:08:27
46,183,455
0
0
null
null
null
null
UTF-8
Java
false
false
6,075
java
package com.vz.hackathon; import java.io.IOException; import java.util.ArrayList; import java.util.Map; import com.google.android.gms.gcm.GoogleCloudMessaging; import android.support.v7.app.ActionBarActivity; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.os.AsyncTask; import android.os.Bundle; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.ListView; public class MainActivity extends ActionBarActivity { SharedPreferences prefs; GoogleCloudMessaging gcm; Context context; String regId; EditText txtRegId; Button showRegID, myJobs; ListView notiList; MyDBHandler db; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); txtRegId = (EditText) findViewById(R.id.etregid); showRegID = (Button) findViewById(R.id.btnshow); myJobs = (Button) findViewById(R.id.btnmyjobs); notiList = (ListView) findViewById(R.id.notificationlist); context = getApplicationContext(); regId = getRegistrationId(context); if(regId == ""){ registerInBackground(); }else{ txtRegId.setText(regId); } showRegID.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(txtRegId.getVisibility() == View.VISIBLE){ txtRegId.setVisibility(View.INVISIBLE); notiList.setVisibility(View.VISIBLE); } else { txtRegId.setVisibility(View.VISIBLE); notiList.setVisibility(View.INVISIBLE); } } }); myJobs.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(MainActivity.this, MyJobs.class); startActivity(intent); overridePendingTransition(R.anim.abc_slide_in_top, R.anim.abc_slide_out_bottom); } }); db = new MyDBHandler(getApplicationContext()); ArrayList<Map<String,Object>> notilist = db.getNotificationLogs(); if(notilist != null && notilist.size() > 0){ NotificationListAdapter adapter = new NotificationListAdapter(this, notilist, R.layout.row_notification, new String[] { MyDBHandler.KEY_CUSTOMER_NAME, MyDBHandler.KEY_CUSTOMER_LOC, MyDBHandler.KEY_MSG_TECH, MyDBHandler.KEY_CUSTOMER_NUM }, new int[] { R.id.customername,R.id.cusloc,R.id.msgtech,R.id.customernum}); notiList.setAdapter(adapter); } } private void registerInBackground() { new AsyncTask<Void, Void, String>() { @Override protected String doInBackground(Void... params) { String msg = ""; try { if (gcm == null) { gcm = GoogleCloudMessaging.getInstance(getApplicationContext()); } regId = gcm.register("438358394799"); msg = "" + regId; } catch (IOException ex) { msg = "Error :" + ex.getMessage(); } return msg; } @Override protected void onPostExecute(String msg) { txtRegId.setText(msg); } }.execute(null, null, null); } private String getRegistrationId(Context context) { final SharedPreferences prefs = getSharedPreferences( MainActivity.class.getSimpleName(), Context.MODE_PRIVATE); String registrationId = prefs.getString("regId", ""); if (registrationId == "") { return ""; } return registrationId; } private void storeRegistrationId(Context context, String regId) { prefs = getSharedPreferences(MainActivity.class.getSimpleName(), Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putString("regId", regId); editor.commit(); } /*@Override protected void onResume() { super.onResume(); Utils.setActivityRunningState(getApplicationContext(), true); } @Override protected void onPause() { super.onPause(); Utils.setActivityRunningState(getApplicationContext(), false); } @Override protected void onStart() { // TODO Auto-generated method stub //Register BroadcastReceiver //to receive event from our service myReceiver = new MyReceiver(); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(GcmMessageHandler.MY_ACTION); registerReceiver(myReceiver, intentFilter); super.onStart(); } @Override protected void onStop() { // TODO Auto-generated method stub unregisterReceiver(myReceiver); super.onStop(); } private class MyReceiver extends BroadcastReceiver { @Override public void onReceive(Context arg0, Intent arg1) { // TODO Auto-generated method stub Toast.makeText(getApplicationContext(), "you have received new job!!!", Toast.LENGTH_LONG).show(); db = new MyDBHandler(getApplicationContext()); ArrayList<Map<String,Object>> notilist = db.getNotificationLogs(); NotificationListAdapter adapter = new NotificationListAdapter(getApplicationContext(), notilist, R.layout.row_notification, new String[] { MyDBHandler.KEY_CUSTOMER_NAME, MyDBHandler.KEY_CUSTOMER_LOC, MyDBHandler.KEY_MSG_TECH, MyDBHandler.KEY_CUSTOMER_NUM }, new int[] { R.id.customername,R.id.cusloc,R.id.msgtech,R.id.customernum}); notiList.setAdapter(adapter); } }*/ }
[ "Admin@Admin-PC" ]
Admin@Admin-PC
71f80b135fac8d896d7d39058de2656041b16204
71975999c9d702a0883ec9038ce3e76325928549
/src2.4.0/src/main/java/defpackage/OOO000o.java
1daf74f54b54f6c98ea75af719a48cc2fd6d23fa
[]
no_license
XposedRunner/PhysicalFitnessRunner
dc64179551ccd219979a6f8b9fe0614c29cd61de
cb037e59416d6c290debbed5ed84c956e705e738
refs/heads/master
2020-07-15T18:18:23.001280
2019-09-02T04:21:34
2019-09-02T04:21:34
205,620,387
3
2
null
null
null
null
UTF-8
Java
false
false
719
java
package defpackage; import android.os.Handler; import defpackage.OOO00Oo.O000000o; /* compiled from: BitmapPreFiller */ /* renamed from: OOO000o */ public final class OOO000o { private final OO0OOo0 O000000o; private final OO000OO O00000Oo; private final Handler O00000o; private final O0O0O O00000o0; private OO0o O00000oO; public OOO000o(OO0OOo0 oO0OOo0, OO000OO oo000oo, O0O0O o0o0o) { } private static int O000000o(OOO00Oo oOO00Oo) { return 0; } /* Access modifiers changed, original: 0000 */ public OOO00O0 O000000o(OOO00Oo[] oOO00OoArr) { return null; } public void O000000o(O000000o... o000000oArr) { } }
[ "xr_master@mail.com" ]
xr_master@mail.com
78d5fef4e2cb20c99db60040d4f1cf18c9cf6c19
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-aiccs/src/main/java/com/aliyuncs/aiccs/model/v20191015/TransferCallToSkillGroupResponse.java
34acc5915c4b59380d3a2fee65b7ac33e0bbef6a
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
1,815
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.aiccs.model.v20191015; import com.aliyuncs.AcsResponse; import com.aliyuncs.aiccs.transform.v20191015.TransferCallToSkillGroupResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class TransferCallToSkillGroupResponse extends AcsResponse { private String message; private String requestId; private String code; private Boolean success; public String getMessage() { return this.message; } public void setMessage(String message) { this.message = message; } public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public String getCode() { return this.code; } public void setCode(String code) { this.code = code; } public Boolean getSuccess() { return this.success; } public void setSuccess(Boolean success) { this.success = success; } @Override public TransferCallToSkillGroupResponse getInstance(UnmarshallerContext context) { return TransferCallToSkillGroupResponseUnmarshaller.unmarshall(this, context); } @Override public boolean checkShowJsonItemName() { return false; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
84d66845a1f553e9b90bd9fb3ede05ba051cdd24
c16ea32a4cddb6b63ad3bacce3c6db0259d2bacd
/google/cloud/dataproc/v1beta2/google-cloud-dataproc-v1beta2-java/proto-google-cloud-dataproc-v1beta2-java/src/main/java/com/google/cloud/dataproc/v1beta2/ListClustersResponseOrBuilder.java
9e4326bbed4722a2ca3a02872be61c662b4b067d
[ "Apache-2.0" ]
permissive
dizcology/googleapis-gen
74a72b655fba2565233e5a289cfaea6dc7b91e1a
478f36572d7bcf1dc66038d0e76b9b3fa2abae63
refs/heads/master
2023-06-04T15:51:18.380826
2021-06-16T20:42:38
2021-06-16T20:42:38
null
0
0
null
null
null
null
UTF-8
Java
false
true
2,717
java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/dataproc/v1beta2/clusters.proto package com.google.cloud.dataproc.v1beta2; public interface ListClustersResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.ListClustersResponse) com.google.protobuf.MessageOrBuilder { /** * <pre> * Output only. The clusters in the project. * </pre> * * <code>repeated .google.cloud.dataproc.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> */ java.util.List<com.google.cloud.dataproc.v1beta2.Cluster> getClustersList(); /** * <pre> * Output only. The clusters in the project. * </pre> * * <code>repeated .google.cloud.dataproc.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> */ com.google.cloud.dataproc.v1beta2.Cluster getClusters(int index); /** * <pre> * Output only. The clusters in the project. * </pre> * * <code>repeated .google.cloud.dataproc.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> */ int getClustersCount(); /** * <pre> * Output only. The clusters in the project. * </pre> * * <code>repeated .google.cloud.dataproc.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> */ java.util.List<? extends com.google.cloud.dataproc.v1beta2.ClusterOrBuilder> getClustersOrBuilderList(); /** * <pre> * Output only. The clusters in the project. * </pre> * * <code>repeated .google.cloud.dataproc.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> */ com.google.cloud.dataproc.v1beta2.ClusterOrBuilder getClustersOrBuilder( int index); /** * <pre> * Output only. This token is included in the response if there are more * results to fetch. To fetch additional results, provide this value as the * `page_token` in a subsequent &lt;code&gt;ListClustersRequest&lt;/code&gt;. * </pre> * * <code>string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> * @return The nextPageToken. */ java.lang.String getNextPageToken(); /** * <pre> * Output only. This token is included in the response if there are more * results to fetch. To fetch additional results, provide this value as the * `page_token` in a subsequent &lt;code&gt;ListClustersRequest&lt;/code&gt;. * </pre> * * <code>string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> * @return The bytes for nextPageToken. */ com.google.protobuf.ByteString getNextPageTokenBytes(); }
[ "bazel-bot-development[bot]@users.noreply.github.com" ]
bazel-bot-development[bot]@users.noreply.github.com
efa383259b4ecf5f6f02d84b657e826850103156
5f8109fa4637634b458c196967e0a8d9a0bb2c3c
/workspace_08_13/jdbc_backup/src/test/test09_DeptDao.java
8bf0f5a97d5fdec042268878e97fed9165d2dfe0
[]
no_license
mini222333/mini
72e7a9f2126dfdd0b5dde551cfaa4d375c0256d2
787b02e0d4db27a208a3e2cac652711898ed2cbe
refs/heads/master
2020-07-29T09:31:16.776045
2019-09-20T08:54:40
2019-09-20T08:54:40
209,746,612
0
0
null
null
null
null
UTF-8
Java
false
false
327
java
package test; import dao.DeptDao; public class test09_DeptDao { public static void main(String[] args) { DeptDao dao = new DeptDao(); dao.getDeptRec().forEach(i->System.out.println(i)); System.out.println("------------------------------"); dao.getDeptRec(1,3).forEach(i->System.out.println(i)); } }
[ "user@DESKTOP-V882PTR" ]
user@DESKTOP-V882PTR
dfed581400b00b6972bcdde014982783d5bcb5c7
4312a71c36d8a233de2741f51a2a9d28443cd95b
/RawExperiments/Math/math97/2/AstorMain-math_97/src/variant-226/org/apache/commons/math/analysis/BrentSolver.java
81794ad5eadae10fa9eff1159a77484eef1327f5
[]
no_license
SajjadZaidi/AutoRepair
5c7aa7a689747c143cafd267db64f1e365de4d98
e21eb9384197bae4d9b23af93df73b6e46bb749a
refs/heads/master
2021-05-07T00:07:06.345617
2017-12-02T18:48:14
2017-12-02T18:48:14
112,858,432
0
0
null
null
null
null
UTF-8
Java
false
false
5,293
java
package org.apache.commons.math.analysis; public class BrentSolver extends org.apache.commons.math.analysis.UnivariateRealSolverImpl { private static final long serialVersionUID = -2136672307739067002L; public BrentSolver(org.apache.commons.math.analysis.UnivariateRealFunction f) { super(f, 100, 1.0E-6); } public double solve(double min, double max, double initial) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { if (((initial - min) * (max - initial)) < 0) { throw new java.lang.IllegalArgumentException(((((((("Initial guess is not in search" + (" interval." + " Initial: ")) + initial) + " Endpoints: [") + min) + ",") + max) + "]")); } double yInitial = f.value(initial); if ((java.lang.Math.abs(yInitial)) <= (functionValueAccuracy)) { setResult(initial, 0); return result; } double yMin = f.value(min); if ((java.lang.Math.abs(yMin)) <= (functionValueAccuracy)) { setResult(yMin, 0); return result; } if ((yInitial * yMin) < 0) { return solve(min, yMin, initial, yInitial, min, yMin); } double yMax = f.value(max); if ((java.lang.Math.abs(yMax)) <= (functionValueAccuracy)) { setResult(yMax, 0); return result; } if ((yInitial * yMax) < 0) { return solve(initial, yInitial, max, yMax, initial, yInitial); } return solve(min, yMin, max, yMax, initial, yInitial); } public double solve(double min, double max) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { clearResult(); verifyInterval(min, max); double ret = java.lang.Double.NaN; double p1; double yMin = f.value(min); double yMax = f.value(max); double sign = yMin * yMax; if (sign >= 0) { throw new java.lang.IllegalArgumentException((((((((((("Function values at endpoints do not have different signs." + " Endpoints: [") + min) + ",") + max) + "]") + " Values: [") + yMin) + ",") + yMax) + "]")); } else { ret = solve(min, yMin, max, yMax, min, yMin); } return ret; } private double solve(double x0, double y0, double x1, double y1, double x2, double y2) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { double delta = x1 - x0; double oldDelta = delta; int i = 0; while (i < (maximalIterationCount)) { if ((java.lang.Math.abs(y2)) < (java.lang.Math.abs(y1))) { x0 = x1; x1 = x2; x2 = x0; y0 = y1; y1 = y2; y2 = y0; } if ((java.lang.Math.abs(y1)) <= (functionValueAccuracy)) { setResult(x1, i); return result; } double dx = x2 - x1; double tolerance = java.lang.Math.max(((relativeAccuracy) * (java.lang.Math.abs(x1))), absoluteAccuracy); if ((java.lang.Math.abs(dx)) <= tolerance) { setResult(x1, i); return result; } if (((java.lang.Math.abs(oldDelta)) < tolerance) || ((java.lang.Math.abs(y0)) <= (java.lang.Math.abs(y1)))) { delta = 0.5 * dx; oldDelta = delta; } else { double r3 = y1 / y0; double p; double p1; if (x0 == x2) { p = dx * r3; p1 = 1.0 - r3; } else { double r1 = y0 / y2; double r2 = y1 / y2; p = r3 * (((dx * r1) * (r1 - r2)) - ((x1 - x0) * (r2 - 1.0))); p1 = ((r1 - 1.0) * (r2 - 1.0)) * (r3 - 1.0); } if (p > 0.0) { p1 = -p1; } else { p = -p; } if (((2.0 * p) >= (((1.5 * dx) * p1) - (java.lang.Math.abs((tolerance * p1))))) || (p >= (java.lang.Math.abs(((0.5 * oldDelta) * p1))))) { delta = 0.5 * dx; oldDelta = delta; } else { oldDelta = delta; delta = p / p1; } } x0 = x1; y0 = y1; if ((java.lang.Math.abs(delta)) > tolerance) { x1 = x1 + delta; } else { if (dx > 0.0) { x1 = x1 + (0.5 * tolerance); } else { if (dx <= 0.0) { x1 = x1 - (0.5 * tolerance); } } } y1 = f.value(x1); if ((y1 > 0) == (y2 > 0)) { x2 = x0; y2 = y0; delta = x1 - x0; oldDelta = delta; } i++; } throw new org.apache.commons.math.MaxIterationsExceededException(maximalIterationCount); } }
[ "sajjad.syed@ucalgary.ca" ]
sajjad.syed@ucalgary.ca
6d173670586b8d4225f630561769dee07b395353
28e60263224c399aa084f9222460d563275e3960
/bus-image/src/main/java/org/aoju/bus/image/metric/internal/xdsi/ExternalLinkType.java
76a0c534f686012518cac9f04a65b2c12d7626bf
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
lonpo/bus
b2bda2ab641c637b8a24888194548710cb2e82fa
4d4d4e762fa0654211ca97c62b286869b514b7d3
refs/heads/master
2022-07-15T09:40:43.298138
2020-05-15T04:12:59
2020-05-15T04:12:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,572
java
/********************************************************************************* * * * The MIT License * * * * Copyright (c) 2015-2020 aoju.org and other 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.aoju.bus.image.metric.internal.xdsi; import javax.xml.bind.annotation.*; /** * @author Kimi Liu * @version 5.9.1 * @since JDK 1.8+ */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ExternalLinkType") public class ExternalLinkType extends RegistryObjectType { @XmlAttribute(name = "externalURI", required = true) @XmlSchemaType(name = "anyURI") protected String externalURI; public String getExternalURI() { return this.externalURI; } public void setExternalURI(String value) { this.externalURI = value; } }
[ "839536@qq.com" ]
839536@qq.com
e8e945a73e86b5efd303a1415952cd785039e3be
96342d1091241ac93d2d59366b873c8fedce8137
/java/com/l2jolivia/gameserver/engines/items/DocumentItem.java
7e990f89d20502b49e0d48a4ceed7c329195030d
[]
no_license
soultobe/L2JOlivia_EpicEdition
c97ac7d232e429fa6f91d21bb9360cf347c7ee33
6f9b3de9f63d70fa2e281b49d139738e02d97cd6
refs/heads/master
2021-01-10T03:42:04.091432
2016-03-09T06:55:59
2016-03-09T06:55:59
53,468,281
0
1
null
null
null
null
UTF-8
Java
false
false
5,246
java
/* * This file is part of the L2J Olivia project. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jolivia.gameserver.engines.items; import java.io.File; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import org.w3c.dom.Document; import org.w3c.dom.Node; import com.l2jolivia.gameserver.engines.DocumentBase; import com.l2jolivia.gameserver.model.StatsSet; import com.l2jolivia.gameserver.model.conditions.Condition; import com.l2jolivia.gameserver.model.items.L2Item; /** * @author mkizub, JIV */ public final class DocumentItem extends DocumentBase { private Item _currentItem = null; private final List<L2Item> _itemsInFile = new ArrayList<>(); /** * @param file */ public DocumentItem(File file) { super(file); } @Override protected StatsSet getStatsSet() { return _currentItem.set; } @Override protected String getTableValue(String name) { return _tables.get(name)[_currentItem.currentLevel]; } @Override protected String getTableValue(String name, int idx) { return _tables.get(name)[idx - 1]; } @Override protected void parseDocument(Document doc) { for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) { if ("list".equalsIgnoreCase(n.getNodeName())) { for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) { if ("item".equalsIgnoreCase(d.getNodeName())) { try { _currentItem = new Item(); parseItem(d); _itemsInFile.add(_currentItem.item); resetTable(); } catch (Exception e) { _log.log(Level.WARNING, "Cannot create item " + _currentItem.id, e); } } } } } } protected void parseItem(Node n) throws InvocationTargetException { final int itemId = Integer.parseInt(n.getAttributes().getNamedItem("id").getNodeValue()); final String className = n.getAttributes().getNamedItem("type").getNodeValue(); final String itemName = n.getAttributes().getNamedItem("name").getNodeValue(); String additionalName = null; if (n.getAttributes().getNamedItem("additionalName") != null) { additionalName = n.getAttributes().getNamedItem("additionalName").getNodeValue(); } _currentItem.id = itemId; _currentItem.name = itemName; _currentItem.type = className; _currentItem.set = new StatsSet(); _currentItem.set.set("item_id", itemId); _currentItem.set.set("name", itemName); _currentItem.set.set("additionalName", additionalName); final Node first = n.getFirstChild(); for (n = first; n != null; n = n.getNextSibling()) { if ("table".equalsIgnoreCase(n.getNodeName())) { if (_currentItem.item != null) { throw new IllegalStateException("Item created but table node found! Item " + itemId); } parseTable(n); } else if ("set".equalsIgnoreCase(n.getNodeName())) { if (_currentItem.item != null) { throw new IllegalStateException("Item created but set node found! Item " + itemId); } parseBeanSet(n, _currentItem.set, 1); } else if ("for".equalsIgnoreCase(n.getNodeName())) { makeItem(); parseTemplate(n, _currentItem.item); } else if ("cond".equalsIgnoreCase(n.getNodeName())) { makeItem(); final Condition condition = parseCondition(n.getFirstChild(), _currentItem.item); final Node msg = n.getAttributes().getNamedItem("msg"); final Node msgId = n.getAttributes().getNamedItem("msgId"); if ((condition != null) && (msg != null)) { condition.setMessage(msg.getNodeValue()); } else if ((condition != null) && (msgId != null)) { condition.setMessageId(Integer.decode(getValue(msgId.getNodeValue(), null))); final Node addName = n.getAttributes().getNamedItem("addName"); if ((addName != null) && (Integer.decode(getValue(msgId.getNodeValue(), null)) > 0)) { condition.addName(); } } _currentItem.item.attach(condition); } } // bah! in this point item doesn't have to be still created makeItem(); } private void makeItem() throws InvocationTargetException { if (_currentItem.item != null) { return; // item is already created } try { final Constructor<?> c = Class.forName("com.l2jolivia.gameserver.model.items.L2" + _currentItem.type).getConstructor(StatsSet.class); _currentItem.item = (L2Item) c.newInstance(_currentItem.set); } catch (Exception e) { throw new InvocationTargetException(e); } } public List<L2Item> getItemList() { return _itemsInFile; } }
[ "kim@tsnet-j.co.jp" ]
kim@tsnet-j.co.jp
0b12079c21546d7a9ba05e97f99f22d3f070d108
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-13377-3-27-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/objects/classes/BaseClass_ESTest.java
7d179128efe2e878cd0a1304d351e22eab4d3275
[ "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
554
java
/* * This file was automatically generated by EvoSuite * Mon Mar 30 20:38:02 UTC 2020 */ package com.xpn.xwiki.objects.classes; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class BaseClass_ESTest extends BaseClass_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
a24b96ba6808febc8ea8823a6e7f6576c3117d4e
70e16d746b9a3c6ec2628bff7c986c9ea4ccf0df
/lib_zbar/src/main/java/net/sourceforge/zbar/Symbol.java
8caa60a2c36d976b355245d079d9838287ada94c
[]
no_license
66668/FastQrcode3
9e1020bdfe4c17fb92dd401c9ade1a96e171c2fa
d2bbc751349cf2b9e887de68ec2891ed4af1e4fb
refs/heads/master
2020-06-29T21:23:32.503807
2019-08-08T04:12:08
2019-08-08T04:12:08
200,628,505
0
1
null
null
null
null
UTF-8
Java
false
false
6,400
java
/*------------------------------------------------------------------------ * Symbol * * Copyright 2007-2010 (c) Jeff Brown <spadix@users.sourceforge.net> * * This string_b is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ package net.sourceforge.zbar; import android.graphics.PointF; /** * Immutable container for decoded result symbols associated with an image * or a composite symbol. */ public class Symbol { /** No symbol decoded. */ public static final int NONE = 0; /** Symbol detected but not decoded. */ public static final int PARTIAL = 1; /** EAN-8. */ public static final int EAN8 = 8; /** UPC-E. */ public static final int UPCE = 9; /** ISBN-10 (from EAN-13). */ public static final int ISBN10 = 10; /** UPC-A. */ public static final int UPCA = 12; /** EAN-13. */ public static final int EAN13 = 13; /** ISBN-13 (from EAN-13). */ public static final int ISBN13 = 14; /** Interleaved 2 of 5. */ public static final int I25 = 25; /** DataBar (RSS-14). */ public static final int DATABAR = 34; /** DataBar Expanded. */ public static final int DATABAR_EXP = 35; /** Codabar. */ public static final int CODABAR = 38; /** Code 39. */ public static final int CODE39 = 39; /** PDF417. */ public static final int PDF417 = 57; /** QR Code. */ public static final int QRCODE = 64; /** Code 93. */ public static final int CODE93 = 93; /** Code 128. */ public static final int CODE128 = 128; /** C pointer to a zbar_symbol_t. */ private long peer; /** Cached attributes. */ private int type; static { System.loadLibrary("zbarjni"); init(); } private static native void init(); /** Symbols are only created by other package methods. */ Symbol(long peer) { this.peer = peer; } protected void finalize() { destroy(); } /** Clean up native data associated with an instance. */ public synchronized void destroy() { if (peer != 0) { destroy(peer); peer = 0; } } /** Release the associated peer instance. */ private native void destroy(long peer); /** Retrieve type of decoded symbol. */ public int getType() { if (type == 0) { type = getType(peer); } return (type); } private native int getType(long peer); /** Retrieve symbology boolean configs settings used during decode. */ public native int getConfigMask(); /** Retrieve symbology characteristics detected during decode. */ public native int getModifierMask(); /** Retrieve data decoded from symbol as a String. */ public native String getData(); /** Retrieve raw data bytes decoded from symbol. */ public native byte[] getDataBytes(); /** * Retrieve a symbol confidence metric. Quality is an unscaled, * relative quantity: larger values are better than smaller * values, where "large" and "small" are application dependent. */ public native int getQuality(); /** * Retrieve current cache count. When the cache is enabled for * the image_scanner this provides inter-frame reliability and * redundancy information for video streams. * * @returns < 0 if symbol is still uncertain * @returns 0 if symbol is newly verified * @returns > 0 for duplicate symbols */ public native int getCount(); public int getLocationSize() { return getLocationSize(peer); } /** * Retrieve an approximate, axis-aligned bounding box for the * symbol. */ public int[] getBounds() { int n = getLocationSize(peer); if (n <= 0) { return (null); } int[] bounds = new int[4]; int xmin = Integer.MAX_VALUE; int xmax = Integer.MIN_VALUE; int ymin = Integer.MAX_VALUE; int ymax = Integer.MIN_VALUE; for (int i = 0; i < n; i++) { int x = getLocationX(peer, i); if (xmin > x) xmin = x; if (xmax < x) xmax = x; int y = getLocationY(peer, i); if (ymin > y) ymin = y; if (ymax < y) ymax = y; } bounds[0] = xmin; bounds[1] = ymin; bounds[2] = xmax - xmin; bounds[3] = ymax - ymin; return (bounds); } private native int getLocationSize(long peer); private native int getLocationX(long peer, int idx); private native int getLocationY(long peer, int idx); public int[] getLocationPoint(int idx) { int[] p = new int[2]; p[0] = getLocationX(peer, idx); p[1] = getLocationY(peer, idx); return (p); } public PointF[] getLocationPoints() { int locationSize = getLocationSize(peer); final PointF[] pointArr = new PointF[locationSize]; for (int pointIndex = 0; pointIndex < locationSize; pointIndex++) { pointArr[pointIndex] = new PointF(getLocationX(peer, pointIndex), getLocationY(peer, pointIndex)); } return pointArr; } /** * Retrieve general axis-aligned, orientation of decoded * symbol. */ public native int getOrientation(); /** Retrieve components of a composite result. */ public SymbolSet getComponents() { return (new SymbolSet(getComponents(peer))); } private native long getComponents(long peer); native long next(); }
[ "sjy0118atsn@163.com" ]
sjy0118atsn@163.com
7b78570d0593b3c69923202eb83a5b000254ffe1
ee4cbc27087d3b7f4da7de2a36c39a2ebf381f79
/eis-yqfs-parent/eis-yqfs-facade/src/main/java/com/prolog/eis/model/pd/PdTaskDetail.java
2412ef24c82186fe8d70d80739bf0181a264eb44
[]
no_license
Chaussure-org/eis-yq-plg
161126bd784095bb5eb4b45ae581439169fa0e38
19313dbbc74fbe79e38f35594ee5a5b3dc26b3cb
refs/heads/master
2023-01-02T08:27:57.747759
2020-10-19T07:22:52
2020-10-19T07:22:52
305,276,116
0
1
null
null
null
null
UTF-8
Java
false
false
4,275
java
package com.prolog.eis.model.pd; import java.util.Date; import com.prolog.framework.core.annotation.AutoKey; import com.prolog.framework.core.annotation.Column; import com.prolog.framework.core.annotation.Id; import com.prolog.framework.core.annotation.Table; import io.swagger.annotations.ApiModelProperty; @Table("pd_task_detail") public class PdTaskDetail { @Id @Column("id") @ApiModelProperty("id") @AutoKey(type = AutoKey.TYPE_IDENTITY) private int id; @Column("pd_task_id") @ApiModelProperty("盘点任务id") private int pdTaskId; @Column("container_no") @ApiModelProperty("箱号") private String containerNo; @Column("container_sub_no") @ApiModelProperty("货格号") private String containerSubNo; @Column("goods_no") @ApiModelProperty("商品编号") private String goodsNo; @Column("goods_name") @ApiModelProperty("商品名称") private String goodsName; @Column("bar_code") @ApiModelProperty("商品条码") private String barCode; @Column("original_count") @ApiModelProperty("原始数量") private int originalCount; @Column("modify_count") @ApiModelProperty("修改数量") private int modifyCount; @Column("create_time") @ApiModelProperty("创建时间") private Date createTime; @Column("task_state") @ApiModelProperty("任务状态 0新建 10下发 20已出库 30进行中 40已完成") private int taskState; @Column("publish_time") @ApiModelProperty("下发时间") private Date publishTime; @Column("outbound_time") @ApiModelProperty("出库时间") private Date outboundTime; @Column("pd_start_time") @ApiModelProperty("盘点开始时间") private Date pdStartTime; @Column("pd_end_time") @ApiModelProperty("盘点结束时间") private Date pdEndTime; @Column("finish_reason") @ApiModelProperty("结束原因") private String finishReason; @ApiModelProperty("盘点类型[1:静态盘点,2:动态盘点]") @Column("pd_type") private int pdType; public int getId() { return id; } public void setId(int id) { this.id = id; } public int getPdTaskId() { return pdTaskId; } public void setPdTaskId(int pdTaskId) { this.pdTaskId = pdTaskId; } public String getContainerNo() { return containerNo; } public void setContainerNo(String containerNo) { this.containerNo = containerNo; } public String getContainerSubNo() { return containerSubNo; } public void setContainerSubNo(String containerSubNo) { this.containerSubNo = containerSubNo; } public String getGoodsNo() { return goodsNo; } public void setGoodsNo(String goodsNo) { this.goodsNo = goodsNo; } public String getGoodsName() { return goodsName; } public void setGoodsName(String goodsName) { this.goodsName = goodsName; } public String getBarCode() { return barCode; } public void setBarCode(String barCode) { this.barCode = barCode; } public int getOriginalCount() { return originalCount; } public void setOriginalCount(int originalCount) { this.originalCount = originalCount; } public int getModifyCount() { return modifyCount; } public void setModifyCount(int modifyCount) { this.modifyCount = modifyCount; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public int getTaskState() { return taskState; } public void setTaskState(int taskState) { this.taskState = taskState; } public Date getPublishTime() { return publishTime; } public void setPublishTime(Date publishTime) { this.publishTime = publishTime; } public Date getOutboundTime() { return outboundTime; } public void setOutboundTime(Date outboundTime) { this.outboundTime = outboundTime; } public Date getPdStartTime() { return pdStartTime; } public void setPdStartTime(Date pdStartTime) { this.pdStartTime = pdStartTime; } public Date getPdEndTime() { return pdEndTime; } public void setPdEndTime(Date pdEndTime) { this.pdEndTime = pdEndTime; } public String getFinishReason() { return finishReason; } public void setFinishReason(String finishReason) { this.finishReason = finishReason; } public int getPdType() { return pdType; } public void setPdType(int pdType) { this.pdType = pdType; } }
[ "chaussure@qq.com" ]
chaussure@qq.com
0c38a8840308c5741d8b5c5199ef80a77617f3cd
5be2a68d3f6e5cc49b5fce7ed361ffd127498d5a
/panda-framework/src/main/java/org/panda_lang/framework/language/architecture/type/array/ArrayClassTypeFetcher.java
74f5d8221f865bc4f1ebaaf71edf77dbf1b2715b
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
jofrantoba/panda
51c4a92403a9352987abf94ca0ad0957fcdc6352
b31547c8441406922714d629f2283a3d9d322872
refs/heads/master
2022-11-14T16:41:14.643470
2020-07-07T23:00:44
2020-07-07T23:00:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,474
java
/* * Copyright (c) 2020 Dzikoysk * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.panda_lang.framework.language.architecture.type.array; import org.panda_lang.framework.PandaFrameworkException; import org.panda_lang.framework.design.architecture.module.Module; import org.panda_lang.framework.design.architecture.module.TypeLoader; import org.panda_lang.framework.design.architecture.type.Type; import org.panda_lang.utilities.commons.ArrayUtils; import org.panda_lang.utilities.commons.StringUtils; import org.panda_lang.utilities.commons.function.Option; import java.util.HashMap; import java.util.Map; public final class ArrayClassTypeFetcher { private static final Map<String, Type> ARRAY_PROTOTYPES = new HashMap<>(); public static Option<Type> fetch(TypeLoader typeLoader, Class<?> type) { Class<?> baseClass = ArrayUtils.getBaseClass(type); Type baseType = typeLoader.requireType(baseClass); return fetch(typeLoader, baseType.getSimpleName() + type.getSimpleName().replace(baseClass.getSimpleName(), StringUtils.EMPTY)); } public static Option<Type> fetch(TypeLoader typeLoader, String typeName) { return Option.of(ARRAY_PROTOTYPES.get(typeName)) .orElse(() -> { String arrayType = StringUtils.replace(typeName, PandaArray.IDENTIFIER, StringUtils.EMPTY); return typeLoader.forName(arrayType); }) .map(type -> { int dimensions = StringUtils.countOccurrences(typeName, PandaArray.IDENTIFIER); return getArrayOf(typeLoader, type, dimensions); }); } public static Type getArrayOf(TypeLoader typeLoader, Type baseType, int dimensions) { Class<?> componentType = ArrayUtils.getDimensionalArrayType(baseType.getAssociatedClass().fetchStructure(), dimensions); Class<?> arrayClass = ArrayUtils.getArrayClass(componentType); Module module = baseType.getModule(); Type componentReference; if (componentType.isArray()) { componentReference = fetch(typeLoader, componentType).orThrow(() -> { throw new PandaFrameworkException("Cannot fetch array class for array type " + componentType); }); } else { componentReference = module.forClass(componentType).orThrow(() -> { throw new PandaFrameworkException("Cannot fetch array class for " + componentType); }); } ArrayType arrayType = new ArrayType(module, arrayClass, componentReference); ARRAY_PROTOTYPES.put(baseType.getName() + dimensions, arrayType); arrayType.getMethods().declare("size", () -> ArrayClassTypeConstants.SIZE.apply(typeLoader)); arrayType.getMethods().declare("asString", () -> ArrayClassTypeConstants.AS_STRING.apply(typeLoader)); module.add(arrayType); return arrayType; } }
[ "dzikoysk@dzikoysk.net" ]
dzikoysk@dzikoysk.net
85aced9725065f27a7da04a5c0e3a5cf422b3220
cdc9a334996b0c933269b7aa8b39357c97176ca5
/java/service-oa/src/main/java/com/suneee/eas/oa/model/Demo.java
655f03661e1c2400b36f12af6aa22ef3f8cf5c18
[]
no_license
lmr1109665009/oa
857c2729398f08f2094f47824f383cfa4d808ae6
21cf4bac10ab72520a1f0dfdd965b9378081823c
refs/heads/master
2020-05-16T10:39:51.316044
2019-04-23T10:13:26
2019-04-23T10:13:26
182,986,352
2
3
null
null
null
null
UTF-8
Java
false
false
1,032
java
package com.suneee.eas.oa.model; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.suneee.eas.common.component.jackson.LongJsonDeserializer; import com.suneee.eas.common.component.jackson.LongJsonSerializer; import org.apache.ibatis.type.Alias; /** * @user 子华 * @created 2018/7/31 */ @Alias("demo") public class Demo { @JsonSerialize(using = LongJsonSerializer.class) @JsonDeserialize(using = LongJsonDeserializer.class) private Long id; private String username; private String password; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
[ "lmr1109665009@163.com" ]
lmr1109665009@163.com
08e2569debb5318f5b15c746671c304a4c0a6f99
9743e5ddca02b4aadb54c917e2b18ce66763f6dd
/src/main/java/br/com/fws/certificado_digital/dao/CustomerDao.java
d5650eb84f808c76a6e453b8f7f1fb3d2f91193b
[]
no_license
fwfurtado/prac-certificados-digitais
fa42aef78574efecfbc7a5d0f549778e40df5f1b
b66e9e50146fd0d16241a91eb79aedfc9c8570c0
refs/heads/master
2021-06-09T11:49:04.274499
2016-11-28T14:15:51
2016-11-28T14:15:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,513
java
package br.com.fws.certificado_digital.dao; import java.io.Serializable; import javax.persistence.EntityManager; import javax.persistence.NoResultException; import javax.persistence.PersistenceContext; import br.com.fws.certificado_digital.models.customer.Customer; public class CustomerDao implements Serializable { private static final long serialVersionUID = 1L; @PersistenceContext private EntityManager manager; public Customer findById(Long id){ return manager.find(Customer.class, id); } public void update(Customer customer) { manager.merge(customer); } public void save(Customer customer) { manager.persist(customer); } public Customer loadByHash(String hash){ return manager.createQuery("select c from Customer c where c.activationHash = :hash", Customer.class) .setParameter("hash", hash) .getSingleResult(); } public boolean exist(String companyRegistration) { try{ manager .createQuery("select c from Customer c where c.companyRegistration = :companyRegistration", Customer.class) .setParameter("companyRegistration", companyRegistration) .getSingleResult(); return true; }catch (NoResultException e) { return false; } } public Customer loadByCompanyRegistration(String companyRegistration) { return manager .createQuery("select c from Customer c where c.companyRegistration = :companyRegistration", Customer.class) .setParameter("companyRegistration", companyRegistration) .getSingleResult(); } }
[ "feh.wilinando@gmail.com" ]
feh.wilinando@gmail.com
ef1b317bd9019efbc3f7d18cdb76e1b100326c54
18689b77b32bd6557d6b82b3f483e934bcd17511
/ShopBook/src/main/java/com/tampro/dto/CategoryDTO.java
7dedd3ebd0ce5a29cafcca0a9701c1518c27fc84
[]
no_license
xomrayno1/ShopBook
47faf3511ace260b353d33689494f43f4e2e838a
097700d4fcd4d4741230fba11eee9aeb8e9bf914
refs/heads/master
2022-12-29T06:49:27.748072
2020-10-19T17:49:36
2020-10-19T17:49:36
297,365,374
0
0
null
null
null
null
UTF-8
Java
false
false
2,009
java
package com.tampro.dto; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.List; import org.springframework.web.multipart.MultipartFile; public class CategoryDTO extends Base{ private int id; private int idParent; private String code; private String name; private String imgUrl; private MultipartFile multipartFile ; private List<CategoryDTO> childCategory; private int orderIndex; private String url; private List<ProductInfoDTO> productInfoDTOs; private String idCategory; public int getId() { return id; } public void setId(int id) { this.id = id; } public int getIdParent() { return idParent; } public void setIdParent(int idParent) { this.idParent = idParent; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getImgUrl() { return imgUrl; } public void setImgUrl(String imgUrl) { this.imgUrl = imgUrl; } public MultipartFile getMultipartFile() { return multipartFile; } public void setMultipartFile(MultipartFile multipartFile) { this.multipartFile = multipartFile; } public List<CategoryDTO> getChildCategory() { return childCategory; } public void setChildCategory(List<CategoryDTO> childCategory) { this.childCategory = childCategory; } public int getOrderIndex() { return orderIndex; } public void setOrderIndex(int orderIndex) { this.orderIndex = orderIndex; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public List<ProductInfoDTO> getProductInfoDTOs() { return productInfoDTOs; } public void setProductInfoDTOs(List<ProductInfoDTO> productInfoDTOs) { this.productInfoDTOs = productInfoDTOs; } public String getIdCategory() { return idCategory; } public void setIdCategory(String idCategory) { this.idCategory = idCategory; } }
[ "xomrayno5" ]
xomrayno5
4b1fe081b992ccd3893b83b9d15f607d3228eaec
f2497f7c5dd0de11b63e0beff552fe24ba6eff83
/API/IOAPI.java
8b26889e7f888ccdc23f78fbd8ae4dd2df5797b3
[]
no_license
riking/RotaryCraft
b851011fdd3bd80ee4c5e8eaff2004b641c629fe
fe1716b65a13577ed7342287babf9e29d82844e1
refs/heads/master
2021-01-19T07:20:01.698369
2015-01-06T09:16:58
2015-01-06T09:16:58
28,856,270
0
1
null
2015-01-06T09:30:45
2015-01-06T09:30:44
null
UTF-8
Java
false
false
2,330
java
/******************************************************************************* * @author Reika Kalseki * * Copyright 2015 * * All rights reserved. * Distribution of the software in any form is only allowed with * explicit, prior permission from the owner. ******************************************************************************/ package Reika.RotaryCraft.API; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import Reika.RotaryCraft.API.Power.ShaftMachine; import net.minecraft.tileentity.TileEntity; /** Use this to have RC-style red and green IO boxes. */ public class IOAPI { private static Class io; private static Method render; static { try { io = Class.forName("Reika.RotaryCraft.Auxiliary.IORenderer", false, IOAPI.class.getClassLoader()); render = io.getMethod("renderIO", TileEntity.class, double.class, double.class, double.class); } catch (ClassNotFoundException e) { System.out.println("RotaryCraft IORenderer class not found!"); e.printStackTrace(); } catch (NoSuchMethodException e) { System.out.println("Could not find renderIO method in IORenderer class!"); e.printStackTrace(); } catch (SecurityException e) { e.printStackTrace(); } } /** Call this to run the RotaryCraft I/O Renderer on your TileEntity. * * You must call this from inside your TE renderer's "renderTileEntityAt" method. * Calling it on pass 1 only is strongly recommended to * prevent visual glitches caused by OpenGL limitations. * @param machine Your TileEntity as either a ShaftPowerEmitter or ShaftPowerReceiver * @param par2 The "par2" passed in the "renderTileEntityAt"; related to x-displacement * @param par4 The "par4" passed in the "renderTileEntityAt"; related to y-displacement * @param par6 The "par6" passed in the "renderTileEntityAt"; related to z-displacement */ public static void renderIO(ShaftMachine machine, double par2, double par4, double par6) { try { render.invoke(null, machine, par2, par4, par6); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } catch (NullPointerException e) { //If init failed e.printStackTrace(); } } }
[ "reikasminecraft@gmail.com" ]
reikasminecraft@gmail.com
d2dff54a53024d61a5c4c40a528f6c91bb316357
680b891b4c724b0e84a64fee47e5901ed60fc44b
/src/main/java/com/casic/accessControl/core/spring/ApplicationContextHolder.java
0504646bb45b7d8652e11da39dc6f583616d97a8
[]
no_license
predatorZhang/EMS
e662e9114dafcae7ae5368bb683b60e0606df476
e44042197a7c2e4e2e8723237d269ff06e01ecd2
refs/heads/master
2021-01-01T06:06:53.556966
2017-07-16T03:34:10
2017-07-16T03:34:10
97,357,624
1
0
null
null
null
null
UTF-8
Java
false
false
1,009
java
package com.casic.accessControl.core.spring; import org.springframework.context.ApplicationContext; /** * 保存ApplicationContext的单例. */ public class ApplicationContextHolder { /** instance. */ private static ApplicationContextHolder instance = new ApplicationContextHolder(); /** ApplicationContext. */ private ApplicationContext applicationContext; /** * get ApplicationContext. * * @return ApplicationContext */ public ApplicationContext getApplicationContext() { return applicationContext; } /** * set ApplicationContext. * * @param applicationContext * ApplicationContext */ public void setApplicationContext(ApplicationContext applicationContext) { this.applicationContext = applicationContext; } /** * get instance. * * @return ApplicationContextHolder */ public static ApplicationContextHolder getInstance() { return instance; } }
[ "zhangfan1212@126.com" ]
zhangfan1212@126.com
0ad88ad95961dcd37ee9c3e0e787af5aea368469
edeb76ba44692dff2f180119703c239f4585d066
/libRemoteServices/src/org/gvsig/remoteClient/taskplanning/retrieving/RetrieveQueue.java
ad6018c8c259e3c8c3c16bf56a36d4cc7c671a6f
[]
no_license
CafeGIS/gvSIG2_0
f3e52bdbb98090fd44549bd8d6c75b645d36f624
81376f304645d040ee34e98d57b4f745e0293d05
refs/heads/master
2020-04-04T19:33:47.082008
2012-09-13T03:55:33
2012-09-13T03:55:33
5,685,448
2
1
null
null
null
null
UTF-8
Java
false
false
2,557
java
/* * Created on 01-oct-2005 */ package org.gvsig.remoteClient.taskplanning.retrieving; import java.util.Date; import java.util.Vector; import org.gvsig.remoteClient.taskplanning.FIFOTaskPlanner; import org.gvsig.remoteClient.taskplanning.IQueue; import org.gvsig.remoteClient.taskplanning.IRunnableTask; import org.gvsig.remoteClient.taskplanning.ITaskPlanner; /** * @author jaume dominguez faus - jaume.dominguez@iver.es * Luis W. Sevilla (sevilla_lui@gva.es) */ public class RetrieveQueue implements IQueue { private String hostName; private Date startTime; private Vector tasks = new Vector(); private boolean waiting; private ITaskPlanner taskPlanner; private Worker worker; /** * */ public RetrieveQueue(String hName) { hostName = hName; startTime = new Date(); worker = new Worker(); new Thread(worker).start(); } public IRunnableTask put(IRunnableTask task) { tasks.add(task); if (waiting) { synchronized (this) { notifyAll(); } } return task; } public IRunnableTask take() { if (tasks.isEmpty()) { synchronized (this) { waiting = true; try { wait(); } catch (InterruptedException ie) { waiting = false; } } } return getTaskPlanner().nextTask() ; } public boolean isEmpty() { synchronized (this) { return tasks.isEmpty() && !worker.r.isRunning(); } } public ITaskPlanner getTaskPlanner() { if (taskPlanner == null) { taskPlanner = new FIFOTaskPlanner(this); } return taskPlanner; } public void setTaskPlanner(ITaskPlanner planner) { taskPlanner = planner; } public void pause() { waiting = true; } public void resume() { waiting = false; } public Vector getTasks() { return tasks; } private class Worker implements Runnable { URLRetrieveTask r; int i = 0; public void run() { while (true) { r = (URLRetrieveTask) take(); r.execute(); } } } protected URLRetrieveTask getURLPreviousRequest(URLRequest request) { // Is the one currently running? /*URLRetrieveTask aux = (URLRetrieveTask) worker.r; if (request.equals(aux.getRequest())) { return aux; }*/ // Is one of those in the queue? for (int i = 0; i < tasks.size(); i++) { URLRetrieveTask task = (URLRetrieveTask) tasks.get(i); URLRequest aWorkingRequest = task.getRequest(); if (aWorkingRequest.equals(request)) { return task; } } return null; } }
[ "tranquangtruonghinh@gmail.com" ]
tranquangtruonghinh@gmail.com
e47587c47796dd417777aedc7c259add0805184f
54a24781a7a09311456cb685f63f0e6d2bab4bab
/src/l1j/server/server/clientpackets/C_DeleteBookmark.java
91f240160a6215b939920c83368e62991b56a791
[]
no_license
crazyidol9/L1J-KR_3.80
b1c2d849a0daad99fd12166611e82b6804d2b26d
43c5da32e1986082be6f1205887ffc4538baa2c6
refs/heads/master
2021-08-16T13:50:50.570172
2017-11-20T01:20:52
2017-11-20T01:20:52
111,041,969
0
0
null
2017-11-17T01:24:24
2017-11-17T01:24:24
null
UTF-8
Java
false
false
1,510
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, 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. * * http://www.gnu.org/copyleft/gpl.html */ package l1j.server.server.clientpackets; import server.LineageClient; import l1j.server.server.model.Instance.L1PcInstance; import l1j.server.server.templates.L1BookMark; public class C_DeleteBookmark extends ClientBasePacket { private static final String C_DETELE_BOOKMARK = "[C] C_DeleteBookmark"; public C_DeleteBookmark(byte[] decrypt, LineageClient client) { super(decrypt); try { L1PcInstance pc = client.getActiveChar(); if (pc == null) return; String bookmarkname = readS(); if (!bookmarkname.isEmpty()) L1BookMark.deleteBookmark(pc, bookmarkname); } catch (Exception e) { // } finally { // Finish(); } } @Override public String getType() { return C_DETELE_BOOKMARK; } }
[ "wantedgaming.net@gmail.com" ]
wantedgaming.net@gmail.com
8308659509c54d94a14a56fca0d7d13290751871
6dc254f640f720fd6f1d581cc9c47452e6904083
/src/server/maps/MapleExtractor.java
8f2e93f8d49de6877b7de18399b803520f773d56
[]
no_license
ronancpl/judoms
5fb9077afd7715207d360e1816e8083775b4dc67
6d1c0dc225b934edfa227d5497a178811edacb2b
refs/heads/master
2021-01-16T23:14:45.927216
2015-07-12T21:55:21
2015-07-12T21:55:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,249
java
package server.maps; import client.MapleCharacter; import client.MapleClient; import java.awt.Point; import tools.packet.CField; public class MapleExtractor extends MapleMapObject { public int owner, timeLeft, itemId, fee; public long startTime; public String ownerName; public MapleExtractor(MapleCharacter owner, int itemId, int fee, int timeLeft) { super(); this.owner = owner.getId(); this.itemId = itemId; this.fee = fee; this.ownerName = owner.getName(); this.startTime = System.currentTimeMillis(); this.timeLeft = timeLeft; setPosition(owner.getPosition()); } public int getTimeLeft() { // Tbh idk if this is even right, lol return timeLeft; } @Override public void sendSpawnData(MapleClient client) { client.getSession().write(CField.makeExtractor(owner, ownerName, getTruePosition(), getTimeLeft(), itemId, fee)); } @Override public void sendDestroyData(MapleClient client) { client.getSession().write(CField.removeExtractor(this.owner)); } @Override public MapleMapObjectType getType() { return MapleMapObjectType.EXTRACTOR; } }
[ "msroed@gmail.com" ]
msroed@gmail.com
c40d9030ed9488a3b2cdeb7bff7460d824a4c6ba
744819ca0ddb00b1705b31b611298a9155aa640e
/java/src/main/java/org/shoban/java/collections/interfaces/OysterMonths.java
21455abb942263054a279bb19d73f3a2c16d2bde
[]
no_license
shobancs/javario
4dcff83c565fe6fdc737ad9c67ea7ff34eac4bb8
2055f9e0bd86a61bca2523ba69e5f525ba3cb60f
refs/heads/master
2022-12-22T00:03:39.846763
2020-07-09T16:44:39
2020-07-09T16:44:39
66,690,745
0
1
null
2022-12-16T03:39:43
2016-08-27T02:11:16
Java
UTF-8
Java
false
false
2,622
java
package org.shoban.java.collections.interfaces; /* * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * - Neither the name of Oracle or 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 OWNER 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. */ import java.util.Collection; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.text.DateFormatSymbols; public class OysterMonths { Collection<String> safeMonths; public Collection<String> filter(Collection<String> c) { Collection<String> filteredCollection = new ArrayList<String>(); for (Iterator<String> i = c.iterator(); i.hasNext(); ) { String s = i.next(); if (condition(s)) { filteredCollection.add(s); } } return filteredCollection; } public boolean condition(String s) { return s.contains("r"); } public static void main(String[] args) { OysterMonths om = new OysterMonths(); DateFormatSymbols dfs = new DateFormatSymbols(); String[] monthArray = dfs.getMonths(); Collection<String> months = Arrays.asList(monthArray); om.safeMonths = om.filter(months); System.out.println("The following months are safe for oysters:"); System.out.println(om.safeMonths); } }
[ "scheekur@cisco.com" ]
scheekur@cisco.com
11cc80eed1d16ebf371276fcd0dc1bb03f8a442c
c43b364d2ec620ab89d5eb419e7b60290b6d5866
/src/com/massivecraft/creativegates/zcore/persist/EM.java
ea3652ba9dd804cba4dac24b626b9908917b31ed
[]
no_license
Scrik/CreativeGates
6e10badad5f888ab6eb0c19d54ded7fc73636489
22c1d7f7774a3f88ca63522b7e22d4201dec3792
refs/heads/master
2021-01-17T11:26:21.210482
2013-09-27T17:31:47
2013-09-27T17:31:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,264
java
package com.massivecraft.creativegates.zcore.persist; import java.util.*; import com.massivecraft.creativegates.zcore.persist.Entity; import com.massivecraft.creativegates.zcore.persist.EntityCollection; public class EM { public static Map<Class<? extends Entity>, EntityCollection<? extends Entity>> class2Entities = new LinkedHashMap<Class<? extends Entity>, EntityCollection<? extends Entity>>(); @SuppressWarnings("unchecked") public static <T extends Entity> EntityCollection<T> getEntitiesCollectionForEntityClass(Class<T> entityClass) { return (EntityCollection<T>) class2Entities.get(entityClass); } public static void setEntitiesCollectionForEntityClass(Class<? extends Entity> entityClass, EntityCollection<? extends Entity> entities) { class2Entities.put(entityClass, entities); } // -------------------------------------------- // // ATTACH AND DETACH // -------------------------------------------- // @SuppressWarnings("unchecked") public static <T extends Entity> void attach(T entity) { EntityCollection<T> ec = (EntityCollection<T>) getEntitiesCollectionForEntityClass(entity.getClass()); ec.attach(entity); } @SuppressWarnings("unchecked") public static <T extends Entity> void detach(T entity) { EntityCollection<T> ec = (EntityCollection<T>) getEntitiesCollectionForEntityClass(entity.getClass()); ec.detach(entity); } @SuppressWarnings("unchecked") public static <T extends Entity> boolean attached(T entity) { EntityCollection<T> ec = (EntityCollection<T>) getEntitiesCollectionForEntityClass(entity.getClass()); return ec.attached(entity); } @SuppressWarnings("unchecked") public static <T extends Entity> boolean detached(T entity) { EntityCollection<T> ec = (EntityCollection<T>) getEntitiesCollectionForEntityClass(entity.getClass()); return ec.detached(entity); } // -------------------------------------------- // // DISC // -------------------------------------------- // public static void saveAllToDisc() { for (EntityCollection<? extends Entity> ec : class2Entities.values()) { ec.saveToDisc(); } } public static void loadAllFromDisc() { for (EntityCollection<? extends Entity> ec : class2Entities.values()) { ec.loadFromDisc(); } } }
[ "Shev4ik.den@gmail.com" ]
Shev4ik.den@gmail.com
626bb8068fc91c0657e714a1aaf87a804388e741
14d083e172837377a0bc3e9b2b031c058e75a4aa
/src/Physics/Smoothing/Ease_Out_Interpolation/CEase_In_Out_Interpolation.java
b4f7d2621c130b4e1b8e998a59a505ea3a7d26dd
[]
no_license
wgres101/NECROTEK3Dv2
478b708936b4dcfd9aa7f9b949e23bfa3e61bd43
4f57b5f56fc2fa6406d2ce6ed5fdce21964fd483
refs/heads/master
2020-12-18T18:58:42.660286
2017-08-10T23:23:29
2017-08-10T23:23:29
235,483,578
0
0
null
null
null
null
UTF-8
Java
false
false
880
java
package Physics.Smoothing.Ease_Out_Interpolation; public class CEase_In_Out_Interpolation { float _value; float _target; float _speed; float _acceleration; float _remainingTime; float totalTime; public boolean Setup(float from, float to, float time) { _value = from; _target = to; _speed = 0.0f; //derived from x=x0 + v0t + att/2 _acceleration = (to-from)/(time*time/4); _remainingTime = time; totalTime = time; if (time<=0) { return false; } return true; } public boolean Interpolate(float deltaTime) { _remainingTime -= deltaTime; if (_remainingTime < totalTime/2) { //deceleration _speed -= _acceleration * deltaTime; } else { //acceleration _speed += _acceleration * deltaTime; } _value += _speed*deltaTime; return (_remainingTime <= 0); } float GetValue() { return _value; } }
[ "ted_gress@yahoo.com" ]
ted_gress@yahoo.com
b66421cc85ac87e4e63462388d44972a1dc027f5
b94b3bfdccaf132e091bd88206169ef701d50456
/2003/BOA_new/src/com/boa/eagls/government/taglib/pagedList/NextButtonTag.java
c4f05cd6c2f95c0aca6a346af7bef1de5679adcf
[]
no_license
ildar66/WSAD5_BOA
f6b87c0bbd2db40b410b657e819f99ec40f7c792
a8a8e3bd80f2660676c6fb0a7d91b483db4840ca
refs/heads/master
2020-12-02T09:58:51.906254
2017-07-09T07:18:34
2017-07-09T07:18:34
96,667,614
0
0
null
null
null
null
UTF-8
Java
false
false
2,674
java
package com.boa.eagls.government.taglib.pagedList; import com.boa.eagls.government.exceptions.system.EaglsDAOError; import com.boa.eagls.government.util.pagedList.ValueListIterator; import org.apache.log4j.Logger; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.TagSupport; import javax.servlet.http.HttpServletRequest; import java.io.IOException; /** * Tag for rendering nextColumn button in PagedList. It may render nothing if no nextColumn * records are exist. * User: OlegK * Date: 06.07.2003 * @author Oleg Klimenko */ public class NextButtonTag extends TagSupport { private static Logger logger = Logger.getLogger(NextButtonTag.class); private String searchParameter; public String getSearchParameter() { return searchParameter; } public void setSearchParameter(String searchParameter) { this.searchParameter = searchParameter; } /** * It's a simple tag. So it writes to output during startTag processing. * It doesn't have a body. * @throws JspException */ public int doStartTag() throws JspException { ValueListIterator valueListIterator = PageListUtil.lookupForIterator(pageContext); try { if (valueListIterator.hasNext(50)) { logger.debug("IS NEXT"); // pageContext.getOut().print("<INPUT TYPE='SUBMIT' name='nextColumn' value='Next'/>"); pageContext.getOut().print("<INPUT TYPE='BUTTON' name='nextColumn' value='Next' "); if (searchParameter == null) { pageContext.getOut().print("onclick='window.location=\""+ ((HttpServletRequest)(pageContext.getRequest())).getRequestURL()+"?Next=Next\"'/>"); } else { pageContext.getOut().print("onclick='window.location=\""+ ((HttpServletRequest)(pageContext.getRequest())).getRequestURL()+"?Next=Next&searchType="+searchParameter+"\"'/>"); } } else { logger.debug("IS NOT NEXT"); pageContext.getOut().print("&nbsp;"); } } catch (EaglsDAOError eaglsDAOError) { logger.error(eaglsDAOError.getMessage(), eaglsDAOError); PageListUtil.handleDaoError(eaglsDAOError.getMessage(), eaglsDAOError, this); // throw new JspException("NextButtonTag: ", eaglsDAOError); } catch (IOException e) { logger.error(e.getMessage(), e); throw new JspException("NextButtonTag: ", e); } return SKIP_BODY; } public int doEndTag() { return EVAL_PAGE; } }
[ "ildar66@inbox.ru" ]
ildar66@inbox.ru
36eae467a93a676d03fd3f8bc1ccac4f6a742a14
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_e0a8750f5d2b6edbef1946bf1494c6df991a4f35/SchemaLocationSection/7_e0a8750f5d2b6edbef1946bf1494c6df991a4f35_SchemaLocationSection_t.java
349a3603ebfcbfa4ee55c981480bf333e77bb43a
[]
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,873
java
/******************************************************************************* * Copyright (c) 2001, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.wst.xsd.ui.internal.properties.section; import org.eclipse.core.resources.IFile; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.window.Window; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CLabel; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.wst.common.ui.properties.ITabbedPropertyConstants; import org.eclipse.wst.common.ui.properties.TabbedPropertySheetWidgetFactory; import org.eclipse.wst.common.ui.viewers.ResourceFilter; import org.eclipse.wst.xml.uriresolver.util.URIHelper; import org.eclipse.wst.xsd.ui.internal.XSDEditorPlugin; import org.eclipse.wst.xsd.ui.internal.wizards.XSDSelectIncludeFileWizard; import org.eclipse.xsd.XSDInclude; import org.eclipse.xsd.XSDRedefine; import org.eclipse.xsd.XSDSchema; import org.eclipse.xsd.impl.XSDIncludeImpl; import org.eclipse.xsd.impl.XSDRedefineImpl; import org.w3c.dom.Element; public class SchemaLocationSection extends CommonDirectivesSection { IWorkbenchPart part; /** * */ public SchemaLocationSection() { super(); } /** * @see org.eclipse.wst.common.ui.properties.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.wst.common.ui.properties.TabbedPropertySheetWidgetFactory) */ public void createControls(Composite parent, TabbedPropertySheetWidgetFactory factory) { super.createControls(parent, factory); Composite composite = getWidgetFactory().createFlatFormComposite(parent); int leftCoordinate = getStandardLabelWidth(composite, new String[] {XSDEditorPlugin.getXSDString("_UI_LABEL_SCHEMA_LOCATION")}); // Create Schema Location Label CLabel schemaLocationLabel = getWidgetFactory().createCLabel(composite, XSDEditorPlugin.getXSDString("_UI_LABEL_SCHEMA_LOCATION")); //$NON-NLS-1$ // Create Schema Location Text schemaLocationText = getWidgetFactory().createText(composite, "", SWT.NONE); //$NON-NLS-1$ // Create Wizard Button wizardButton = getWidgetFactory().createButton(composite, "", SWT.NONE); //$NON-NLS-1$ wizardButton.setImage(XSDEditorPlugin.getXSDImage("icons/browsebutton.gif")); //$NON-NLS-1$ FormData buttonFormData = new FormData(); buttonFormData.left = new FormAttachment(100, -rightMarginSpace + 2); buttonFormData.right = new FormAttachment(100,0); buttonFormData.top = new FormAttachment(schemaLocationText, 0, SWT.CENTER); wizardButton.setLayoutData(buttonFormData); wizardButton.addSelectionListener(this); schemaLocationText.setEditable(true); FormData schemaLocationData = new FormData(); schemaLocationData.left = new FormAttachment(0, leftCoordinate); schemaLocationData.right = new FormAttachment(wizardButton, 0); schemaLocationText.setLayoutData(schemaLocationData); schemaLocationText.addListener(SWT.Modify, this); FormData data = new FormData(); data.left = new FormAttachment(0, 0); data.right = new FormAttachment(schemaLocationText, -ITabbedPropertyConstants.HSPACE); data.top = new FormAttachment(schemaLocationText, 0, SWT.CENTER); schemaLocationLabel.setLayoutData(data); // error text errorText = new StyledText(composite, SWT.FLAT); errorText.setEditable(false); errorText.setEnabled(false); errorText.setText(""); data = new FormData(); data.left = new FormAttachment(schemaLocationText, 0, SWT.LEFT); data.right = new FormAttachment(100, 0); data.top = new FormAttachment(schemaLocationText, 0); errorText.setLayoutData(data); } public void widgetSelected(SelectionEvent event) { if (event.widget == wizardButton) { Shell shell = Display.getCurrent().getActiveShell(); IFile currentIFile = ((IFileEditorInput)getActiveEditor().getEditorInput()).getFile(); ViewerFilter filter = new ResourceFilter(new String[] { ".xsd" }, //$NON-NLS-1$ new IFile[] { currentIFile }, null); XSDSelectIncludeFileWizard fileSelectWizard = new XSDSelectIncludeFileWizard(xsdSchema, true, XSDEditorPlugin.getXSDString("_UI_FILEDIALOG_SELECT_XML_SCHEMA"), //$NON-NLS-1$ XSDEditorPlugin.getXSDString("_UI_FILEDIALOG_SELECT_XML_DESC"), //$NON-NLS-1$ filter, (IStructuredSelection) selection); WizardDialog wizardDialog = new WizardDialog(shell, fileSelectWizard); wizardDialog.create(); wizardDialog.setBlockOnOpen(true); int result = wizardDialog.open(); String value = schemaLocationText.getText(); if (result == Window.OK) { errorText.setText(""); IFile selectedIFile = fileSelectWizard.getResultFile(); String schemaFileString = value; if (selectedIFile != null) { schemaFileString = URIHelper.getRelativeURI(selectedIFile.getLocation(), currentIFile.getLocation()); } else { schemaFileString = fileSelectWizard.getURL(); } handleSchemaLocationChange(schemaFileString, fileSelectWizard.getNamespace(), null); refresh(); } } } /* * @see org.eclipse.wst.common.ui.properties.view.ITabbedPropertySection#refresh() */ public void refresh() { if (doRefresh) { setListenerEnabled(false); Element element = null; if (input instanceof XSDInclude) { element = ((XSDIncludeImpl) input).getElement(); } else if (input instanceof XSDRedefine) { element = ((XSDRedefineImpl) input).getElement(); } if (element != null) { String location = ""; //$NON-NLS-1$ location = element.getAttribute("schemaLocation"); //$NON-NLS-1$ if (location == null) { location = ""; } schemaLocationText.setText(location); } setListenerEnabled(true); } } /* (non-Javadoc) * @see org.eclipse.wst.common.ui.properties.ISection#shouldUseExtraSpace() */ public boolean shouldUseExtraSpace() { return true; } protected void handleSchemaLocationChange(String schemaFileString, String namespace, XSDSchema externalSchema) { if (input instanceof XSDInclude) { Element element = ((XSDIncludeImpl) input).getElement(); element.setAttribute("schemaLocation", schemaFileString); //$NON-NLS-1$ } else if (input instanceof XSDRedefine) { Element element = ((XSDRedefineImpl) input).getElement(); element.setAttribute("schemaLocation", schemaFileString); //$NON-NLS-1$ } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
7649c3be8051bedf40736c79c49673c02028770e
08d971a00c30e0771cb82d0e03edc183acedccb0
/app/src/main/java/pumpkin/org/angrypandarxjava/rx/ObservableWindow.java
5904832cd76f4ccc4715ba16c33022f110060319
[]
no_license
MMLoveMeMM/AngryPandaRxJava
c27bf6443c75bb0c18e85188ec17c67de50f006c
2386d1cc1768645245e72b1e026d6aae4d172416
refs/heads/master
2020-06-21T23:30:32.121851
2019-09-26T11:24:41
2019-09-26T11:24:41
197,578,889
0
0
null
null
null
null
UTF-8
Java
false
false
1,780
java
package pumpkin.org.angrypandarxjava.rx; import android.support.annotation.NonNull; import android.util.Log; import java.util.concurrent.TimeUnit; import io.reactivex.Observable; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.functions.Consumer; import io.reactivex.schedulers.Schedulers; /** * @ProjectName: AngryPandaRxJava * @ClassName: ObservableWindow * @Author: 刘志保 * @CreateDate: 2019/7/18 10:47 * @Description: 按照实际划分窗口,将数据发送给不同的 Observable---这个东西不怎么好用. */ public class ObservableWindow { private static final String TAG = ObservableWindow.class.getName(); public void obCreateWindow(){ Observable.interval(1, TimeUnit.SECONDS) // 间隔一秒发一次 .take(15) // 最多接收15个 .window(3, TimeUnit.SECONDS) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Consumer<Observable<Long>>() { @Override public void accept(@NonNull Observable<Long> longObservable) throws Exception { Log.d(TAG, "Sub Divide begin...\n"); longObservable.subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Consumer<Long>() { @Override public void accept(@NonNull Long aLong) throws Exception { Log.d(TAG, "Next:" + aLong + "\n"); } }); } }); } }
[ "liuzhibao@xl.cn" ]
liuzhibao@xl.cn
04e76369caa27bbcc65b6b02bbedd5038cb2b2e4
27ba059d23f01e7c9bbd5554b428c7dfb5256d50
/core/org.ebayopensource.vjet.core.jsgenshared/src/org/ebayopensource/dsf/jsgen/shared/validation/vjo/semantic/validator/VjoObjLiteralValidator.java
d9313799c23581ee41ede07cc649ded33ad7ca58
[]
no_license
arv100kri/vjet
3ebecd93446e4c60d7a771dc10b575ed4a86b5c2
fb302d0954c205a566540d7e607e088faf15dc85
refs/heads/master
2020-12-24T17:45:28.531344
2012-01-07T01:25:41
2012-01-07T01:25:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,111
java
/******************************************************************************* * Copyright (c) 2005-2011 eBay Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.ebayopensource.dsf.jsgen.shared.validation.vjo.semantic.validator; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.ebayopensource.dsf.jsgen.shared.validation.vjo.VjoSemanticValidator; import org.ebayopensource.dsf.jsgen.shared.validation.vjo.VjoValidationCtx; import org.ebayopensource.dsf.jsgen.shared.validation.vjo.semantic.rules.VjoSemanticRuleRepo; import org.ebayopensource.dsf.jsgen.shared.validation.vjo.semantic.rules.rulectx.BaseVjoSemanticRuleCtx; import org.ebayopensource.dsf.jsgen.shared.validation.vjo.semantic.rules.util.TypeCheckUtil; import org.ebayopensource.dsf.jsgen.shared.validation.vjo.visitor.IVjoValidationPostAllChildrenListener; import org.ebayopensource.dsf.jsgen.shared.validation.vjo.visitor.IVjoValidationVisitorEvent; import org.ebayopensource.dsf.jst.IJstNode; import org.ebayopensource.dsf.jst.term.JstIdentifier; import org.ebayopensource.dsf.jst.term.NV; import org.ebayopensource.dsf.jst.term.ObjLiteral; import org.ebayopensource.dsf.jst.token.IExpr; public class VjoObjLiteralValidator extends VjoSemanticValidator implements IVjoValidationPostAllChildrenListener { private static List<Class<? extends IJstNode>> s_targetTypes; static{ s_targetTypes = new ArrayList<Class<? extends IJstNode>>(); s_targetTypes.add(ObjLiteral.class); } @Override public List<Class<? extends IJstNode>> getTargetNodeTypes() { return s_targetTypes; } @Override public void onPostAllChildrenEvent(final IVjoValidationVisitorEvent event){ final VjoValidationCtx ctx = event.getValidationCtx(); final IJstNode jstNode = event.getVisitNode(); if(!(jstNode instanceof ObjLiteral)){ return; } final ObjLiteral objLiteral = (ObjLiteral)jstNode; final Set<String> nameSet = new HashSet<String>(); for(NV nv : objLiteral.getNVs()){ if(nameSet.contains(nv.getName())){ //report problem; //add error arguments String[] arguments = new String[2]; arguments[0] = nv.getName() != null ? nv.getName() : "NULL"; arguments[1] = objLiteral.toExprText(); final BaseVjoSemanticRuleCtx ruleCtx = new BaseVjoSemanticRuleCtx(objLiteral, ctx.getGroupId(), arguments); satisfyRule(ctx, VjoSemanticRuleRepo.getInstance().OBJECT_LITERAL_SHOULD_HAVE_UNIQUE_KEY, ruleCtx); } nameSet.add(nv.getName()); if(isJavaKeyword(nv.getName())){ final BaseVjoSemanticRuleCtx ruleCtx = new BaseVjoSemanticRuleCtx(nv, ctx.getGroupId(), new String[]{nv.getName(), nv.getName()}); satisfyRule(ctx, VjoSemanticRuleRepo.getInstance().VJO_SYNTAX_CORRECTNESS, ruleCtx); } //validate name/value type matching //added by huzhou@ebay.com to validate the type matching of NV pairs final JstIdentifier name = nv.getIdentifier(); final IExpr value = nv.getValue(); validateNVTypes(ctx, nv, name, value); } validateComplexType(ctx, objLiteral, objLiteral.toExprText(), objLiteral.getResultType()); } private void validateNVTypes(final VjoValidationCtx ctx, NV nv, final JstIdentifier name, final IExpr value) { if(name != null && name.getType() != null && value != null && value.getResultType() != null){ if(!TypeCheckUtil.isAssignable(name.getType(), value.getResultType())){ final String[] arguments = {name.getType().getName(), value.toExprText(), nv.toString()}; final BaseVjoSemanticRuleCtx ruleCtx = new BaseVjoSemanticRuleCtx(name, ctx.getGroupId(), arguments); satisfyRule(ctx, VjoSemanticRuleRepo.getInstance().ASSIGNABLE, ruleCtx); } } } }
[ "pwang@27f4aac7-f869-4a38-a8c2-f1a995e726e6" ]
pwang@27f4aac7-f869-4a38-a8c2-f1a995e726e6
45dcfde83e6488d333dd3e28b985e20534d65d49
11b9a30ada6672f428c8292937dec7ce9f35c71b
/src/main/java/com/sun/org/apache/xerces/internal/impl/dv/xs/AnyURIDV.java
69462b45a5710dfc103a8661cfdfd9c00fa8a1b7
[]
no_license
bogle-zhao/jdk8
5b0a3978526723b3952a0c5d7221a3686039910b
8a66f021a824acfb48962721a20d27553523350d
refs/heads/master
2022-12-13T10:44:17.426522
2020-09-27T13:37:00
2020-09-27T13:37:00
299,039,533
0
0
null
null
null
null
UTF-8
Java
false
false
7,042
java
/***** Lobxxx Translate Finished ******/ /* * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * <p> *  版权所有2001-2005 Apache软件基金会。 * *  根据Apache许可证2.0版("许可证")授权;您不能使用此文件,除非符合许可证。您可以通过获取许可证的副本 * *  http://www.apache.org/licenses/LICENSE-2.0 * *  除非适用法律要求或书面同意,否则根据许可证分发的软件按"原样"分发,不附带任何明示或暗示的担保或条件。请参阅管理许可证下的权限和限制的特定语言的许可证。 */ package com.sun.org.apache.xerces.internal.impl.dv.xs; import com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException; import com.sun.org.apache.xerces.internal.util.URI; import com.sun.org.apache.xerces.internal.impl.dv.ValidationContext; /** * Represent the schema type "anyURI" * * @xerces.internal * * <p> * * * @author Neeraj Bajaj, Sun Microsystems, inc. * @author Sandy Gao, IBM * */ public class AnyURIDV extends TypeValidator { private static final URI BASE_URI; static { URI uri = null; try { uri = new URI("abc://def.ghi.jkl"); } catch (URI.MalformedURIException ex) { } BASE_URI = uri; } public short getAllowedFacets(){ return (XSSimpleTypeDecl.FACET_LENGTH | XSSimpleTypeDecl.FACET_MINLENGTH | XSSimpleTypeDecl.FACET_MAXLENGTH | XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_ENUMERATION | XSSimpleTypeDecl.FACET_WHITESPACE ); } // before we return string we have to make sure it is correct URI as per spec. // for some types (string and derived), they just return the string itself public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException { // check 3.2.17.c0 must: URI (rfc 2396/2723) try { if( content.length() != 0 ) { // encode special characters using XLink 5.4 algorithm final String encoded = encode(content); // Support for relative URLs // According to Java 1.1: URLs may also be specified with a // String and the URL object that it is related to. new URI(BASE_URI, encoded ); } } catch (URI.MalformedURIException ex) { throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "anyURI"}); } // REVISIT: do we need to return the new URI object? return content; } // which ASCII characters need to be escaped private static boolean gNeedEscaping[] = new boolean[128]; // the first hex character if a character needs to be escaped private static char gAfterEscaping1[] = new char[128]; // the second hex character if a character needs to be escaped private static char gAfterEscaping2[] = new char[128]; private static char[] gHexChs = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; // initialize the above 3 arrays static { for (int i = 0; i <= 0x1f; i++) { gNeedEscaping[i] = true; gAfterEscaping1[i] = gHexChs[i >> 4]; gAfterEscaping2[i] = gHexChs[i & 0xf]; } gNeedEscaping[0x7f] = true; gAfterEscaping1[0x7f] = '7'; gAfterEscaping2[0x7f] = 'F'; char[] escChs = {' ', '<', '>', '"', '{', '}', '|', '\\', '^', '~', '`'}; int len = escChs.length; char ch; for (int i = 0; i < len; i++) { ch = escChs[i]; gNeedEscaping[ch] = true; gAfterEscaping1[ch] = gHexChs[ch >> 4]; gAfterEscaping2[ch] = gHexChs[ch & 0xf]; } } // To encode special characters in anyURI, by using %HH to represent // special ASCII characters: 0x00~0x1F, 0x7F, ' ', '<', '>', etc. // and non-ASCII characters (whose value >= 128). private static String encode(String anyURI){ int len = anyURI.length(), ch; StringBuffer buffer = new StringBuffer(len*3); // for each character in the anyURI int i = 0; for (; i < len; i++) { ch = anyURI.charAt(i); // if it's not an ASCII character, break here, and use UTF-8 encoding if (ch >= 128) break; if (gNeedEscaping[ch]) { buffer.append('%'); buffer.append(gAfterEscaping1[ch]); buffer.append(gAfterEscaping2[ch]); } else { buffer.append((char)ch); } } // we saw some non-ascii character if (i < len) { // get UTF-8 bytes for the remaining sub-string byte[] bytes = null; byte b; try { bytes = anyURI.substring(i).getBytes("UTF-8"); } catch (java.io.UnsupportedEncodingException e) { // should never happen return anyURI; } len = bytes.length; // for each byte for (i = 0; i < len; i++) { b = bytes[i]; // for non-ascii character: make it positive, then escape if (b < 0) { ch = b + 256; buffer.append('%'); buffer.append(gHexChs[ch >> 4]); buffer.append(gHexChs[ch & 0xf]); } else if (gNeedEscaping[b]) { buffer.append('%'); buffer.append(gAfterEscaping1[b]); buffer.append(gAfterEscaping2[b]); } else { buffer.append((char)b); } } } // If encoding happened, create a new string; // otherwise, return the orginal one. if (buffer.length() != len) { return buffer.toString(); } else { return anyURI; } } } // class AnyURIDV
[ "zhaobo@MacBook-Pro.local" ]
zhaobo@MacBook-Pro.local
23c4b2c01149a98e18c47dc75c74e883f886c9f0
95c043d5d606147e98aefacc4023f4d318609bc2
/OSM_CLIENT/src/main/java/it/nextworks/osm/auth/OAuthFlow.java
64efa60763b945aa9ca9d598f1740cc423dd69d1
[ "Apache-2.0" ]
permissive
nextworks-it/nfvo-drivers
0b82d167e3778b3d075f3481a3bc9b818aa340eb
32821abaf369575e2e3877d4f105e80f6d39b80e
refs/heads/master
2022-12-21T19:25:37.688993
2021-05-06T12:03:23
2021-05-06T12:03:23
210,298,021
0
1
Apache-2.0
2019-12-16T10:04:53
2019-09-23T08:03:23
Java
UTF-8
Java
false
false
828
java
/* * OSM NB API featuring ETSI NFV SOL005 * This is Open Source MANO Northbound API featuring ETSI NFV SOL005. For more information on OSM, you can visit [http://osm.etsi.org](http://osm.etsi.org). You can send us your comments and questions to OSM_TECH@list.etsi.org or join the [OpenSourceMANO Slack Workplace](https://join.slack.com/t/opensourcemano/shared_invite/enQtMzQ3MzYzNTQ0NDIyLWVkNTE4ZjZjNWI0ZTQyN2VhOTI1MjViMzU1NWYwMWM3ODI4NTQyY2VlODA2ZjczMWIyYTFkZWNiZmFkM2M2ZDk) * * OpenAPI spec version: 1.0.0 * Contact: OSM_TECH@list.etsi.org * * 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 it.nextworks.osm.auth; public enum OAuthFlow { accessCode, implicit, password, application }
[ "j.brenes@nextworks.it" ]
j.brenes@nextworks.it
cc927c2c308cd24261b770f1de128013b2d47f7e
71b919749069accbdbfc35f7dba703dd5c5780a6
/learn-spring-example/small-spring-all/src/main/java/org/learn/spring/beans/factory/InitializingBean.java
d1922281dd472678b1937fbe37e55df0230e89bc
[ "MIT" ]
permissive
xp-zhao/learn-java
489f811acf20649b773032a6831fbfc72dc4c418
108dcf1e4e02ae76bfd09e7c2608a38a1216685c
refs/heads/master
2023-09-01T03:07:23.795372
2023-08-25T08:28:59
2023-08-25T08:28:59
118,060,929
2
0
MIT
2022-06-21T04:16:08
2018-01-19T01:39:11
Java
UTF-8
Java
false
false
274
java
package org.learn.spring.beans.factory; /** * Bean 初始化接口 * * @author zhaoxiaoping * @date 2023-2-7 */ public interface InitializingBean { /** * Bean 属性填充后调用 * * @throws Exception */ void afterPropertiesSet() throws Exception; }
[ "13688396271@163.com" ]
13688396271@163.com
7de9228cb446421c7138d78e56b4e9ebeb3a17d4
31b98c799f9d878eeb2a5f75e6a19f7d73e69e64
/김성기 교수님의 도움/exampleMore/src/example11_2_person_mgmt/Ex11_4_8_StorePerson_NotUsingGeneric.java
81da4865d66e86ef5cbbfaff13c545c26873504a
[]
no_license
DongGeon0908/Java
228e49e4c342489130d7975f025dcb3d2fb260af
b97cbd80f0a489a781a6c1f84a4a961a088061d1
refs/heads/master
2023-04-27T19:11:13.900318
2021-05-19T03:21:59
2021-05-19T03:21:59
326,665,026
0
0
null
null
null
null
UHC
Java
false
false
4,194
java
package example11_2_person_mgmt; import java.util.Vector; /** * [ storePerson_NotUsingGeneric ]: * 제네릭 클래스의 타입매개변수 생략 가능함 보이는 예제(Vector의 타입 매개변수를 생략하여 원소들을 저장하고 꺼내는 작업을 보이는 예) * * o 타입 매개변수를 생략한 Vector 클래스의 객체 생성과 참조 * - Vector 클래스는 제네릭 클래스이므로 * << vector<원소클래스> 객체참조변수 = new Vector<원소클래스)() >> 형식으로 사용 * * - 타입 매개변수 생략 가능하므로 제네릭 클래스 지원하기 전의 형식인 * << Vector 객체참조변수 = new Vector(); >>로도 사용 가능 * * - 타입 매개변수 생략하면 * << Vector<Object> 객체참조변수 = new Vector<Object)() >>와 동일한 코드 * * - 이 경우 Vector에 모든 클래스의 객체 저장할 수 있으며, 특정 클래스의 객체만 저장할 수 없음 * * - 타입 매개변수를 생략한 예: Vector strings = new Vector(); * 이는 << Vector<Object> strings = new Vector<Object>(); >>와 동일함 * * - Vector 객체에 저장된 객체를 get() 메소드로 검색하면 Object 클래스의 객체 반환되므로 * 하위 클래스의 객체로 사용하기 위해서는 다운캐스팅해야 함 * * - 다운 캐스팅 예 * strings.add("홍길동"); // String 객체를 Vector strings에 추가 * String s = (String) strings.get(0); // String 원소를 저장하기 위해 다운캐스팅해야함 * * o main()에서 타입 매개변수를 생략한 Vector 객체에 문자열을 저장한 후 저장된 원소인 문자열을 검색하여 출력함 * */ class Ex11_4_8_StorePerson_NotUsingGeneric { public static void main(String[] args) { // Vector 객체를 생성하여 persons가 참조하게 함(의도는 Person 객체를 저장하기 위함임) Vector persons = new Vector(); persons.add( new Person("홍길동", 18) ); // 홍길동 객체를 persons에 추가 persons.add( new Person("이몽룡", 16) ); // 이몽룡 객체를 persons에 추가 Person p = new Person("김철수", 23); persons.add(0, p); // 김철수 Person 객체를 persons의 0 위치에 추가 for (int i =0; i < persons.size(); i++) { // persons에 저장된 원소 개수만큼 p = (Person) persons.get(i); // 인덱스 i의 원소 구하여 Person으로 다운캐스팅하여 p.output(); // 출력 } persons.add(1, "홍길동"); // persons에 문자열 "홍길동"도 1의 위치에 저장 가능함 p = (Person) persons.get(1); // 1 위치의 원소 구하여 Person으로 캐스트 - String을 Person으로 캐스팅하므로 예외 발생함 } } /* * [ 프로그램의 이해 및 실행 ] * * 1) 이 프로그램은 컴파일 오류는 없지만 경고 메시자가 여러 개 있으며, 경고 메시지 내용은 다음과 같다. * * Vector is a raw type. References to generic type Vector<E> should be parameterized * * 이 경고 메시지는 Vector 클래스는 제네릭 클래스이므로 타입 매개변수가 주어져야 하지만 주어지지 않았다는 것을 나타낸다. * * 제네릭 타입의 경우 타입 매개변수가 주어지지 않으면 타입 매개변수를 Object로 간주하여 처리하므로 * << Vector persons = new Vector(); >>는 << Vector<Object> persons = new Vector<Object>(); >>와 동일하다. * * 2) 변수 이름 persons는 Persons 객체를 저장하는 것으로 명명되었지만 * << persons.add(1, "홍길동"); >>에서 persons에 String "홍길동"을 추가해도 * String은 Object의 하위 클래스이므로 오류 없이 수행된다. * * 3) << p = (Person) persons.get(1); >>의 persons.get(1)의 결과로 String "홍길동"이 반환되며, * Person 객체가 아닌 String "홍길동"을 Person 클래스의 객체로 다운캐스팅하면 * 오류가 발생한다. */
[ "wrjssmjdhappy@gmail.com" ]
wrjssmjdhappy@gmail.com
b273f8f0e9c49c62ee5ddd6268633d96143db54e
98bd09233229554d0824b89feff9448d58b6f3c4
/hs-listener/src/main/java/com/huashi/listener/controller/SmsSendbackController.java
faac38135e2f272c6e3ab9487d57f8ed80aca73f
[]
no_license
arraycto/hspaas
6cb308c76a4e77bd06106c686f98d20fba685505
29c2ecf904f3fcc7b2965edb5b74a11908a25c49
refs/heads/master
2020-12-10T14:18:40.245824
2019-07-05T08:45:47
2019-07-05T08:45:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,971
java
package com.huashi.listener.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.huashi.listener.prervice.SmsPassagePrervice; /** * * TODO 短信发送回调处理器 * * @author zhengying * @version V1.0 * @date 2016年10月11日 下午5:36:43 */ @Controller @RequestMapping("/sms") public class SmsSendbackController extends BaseController { @Autowired private SmsPassagePrervice smsPassagePrervice; /** * TODO 接收通道厂商回执状态报告 * * @param filterCode * 过滤码 * @param providerCode * 通道简码 * @param encoding * 编码方式 * @return */ @RequestMapping("/status/{filter_code}/{provider_code}/{encoding}") @ResponseBody public String status(@PathVariable("filter_code") Integer filterCode, @PathVariable("provider_code") String providerCode, @PathVariable("encoding") String encoding) { try { smsPassagePrervice.doPassageStatusReport(providerCode, doTranslateParameter(filterCode, encoding)); } catch (Exception e) { logger.error("解析回执报告数据失败", e); } return SUCCESS; } /** * * TODO 接收通道厂商上行数据 * * @param filterCode * @param providerCode * @param encoding * @return */ @RequestMapping("/mo/{filter_code}/{provider_code}/{encoding}") @ResponseBody public String mo(@PathVariable("filter_code") Integer filterCode, @PathVariable("provider_code") String providerCode, @PathVariable("encoding") String encoding) { try { smsPassagePrervice.doPassageMoReport(providerCode, doTranslateParameter(filterCode, encoding)); } catch (Exception e) { logger.error("解析上行报告数据失败", e); } return SUCCESS; } }
[ "ying1_zheng@bestsign.cn" ]
ying1_zheng@bestsign.cn
e92934a62c6d77403516d3a471482c1f3e61e754
19f7e40c448029530d191a262e5215571382bf9f
/decompiled/instagram/sources/p000X/C12290gV.java
8f1d53f6c9df5003c874f72326d24447ceec40a7
[]
no_license
stanvanrooy/decompiled-instagram
c1fb553c52e98fd82784a3a8a17abab43b0f52eb
3091a40af7accf6c0a80b9dda608471d503c4d78
refs/heads/master
2022-12-07T22:31:43.155086
2020-08-26T03:42:04
2020-08-26T03:42:04
283,347,288
18
1
null
null
null
null
UTF-8
Java
false
false
3,290
java
package p000X; import org.json.JSONObject; /* renamed from: X.0gV reason: invalid class name and case insensitive filesystem */ public final class C12290gV { public int A00 = 0; public int A01; public int A02 = 0; public int A03 = 0; public int A04; public int A05 = 0; public int A06 = 0; public boolean A07 = false; public boolean A08 = false; public boolean A09 = false; public int[] A0A = {-1, -1}; public int[] A0B = {-1, -1}; public int[] A0C = {-1, -1}; public int[] A0D = {-1, -1}; public int A0E = 0; public int A0F = 0; private boolean A00(int[] iArr, int i) { int i2; int i3; this.A0E = i; if (iArr == null) { i2 = 2; } else { int i4 = iArr[0]; if (i4 <= 0 || (i3 = iArr[1]) <= 0) { i2 = 3; } else { this.A0F = 4; if (i4 <= i3) { return true; } return false; } } this.A0F = i2; return false; } public final int A01(double d) { int[] iArr = this.A0A; int i = iArr[1]; int i2 = iArr[0]; return (i2 + ((int) (((double) (i - i2)) * d))) / 1000; } public final int A02(double d) { int[] iArr = this.A0B; int i = iArr[1]; int i2 = iArr[0]; return (i2 + ((int) (((double) (i - i2)) * d))) / 1000; } public final int A03(double d) { int[] iArr = this.A0C; int i = iArr[1]; int i2 = iArr[0]; return (i2 + ((int) (((double) (i - i2)) * d))) / 1000; } public final boolean A04() { if (this.A02 <= 0) { this.A0F = 1; return false; } else if (!this.A07) { return A00(this.A0B, 0); } else { if (!A00(this.A0C, 1) || !A00(this.A0A, 2)) { return false; } return true; } } public final String toString() { if (!A04()) { return AnonymousClass000.A07("invalid_", this.A0F, "_", this.A0E); } JSONObject jSONObject = new JSONObject(); try { jSONObject.put("cores", this.A02); jSONObject.put("is_biglittle", this.A07); if (this.A07) { jSONObject.put("little_freq_min", this.A0C[0]); jSONObject.put("little_freq_max", this.A0C[1]); jSONObject.put("big_freq_min", this.A0A[0]); jSONObject.put("big_freq_max", this.A0A[1]); jSONObject.put("little_cores", this.A03); jSONObject.put("big_cores", this.A00); int i = this.A05; if (i != 0) { jSONObject.put("mid_cores", i); } jSONObject.put("little_index", this.A04); jSONObject.put("big_index", this.A01); } else { jSONObject.put("freq_min", this.A0B[0]); jSONObject.put("freq_max", this.A0B[1]); } jSONObject.put("prebuild", this.A09); return jSONObject.toString(); } catch (Exception unused) { return ""; } } }
[ "stan@rooy.works" ]
stan@rooy.works
8a0af42fe7da2984ddbd590442669d2b64107323
776720ee8c667e72f2f0649cb8288b9e49a7b64c
/core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/DefaultRegisteredServiceServiceTicketExpirationPolicy.java
92d4c39461f2927bef1cd99335f86c94b7d70953
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-free-unknown" ]
permissive
C4n4rd0/cas
42e6f2aef9aabdac2863e96b41ea81a30b8340ad
f368237a44beb56e083680e99b7b6f3207cc155f
refs/heads/master
2022-12-23T06:21:36.803662
2020-09-24T14:29:21
2020-09-24T14:29:21
292,857,943
0
0
Apache-2.0
2020-09-04T13:41:44
2020-09-04T13:41:43
null
UTF-8
Java
false
false
875
java
package org.apereo.cas.services; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonTypeInfo; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; /** * This is {@link DefaultRegisteredServiceServiceTicketExpirationPolicy}. * * @author Misagh Moayyed * @since 6.1.0 */ @Getter @Setter @EqualsAndHashCode @AllArgsConstructor @NoArgsConstructor @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS) @ToString @JsonInclude(JsonInclude.Include.NON_DEFAULT) public class DefaultRegisteredServiceServiceTicketExpirationPolicy implements RegisteredServiceServiceTicketExpirationPolicy { private static final long serialVersionUID = -6745109870746310448L; private long numberOfUses; private String timeToLive; }
[ "mm1844@gmail.com" ]
mm1844@gmail.com
2947c02d322a3d460694fef0e917dd0eef5ca47f
9254e7279570ac8ef687c416a79bb472146e9b35
/nbftestpop-20210916_103600223/src/main/java/com/aliyun/nbftestpop20210916_103600223/models/AddResponseBody.java
623380634062fb3e579c978508ed9a505c80a865
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
589
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.nbftestpop20210916_103600223.models; import com.aliyun.tea.*; public class AddResponseBody extends TeaModel { @NameInMap("sum") public Integer sum; public static AddResponseBody build(java.util.Map<String, ?> map) throws Exception { AddResponseBody self = new AddResponseBody(); return TeaModel.build(map, self); } public AddResponseBody setSum(Integer sum) { this.sum = sum; return this; } public Integer getSum() { return this.sum; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
26818849db0a2e1ed5a03d174a9b63b211e1dfa7
9d93eadf80abc6f6e441451bbc1594161eedced6
/src/java/hrms/model/master/OfficeBean.java
dc009bfb93e3cdd65e6d83585d2cf2942b075a3b
[]
no_license
durgaprasad2882/HRMSOpenSourceFor466anydesk
1bac7eb2e231a4fb3389b6b1cb8fb4384a757522
e7ef76f77d7ecf98464e9bcccc2246b2091efeb4
refs/heads/main
2023-06-29T16:26:04.663376
2021-08-05T09:19:02
2021-08-05T09:19:02
392,978,868
0
0
null
null
null
null
UTF-8
Java
false
false
432
java
package hrms.model.master; public class OfficeBean { private String offCode = null; private String offName = null; public String getOffCode() { return offCode; } public void setOffCode(String offCode) { this.offCode = offCode; } public String getOffName() { return offName; } public void setOffName(String offName) { this.offName = offName; } }
[ "dm.prasad@hotmail.com" ]
dm.prasad@hotmail.com
2ea89ba6cd4367a80f7319786fcd117c6200956c
39f2dc7f250cf6d9e132cda8a328e62f1ebd61fd
/offer_book_reading/src/main/java/cn/offer2020/pbj/book_reading/JVM/jvmdemo/ReentrantLockDemo2.java
249da646c90abf7f32ca973be3609afa8f952292
[ "Apache-2.0" ]
permissive
peng4444/offer2020
0c51a93202383ef8063cc624d96ab0b26ddc8189
372f8d072698acbb03e1bb569a20e6cda957e1af
refs/heads/master
2021-05-17T07:33:28.950090
2020-11-17T13:21:14
2020-11-17T13:21:14
250,697,652
7
0
Apache-2.0
2021-03-31T21:57:55
2020-03-28T02:32:57
Java
UTF-8
Java
false
false
1,173
java
package cn.offer2020.pbj.book_reading.JVM.jvmdemo; import org.junit.Test; import java.util.concurrent.locks.ReentrantLock; /** * @ClassName: ReentrantLockDemo2 * @Author: pbj * @Date: 2020/5/13 18:32 * @Description: TODO ReentrantLock可指定是公平锁还是非公平锁,而synchronized只能是非公平锁。 */ public class ReentrantLockDemo2 { // 分别测试为true 和 为false的输出。为true则输出顺序一定是A B C 但是为false的话有可能输出A C B private static final ReentrantLock reentrantLock = new ReentrantLock(true); public static void main(String[] args) throws InterruptedException { ReentrantLockDemo2 demo2 = new ReentrantLockDemo2(); Thread a = new Thread(() -> { test(); }, "A"); Thread b = new Thread(() -> { test(); }, "B"); Thread c = new Thread(() -> { test(); }, "C"); a.start();b.start();c.start(); } @Test public static void test() { reentrantLock.lock(); try { System.out.println("线程" + Thread.currentThread().getName()); } finally { reentrantLock.unlock();//一定要释放锁 } } }
[ "pbj@qq.com" ]
pbj@qq.com
69ef7c474de1112d4a14e9fc2703c8811f65404f
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/commons-lang/learning/2795/TimeZones.java
21188aa91a5a1b4d8d23eb6accdf02e4e85cf334
[]
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
1,165
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.time; /** * Helps to deal with {@link java.util.TimeZone}s. * * @since 3.7 */ public class TimeZones { // do not instantiate private TimeZones() { } /** * A public version of {@link java.util.TimeZone}'s package private {@code GMT_ID} field. */ public static final String GMT_ID = "GMT"; }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
b505ed7f5d7e4fc0ec23388ae45e937c9a8f11f2
7a4d0f4f9a0daf028965ab48369acba074ab6fdd
/yunchu/module_user_mine/src/main/java/com/example/mineorder/staysendgoods/StaySendGoodsFragment.java
cb1994193d48f0dcec630a9d6a3f7630d62cb677
[]
no_license
majiaxue/yunchu
d1186c8e5d61ebc831f0e59355a298458e156c3f
31ae1fd330926b4c3fc0d08b0823035f6020c637
refs/heads/master
2022-09-02T21:02:49.016339
2020-05-21T05:12:24
2020-05-21T05:12:24
257,544,515
0
1
null
null
null
null
UTF-8
Java
false
false
2,008
java
package com.example.mineorder.staysendgoods; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import com.example.mineorder.adapter.MineOrderParentAdapter; import com.example.module_user_mine.R; import com.example.module_user_mine.R2; import com.example.mvp.BaseFragment; import com.example.utils.LogUtil; import butterknife.BindView; /** * 待发货 */ public class StaySendGoodsFragment extends BaseFragment<StaySendGoodsView, StaySendGoodsPresenter> implements StaySendGoodsView { @BindView(R2.id.stay_send_goods_rec) RecyclerView staySendGoodsRec; private int flag = 0; @Override public int getLayoutId() { return R.layout.fragment_stay_send_goods; } @Override public void initData() { LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false); staySendGoodsRec.setLayoutManager(linearLayoutManager); presenter.staySendGoodsRec(); flag = 1; } @Override public void initClick() { } @Override public StaySendGoodsView createView() { return this; } @Override public StaySendGoodsPresenter createPresenter() { return new StaySendGoodsPresenter(getContext()); } @Override public void onResume() { super.onResume(); LogUtil.e("setUserVisibleHint-------->待发货当前可见"); if (1 == flag) { presenter.staySendGoodsRec(); } } @Override public void setUserVisibleHint(boolean isVisibleToUser) { super.setUserVisibleHint(isVisibleToUser); LogUtil.e("11111111111" + isVisibleToUser); if (isVisibleToUser) { if (flag == 1) { presenter.staySendGoodsRec(); } } } @Override public void load(MineOrderParentAdapter mineOrderParentAdapter) { staySendGoodsRec.setAdapter(mineOrderParentAdapter); } }
[ "ellliot_zhang_z@163.com" ]
ellliot_zhang_z@163.com
b5ab68b1399a785c398964e6fc8933bb6e6b43ec
b5ddf0811dd91ab26776d8b792b09a4b2373bf36
/src/main/java/javax0/workflow/simple/ParametersBuilder.java
7b88ef9824a1f52405cb7d974ff10c4f8e04eb91
[]
no_license
verhas/WorkTotalFlow
b7ad34389aa43bfc3220891c301cdf3e2b9c08fc
281ce226b41d0a7b2f0970ea8f21f86bdda10e9e
refs/heads/master
2021-06-01T21:29:18.984809
2019-12-12T08:15:10
2019-12-12T08:15:10
7,664,042
0
0
null
2020-10-13T01:35:48
2013-01-17T10:15:06
Java
UTF-8
Java
false
false
5,640
java
package javax0.workflow.simple; import java.util.HashMap; import java.util.Map; /** * Builder classes that support parameter addition extend this class. * * @param <CLASS> should be the actual class that extends this abstract class. This type is used as the return type * of the fluent functions. It is possible to provide a different class that is also extending * this abstract class, but the methods return 'this' cast to (CLASS) and in that case it will cause * class cast exception. The restriction that the actual parameter type for CLASS has to be the class * that actually extends this abstract class can not be expressed with generics in Java, thus such a * coding error can only be discovered only during run-time. * @param <K> the key for the parameters * @param <V> the value for the parameters */ abstract class ParametersBuilder<CLASS extends ParametersBuilder<CLASS, K, V>, K, V> { protected final Map<K, V> parameters = new HashMap<>(); @SafeVarargs public final CLASS parameters(Map.Entry<K, V>... entries) { for (final Map.Entry<K, V> entry : entries) { parameters.put(entry.getKey(), entry.getValue()); } return (CLASS) this; } public CLASS parameter(K k0, V v0) { parameters.put(k0, v0); return (CLASS) this; } public CLASS parameters(K k0, V v0, K k1, V v1) { parameters.put(k0, v0); parameters.put(k1, v1); return (CLASS) this; } public CLASS parameters(K k0, V v0, K k1, V v1, K k2, V v2 ) { parameters.put(k0, v0); parameters.put(k1, v1); parameters.put(k2, v2); return (CLASS) this; } public CLASS parameters(K k0, V v0, K k1, V v1, K k2, V v2, K k3, V v3 ) { parameters.put(k0, v0); parameters.put(k1, v1); parameters.put(k2, v2); parameters.put(k3, v3); return (CLASS) this; } public CLASS parameters(K k0, V v0, K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4 ) { parameters.put(k0, v0); parameters.put(k1, v1); parameters.put(k2, v2); parameters.put(k3, v3); parameters.put(k4, v4); return (CLASS) this; } public CLASS parameters(K k0, V v0, K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5 ) { parameters.put(k0, v0); parameters.put(k1, v1); parameters.put(k2, v2); parameters.put(k3, v3); parameters.put(k4, v4); parameters.put(k5, v5); return (CLASS) this; } public CLASS parameters(K k0, V v0, K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6 ) { parameters.put(k0, v0); parameters.put(k1, v1); parameters.put(k2, v2); parameters.put(k3, v3); parameters.put(k4, v4); parameters.put(k5, v5); parameters.put(k6, v6); return (CLASS) this; } public CLASS parameters(K k0, V v0, K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7 ) { parameters.put(k0, v0); parameters.put(k1, v1); parameters.put(k2, v2); parameters.put(k3, v3); parameters.put(k4, v4); parameters.put(k5, v5); parameters.put(k6, v6); parameters.put(k7, v7); return (CLASS) this; } public CLASS parameters(K k0, V v0, K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8 ) { parameters.put(k0, v0); parameters.put(k1, v1); parameters.put(k2, v2); parameters.put(k3, v3); parameters.put(k4, v4); parameters.put(k5, v5); parameters.put(k6, v6); parameters.put(k7, v7); parameters.put(k8, v8); return (CLASS) this; } public CLASS parameters(K k0, V v0, K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9) { parameters.put(k0, v0); parameters.put(k1, v1); parameters.put(k2, v2); parameters.put(k3, v3); parameters.put(k4, v4); parameters.put(k5, v5); parameters.put(k6, v6); parameters.put(k7, v7); parameters.put(k8, v8); parameters.put(k9, v9); return (CLASS) this; } }
[ "peter@verhas.com" ]
peter@verhas.com
b2cfa769d984cbd1427f16b4f5b77bc480919d1c
728c82b77121495db54dfcb670175090c4c5597f
/vertx-gaia/vertx-up/src/main/java/io/vertx/up/micro/ZeroHttpWorker.java
bb9e87942b3cdb20650afbbb3d91a4a4fa5be00d
[ "Apache-2.0" ]
permissive
jdami/vertx-zero
adb23e4cb9c6cf5c01847d0771ff25f523a68744
7aa7be709e0717eaac29a31e8235aa09960777dd
refs/heads/master
2021-05-01T14:38:39.304874
2018-02-10T16:23:30
2018-02-10T16:23:30
121,089,722
1
0
null
2018-02-11T05:46:57
2018-02-11T05:46:57
null
UTF-8
Java
false
false
3,154
java
package io.vertx.up.micro; import io.vertx.core.AbstractVerticle; import io.vertx.core.eventbus.EventBus; import io.vertx.up.annotations.Worker; import io.vertx.up.atom.Envelop; import io.vertx.up.atom.worker.Receipt; import io.vertx.up.func.Fn; import io.vertx.up.log.Annal; import io.vertx.up.micro.follow.Invoker; import io.vertx.up.micro.follow.JetSelector; import io.vertx.up.web.ZeroAnno; import io.vertx.zero.eon.Values; import io.vertx.zero.exception.WorkerArgumentException; import java.lang.reflect.Method; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicBoolean; /** * Default Http Server worker for different handler. * Recommend: Do not modify any workers that vertx zero provided. */ @Worker public class ZeroHttpWorker extends AbstractVerticle { private static final Annal LOGGER = Annal.get(ZeroHttpWorker.class); private static final Set<Receipt> RECEIPTS = ZeroAnno.getReceipts(); private static final ConcurrentMap<Integer, Invoker> INVOKER_MAP = new ConcurrentHashMap<>(); private static final AtomicBoolean LOGGED = new AtomicBoolean(Boolean.FALSE); @Override public void start() { // 1. Get event bus final EventBus bus = this.vertx.eventBus(); // 2. Consume address for (final Receipt receipt : RECEIPTS) { // 3. Deploy for each type final String address = receipt.getAddress(); // 4. Get target reference and method final Object reference = receipt.getProxy(); final Method method = receipt.getMethod(); this.verifyArgs(method, getClass()); // length = 1 final Class<?>[] params = method.getParameterTypes(); final Class<?> returnType = method.getReturnType(); final Class<?> paramCls = params[Values.IDX]; // 6. Invoker select final Invoker invoker = JetSelector.select(returnType, paramCls); invoker.ensure(returnType, paramCls); // 7. Record for different invokers INVOKER_MAP.put(receipt.hashCode(), invoker); Fn.safeJvm(() -> Fn.safeNull( () -> bus.<Envelop>consumer(address, message -> invoker.invoke(reference, method, message)), address, reference, method), LOGGER); } // Record all the information; if (!LOGGED.getAndSet(Boolean.TRUE)) { INVOKER_MAP.forEach((key, value) -> LOGGER.info(Info.MSG_INVOKER, value.getClass(), String.valueOf(key), String.valueOf(value.hashCode()))); } } private void verifyArgs(final Method method, final Class<?> target) { // 1. Ensure method length final Class<?>[] params = method.getParameterTypes(); final Annal logger = Annal.get(target); // 2. The parameters Fn.flingUp(Values.ONE != params.length, logger, WorkerArgumentException.class, target, method); } }
[ "silentbalanceyh@126.com" ]
silentbalanceyh@126.com
8507dcdf24981ac0dfde5b7927b167436ce8623e
3d323f1b05587218c8e8264bd2ec7cfcaf7a5afc
/modules/coq/src/main/java/com/ivo/modules/coq/repository/validate/ValidateMachineRepository.java
4dd108273559b9d950dbb9e5f19f0b18aaf2e374
[]
no_license
wangjian93/activitispringboot
2ea3c30427daa4114df53110a71fddccc5a981fe
3eaa93a7b3630e720281bc56c69fba18b2792477
refs/heads/master
2022-09-19T13:57:58.792055
2019-10-20T18:49:45
2019-10-20T18:49:45
187,170,223
0
0
null
2022-09-01T23:07:37
2019-05-17T07:40:36
JavaScript
UTF-8
Java
false
false
407
java
package com.ivo.modules.coq.repository.validate; import com.ivo.modules.coq.domain.validate.ValidateMachine; import org.springframework.data.jpa.repository.JpaRepository; import java.util.List; /** * @Author: wj * @Date: 2019-09-08 18:41 * @Version 1.0 */ public interface ValidateMachineRepository extends JpaRepository<ValidateMachine, Long> { List<ValidateMachine> findByType(String type); }
[ "1556879688@qq.com" ]
1556879688@qq.com
2226119eaaf0880d78d11210dc3fa19801af41a1
148100c6a5ac58980e43aeb0ef41b00d76dfb5b3
/sources/com/google/android/gms/internal/ads/zzaju.java
48975b42101fd0cdd4ecce259b51ee2a9946038e
[]
no_license
niravrathod/car_details
f979de0b857f93efe079cd8d7567f2134755802d
398897c050436f13b7160050f375ec1f4e05cdf8
refs/heads/master
2020-04-13T16:36:29.854057
2018-12-27T19:03:46
2018-12-27T19:03:46
163,325,703
0
0
null
null
null
null
UTF-8
Java
false
false
379
java
package com.google.android.gms.internal.ads; import android.content.Context; import java.util.Collections; import java.util.Map; import java.util.Set; @zzaer public final class zzaju implements zzaka { /* renamed from: a */ public final zzapi<Map<String, String>> mo2328a(Context context, Set<String> set) { return zzaox.m10019a(Collections.EMPTY_MAP); } }
[ "niravrathod473@gmail.com" ]
niravrathod473@gmail.com
e2bda73d58be209d711d052554db6445bbab23e7
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_cb84b71b478750db26fb7ce1af7f49b5e5c37d38/ViewUserAgentsAction/3_cb84b71b478750db26fb7ce1af7f49b5e5c37d38_ViewUserAgentsAction_t.java
11156877d330e72d24b61aa697e8af1c5b66328a
[]
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,531
java
/* * Copyright (c) 2003-2006, Simon Brown * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * - Neither the name of Pebble 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 OWNER 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 net.sourceforge.pebble.web.action; import net.sourceforge.pebble.Constants; import net.sourceforge.pebble.domain.Blog; import net.sourceforge.pebble.logging.Log; import net.sourceforge.pebble.logging.LogEntry; import net.sourceforge.pebble.web.view.View; import net.sourceforge.pebble.web.view.impl.UserAgentsView; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.Comparator; import java.util.Map; import java.util.TreeMap; /** * Gets the user agent information for the specified time period. * * @author Simon Brown */ public class ViewUserAgentsAction extends AbstractLogAction { /** * Peforms the processing associated with this action. * * @param request the HttpServletRequest instance * @param response the HttpServletResponse instance * @return the name of the next view */ public View process(HttpServletRequest request, HttpServletResponse response) throws ServletException { Blog blog = (Blog)getModel().get(Constants.BLOG_KEY); Log log = getLog(request, response); Map<String, Integer> userAgents = new TreeMap<String, Integer>(new Comparator<String>() { public int compare(String s1, String s2) { return s1 != null ? s1.compareToIgnoreCase(s2) : -1; } }); for (LogEntry logEntry : log.getLogEntries()) { String userAgent = logEntry.getAgent(); if (userAgent == null) { userAgent = ""; } Integer count = userAgents.get(userAgent); if (count == null) { count = 0; } count = count+1; userAgents.put(userAgent, count); } getModel().put("userAgents", userAgents); return new UserAgentsView(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5c49613016a0b9869bbeb6bd584494df0c84b38d
047241bdd3aa490c9b623dd5c3dcdb5775abc885
/practicas/lab03/TiendaElectronica/src/org/cursofinalgrado/uapajava/java/ICalcularPrecio.java
82f04d7ccc7c8bf14a031549d85e6a6c712db2e0
[]
no_license
uniabierta-cursofinal/introduccion-java
751625d838985f9a0452f879b451ca272c7e3dbe
13a8691b54fe4434409833de1d2dfcf92d10d4c6
refs/heads/master
2016-09-06T13:31:25.358295
2015-06-06T21:16:53
2015-06-06T21:16:53
29,449,324
1
9
null
null
null
null
UTF-8
Java
false
false
323
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 org.cursofinalgrado.uapajava.java; /** * * @author ecabrerar */ public interface ICalcularPrecio { double getPrecio(); }
[ "eudris@gmail.com" ]
eudris@gmail.com
847ff85f6458601327fe284ef97f1336c8d5bcc3
8a245dd5ba9701f523415cda3805bea6c60830e4
/src/org/greatfree/dsf/p2p/message/ChatNotification.java
2f154ed04004f93daf227e12f78e86c8a28a0ff2
[]
no_license
ATM006/Programming-Clouds
93e762fff5fa12929fdc61abd2354924fd73abb0
569f30bdf9f8a956e47dcc4ae3514761520124eb
refs/heads/master
2022-12-21T06:48:32.171800
2020-09-14T12:55:50
2020-09-14T12:55:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
939
java
package org.greatfree.dsf.p2p.message; import org.greatfree.chat.message.ChatMessageType; import org.greatfree.message.ServerMessage; import org.greatfree.util.UtilConfig; // Created: 05/02/2017, Bing Li public class ChatNotification extends ServerMessage { private static final long serialVersionUID = -4180547758940870394L; // The chatting message. 04/27/2017, Bing Li private String message; // The sender name. 04/27/2017, Bing Li private String senderName; public ChatNotification(String message, String senderName) { super(ChatMessageType.PEER_CHAT_NOTIFICATION); this.message = message; this.senderName = senderName; } public ChatNotification(String message) { super(ChatMessageType.PEER_CHAT_NOTIFICATION); this.message = message; this.senderName = UtilConfig.EMPTY_STRING; } public String getMessage() { return this.message; } public String getSenderName() { return this.senderName; } }
[ "bing.li@asu.edu" ]
bing.li@asu.edu
ca23b68dcbe96137e94fc98a8b6bb499bed72eb1
a88404e860f9e81f175d80c51b8e735fa499c93c
/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/IGHelper.java
1d279d3972a2c2d0f0231e6946dd93c9d1957a9e
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
sabri0/hapi-fhir
4a53409d31b7f40afe088aa0ee8b946860b8372d
c7798fee4880ee8ffc9ed2e42c29c3b8f6753a1c
refs/heads/master
2020-06-07T20:02:33.258075
2019-06-18T09:40:00
2019-06-18T09:40:00
193,081,738
2
0
Apache-2.0
2019-06-21T10:46:17
2019-06-21T10:46:17
null
UTF-8
Java
false
false
1,484
java
package org.hl7.fhir.r4.utils; import org.hl7.fhir.r4.model.ImplementationGuide.GuideParameterCode; import org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionComponent; import org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent; public class IGHelper { public static String readStringParameter(ImplementationGuideDefinitionComponent ig, GuideParameterCode name) { for (ImplementationGuideDefinitionParameterComponent p : ig.getParameter()) { if (name == p.getCode()) { return p.getValue(); } } return null; } public static boolean getBooleanParameter(ImplementationGuideDefinitionComponent ig, GuideParameterCode name, boolean defaultValue) { String v = readStringParameter(ig, name); return v == null ? false : Boolean.parseBoolean(v); } public static void setParameter(ImplementationGuideDefinitionComponent ig, GuideParameterCode name, String value) { for (ImplementationGuideDefinitionParameterComponent p : ig.getParameter()) { if (name == p.getCode()) { p.setValue(value); return; } } ImplementationGuideDefinitionParameterComponent p = ig.addParameter(); p.setCode(name); p.setValue(value); } public static void setParameter(ImplementationGuideDefinitionComponent ig, GuideParameterCode name, boolean value) { setParameter(ig, name, Boolean.toString(value)); } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
5d65604fa524d532e2b875f900acf048dbda0d58
0c21777557f347ae4ac1b3197d1f7c28e05aed1b
/com/google/android/gms/auth/api/credentials/internal/zza.java
6441a4936f56480a0b79c531389471f78fe0a7e7
[]
no_license
dmisuvorov/HappyFresh.Android
68421b90399b72523f398aabbfd30b61efaeea1f
242c5b0c006e7825ed34da57716d2ba9d1371d65
refs/heads/master
2020-04-29T06:47:34.143095
2016-01-11T06:24:16
2016-01-11T06:24:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
690
java
package com.google.android.gms.auth.api.credentials.internal; import com.google.android.gms.auth.api.credentials.Credential; import com.google.android.gms.common.api.Status; public class zza extends ICredentialsCallbacks.zza { public void onCredentialResult(Status paramStatus, Credential paramCredential) { throw new UnsupportedOperationException(); } public void onStatusResult(Status paramStatus) { throw new UnsupportedOperationException(); } } /* Location: /Users/michael/Downloads/dex2jar-2.0/HappyFresh.jar!/com/google/android/gms/auth/api/credentials/internal/zza.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "michael@MJSTONE-MACBOOK.local" ]
michael@MJSTONE-MACBOOK.local
547bf909c463f7a85c8fbfb7dc64e2e07e1f3da6
5da5f8bba90a33f2e74e89f031e3092a4a27e976
/anchorcms-web/src/main/java/com/anchorcms/icloud/dao/supplychain/SRepairInquiryDao.java
beb7823bcb5ea4fb25301866a59fe8dcbc151308
[]
no_license
hanshuxia/nmggyy
3700210e6f1421d67e7bbf2c004a479ea2faef00
75665cac07c74e972753874a9f28077a7b649fee
refs/heads/master
2020-03-27T02:32:23.219385
2018-08-24T02:37:17
2018-08-24T02:37:17
145,797,102
0
0
null
null
null
null
UTF-8
Java
false
false
2,143
java
package com.anchorcms.icloud.dao.supplychain; import com.anchorcms.common.page.Pagination; import com.anchorcms.icloud.model.payment.SSupplychainOrder; import com.anchorcms.icloud.model.supplychain.SRepairInquiry; import com.anchorcms.icloud.model.synergy.SDeviceInquiry; import java.sql.Date; import java.util.List; /** * Created by hansx on 2016/12/27. * <p> * 维修资源询价DAO */ public interface SRepairInquiryDao { /** * @author hansx * @Date 2017/1/5 0005 下午 2:26 * @return * 根据id获取询价信息 */ public SRepairInquiry findById(String id); /** * @author hansx * @Date 2017/1/5 0005 下午 2:26 * @return * 添加询价信息 */ public SRepairInquiry save(SRepairInquiry srr); /** * @author hansx * @Date 2017/1/5 0005 下午 2:26 * @return * 添加询价信息 */ public SDeviceInquiry save(SDeviceInquiry srr); /** * @author hansx * @Date 2017/1/5 0005 下午 2:27 * @return * 获取列表 */ public List<SRepairInquiry> getList(); /** * @author hansx * @Date 2017/1/5 0005 下午 2:27 * @return * 条件查询,分页 */ public Pagination getInquiryListForMember(String statusType,String inquiryTheme, Date startDate, Date endDate,String companyName,String companyId, Integer channelId, Integer siteId, Integer modelId, Integer memberId, int pageNo, int pageSize,Boolean flag); /** * @author hansx * @Date 2017/1/7 0007 下午 12:11 * @return * 根据id更新报价 */ public int updateById(String id,Double offer, String statusType); /** * @author hansx * @Date 2017/1/7 0007 下午 12:11 * @return * 根据id更新状态 */ public int updateStatusById(String id, String statusType); /** * @author dongxuecheng * @Date 2017/2/22 10:07 * @return * @description评价 */ public Integer setEvaluteValue(String inquiryId,String evaluteValue); SSupplychainOrder save(SSupplychainOrder buy); }
[ "605128459@qq.com" ]
605128459@qq.com
656ebc5f9d6e11d4c0b480fe86bb6273cad33db7
2b2fcb1902206ad0f207305b9268838504c3749b
/WakfuClientSources/srcx/class_1196_alB.java
6add2853104413977c4b08e824b3e4a0b78b5f4c
[]
no_license
shelsonjava/Synx
4fbcee964631f747efc9296477dee5a22826791a
0cb26d5473ba1f36a3ea1d7163a5b9e6ebcb0b1d
refs/heads/master
2021-01-15T13:51:41.816571
2013-11-17T10:46:22
2013-11-17T10:46:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
423
java
final class alB implements dgE { private final bjI dmw; alB(bjI parambjI) { this.dmw = parambjI; } public final boolean k(int paramInt, byte paramByte) { int i = this.dmw.uK(paramInt); if ((i >= 0) && (g(paramByte, this.dmw.get(paramInt)))) { return true; } return false; } private final boolean g(byte paramByte1, byte paramByte2) { return paramByte1 == paramByte2; } }
[ "music_inme@hotmail.fr" ]
music_inme@hotmail.fr
da59cd7f5e160309b5521d9ffba8ea86cba0752c
730d0e683845e261b14691f5a3c733a3f0cd4816
/javaBasic/src/lambdaExpressions/FunctionExample2.java
b20abcb222002907ad485b8007f42f6038efeda7
[]
no_license
JoongSeokD/javaBasic
542e1f6e215b295f7f467550d9578bb61b3f6b87
adab1515cd5f5fe095a14d2e056bcafc9d235294
refs/heads/master
2020-11-24T06:46:09.802114
2019-12-23T10:31:33
2019-12-23T10:31:33
228,015,343
0
0
null
null
null
null
UHC
Java
false
false
972
java
package lambdaExpressions; import java.util.Arrays; import java.util.List; import java.util.function.Function; import java.util.function.ToIntFunction; public class FunctionExample2 { private static List<Student> list = Arrays.asList( new Student("홍길동", 90, 96), new Student("일지매", 95, 93) ); public static void printString(Function<Student, String> function) { for (Student student : list) { System.out.print(function.apply(student) + " "); } System.out.println(); } public static void printInt(ToIntFunction<Student> function) { for (Student student : list) { System.out.print(function.applyAsInt(student) + " "); } System.out.println(); } public static void main(String[] args) { System.out.println("[학생 이름]"); printString(t -> t.getName()); System.out.println("[영어 점수]"); printInt(t -> t.getEnglishScore()); System.out.println("[수학 점수]"); printInt(t -> t.getMathScore()); } }
[ "ljseokd@gmail.com" ]
ljseokd@gmail.com
52142827b8b1fa8c207438fa1ba8e7431aeabc38
3cee619f9d555e75625bfff889ae5c1394fd057a
/app/src/main/java/org/tensorflow/lite/examples/imagesegmentation/judi/com/kottlinbase/p274ui/p276b/C7229d.java
61cd70909a31d34e14ea416b5f02be240d41ab87
[]
no_license
randauto/imageerrortest
6fe12d92279e315e32409e292c61b5dc418f8c2b
06969c68b9d82ed1c366d8b425c87c61db933f15
refs/heads/master
2022-04-21T18:21:56.836502
2020-04-23T16:18:49
2020-04-23T16:18:49
258,261,084
0
0
null
null
null
null
UTF-8
Java
false
false
2,458
java
package org.tensorflow.lite.examples.imagesegmentation.judi.com.kottlinbase.p274ui.p276b; import android.content.Context; import android.os.Bundle; import android.widget.TextView; import com.judi.emojiphoto.R; import judi.com.kottlinbase.C7191b.C7192a; import p073b.C3218m; import p073b.p079e.p081b.C1489j; @C3218m(mo10384a = {1, 1, 11}, mo10385b = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\u0018\u00002\u00020\u0001B\u000f\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003¢\u0006\u0002\u0010\u0004J\b\u0010\u0005\u001a\u00020\u0006H\u0016J\u0012\u0010\u0007\u001a\u00020\u00062\b\u0010\b\u001a\u0004\u0018\u00010\tH\u0014J\u000e\u0010\n\u001a\u00020\u00062\u0006\u0010\u000b\u001a\u00020\f¨\u0006\r"}, mo10386c = {"Ljudi/com/kottlinbase/ui/dialog/ProgressAlert;", "Ljudi/com/kottlinbase/ui/dialog/BaseAlert;", "context", "Landroid/content/Context;", "(Landroid/content/Context;)V", "dismiss", "", "onCreate", "savedInstanceState", "Landroid/os/Bundle;", "updateMessage", "mesage", "", "app_release"}) /* renamed from: judi.com.kottlinbase.ui.b.d */ /* compiled from: ProgressAlert.kt */ public final class C7229d extends C7227b { public C7229d(Context context) { super(context); } /* access modifiers changed from: protected */ public void onCreate(Bundle bundle) { super.onCreate(bundle); setContentView(R.layout.dialog_progress); mo23291a(); } /* renamed from: a */ public final void mo23301a(String str) { C1489j.m6972b(str, "mesage"); TextView textView = (TextView) findViewById(C7192a.tvProgressMsg); C1489j.m6969a((Object) textView, "tvProgressMsg"); CharSequence charSequence = str; int i = 0; if (charSequence.length() == 0) { i = 4; } textView.setVisibility(i); TextView textView2 = (TextView) findViewById(C7192a.tvProgressMsg); C1489j.m6969a((Object) textView2, "tvProgressMsg"); textView2.setText(charSequence); } public void dismiss() { try { TextView textView = (TextView) findViewById(C7192a.tvProgressMsg); C1489j.m6969a((Object) textView, "tvProgressMsg"); textView.setVisibility(4); super.dismiss(); } catch (Exception unused) { } } }
[ "tuanlq@funtap.vn" ]
tuanlq@funtap.vn
c7c8f2d0dff035fcc9f653ee281201610d785c0e
8191bea395f0e97835735d1ab6e859db3a7f8a99
/f737922a0ddc9335bb0fc2f3ae5ffe93_source_from_JADX/java_files/ape$1.java
69b6fe8b98ae6837b9ef5ddd013dce907033e76a
[]
no_license
msmtmsmt123/jadx-1
5e5aea319e094b5d09c66e0fdb31f10a3238346c
b9458bb1a49a8a7fba8b9f9a6fb6f54438ce03a2
refs/heads/master
2021-05-08T19:21:27.870459
2017-01-28T04:19:54
2017-01-28T04:19:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
216
java
class ape$1 extends InheritableThreadLocal<ape> { protected /* synthetic */ Object initialValue() { return j6(); } ape$1() { } protected ape j6() { return new ape(null); } }
[ "eggfly@qq.com" ]
eggfly@qq.com
8bf984e6bce435380eb5f82fa045c19f77309c6e
bc541f0e686034bcd8693a37cbb0e9cb40474047
/springboot-mybatisplus/src/test/java/com/example/mp/SpringbootMybatisplusApplicationTests.java
134523a7adc140292fe20cd38fc97e7903d9cbc5
[]
no_license
zhupeng0521/springboot-collections
847d95cc36f8424b64eb88368ee972248c87fbf8
d0def11b6f7d3924a2b26d925bd3198d7a49590c
refs/heads/master
2021-05-16T18:28:56.797977
2020-02-10T06:41:03
2020-02-10T06:41:03
250,419,692
0
1
null
2020-03-27T02:15:24
2020-03-27T02:15:24
null
UTF-8
Java
false
false
355
java
package com.example.mp; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class SpringbootMybatisplusApplicationTests { @Test public void contextLoads() { } }
[ "1763124707@qq.com" ]
1763124707@qq.com
8fd85f87cb1edeec75e70e4fea20a1ae74c2f4a1
5d95c6ff69fc659e90865ff9f8f0955c710d46fd
/泛型2/src/com/test/泛型擦除.java
5d8e9ddb7a98018b62f9cbbfb172b6f73bd2dac1
[]
no_license
alexlzl/JavaDemo8
838cb0265b77699293552d3f8b93180023a8f0ec
f71a17c4f06f7b1eba3ca1f96b26d92de64fa86a
refs/heads/master
2020-03-25T16:56:30.496319
2018-12-26T02:52:09
2018-12-26T02:52:09
143,955,164
0
0
null
null
null
null
UTF-8
Java
false
false
3,041
java
package com.test; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; /** * Created by liuzhouliang on 2018/8/24. * <p> * 我们现在可以下结论了,在泛型类被类型擦除的时候,之前泛型类中的类型参数部分如果没有指定上限, * 如 <T> 则会被转译成普通的 Object 类型,如果指定了上限如 <T extends String> 则类型参数就被替换成类型上限。 */ public class 泛型擦除 { public static void main(String[] args) { List<Integer> ls = new ArrayList<>(); ls.add(23); // ls.add("text");//在擦除的时候add方法的类型参数被转换为Object类型,所以可以通过反射来传递费Integer类型参数 try { Method method = ls.getClass().getDeclaredMethod("add", Object.class); /** * 可以看到,利用类型擦除的原理,用反射的手段就绕过了正常开发中编译器不允许的操作限制。 */ method.invoke(ls, "test"); method.invoke(ls, 42.9f); } catch (NoSuchMethodException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SecurityException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InvocationTargetException e) { // TODO Auto-generated catch block e.printStackTrace(); } for (Object o : ls) { System.out.println(o); } //Java 不能创建具体类型的泛型数组 /** * 这两行代码是无法在编译器中编译通过的。原因还是类型擦除带来的影响。 List<Integer> 和 List<Boolean> 在 jvm 中等同于List<Object> ,所有的类型信息都被擦除,程序也无法分辨一个数组中的元素类型具体是 List<Integer>类型还是 List<Boolean> 类型。 */ // List<Integer>[] li2 = new ArrayList<Integer>[]; // List<Boolean> li3 = new ArrayList<Boolean>[]; /** * 借助于无限定通配符却可以,前面讲过 ? 代表未知类型,所以它涉及的操作都基本上与类型无关, * 因此 jvm 不需要针对它对类型作判断,因此它能编译通过 * ,但是,只提供了数组中的元素因为通配符原因,它只能读,不能写。 * 比如,上面的 v 这个局部变量,它只能进行 get() 操作,不能进行 add() 操作, * 这个在前面通配符的内容小节中已经讲过。 */ List<?>[] li3 = new ArrayList<?>[10]; li3[1] = new ArrayList<String>(); List<?> v = li3[1]; } }
[ "525688067@qq.com" ]
525688067@qq.com
34e00d6ea58bd18560f5cfdab0235a67d2a9f9c4
82262cdae859ded0f82346ed04ff0f407b18ea6f
/366pai/zeus-core/core-service/src/main/java/com/_360pai/core/condition/payment/ReleaseDepositActionCondition.java
0e0ce8a834ead9b53f99f45d5d201e5e5b25fbb6
[]
no_license
dwifdji/real-project
75ec32805f97c6d0d8f0935f7f92902f9509a993
9ddf66dfe0493915b22132781ef121a8d4661ff8
refs/heads/master
2020-12-27T14:01:37.365982
2019-07-26T10:07:27
2019-07-26T10:07:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
529
java
package com._360pai.core.condition.payment; import com._360pai.arch.core.abs.DaoCondition; /** * <p>用于封装查询条件</p> * <p>默认条件下仅生成数据表字段的查询条件,更多条件,请自行添加</p> * @author Generator * @date 2018年08月10日 17时37分19秒 */ public class ReleaseDepositActionCondition implements DaoCondition{ /** * */ private String id; /** * */ public String getId(){ return id; } /** * */ public void setId(String id){ this.id = id; } }
[ "15538068782@163.com" ]
15538068782@163.com
19710afa7b020ccc14dd87f8fbbb2e529e2675ac
8294bbedd27c50a99bae00eccc83a87ac9232875
/lib_common_ui/src/main/java/com/imooc/lib_common_ui/widget/CircleProgressButton.java
41d0e01dd5bca6bb739cffe09a19c65c67bef08d
[]
no_license
99kyuu/NeteaseCloudMusic-MVVM
c3ff6a40a73422b268763793905962951dd51897
a6c1b07ff283e3977b5b23eb7655168b85bbba7c
refs/heads/master
2022-12-03T16:54:02.497873
2020-08-24T02:39:44
2020-08-24T02:39:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,785
java
package com.imooc.lib_common_ui.widget; import android.annotation.SuppressLint; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.RectF; import android.util.AttributeSet; import android.view.View; import com.imooc.lib_common_ui.R; public class CircleProgressButton extends View { private int bgColor; private int progressColor; private int viewWidth; private int viewHeight; private float viewRoundWidth; private float progressValue = 0; private int progressMax = 100; private Paint paint; private RectF rectF; private Status playOrPause = Status.PLAY; public CircleProgressButton(Context context) { this(context, null, 0); } public CircleProgressButton(Context context, AttributeSet attrs) { this(context, attrs, 0); } public CircleProgressButton(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); paint = new Paint(); TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.CircleProgressButton); //背景环颜色 bgColor = typedArray.getColor(R.styleable.CircleProgressButton_bgColor, Color.GRAY); //进度环的颜色 progressColor = typedArray.getColor(R.styleable.CircleProgressButton_progressColor, Color.RED); //宽度和高度 viewWidth = typedArray.getColor(R.styleable.CircleProgressButton_viewWidth, 15); viewHeight = typedArray.getColor(R.styleable.CircleProgressButton_viewHeight, 15); //外层圆环的宽度 viewRoundWidth = typedArray.getColor(R.styleable.CircleProgressButton_viewRoundWidth, 4); typedArray.recycle(); } @SuppressLint("DrawAllocation") @Override protected void onDraw(Canvas canvas) { //外层的圆 canvas.save(); int center = getWidth() / 2; int radius = (int) (center - viewRoundWidth / 2); paint.setColor(bgColor); //设置背景圆环的颜色 paint.setStyle(Paint.Style.STROKE); //设置空心 paint.setStrokeWidth(viewRoundWidth); //设置圆环的宽度 paint.setAntiAlias(true); //消除锯齿 paint.setDither(true); // 设置抖动 canvas.drawCircle(center, center, radius, paint); //画出圆环 canvas.save(); //进度层的圆 paint.setColor(progressColor); paint.setStrokeWidth(viewRoundWidth); rectF = new RectF(center - radius, center - radius, center + radius, center + radius); canvas.drawArc(rectF, -90, (float) 360 * progressValue / progressMax, false, paint); //画播放和暂停 int x = getWidth(); if(playOrPause == Status.PLAY){ //红色 两条竖线 paint.setColor(Color.RED); paint.setStyle(Paint.Style.FILL); paint.setStrokeWidth(3f); canvas.drawLine(3*x/8, 5*x/16, 3*x/8,11*x/16, paint); canvas.drawLine(5*x/8, 5*x/16, 5*x/8,11*x/16, paint); }else if(playOrPause == Status.PAUSE){ //灰色 三角形 Path path = new Path(); paint.setColor(Color.DKGRAY); paint.setStyle(Paint.Style.STROKE); paint.setStrokeWidth(3f); path.moveTo(7*x/16,5*x/16); path.lineTo(7*x/16,11*x/16); path.lineTo(11*x/16,8*x/16); path.close(); canvas.drawPath(path, paint); } super.onDraw(canvas); } //播放进度 public void setProgressValue(float progressValue) { if(progressValue < 0 || progressValue > 100){ throw new IllegalArgumentException("progressValue illegal"); } this.progressValue = progressValue; postInvalidate(); } //设置播放状态 public void setPlayOrPause(Status status) { this.playOrPause = status; if(playOrPause == Status.PAUSE){ bgColor = Color.DKGRAY; }else if(playOrPause == Status.PLAY){ bgColor = Color.LTGRAY; } postInvalidate(); } //播放状态 public enum Status{ PLAY, PAUSE } }
[ "1025618933@qq,com" ]
1025618933@qq,com
5e194f131337bbbf4853920b0740c1918613e5bd
01f378d5c407a5c3db6e4fb7c89dc04a8b702416
/src/main/java/com/whc/relation_udf/udaf/aggMap/AggMapKd.java
c232e62572a5b4d17ab5a52923a56b44cf88a70f
[]
no_license
xiaoyaowang18/udf-whc
98e4b92899fee81d93ee252983f344f3ae91089e
b9d9c02f521490217de14321a875985b4290a9c0
refs/heads/master
2023-06-06T23:06:15.964170
2021-06-30T14:48:17
2021-06-30T14:48:17
357,855,730
0
0
null
null
null
null
UTF-8
Java
false
false
3,363
java
package com.whc.relation_udf.udaf.aggMap; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import com.alibaba.fastjson.JSONObject; import com.aliyun.odps.io.Text; import com.aliyun.odps.io.Writable; import com.aliyun.odps.udf.Aggregator; import com.aliyun.odps.udf.UDFException; import com.aliyun.odps.udf.annotation.Resolve; @Resolve({"string,string,string,string,string,string->string"}) public class AggMapKd extends Aggregator { private static class JsonBuffer implements Writable { private String json = ""; private String hbh = ""; private String hdz = ""; private String xzddz = ""; private int count = 0; @Override public void readFields(DataInput in) throws IOException { // TODO Auto-generated method stub json = in.readUTF(); hbh = in.readUTF(); hdz = in.readUTF(); xzddz = in.readUTF(); count = in.readInt(); } @Override public void write(DataOutput out) throws IOException { // TODO Auto-generated method stub out.writeUTF(json); out.writeUTF(hbh); out.writeUTF(hdz); out.writeUTF(xzddz); out.writeInt(count); } } private Text rel = new Text(); @Override public void iterate(Writable buffer, Writable[] args) throws UDFException { // TODO Auto-generated method stub Text gmsfhm = (Text)args[0]; Text xm = (Text)args[1]; Text yhzgx = (Text)args[2]; Text hbh = (Text)args[3]; Text hdz = (Text)args[4]; Text xzddz = (Text)args[5]; String yhzgxStr = null; if (yhzgx != null ) { yhzgxStr = yhzgx.toString(); } String xmStr = null; if (xm != null ) { xmStr = xm.toString(); } JSONObject jsonObject = new JSONObject(); jsonObject.put("gmsfhm", gmsfhm.toString()); jsonObject.put("yhzgx", yhzgxStr); jsonObject.put("xm", xmStr); JsonBuffer buf = (JsonBuffer) buffer; if (buf.count <= 50) { buf.json = buf.json + "##" + JSONObject.toJSONString(jsonObject); if (buf.hbh.length() == 0 && hbh != null) { buf.hbh = hbh.toString(); } if (buf.hdz.length() == 0 && hdz != null) { buf.hdz = hdz.toString(); } if (buf.xzddz.length() == 0 && xzddz != null) { buf.xzddz = xzddz.toString(); } buf.count += 1; } } @Override public void merge(Writable buffer, Writable partial) throws UDFException { // TODO Auto-generated method stub JsonBuffer buf = (JsonBuffer) buffer; JsonBuffer p = (JsonBuffer) partial; if (buf.count + p.count <= 50) { buf.json = buf.json + p.json; if (buf.hbh.length() == 0 && p.hbh.length() > 0) { buf.hbh = p.hbh.toString(); } if (buf.hdz.length() == 0 && p.hdz.length() > 0) { buf.hdz = p.hdz.toString(); } if (buf.xzddz.length() == 0 && p.xzddz.length() > 0) { buf.xzddz = p.xzddz.toString(); } buf.count += p.count; } } @Override public Writable newBuffer() { // TODO Auto-generated method stub return new JsonBuffer(); } @Override public Writable terminate(Writable buffer) throws UDFException { JsonBuffer buf = (JsonBuffer) buffer; String jsondata = ""; if (buf.count <= 50) { JSONObject jsonObject = new JSONObject(); jsonObject.put("json", buf.json); jsonObject.put("hbh", buf.hbh); jsonObject.put("hdz", buf.hdz); jsonObject.put("xzddz", buf.xzddz); jsondata = JSONObject.toJSONString(jsonObject); } rel.set(jsondata); return rel; } }
[ "=" ]
=
0e09fbbb9ef8b528e11c00fe2fbac486ce493f53
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_31a56a55e8cd989d740c3c15af09b1aaf669b2bb/TimeWindowMaker/9_31a56a55e8cd989d740c3c15af09b1aaf669b2bb_TimeWindowMaker_s.java
e8b1894d1f3bec5357fe981722b76e8291249f4f
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,214
java
package com.guseggert.sensorloggerfeatureextractor.data; import java.util.Observable; import com.guseggert.sensorloggerfeatureextractor.DataInstance; import com.guseggert.sensorloggerfeatureextractor.DataReader; import com.guseggert.sensorloggerfeatureextractor.DataWriter; import com.guseggert.sensorloggerfeatureextractor.feature.FeatureSet; //Each time window observes TimeWindowMaker for new data points. //When a time window is full, it calls onTimeWindowFinished(), which //removes the time window as an observer and then processes the data. public class TimeWindowMaker extends Observable { public final static int MSG_FEATURE_EXTRACTION_COMPLETE = 0; // message code for thread communication public final static int MSG_FEATURE_EXTRACTION_FAILURE = 1; private final long TIMEWINDOWLENGTH = 5000000000l; // nanoseconds private final float TIMEWINDOWOVERLAP = 0.5f; // overlap of time windows private TimeWindow mLastTimeWindow = null; private final String INPUTFILENAME = "1366254022182.csv"; private final String OUTPUTFILENAME = INPUTFILENAME + "_features.csv"; private DataWriter mDataWriter = new DataWriter(OUTPUTFILENAME); public TimeWindowMaker() { DataReader dr = new DataReader(INPUTFILENAME); while (dr.hasNext()) addPoint(dr.nextLine()); } private void addPoint(DataInstance instance) { if (mLastTimeWindow == null || boundaryReached(instance.Time)) newTimeWindow(instance); setChanged(); notifyObservers(instance); } private boolean boundaryReached(long time) { long interval = time - mLastTimeWindow.getStartTime(); return interval >= TIMEWINDOWLENGTH * TIMEWINDOWOVERLAP; } private void newTimeWindow(DataInstance instance) { System.out.println("New time window: " + instance.Time); TimeWindow tw = new TimeWindow(instance, TIMEWINDOWLENGTH, this); addObserver(tw); mLastTimeWindow = tw; } public void onTimeWindowFull(TimeWindow timeWindow) { System.out.println("Time window full: " + timeWindow.getStartTime()); deleteObserver(timeWindow); FeatureSet featureSet = new FeatureSet(timeWindow); mDataWriter.writeLine(featureSet); // write feature set to file } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
70c11d41931adcb50c4922ddd582d3a5ff676fb0
d3dc7cce3026141d4d706b7b915e6ab62c9ffdb3
/src/minecraft/net/minecraft/src/SaveHandler.java
b850c1dd02c0bbe066feb1981a7b0786158a6147
[]
no_license
Rob4001/UMC-Client
eec49225f15224cda910fd7850878b3e594913d2
ab93ea52a7f0e36ec22ea50d096e209000cd3d78
refs/heads/master
2016-09-06T01:58:30.770379
2012-03-04T16:18:49
2012-03-04T16:19:12
3,112,848
0
0
null
null
null
null
UTF-8
Java
false
false
6,831
java
package net.minecraft.src; import java.io.*; import java.util.List; import java.util.logging.Logger; public class SaveHandler implements ISaveHandler { private static final Logger logger = Logger.getLogger("Minecraft"); /** The path to the current savegame directory */ private final File saveDirectory; /** The directory in which to save player information */ private final File playersDirectory; private final File mapDataDir; /** * The time in milliseconds when this field was initialized. Stored in the session lock file. */ private final long initializationTime = System.currentTimeMillis(); /** The directory name of the world */ private final String saveDirectoryName; public SaveHandler(File par1File, String par2Str, boolean par3) { saveDirectory = new File(par1File, par2Str); saveDirectory.mkdirs(); playersDirectory = new File(saveDirectory, "players"); mapDataDir = new File(saveDirectory, "data"); mapDataDir.mkdirs(); saveDirectoryName = par2Str; if (par3) { playersDirectory.mkdirs(); } setSessionLock(); } /** * Creates a session lock file for this process */ private void setSessionLock() { try { File file = new File(saveDirectory, "session.lock"); DataOutputStream dataoutputstream = new DataOutputStream(new FileOutputStream(file)); try { dataoutputstream.writeLong(initializationTime); } finally { dataoutputstream.close(); } } catch (IOException ioexception) { ioexception.printStackTrace(); throw new RuntimeException("Failed to check session lock, aborting"); } } /** * gets the File object corresponding to the base directory of this save (saves/404 for a save called 404 etc) */ protected File getSaveDirectory() { return saveDirectory; } public void checkSessionLock() { try { File file = new File(saveDirectory, "session.lock"); DataInputStream datainputstream = new DataInputStream(new FileInputStream(file)); try { if (datainputstream.readLong() != initializationTime) { throw new MinecraftException("The save is being accessed from another location, aborting"); } } finally { datainputstream.close(); } } catch (IOException ioexception) { throw new MinecraftException("Failed to check session lock, aborting"); } } /** * Returns the chunk loader with the provided world provider */ public IChunkLoader getChunkLoader(WorldProvider par1WorldProvider) { throw new RuntimeException("Old Chunk Storage is no longer supported."); } /** * Returns a freshly loaded worldInfo from the save */ public WorldInfo loadWorldInfo() { File file = new File(saveDirectory, "level.dat"); if (file.exists()) { try { NBTTagCompound nbttagcompound = CompressedStreamTools.readCompressed(new FileInputStream(file)); NBTTagCompound nbttagcompound2 = nbttagcompound.getCompoundTag("Data"); return new WorldInfo(nbttagcompound2); } catch (Exception exception) { exception.printStackTrace(); } } file = new File(saveDirectory, "level.dat_old"); if (file.exists()) { try { NBTTagCompound nbttagcompound1 = CompressedStreamTools.readCompressed(new FileInputStream(file)); NBTTagCompound nbttagcompound3 = nbttagcompound1.getCompoundTag("Data"); return new WorldInfo(nbttagcompound3); } catch (Exception exception1) { exception1.printStackTrace(); } } return null; } public void saveWorldInfoAndPlayer(WorldInfo par1WorldInfo, List par2List) { NBTTagCompound nbttagcompound = par1WorldInfo.getNBTTagCompoundWithPlayers(par2List); NBTTagCompound nbttagcompound1 = new NBTTagCompound(); nbttagcompound1.setTag("Data", nbttagcompound); try { File file = new File(saveDirectory, "level.dat_new"); File file1 = new File(saveDirectory, "level.dat_old"); File file2 = new File(saveDirectory, "level.dat"); CompressedStreamTools.writeCompressed(nbttagcompound1, new FileOutputStream(file)); if (file1.exists()) { file1.delete(); } file2.renameTo(file1); if (file2.exists()) { file2.delete(); } file.renameTo(file2); if (file.exists()) { file.delete(); } } catch (Exception exception) { exception.printStackTrace(); } } /** * Saves the passed in world info. */ public void saveWorldInfo(WorldInfo par1WorldInfo) { NBTTagCompound nbttagcompound = par1WorldInfo.getNBTTagCompound(); NBTTagCompound nbttagcompound1 = new NBTTagCompound(); nbttagcompound1.setTag("Data", nbttagcompound); try { File file = new File(saveDirectory, "level.dat_new"); File file1 = new File(saveDirectory, "level.dat_old"); File file2 = new File(saveDirectory, "level.dat"); CompressedStreamTools.writeCompressed(nbttagcompound1, new FileOutputStream(file)); if (file1.exists()) { file1.delete(); } file2.renameTo(file1); if (file2.exists()) { file2.delete(); } file.renameTo(file2); if (file.exists()) { file.delete(); } } catch (Exception exception) { exception.printStackTrace(); } } /** * Gets the file location of the given map */ public File getMapFileFromName(String par1Str) { return new File(mapDataDir, (new StringBuilder()).append(par1Str).append(".dat").toString()); } /** * Returns the name of the directory where world information is saved */ public String getSaveDirectoryName() { return saveDirectoryName; } }
[ "robert.wilson1717@gmail.com" ]
robert.wilson1717@gmail.com
a802ff384428af8238acb6b757b881c3260d9399
7ce60ae831a4afcefe30b149ad5aa2a01c61280d
/Test Data/Comp401F16/Assignment12/Correct, Stub(stubs)/Submission attachment(s)/Assignment12Stubs/Assignment12Stubs/src/grail/tokenBeans/QuoteToken.java
3e8d53ec69df54fd1265d86dd899a607a7bed16b
[]
no_license
pdewan/Comp401AllChecks
ed967cb535f1bf8c6d7777b7ca53bd6e810e5ba1
86d995defcdde2766329a6db37fdb7a54c70da4a
refs/heads/master
2023-06-26T13:01:27.009697
2023-06-12T06:05:01
2023-06-12T06:05:01
66,742,312
0
0
null
2022-06-30T14:43:42
2016-08-28T00:49:37
Java
UTF-8
Java
false
false
348
java
package grail.tokenBeans; import util.annotations.EditablePropertyNames; import util.annotations.StructurePattern; import util.annotations.StructurePatternNames; import util.annotations.Tags; @Tags({"Quote"}) @StructurePattern(StructurePatternNames.BEAN_PATTERN) @EditablePropertyNames({"Input"}) public class QuoteToken extends GenericToken{ }
[ "avitkus7@gmail.com" ]
avitkus7@gmail.com
db9ed4d54c3e91ec9b34e103adc50126cd1fc728
0ea271177f5c42920ac53cd7f01f053dba5c14e4
/5.3.5/sources/com/google/android/gms/internal/zzedy.java
7c374c3a04400ace508eee2f931bac922c679ed7
[]
no_license
alireza-ebrahimi/telegram-talaeii
367a81a77f9bc447e729b2ca339f9512a4c2860e
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
refs/heads/master
2020-03-21T13:44:29.008002
2018-12-09T10:30:29
2018-12-09T10:30:29
138,622,926
12
1
null
null
null
null
UTF-8
Java
false
false
1,240
java
package com.google.android.gms.internal; import java.util.Comparator; public final class zzedy<K, V> implements zzedz<K, V> { private static final zzedy zzmyr = new zzedy(); private zzedy() { } public static <K, V> zzedy<K, V> zzbvx() { return zzmyr; } public final K getKey() { return null; } public final V getValue() { return null; } public final boolean isEmpty() { return true; } public final int size() { return 0; } public final zzedz<K, V> zza(K k, V v, Integer num, zzedz<K, V> zzedz, zzedz<K, V> zzedz2) { return this; } public final zzedz<K, V> zza(K k, V v, Comparator<K> comparator) { return new zzeec(k, v); } public final zzedz<K, V> zza(K k, Comparator<K> comparator) { return this; } public final void zza(zzeeb<K, V> zzeeb) { } public final boolean zzbvw() { return false; } public final zzedz<K, V> zzbvy() { return this; } public final zzedz<K, V> zzbvz() { return this; } public final zzedz<K, V> zzbwa() { return this; } public final zzedz<K, V> zzbwb() { return this; } }
[ "alireza.ebrahimi2006@gmail.com" ]
alireza.ebrahimi2006@gmail.com
1c0f92b56de52eec2a3768c58247b8f4afb88083
0bd46abe6f88285fdd466955352169209b96962e
/src/main/java/com/zhi/common/GeneratorDisplay.java
21b82e68759728f48269d43644d3ec46c73dcdd2
[]
no_license
lkp7321/rongzhi
7481b4a1e7471ee3c30ee2784132a527b051809d
d5c5f334a3c8d5a8c84c40080796bece304876fd
refs/heads/master
2020-04-15T14:45:28.522054
2019-01-14T02:28:46
2019-01-14T02:28:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,229
java
package com.zhi.common; import org.mybatis.generator.api.MyBatisGenerator; import org.mybatis.generator.config.Configuration; import org.mybatis.generator.config.xml.ConfigurationParser; import org.mybatis.generator.internal.DefaultShellCallback; import java.io.File; import java.util.ArrayList; import java.util.List; public class GeneratorDisplay { public void generator() throws Exception{ List<String> warnings = new ArrayList<>(); boolean overwrite = true; //指定 逆向工程配置文件 File configFile = new File("generatorConfig.xml"); ConfigurationParser cp = new ConfigurationParser(warnings); Configuration config = cp.parseConfiguration(configFile); DefaultShellCallback callback = new DefaultShellCallback(overwrite); MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings); myBatisGenerator.generate(null); } public static void main(String[] args) throws Exception { try { GeneratorDisplay generatorSqlmap = new GeneratorDisplay(); generatorSqlmap.generator(); } catch (Exception e) { e.printStackTrace(); } } }
[ "lz13037330@163.com" ]
lz13037330@163.com
b7d3ffc4537996b367858476476dfc424925c936
6dc818eac00d33bb873402b40f2828090800b0c4
/JSP 폴더/JSP Files/210503_sourcecode/webStudy04_springMVC_Sem/src/main/java/kr/or/ddit/login/LoginCheckController.java
0f2f33a43493611971551f324ce18b821cf25d92
[]
no_license
JeonghoonWon/ddit
0df0d29db4a2a1e15a7754adddb6fb5ef87935be
478812565f3c2ed297e80bc69a5699c58c1dfdb8
refs/heads/master
2023-06-01T18:42:04.310131
2021-06-29T07:48:42
2021-06-29T07:48:42
342,758,724
0
0
null
null
null
null
UTF-8
Java
false
false
2,800
java
package kr.or.ddit.login; import javax.annotation.PostConstruct; import javax.inject.Inject; import javax.servlet.ServletContext; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import kr.or.ddit.enumpkg.ServiceResult; import kr.or.ddit.exception.BadRequestException; import kr.or.ddit.member.service.IAuthenticateService; import kr.or.ddit.vo.MemberVO; @Controller public class LoginCheckController{ private static final Logger logger = LoggerFactory.getLogger(LoginCheckController.class); @Inject private IAuthenticateService service; @Inject private WebApplicationContext container; private ServletContext application; @PostConstruct public void init() { application = container.getServletContext(); } @RequestMapping(value="/login/loginCheck.do", method=RequestMethod.POST) public String doPost( @RequestParam(required=true) String mem_id , @RequestParam(required=true) String mem_pass , @RequestParam(required=false) String saveId , HttpServletResponse resp , HttpSession session , RedirectAttributes redirectAttributes ){ if(session.isNew()) { throw new BadRequestException("비정상 세션"); } // 요청 분석 String view = null; String message = null; // 인증(id==password) MemberVO member = new MemberVO(mem_id, mem_pass); if(logger.isDebugEnabled()) logger.debug("인증전 MemberVO : {}", member); ServiceResult result = service.authenticate(member); switch (result) { case OK: if(logger.isInfoEnabled()) logger.info("인증후 MemberVO : {}", member); view = "redirect:/"; session.setAttribute("authMember", member); Cookie idCookie = new Cookie("idCookie", mem_id); idCookie.setPath(application.getContextPath()); int maxAge = 0; if("saveId".equals(saveId)) { maxAge = 60*60*24*7; } idCookie.setMaxAge(maxAge); resp.addCookie(idCookie); break; case NOTEXIST: view = "redirect:/login/loginForm.jsp"; message = "아이디 오류"; break; case INVALIDPASSWORD: view = "redirect:/login/loginForm.jsp"; // 2) 인증 실패(아이디 상태 유지) message = "비번 오류"; redirectAttributes.addFlashAttribute("failedId", mem_id); break; } redirectAttributes.addFlashAttribute("message", message); return view; } }
[ "expedition1205@gmail.com" ]
expedition1205@gmail.com