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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3bab8fe6da1ce470611ca9c1f5e85eaefffb5804 | 5c69293a9a3ae977f74fc51ed0a3c9440477d980 | /jpwh/model/target/generated-sources/annotations/org/jpwh/model/concurrency/versiontimestamp/Item_.java | 874b8eee1fdd6cf4a50f962fc0229a4b73cae34e | [] | no_license | firak01/Buch_PersistenceWithHibernate2nd2016 | 403e8aba0bf171126b97ddd9d964644ca95fcef9 | 879a45ff05f306eb9157d794101072f7f0549a6f | refs/heads/master | 2021-06-25T19:44:42.282530 | 2017-09-11T08:23:00 | 2017-09-11T08:23:00 | 103,109,289 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 563 | java | package org.jpwh.model.concurrency.versiontimestamp;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor")
@StaticMetamodel(Item.class)
public abstract class Item_ {
public static volatile SingularAttribute<Item, Long> id;
public static volatile SingularAttribute<Item, String> name;
public static volatile SingularAttribute<Item, Date> lastUpdated;
}
| [
"firak01@t-online.de"
] | firak01@t-online.de |
37cecb395dd5ce6242cf83f7ba0bb1153f6a256f | 118428e616ea6e0c89e0d172e0ddf2f545892c2b | /battlefields-terrain-p18-api/src/com/jfixby/util/p18t/api/P18TerrainPalette.java | a030d94c0884399496614498da8e35158a19f178 | [] | no_license | RedTriplane/Battlefields | 069377344fc13ccf0a47444d7cf01f97997382de | 18c3a28ee8ef771684f69e8f7a763d6ed5a2408f | refs/heads/master | 2021-06-21T09:36:56.981270 | 2017-08-16T21:40:24 | 2017-08-16T21:40:24 | 49,335,652 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,302 | java | package com.jfixby.util.p18t.api;
import com.jfixby.r3.ext.api.patch18.P18Palette;
import com.jfixby.r3.ext.api.patch18.Patch18;
import com.jfixby.r3.ext.api.patch18.palette.Fabric;
import com.jfixby.r3.ext.api.patch18.palette.FabricsList;
import com.jfixby.r3.ext.api.patch18.palette.FabricsRelation;
import com.jfixby.r3.ext.api.patch18.palette.RelationsList;
import com.jfixby.scarabei.api.collections.Collection;
import com.jfixby.scarabei.api.collections.Mapping;
import com.jfixby.scarabei.api.floatn.Float2;
import com.jfixby.scarabei.api.gamedev.GameMeter;
import com.jfixby.scarabei.api.names.ID;
import com.jfixby.util.terain.test.api.palette.TerrainPalette;
public interface P18TerrainPalette {
ID getPaletteNamespace();
GameMeter getBlockXWidth();
GameMeter getBlockYWidth();
P18Palette getP18Palette();
//
TerrainPalette getTerrainPalette();
void print();
Mapping<FabricsRelation, Float2> getRelationRelativeCenters();
ID getNamespace();
P18TerrainTypeVariationsList listVariationsFor(Patch18 shape,
Fabric upperFabric, Fabric lowerFabric);
FabricsList listFabrics();
RelationsList listRelations();
P18TerrainTypeVariationsList listVariationsFor(FabricsRelation relation,
Patch18 p18val);
Collection<P18TerrainTypeVariationsList> listVariationsAll();
}
| [
"github@jfixby.com"
] | github@jfixby.com |
d0de5a6d8437b937cf586074530ebeadcf35fdba | e639492798506f6f9e7e3e113b3938dbfbf70316 | /app/src/main/java/chhaichivon/com/movies/ui/movie/adapter/FragmentPagersAdapter.java | 849e3c9e595d3de2560f8b8be1f0c42da82da011 | [] | no_license | chhai-chivon-android/Movies | 7739235f8bb0654b2541b0dcc3bf52afa17b5151 | d6c1b27c38cae5b9c76ca133634cebff1e3bacb7 | refs/heads/master | 2021-01-16T18:33:44.230331 | 2017-08-14T00:18:57 | 2017-08-14T00:18:57 | 100,092,502 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 990 | java | package chhaichivon.com.movies.ui.movie.adapter;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import chhaichivon.com.movies.ui.movie.fragment.MovieGridFragment;
import chhaichivon.com.movies.ui.movie.fragment.MovieListFragment;
/**
* AUTHOR : CHHAI CHIVON
* EMAIL : chhaichivon1995@gmail.com
* DATE : 8/12/2017
* TIME : 10:48 AM
*/
public class FragmentPagersAdapter extends FragmentPagerAdapter {
public FragmentPagersAdapter(FragmentManager fm){
super(fm);
}
@Override public Fragment getItem(int position) {
if(position == 0){
return new MovieGridFragment();
}else{
return new MovieListFragment();
}
}
@Override public int getCount() {
return 2;
}
@Override public CharSequence getPageTitle(int position) {
if(position == 0) return "Home";
else return "Next";
}
}
| [
"chivonchhai@hotmail.com"
] | chivonchhai@hotmail.com |
f183b7a8097bece7e33489ab45f639d771fac16d | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/62/org/apache/commons/math/ode/jacobians/FirstOrderIntegratorWithJacobians_getCurrentStepStart_295.java | 6486039e73fbd14c5a21beba4a0eada79b00a007 | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 1,657 | java |
org apach common math od jacobian
enhanc order integr differenti equat
comput partial deriv solut respect initi state
paramet
order comput state deriv od problem
extend jacobian raw od variat equat
ad form compound problem higher dimens origin od
problem dimens paramet compound problem
dimens time
parameter od parameterizedod
od jacobian odewithjacobian
version revis date
order integr jacobian firstorderintegratorwithjacobian
current step start time
method call integr typic
object implement link org apach common math od order differenti equat firstorderdifferentialequ
differenti equat problem current step
attempt need
result undefin method call
call code integr code
current step start time
current step start getcurrentstepstart
integr current step start getcurrentstepstart
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
a19b5a70abb26204f51737750ba38a9b3551fec4 | 81250aa35c5be2cfd4629d9aa2c06f940b6b2f45 | /app/src/main/java/org/newstand/datamigration/data/SmsContentProviderCompat.java | 4132d69fdb73aa6f3b4d32068e1de9e7b65cd0f9 | [] | no_license | PPOP-PPOP/DataMigration | a7a6ded880a086971aad5433aec7ab36c46f4c7b | b40f39a5a12869e2d52bda848e3d6a7f672a757e | refs/heads/master | 2020-12-02T08:01:58.465842 | 2017-07-12T06:44:12 | 2017-07-12T06:44:12 | 96,761,786 | 1 | 0 | null | 2017-07-12T06:40:02 | 2017-07-10T09:49:14 | Java | UTF-8 | Java | false | false | 6,715 | java | package org.newstand.datamigration.data;
import android.Manifest;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.net.Uri;
import android.os.Build;
import android.provider.Telephony;
import android.support.annotation.WorkerThread;
import android.text.TextUtils;
import org.newstand.datamigration.data.model.AppRecord;
import org.newstand.datamigration.data.model.DataCategory;
import org.newstand.datamigration.data.model.DataRecord;
import org.newstand.datamigration.loader.DataLoaderManager;
import org.newstand.datamigration.loader.LoaderSource;
import org.newstand.datamigration.provider.SettingsProvider;
import org.newstand.datamigration.sync.SharedExecutor;
import org.newstand.datamigration.sync.Sleeper;
import org.newstand.logger.Logger;
import java.util.Collection;
import java.util.List;
/**
* Created by Nick@NewStand.org on 2017/3/13 13:36
* E-Mail: NewStand@163.com
* All right reserved.
*/
public class SmsContentProviderCompat {
public static final Uri INBOX_CONTENT_URI = Uri.parse("content://sms/inbox");
public static final Uri SENT_CONTENT_URI = Uri.parse("content://sms/sent");
public static final Uri DRAFT_CONTENT_URI = Uri.parse("content://sms/draft");
public static final String ADDRESS = "address";
public static final String BODY = "body";
public static final String DATE_SENT = "date_sent";
public static final String READ = "read";
@TargetApi(Build.VERSION_CODES.KITKAT)
public static void setAsDefaultSmsApp(Context context) {
String defaultSmsApp = null;
String currentPn = context.getPackageName();
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
defaultSmsApp = Telephony.Sms.getDefaultSmsPackage(context);
}
if (!TextUtils.isEmpty(defaultSmsApp)) {
SettingsProvider.setDefSmsApp(defaultSmsApp);
} else {
return;
}
if (!defaultSmsApp.equals(currentPn)) {
Intent intent = new Intent(Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT);
intent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME, currentPn);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}
}
public static boolean waitUtilBecomeDefSmsApp(Context context, int maxTimes) {
for (int i = 0; i < maxTimes; i++) {
String defaultSmsApp;
String currentPn = context.getPackageName();
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
defaultSmsApp = Telephony.Sms.getDefaultSmsPackage(context);
} else {
return true;
}
if (currentPn.equals(defaultSmsApp)) {
return true;
}
Sleeper.sleepQuietly(1000);
}
return false;
}
public static boolean areWeDefSmsApp(Context context) {
String defaultSmsApp;
String me = context.getPackageName();
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
defaultSmsApp = Telephony.Sms.getDefaultSmsPackage(context);
} else {
return false;
}
if (TextUtils.isEmpty(defaultSmsApp)) {
return false;
}
return me.equals(defaultSmsApp);
}
public static void restoreDefSmsAppCheckedAsync(final Context context) {
SharedExecutor.execute(new Runnable() {
@Override
public void run() {
restoreDefSmsApp(context);
}
});
}
@WorkerThread
@TargetApi(Build.VERSION_CODES.KITKAT)
public static void restoreDefSmsApp(Context context) {
String defaultSmsApp = null;
String me = context.getPackageName();
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
defaultSmsApp = Telephony.Sms.getDefaultSmsPackage(context);
}
if (TextUtils.isEmpty(defaultSmsApp)) {
return;
}
// Find the most like app.
if (me.equals(defaultSmsApp)) {
Logger.w("Current def SMS app is me??? WTF??? ");
Collection<DataRecord> apps = DataLoaderManager.from(context)
.load(LoaderSource.builder().parent(LoaderSource.Parent.Android).build(),
DataCategory.App);
for (DataRecord record : apps) {
AppRecord appRecord = (AppRecord) record;
if (isAndroidMmsApp(context, appRecord.getPkgName())) {
defaultSmsApp = appRecord.getPkgName();
Logger.d("Now trying to use %s as def Sms app", defaultSmsApp);
break;
}
}
}
String previousPkg = SettingsProvider.getDefSmsApp();
if (TextUtils.isEmpty(previousPkg)) return;
if (defaultSmsApp.equals(me)) {
Logger.v("Restoring sms app to %s", previousPkg);
Intent intent = new Intent(Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT);
intent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME, previousPkg);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}
}
public static boolean isAndroidMmsApp(Context context, String strPkgName) {
if (context.getPackageName().equals(strPkgName)) return false;
if (!strPkgName.contains("android") && !strPkgName.contains("google")) return false;
PackageManager pkm = context.getPackageManager();
boolean isMms = false;
PackageInfo pkgInfo;
try {
pkgInfo = pkm.getPackageInfo(strPkgName, PackageManager.GET_SERVICES);
ServiceInfo[] servicesInfos = pkgInfo.services;
if (null != servicesInfos) {
for (ServiceInfo sInfo : servicesInfos) {
if (null != sInfo.permission && sInfo.permission.equals(Manifest.permission.SEND_SMS)) {
isMms = true;
break;
}
}
}
} catch (PackageManager.NameNotFoundException ignored) {
}
return isMms;
}
}
| [
"guohao4@lenovo.com"
] | guohao4@lenovo.com |
be38039dfc47ed7a875941129e094cb2b502bd37 | cde2cc5ddf47cef2de2e03c7fd63028ee02ec34f | /J2SE/day11/src/Bank/src/swing_frms/Painter.java | 4491cfa89c22fa340fa8e7543289016b9e93cdaa | [] | no_license | pratyushjava/Java_J2SE_J2EE | e93dd5ec75643149a79334f89e60ac7c56c1c20a | 7fadcaa95d5fcba1a616a189dd65707c60572d77 | refs/heads/master | 2021-01-22T23:25:42.769072 | 2018-09-10T05:25:26 | 2018-09-10T05:25:26 | 85,630,861 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 867 | java | package swing_frms;
// Testing PaintPanel.
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class Painter
{
public static void main( String[] args )
{
// create JFrame
JFrame application = new JFrame( "A simple paint program" );
PaintPanel paintPanel = new PaintPanel(); // create paint panel
application.add( paintPanel, BorderLayout.CENTER ); // in center
// create a label and place it in SOUTH of BorderLayout
application.add( new JLabel( "Drag the mouse to draw" ),
BorderLayout.SOUTH );
application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
application.setSize( 400, 200 ); // set frame size
application.setLocationRelativeTo(null);
application.setVisible( true ); // display frame
} // end main
} // end class Painter
| [
"pratyus@g.clemson.edu"
] | pratyus@g.clemson.edu |
6d5a73b016c52bfca5ca3b7d3b61beae04e8eb23 | b07acbae379982280cf953da07cf8994d1602a07 | /javatest-basis/src/main/java/com/thd/thread/api/t15inheritablethreadlocal/ThreadParent.java | 96cdf71cef468d0fc02b0894479c15965064f15a | [] | no_license | devil13th/javatest-root | 28d35199b5b2475aac75cb8ee50d8e9f92d8c980 | e2a1f6595ba8eebbaa404c6ba422065df7baf802 | refs/heads/master | 2022-12-23T02:43:46.050912 | 2021-05-28T02:03:03 | 2021-05-28T02:03:03 | 137,824,328 | 0 | 0 | null | 2022-12-16T03:03:30 | 2018-06-19T01:20:49 | Java | UTF-8 | Java | false | false | 633 | java | package com.thd.thread.api.t15inheritablethreadlocal;
public class ThreadParent implements Runnable {
@Override
public void run() {
System.out.println(Thread.currentThread().getName() + " inheritableThreadLocal:" + Test.itl.get());
System.out.println(Thread.currentThread().getName() + " threadLocal:" + Test.tl.get());
Test.itl.set(Thread.currentThread().getName() + " ่ฎพ็ฝฎ็ InheritableThreadLocal");
Thread t1 = new Thread(new ThreadChild(),Thread.currentThread().getName() + " childA");
Thread t2 = new Thread(new ThreadChild(),Thread.currentThread().getName() + " childB");
t1.start();
t2.start();
}
}
| [
"181907667@qq.com"
] | 181907667@qq.com |
723ad9410d26905a57704d43b5043ef2f2148df9 | 41ea427d7fee53e823e655da48c7e62e4eafc188 | /core/src/gdx/lessons/lesson4/classfiles/base/ScaledTouchUpButton.java | dbdff307c16c6643a903c73ab8f9e86caee07387 | [] | no_license | iourilitv/StarGame | 4892b49667f194ec16f003e12c4e2ba579bfeb16 | 9becaace5d248a172b500d8f3c4c5c3dddf11abd | refs/heads/master | 2020-08-30T05:12:00.063404 | 2019-12-04T16:15:03 | 2019-12-04T16:15:03 | 218,272,836 | 0 | 0 | null | 2019-12-04T16:14:10 | 2019-10-29T11:38:14 | Java | UTF-8 | Java | false | false | 1,939 | java | package gdx.lessons.lesson4.classfiles.base;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.math.Vector2;
/**
* ะ ะพะดะธัะตะปััะบะธะน ะบะปะฐัั ะดะปั ะบะฝะพะฟะพะบ. ะะปะฐัั ะฐะฑัััะฐะบัะฝัะน,
* ะฟะพััะพะผั ะบะพะฝััััะบัะพัั ะฝะฐัะปะตะดะฝะธะบะพะฒ ะผะพะณัั ะพัะปะธัะฐัััั!
*/
public abstract class ScaledTouchUpButton extends Sprite {
//ะฟัะธะฝะธะผะฐะตะผ ะพะฑัะตะบั ะฟะฐะปััะฐ
private int pointer;
//ะพะฑััะฒะปัะตะผ ะฟะตัะตะผะตะฝะฝัั ะผะฐัะบะตัะฐ ะฝะฐะถะฐัะธั ะบะฝะพะฟะบะธ
private boolean pressed;
public ScaledTouchUpButton(TextureRegion region) {
super(region);
}
@Override
public boolean touchDown(Vector2 touch, int pointer) {
//ะตัะปะธ ะบะฝะพะฟะบะฐ ัะถะต ะฝะฐะถะฐัะฐ ะธะปะธ ัะพัะบะฐ ะบะฐัะฐะฝะธั ะฝะต ะฟะพะฟะฐะปะฐ ะฝะฐ ะบะฝะพะฟะบั
if (pressed || !isMe(touch)) {
return false;
}
//ัััะฐะฝะฐะฒะปะธะฒะฐะตะผ ะผะฐัะบะตั ะฝะฐะถะฐัะธั ะบะฝะพะฟะบะธ
pressed = true;
//ัะผะตะฝััะฐะตะผ ัะฐะทะผะตั ะบะฝะพะฟะบะธ
scale = 0.9f;
//ัััะฐะฝะฐะฒะปะธะฒะฐะตะผ(ะทะฐะฟะพะผะธะฝะฐะตะผ) ะพััะตะบั ะฟะฐะปััะฐ
this.pointer = pointer;
return false;
}
@Override
public boolean touchUp(Vector2 touch, int pointer) {
//ะตัะปะธ ะบะพัะฝัะปัั ะดััะณะพะน ะฟะฐะปะตั ะธะปะธ ะบะฝะพะฟะบะฐ ะฝะต ะฝะฐะถะฐัะฐ
if (this.pointer != pointer || !pressed) {
return false;
}
//ะตัะปะธ ะตััั ะฟะพะฟะฐะดะฐะฝะธะต ะฝะฐ ะบะฝะพะฟะบั
if (isMe(touch)) {
//ะฒัะฟะพะปะฝัะตะผ ะดะตะนััะฒะธะต
action();
}
//ัะฑัะฐััะฒะฐะตะผ ะผะฐัะบะตั ะฝะฐะถะฐัะธั
pressed = false;
//ะฒะพัััะฐะฝะฐะฒะปะธะฒะฐะตะผ ัะฐะทะผะตั ะบะฝะพะฟะบะธ
scale = 1;
return false;
}
public abstract void action();
}
| [
"iourilitv1965@gmail.com"
] | iourilitv1965@gmail.com |
b32e7d919ad682bcaa108bb596b8598d74a6c4ef | 878921bc9847cd8084102e0cf3dae9638195a54a | /Mage.Sets/src/mage/cards/w/WaryOkapi.java | e4ffcbebd98a8b006d972203d9cd47f6ff835c76 | [
"MIT"
] | permissive | drowinternet/mage | 542e9b6a658bd509a1a0b829cd007505353701af | f7a78a378368b7c369d2078b3a7b4b8bf44bbad3 | refs/heads/master | 2021-05-22T22:28:44.892369 | 2020-04-13T18:28:03 | 2020-04-13T18:28:03 | 253,072,532 | 2 | 0 | MIT | 2020-04-04T22:51:50 | 2020-04-04T18:36:15 | Java | UTF-8 | Java | false | false | 825 | java | package mage.cards.w;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
/**
*
* @author TheElk801
*/
public final class WaryOkapi extends CardImpl {
public WaryOkapi(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.subtype.add(SubType.ANTELOPE);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
}
public WaryOkapi(final WaryOkapi card) {
super(card);
}
@Override
public WaryOkapi copy() {
return new WaryOkapi(this);
}
}
| [
"theelk801@gmail.com"
] | theelk801@gmail.com |
6d72e137fffaef0ef05b1d94d1099cea4828155f | 611177d9fe9c89429f0e2b623d413a767051fe0e | /src/main/java/cn/javaex/uscat/dao/slide_info/ISlideInfoDAO.java | acfea868c3877380626d97e2b2ac60eb00fc2fab | [] | no_license | JavaSuyi/forum | 07678ccd2eabd3e717fa53f86e823bc5c8ba2d60 | 11a635e1b263c154413b130038773b3872a02261 | refs/heads/master | 2023-03-09T08:21:08.189742 | 2021-02-27T07:00:39 | 2021-02-27T07:00:39 | 342,758,049 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 636 | java | package cn.javaex.uscat.dao.slide_info;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import cn.javaex.uscat.view.SlideInfo;
public interface ISlideInfoDAO {
/**
* ๆ นๆฎๆฅๅฃไธป้ฎ๏ผๆฅ่ฏขๆๆๅนป็ฏ็ๆฐๆฎ
* @param apiId ๆฅๅฃ่กจ็ไธป้ฎ
* @return
*/
List<SlideInfo> listByApiId(String apiId);
/**
* ๆๅ
ฅๆฐ็ๅนป็ฏ็ๆฐๆฎ
*/
int insert(SlideInfo slideProfileInfo);
/**
* ๆดๆฐๅนป็ฏ็ๆฐๆฎ
*/
int update(SlideInfo slideProfileInfo);
/**
* ๆน้ๅ ้คๅนป็ฏ็ๆฐๆฎ
* @param idArr ไธป้ฎๆฐ็ป
* @return
*/
int delete(@Param("idArr") String[] idArr);
} | [
"aaa"
] | aaa |
8dd1d952fcdd5eaf64dfd794a412e1a637d9c76f | 132ef19f6dbfd8dcb2c0680421b53a4182c96b7e | /ๅทฅๅ
ท/Picturepark.SDK.Playground-master/Picturepark.SDK.Playground-master/playground/java-client/src/main/java/io/swagger/client/model/TermsRelationAggregatorDocumentType.java | 7e8acebdb19f4699166e1a7ad8a13bcef6898179 | [] | no_license | weedkiller/CommonPlatform2 | 0f6ea0cf4055cb67fdfcab0a024acf9631bf483a | eb5114a6ea019b98b3a5e41f38ba3621c4da43d0 | refs/heads/master | 2023-02-24T14:56:35.260089 | 2019-05-31T08:16:31 | 2019-05-31T08:16:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,057 | java | /*
* Web API Swagger specification
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0.0
*
*
* 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 io.swagger.client.model;
import java.util.Objects;
import io.swagger.annotations.ApiModel;
import com.google.gson.annotations.SerializedName;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
*
*/
@JsonAdapter(TermsRelationAggregatorDocumentType.Adapter.class)
public enum TermsRelationAggregatorDocumentType {
CONTENT("Content"),
LISTITEM("ListItem"),
SCHEMA("Schema"),
USER("User"),
CONTENTPERMISSIONSET("ContentPermissionSet"),
OWNER("Owner");
private String value;
TermsRelationAggregatorDocumentType(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TermsRelationAggregatorDocumentType fromValue(String text) {
for (TermsRelationAggregatorDocumentType b : TermsRelationAggregatorDocumentType.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<TermsRelationAggregatorDocumentType> {
@Override
public void write(final JsonWriter jsonWriter, final TermsRelationAggregatorDocumentType enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public TermsRelationAggregatorDocumentType read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return TermsRelationAggregatorDocumentType.fromValue(String.valueOf(value));
}
}
}
| [
"a6818162@163.com"
] | a6818162@163.com |
71fc4ce7c074d7c87756a164bdfa6d1af3689bef | 603bb54aa86b79f12020e759d00156c1c333773c | /src/java/br/com/auster/om/pricing/TaxCategory.java | 0386a009be56cf6a023ecd855a9ab8fe8d0b2ac4 | [] | no_license | m-rossini/om-invoice | 73612e49fe753bfc0abecc867917333744a89049 | 7c5b28890f1e0aac397f8fb5a764685c88956427 | refs/heads/master | 2021-01-23T20:14:07.134172 | 2015-09-16T18:15:54 | 2015-09-16T18:15:54 | 42,605,076 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,457 | java | /*
* Copyright (c) 2004-2005 Auster Solutions do Brasil. All Rights Reserved.
*
* 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.
*
* Created on Sep 16, 2005
*/
package br.com.auster.om.pricing;
import java.sql.Timestamp;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import br.com.auster.common.datastruct.RangeMap;
import br.com.auster.om.reference.CatalogEntity;
/**
* @hibernate.class
* table="PRC_TAX_CATEGORY"
*
* @author framos
* @version $Id: TaxCategory.java 59 2005-10-25 16:59:10Z framos $
*/
public class TaxCategory extends CatalogEntity {
// ---------------------------
// Instance variables
// ---------------------------
private String taxCode;
private Timestamp updatedDate;
private Set taxRates;
private Map taxRatesByExternalId;
// ---------------------------
// Constructors
// ---------------------------
public TaxCategory() {
super();
this.taxRates = new LinkedHashSet();
this.taxRatesByExternalId = new LinkedHashMap();
}
public TaxCategory(long _uid) {
super(_uid);
this.taxRates = new LinkedHashSet();
this.taxRatesByExternalId = new LinkedHashMap();
}
// ---------------------------
// Public methods
// ---------------------------
/**
* @hibernate.property
* column="TAX_CODE"
* type="string"
* length="30"
* not-null="true"
*/
public String getTaxCode() {
return taxCode;
}
public void setTaxCode(String taxCode) {
this.taxCode = taxCode;
}
/**
* @hibernate.property
* column="UPDATED_DATE"
* type="timestamp"
* not-null="true"
*/
public Timestamp getUpdatedDate() {
return updatedDate;
}
public void setUpdatedDate(Timestamp updatedDate) {
this.updatedDate = updatedDate;
}
/**
* @hibernate.collection-one-to-many
* lazy="false"
* class="br.com.auster.om.pricing.TaxRate"
*
* @hibernate.set
* inverse="false"
* cascade="all-delete-orphan"
*
* @hibernate.collection-key
* column="TAX_CATEGORY_ID"
* not-null="true"
*/
public Set getTaxRates() {
return taxRates;
}
public void setTaxRates(Set _rates) {
taxRates = _rates;
buildTaxRateMap(_rates);
}
/**
* Returns the <code>TaxRate</code> instance for the specified external id, using the current date as the
* search period. Check out the {@link #getTaxRate(String, Date)} documentation for more details on how
* the tax rate is found.
*
* @param _externalId the tax rate external id
*
* @return the tax rate for the current date and the external id specified
*/
public TaxRate getTaxRate(String _externalId) {
return getTaxRate(_externalId, null);
}
/**
* Returns the <code>TaxRate</code>, for the specified external id, where the <code>_searchDate</code> parameter
* is between the effective and expiration date.
* If the external id does not exist, or if there is no tax rate defined for the specified search date, then <code>null</code>
* is returned. Likewise, if there is more than on tax rate for the search date, then the first one loaded from the database
* will be returned.
*
* @param _externalId the tax rate external id
* @param _sarchDate the date being searched
*
* @return the tax rate for the sarched date and the external id specified
*/
public TaxRate getTaxRate(String _externalId, Date _searchDate) {
if (_searchDate == null) {
_searchDate = Calendar.getInstance().getTime();
}
RangeMap m = (RangeMap) taxRatesByExternalId.get(_externalId);
if (m != null) {
List rateList = m.get(_searchDate.getTime());
if ((rateList != null) && (rateList.size() > 0)) {
Collections.sort(rateList, new SortByEffectiveDate());
return (TaxRate) rateList.get(0);
}
}
return null;
}
/**
* @see java.lang.Object#toString()
*/
public String toString() {
return
"[TaxCategory]" +
" uid:" + getUid() +
" updatedDate:" + getUpdatedDate() +
" code:" + getTaxCode() +
" #OfRates:" + getTaxRates().size();
}
// ---------------------------
// Private methods
// ---------------------------
private void buildTaxRateMap(Set _rates) {
if (taxRatesByExternalId == null) {
taxRatesByExternalId = new LinkedHashMap();
}
taxRatesByExternalId.clear();
// building map of ranges, for tax rates
for (Iterator it=_rates.iterator(); it.hasNext();) {
TaxRate r = (TaxRate) it.next();
RangeMap m = (RangeMap) taxRatesByExternalId.get(r.getExternalId());
if (m == null) {
m = new RangeMap();
taxRatesByExternalId.put(r.getExternalId(), m);
}
long start = r.getEffectiveDate().getTime();
long end = r.getExpirationDate() == null ? Long.MAX_VALUE : r.getExpirationDate().getTime()+1;
m.add(start, end, r);
}
}
/**
* Sorts a list of tax rate elements by effective date, from the most recent to the least one (descending order).
*/
private class SortByEffectiveDate implements Comparator {
public int compare(Object _t1, Object _t2) {
TaxRate t1 = (TaxRate) _t1;
TaxRate t2 = (TaxRate) _t2;
return t2.getEffectiveDate().compareTo(t1.getEffectiveDate());
}
}
}
| [
"marcos.tengelmann@gmail.com"
] | marcos.tengelmann@gmail.com |
1dc1079e9a37c4c794212df5e56a46be9a1b9b3f | aadbc38f729065d2c7cf20e836ef61fd6538fc39 | /src/main/java/com/haitai/haitaitv/component/constant/operator/ShanghaiIptvConsts.java | 17b2a04670a083b0bba92712e8971222a749a298 | [] | no_license | yongfanfan/jfinal | 4d5a2b658bdce31ca548181221a5965543b744b6 | 6bcb356a5b6ed90a34cd5826c951716c805960a3 | refs/heads/master | 2020-03-21T12:10:49.083952 | 2018-07-04T06:46:18 | 2018-07-04T06:46:18 | 138,539,189 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 781 | java | package com.haitai.haitaitv.component.constant.operator;
import com.haitai.haitaitv.component.constant.ConfigConsts;
import com.haitai.haitaitv.component.constant.VodConsts;
import com.jfinal.kit.PropKit;
/**
* ไธๆตท็ตไฟกiptv็ธๅ
ณ็ๅธธ้
*
* @author liuzhou
* create at 2017-05-04 10:26
*/
public class ShanghaiIptvConsts {
public static final String OPERATOR_ID = "200000";
public static final boolean FLAG = OPERATOR_ID.equals(ConfigConsts.COMMERCE_OPERATOR_ID);
public static final String MEDIA_CONTENT_INTERFACE_NAME = "V2P/Media/Content";
public static final String INTERFACE_SERVER_IP = VodConsts.VOD_URL;
public static final String AUTHENTICATION_INTERFACE = PropKit.get("VOD.INTERFACE");
private ShanghaiIptvConsts() {
}
}
| [
"542868998@qq.com"
] | 542868998@qq.com |
7acf03371f7b81fcc038247151ea8570785b9b18 | d7f3e8adbcea25d6977ad72c6e23b596afdd31d4 | /app/src/main/java/com/ics/newapp/Tender_list.java | ec242369f9f880e58326f8adc8038253ab9d1819 | [] | no_license | NothingbutPro/DigFAb24 | 8608aad4723febab1a795a0c0466e3e21046260d | 01c394fb2a7279b12ee7482dcf46a13b640a8ea7 | refs/heads/master | 2020-05-09T22:38:16.254783 | 2019-04-29T08:06:59 | 2019-04-29T08:06:59 | 181,477,119 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 777 | java | package com.ics.newapp;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
public class Tender_list extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tender_list);
LinearLayout linearLayout=findViewById(R.id.tender_desct);
linearLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(Tender_list.this,Tender_Description.class);
startActivity(intent);
}
});
}
}
| [
"paragsharma611@gmail.com"
] | paragsharma611@gmail.com |
592a5bd8d729c880e855553927e2812a0fd18236 | 38f8a0ba95631613fdcd5e87edbc1c942639eb38 | /solar/src/com/ezcloud/framework/weixin/model/request/InSubscribeEventMessage.java | 9fd6ef2e1f71ff446e1638bc9a8f821bf6a7291e | [] | no_license | javakaka/solar | 841876a4c3e31a435570ac18d43e00760d221917 | 30932f7629bd33a97054dce17adfb94fbd881a98 | refs/heads/master | 2021-01-10T08:56:29.829092 | 2015-11-11T15:02:03 | 2015-11-11T15:02:03 | 44,478,690 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,557 | java | /**
* @Title: InSubscribeEventMessage.java
* @Package com.ezcloud.framework.weixin.model.request
* @Description: TODO
* @author ez-cloud work group
* @date 2013-11-22 ไธๅ03:43:38
* @version V1.0
*/
package com.ezcloud.framework.weixin.model.request;
import com.ezcloud.framework.weixin.model.Message;
/**
* @ClassName: InSubscribeEventMessage
* @Description: ๅ
ณๆณจ๏ผๅๆถๅ
ณๆณจไบไปถๆถๆฏ
* <p>
* ็จๆทๅจๅ
ณๆณจไธๅๆถๅ
ณๆณจๅ
ฌไผๅทไบ๏ผๅพฎไฟกไผๆ่ฟไธชไบไปถๆจ้ๅฐๅผๅ่
ๅกซๅ็URLใ<br/>ๆนไพฟๅผๅ่
็ป็จๆทไธๅๆฌข่ฟๆถๆฏๆ่
ๅๅธๅท็่งฃ็ป<br/>
* </p>
* ๆจ้XMLๆฐๆฎๅ
็คบไพ๏ผ
* <p>
* <xml><br/>
* <ToUserName><![CDATA[toUser]]></ToUserName><br/>
* <FromUserName><![CDATA[FromUser]]></FromUserName><br/>
* <CreateTime>123456789</CreateTime><br/>
* <MsgType><![CDATA[event]]></MsgType><br/>
* <Event><![CDATA[subscribe]]></Event><br/>
* </xml><br/>
* </p>
*
* <p>
* ๅๆฐ่ฏดๆ๏ผ<br/>
* ๅๆฐ ๆ่ฟฐ<br/>
* ToUserName ๅผๅ่
ๅพฎไฟกๅท<br/>
* FromUserName ๅ้ๆนๅธๅท๏ผไธไธชOpenID๏ผ<br/>
* CreateTime ๆถๆฏๅๅปบๆถ้ด ๏ผๆดๅ๏ผ<br/>
* MsgType ๆถๆฏ็ฑปๅ๏ผevent<br/>
* Event ไบไปถ็ฑปๅ๏ผsubscribe(่ฎข้
)ใunsubscribe(ๅๆถ่ฎข้
)<br/>
* </p>
* @author ez-cloud work group
* @date 2013-11-22 ไธๅ03:43:38
*
*/
public class InSubscribeEventMessage extends Message {
//ไบไปถ็ฑปๅ๏ผsubscribe(่ฎข้
)ใunsubscribe(ๅๆถ่ฎข้
)
private String Event;
public InSubscribeEventMessage() {
super();
}
public InSubscribeEventMessage(String toUserName, String fromUserName,
String createTime, String msgType, String event) {
super(toUserName, fromUserName, createTime, msgType);
Event = event;
}
public String getEvent() {
return Event;
}
public void setEvent(String event) {
Event = event;
}
/**
* <p>Title: ObjectToXml</p>
* <p>Description: </p>
* @param object
* @return
* @see com.ezcloud.framework.weixin.model.Message#ObjectToXml(java.lang.Object)
*/
@Override
protected String ObjectToXml(Object object) {
// TODO Auto-generated method stub
return null;
}
/**
* <p>Title: XmlToObject</p>
* <p>Description: </p>
* @param object
* @return
* @see com.ezcloud.framework.weixin.model.Message#XmlToObject(java.lang.Object)
*/
@Override
protected Object XmlToObject(Object object) {
// TODO Auto-generated method stub
return null;
}
}
| [
"510836102@qq.com"
] | 510836102@qq.com |
7d77deb671e3995ce58ad2186ca1f5430a90d65b | 6249a2b3928e2509b8a5d909ef9d8e18221d9637 | /revolsys-core/src/main/java/com/revolsys/elevation/gridded/AbstractTiledGriddedDigitalElevationModel.java | 0558863472ab6dda4f2f7e53bab2be689a572af9 | [
"Apache-2.0"
] | permissive | revolsys/com.revolsys.open | dbcdc3bdcee3276dc3680311948e91ec64e1264e | 7f4385c632094eb5ed67c0646ee3e2e258fba4e4 | refs/heads/main | 2023-08-22T17:18:48.499931 | 2023-05-31T01:59:22 | 2023-05-31T01:59:22 | 2,709,026 | 5 | 11 | NOASSERTION | 2023-05-31T01:59:23 | 2011-11-04T12:33:49 | Java | UTF-8 | Java | false | false | 3,350 | java | package com.revolsys.elevation.gridded;
import java.util.Map;
import org.jeometry.common.collection.map.LruMap;
import com.revolsys.geometry.model.GeometryFactory;
import com.revolsys.grid.AbstractGrid;
import com.revolsys.util.IntPair;
public abstract class AbstractTiledGriddedDigitalElevationModel extends AbstractGrid
implements GriddedElevationModel {
protected int gridTileSize;
private final LruMap<IntPair, GriddedElevationModel> models = new LruMap<>(5000);
private final IntPair getKey = new IntPair();
private final double tileWidth;
private final double tileHeight;
public AbstractTiledGriddedDigitalElevationModel(final GeometryFactory geometryFactory,
final double minX, final double minY, final int gridTileSize, final int gridCellSize) {
super(geometryFactory, minX, minY, Integer.MAX_VALUE, Integer.MAX_VALUE, gridCellSize);
this.gridTileSize = gridTileSize;
this.tileWidth = gridTileSize * gridCellSize;
this.tileHeight = gridTileSize * gridCellSize;
}
@Override
public void clear() {
synchronized (this.models) {
this.models.clear();
}
}
@Override
public final void close() {
try {
closeDo();
} finally {
synchronized (this.models) {
this.models.clear();
}
}
}
protected void closeDo() {
}
public int getGridTileSize() {
return this.gridTileSize;
}
protected GriddedElevationModel getModel(final int gridX, final int gridY) {
GriddedElevationModel model;
final Map<IntPair, GriddedElevationModel> models = this.models;
final int tileIndexX = (int)Math.floor(gridX / this.tileWidth);
final int tileIndexY = (int)Math.floor(gridY / this.tileHeight);
synchronized (models) {
final IntPair getKey = this.getKey;
getKey.setValues(tileIndexX, tileIndexY);
model = models.get(getKey);
if (model == null) {
final double tileX = tileIndexX * this.tileWidth;
final double tileY = tileIndexY * this.tileHeight;
model = newModel(tileX, tileY);
models.put(getKey.clone(), model);
}
}
return model;
}
@Override
public double getValueFast(final int gridX, final int gridY) {
final GriddedElevationModel model = getModel(gridX, gridY);
if (model == null) {
return Double.NaN;
} else {
final int tileSize = this.gridTileSize;
final int gridCellX = gridX % tileSize;
final int gridCellY = gridY % tileSize;
return model.getValue(gridCellX, gridCellY);
}
}
@Override
public boolean isEmpty() {
return false;
}
@Override
public boolean isNull(final int x, final int y) {
return false;
}
@Override
public GriddedElevationModel newGrid(final GeometryFactory geometryFactory, final double x,
final double y, final int width, final int height, final double gridCellSize) {
throw new UnsupportedOperationException();
}
protected abstract GriddedElevationModel newModel(double tileX, double tileY);
public AbstractTiledGriddedDigitalElevationModel setCacheSize(final int cacheSize) {
this.models.setMaxSize(cacheSize);
return this;
}
public void setGridTileSize(final int gridTileSize) {
this.gridTileSize = gridTileSize;
}
@Override
public void setValue(final int x, final int y, final double elevation) {
}
}
| [
"paul.austin@revolsys.com"
] | paul.austin@revolsys.com |
19689aad3372bdb7e73fff11e68d1e29f6fd835d | 0ab92abb9d19857d3b81d3a84f4e81932e9651ea | /EntityScan/src/main/java/com/grwts/vo/StudentVo.java | 2e3532220d127dff73653dc026a119564f22f980 | [] | no_license | Zafarimam7032/sprinng-annotaion | 5a1ea2a1de0d0f0e8a43d49cc962707a3a781f5e | 4ca97f96a1323efdf6ca831694d3750c5ed9e914 | refs/heads/master | 2023-04-22T01:34:17.047697 | 2021-05-17T09:24:03 | 2021-05-17T09:24:03 | 368,127,034 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 872 | java | package com.grwts.vo;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "StudentEntityZafar")
public class StudentVo {
@Id
private int id;
private String name;
private String city;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public StudentVo(int id, String name, String city) {
super();
this.id = id;
this.name = name;
this.city = city;
}
@Override
public String toString() {
return "StudentVo [id=" + id + ", name=" + name + ", city=" + city + "]";
}
public StudentVo() {
super();
// TODO Auto-generated constructor stub
}
}
| [
"Zafar.imam@greatWits.com"
] | Zafar.imam@greatWits.com |
1db4300b4ac0bf22794b3944f2297b4204f0bea8 | 6675a1a9e2aefd5668c1238c330f3237b253299a | /2.15/dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementOperandServiceTest.java | ebf73f02a45b0fa2c4870863858b1c39f8ca7675 | [
"BSD-3-Clause"
] | permissive | hispindia/dhis-2.15 | 9e5bd360bf50eb1f770ac75cf01dc848500882c2 | f61f791bf9df8d681ec442e289d67638b16f99bf | refs/heads/master | 2021-01-12T06:32:38.660800 | 2016-12-27T07:44:32 | 2016-12-27T07:44:32 | 77,379,159 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,417 | java | package org.hisp.dhis.dataelement;
/*
* Copyright (c) 2004-2014, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* Neither the name of the HISP project 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.
*/
import org.hisp.dhis.DhisSpringTest;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import static org.junit.Assert.*;
/**
* @author Lars Helge Overland
*/
public class DataElementOperandServiceTest
extends DhisSpringTest
{
@Autowired
private DataElementOperandService operandService;
@Autowired
private DataElementService dataElementService;
@Autowired
private DataElementCategoryService categoryService;
private DataElement deA;
private DataElement deB;
private DataElement deC;
private DataElementCategoryOptionCombo coc;
@Override
public void setUpTest()
{
deA = createDataElement( 'A' );
deB = createDataElement( 'B' );
deC = createDataElement( 'C' );
dataElementService.addDataElement( deA );
dataElementService.addDataElement( deB );
dataElementService.addDataElement( deC );
coc = categoryService.getDefaultDataElementCategoryOptionCombo();
}
@Test
public void testAddGet()
{
DataElementOperand opA = new DataElementOperand( deA, coc );
DataElementOperand opB = new DataElementOperand( deB, coc );
DataElementOperand opC = new DataElementOperand( deC, coc );
int idA = operandService.addDataElementOperand( opA );
int idB = operandService.addDataElementOperand( opB );
int idC = operandService.addDataElementOperand( opC );
assertEquals( opA, operandService.getDataElementOperand( idA ) );
assertEquals( opB, operandService.getDataElementOperand( idB ) );
assertEquals( opC, operandService.getDataElementOperand( idC ) );
}
@Test
public void testDelete()
{
DataElementOperand opA = new DataElementOperand( deA, coc );
DataElementOperand opB = new DataElementOperand( deB, coc );
DataElementOperand opC = new DataElementOperand( deC, coc );
int idA = operandService.addDataElementOperand( opA );
int idB = operandService.addDataElementOperand( opB );
int idC = operandService.addDataElementOperand( opC );
assertNotNull( operandService.getDataElementOperand( idA ) );
assertNotNull( operandService.getDataElementOperand( idB ) );
assertNotNull( operandService.getDataElementOperand( idC ) );
operandService.deleteDataElementOperand( opA );
operandService.deleteDataElementOperand( opB );
assertNull( operandService.getDataElementOperand( idA ) );
assertNull( operandService.getDataElementOperand( idB ) );
assertNotNull( operandService.getDataElementOperand( idC ) );
operandService.deleteDataElementOperand( opC );
assertNull( operandService.getDataElementOperand( idA ) );
assertNull( operandService.getDataElementOperand( idB ) );
assertNull( operandService.getDataElementOperand( idC ) );
}
public void testGetByUid()
{
DataElementOperand opA = new DataElementOperand( deA, coc );
DataElementOperand opB = new DataElementOperand( deB, coc );
operandService.addDataElementOperand( opA );
operandService.addDataElementOperand( opB );
String uidA = deA.getUid() + DataElementOperand.SEPARATOR + coc.getUid();
String uidB = deB.getUid() + DataElementOperand.SEPARATOR + coc.getUid();
assertEquals( opA, operandService.getDataElementOperandByUid( uidA ) );
assertEquals( opB, operandService.getDataElementOperandByUid( uidB ) );
assertNull( operandService.getDataElementOperandByUid( null ) );
assertNull( operandService.getDataElementOperandByUid( "SomeFunnyUid" ) );
}
}
| [
"[sagarb.4488@gmail.com]"
] | [sagarb.4488@gmail.com] |
74cd46342602a845c40bb4238a01724df21ac520 | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /com/tencent/mm/plugin/nearby/ui/NearbySayHiListUI$5.java | 34b9749ee9c7344991ea29c52389a273fd0cebad | [] | no_license | 0jinxing/wechat-apk-source | 544c2d79bfc10261eb36389c1edfdf553d8f312a | f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d | refs/heads/master | 2020-06-07T20:06:03.580028 | 2019-06-21T09:17:26 | 2019-06-21T09:17:26 | 193,069,132 | 9 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,074 | java | package com.tencent.mm.plugin.nearby.ui;
import android.content.res.Resources;
import android.view.MenuItem;
import android.view.MenuItem.OnMenuItemClickListener;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ui.MMActivity;
import com.tencent.mm.ui.base.h;
import com.tencent.mm.ui.q;
final class NearbySayHiListUI$5
implements MenuItem.OnMenuItemClickListener
{
NearbySayHiListUI$5(NearbySayHiListUI paramNearbySayHiListUI)
{
}
public final boolean onMenuItemClick(MenuItem paramMenuItem)
{
AppMethodBeat.i(55498);
h.a(this.oQP.mController.ylL, true, this.oQP.getResources().getString(2131302715), "", this.oQP.getResources().getString(2131302714), this.oQP.getString(2131296868), new NearbySayHiListUI.5.1(this), null);
AppMethodBeat.o(55498);
return true;
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes2-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.nearby.ui.NearbySayHiListUI.5
* JD-Core Version: 0.6.2
*/ | [
"172601673@qq.com"
] | 172601673@qq.com |
8569ca6cb97d667e86472cdeb8eb3cae6484bdd6 | a60bbb4feca07efabe11d3ce4bfd82eeab63ea78 | /core/src/main/java/com/ouchadam/fang/api/search/ItunesSearch.java | 0527e7eae6374bb8a67f381a8f1b82a8829e74f9 | [] | no_license | ivyspirit/fang | 3c1b69c38eb877f2c9287eb5c449eace80b366b2 | c894df598f486dfc2893c562956f22017c48fafb | refs/heads/master | 2021-01-22T15:42:47.944336 | 2013-08-27T22:09:04 | 2013-08-27T22:09:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,253 | java | package com.ouchadam.fang.api.search;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.kevinsawicki.http.HttpRequest;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
public class ItunesSearch {
private static final String ITUNES_SEARCH_URL = "https://itunes.apple.com/search";
public SearchResult search(String searchTerm) {
searchTerm = searchTerm.replace(" ", "+");
Map<String, String> params = new HashMap<String, String>();
params.put("term", searchTerm);
params.put("media", "podcast");
// params.put("limit", "3");
HttpRequest request = HttpRequest.get(ITUNES_SEARCH_URL, params, true);
if (request.ok()) {
InputStream inputStream = request.buffer();
try {
return new ObjectMapper().readValue(inputStream, SearchResult.class);
} catch (IOException e) {
e.printStackTrace();
}
}
throw new RuntimeException("Search failed");
}
}
| [
"adam@novoda.com"
] | adam@novoda.com |
90f1c71c11f19130190651e6ff1e8c69ccfb865d | 3a64bd35f2956a0b1a731296e8497ac9dfae3ab8 | /greedy/1135_๋ด์ค ์ ํ๊ธฐ.java | 35d27b1dd9d80d6c8d2588d17c6d6c71f3134cb0 | [] | no_license | kys4548/Algorithm_baekjoon | 1564a3409f54cb8ce4145d6b1de861c87b666a50 | fa2e46ce01e5debf4f50d682fa5b1d1bcdf05601 | refs/heads/master | 2021-01-14T18:41:14.998943 | 2020-11-15T11:21:24 | 2020-11-15T11:21:24 | 242,716,325 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,559 | java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.StringTokenizer;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
Employee[] arr = new Employee[n];
for(int i=0; i<n; i++) {
arr[i] = new Employee();
}
StringTokenizer st = new StringTokenizer(br.readLine());
st.nextToken();
for(int i=1; i<n; i++) {
arr[Integer.parseInt(st.nextToken())].list.add(arr[i]);
}
int answer = dp(arr[0]);
System.out.println(answer);
}
private static int dp(Employee employee) {
if(employee.list.isEmpty()) {
return 0;
}
int time = employee.list.size();
List<Integer> tempList = new ArrayList<Integer>();
for(Employee temp : employee.list) {
tempList.add(dp(temp));
}
Collections.sort(tempList, Collections.reverseOrder());
int addTime = 0;
for(int i=0; i<employee.list.size(); i++) {
if(addTime < tempList.get(i) - (time-i -1)) {
addTime = tempList.get(i) - (time-i -1);
}
}
return time + addTime;
}
}
class Employee {
List<Employee> list;
Employee() {
list = new ArrayList<Employee>();
}
} | [
"kys4548@gmail.com"
] | kys4548@gmail.com |
217827ce1b94ea9ae4588062db4f0d3f9982f680 | 3c8dcccd9fcd6abeca1b38294347d05f310b5eea | /boss-core/src/test/java/com/amgkaka/performance/MonitorInfoBean.java | 5b6535c3a906a0bfe07284ba75658ea5ea70ff12 | [
"Apache-2.0"
] | permissive | leopardoooo/cambodia | 023963df2b13d775a0117bb429b2f0d72802def6 | a6b552e3ceb60237f058bf8dfea369f47769542c | refs/heads/master | 2016-09-06T17:38:24.959190 | 2015-12-03T05:58:26 | 2015-12-03T05:58:26 | 38,999,232 | 6 | 6 | null | null | null | null | UTF-8 | Java | false | false | 2,464 | java | package com.amgkaka.performance;
/** *//**
* ็่งไฟกๆฏ็JavaBean็ฑป.
* @author amg
* @version 1.0
* Creation date: 2008-4-25 - ไธๅ10:37:00
*/
public class MonitorInfoBean {
/** *//** ๅฏไฝฟ็จๅ
ๅญ. */
private long totalMemory;
/** *//** ๅฉไฝๅ
ๅญ. */
private long freeMemory;
/** *//** ๆๅคงๅฏไฝฟ็จๅ
ๅญ. */
private long maxMemory;
/** *//** ๆไฝ็ณป็ป. */
private String osName;
/** *//** ๆป็็ฉ็ๅ
ๅญ. */
private long totalMemorySize;
/** *//** ๅฉไฝ็็ฉ็ๅ
ๅญ. */
private long freePhysicalMemorySize;
/** *//** ๅทฒไฝฟ็จ็็ฉ็ๅ
ๅญ. */
private long usedMemory;
/** *//** ็บฟ็จๆปๆฐ. */
private int totalThread;
/** *//** cpuไฝฟ็จ็. */
private double cpuRatio;
public long getFreeMemory() {
return freeMemory;
}
public void setFreeMemory(long freeMemory) {
this.freeMemory = freeMemory;
}
public long getFreePhysicalMemorySize() {
return freePhysicalMemorySize;
}
public void setFreePhysicalMemorySize(long freePhysicalMemorySize) {
this.freePhysicalMemorySize = freePhysicalMemorySize;
}
public long getMaxMemory() {
return maxMemory;
}
public void setMaxMemory(long maxMemory) {
this.maxMemory = maxMemory;
}
public String getOsName() {
return osName;
}
public void setOsName(String osName) {
this.osName = osName;
}
public long getTotalMemory() {
return totalMemory;
}
public void setTotalMemory(long totalMemory) {
this.totalMemory = totalMemory;
}
public long getTotalMemorySize() {
return totalMemorySize;
}
public void setTotalMemorySize(long totalMemorySize) {
this.totalMemorySize = totalMemorySize;
}
public int getTotalThread() {
return totalThread;
}
public void setTotalThread(int totalThread) {
this.totalThread = totalThread;
}
public long getUsedMemory() {
return usedMemory;
}
public void setUsedMemory(long usedMemory) {
this.usedMemory = usedMemory;
}
public double getCpuRatio() {
return cpuRatio;
}
public void setCpuRatio(double cpuRatio) {
this.cpuRatio = cpuRatio;
}
}
| [
"leopardoooo@163.com"
] | leopardoooo@163.com |
215955768c2c8ae8a0735a920c838a3ae359a9e0 | a1ca4e5e6fe8952b77d1830736dbe89420f88285 | /OntoUML/src/OntoUML/validation/StructuralDatatypeValidator.java | 99fcafaf3c47c0eec3af03890dee15727f2df6a7 | [] | no_license | kleopatra999/ontouml-editor-eclipse | 46807fe571a60d33ff0f9c84c2bd564e58190e7a | b90531098e578cebaaf5404adc8dc8b3dbae8773 | refs/heads/master | 2021-01-16T00:27:40.594378 | 2011-09-23T03:22:59 | 2011-09-23T03:22:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 547 | java | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package OntoUML.validation;
/**
* A sample validator interface for {@link OntoUML.StructuralDatatype}.
* This doesn't really do anything, and it's not a real EMF artifact.
* It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
* This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
*/
public interface StructuralDatatypeValidator {
boolean validate();
}
| [
"alessanderbotti@b20185d1-684f-0410-8ba8-0d0db1538d36"
] | alessanderbotti@b20185d1-684f-0410-8ba8-0d0db1538d36 |
7366a1f161d0a2ff8b259f768cf8e5f42d4c9338 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project1/src/test/java/org/gradle/test/performance1_2/Test1_175.java | d25f4b10393ca4c91ca5d40a3fa76a49e6896f74 | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 288 | java | package org.gradle.test.performance1_2;
import static org.junit.Assert.*;
public class Test1_175 {
private final Production1_175 production = new Production1_175("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
929d4094ba809c03e322fc6bc4a58ea63acf136f | b9f9edb9119229d3299d71724beb71433794ad48 | /TestOpenGL/src/com/example/testopengl/MyRenderer.java | 8ac9a21580a2f09619696e6943971c1e0453f663 | [] | no_license | devryan915/Android | 96171e57a98e3e644bb6badb4bb0612309df1149 | 2e19bb2b7e7c00fb8274f013605b662f5193d838 | refs/heads/master | 2021-01-19T04:14:54.967375 | 2016-11-22T08:03:33 | 2016-11-22T08:03:33 | 62,364,795 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 7,951 | java | package com.example.testopengl;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.opengl.GLSurfaceView.Renderer;
import android.opengl.GLU;
import android.opengl.GLUtils;
import android.util.Log;
public class MyRenderer implements Renderer {
private final static String TAG = "MyRenderer";
// ็ซๆนไฝ็้กถ็นๅบงๆ ๏ผไธๅ
ฑๆฏ36ไธช้กถ็น๏ผ็ปๆ12ไธชไธ่งๅฝข๏ผ
private float[] cubeVertices = { -0.6f, -0.6f, -0.6f, -0.6f, 0.6f, -0.6f,
0.6f, 0.6f, -0.6f, 0.6f, 0.6f, -0.6f, 0.6f, -0.6f, -0.6f, -0.6f,
-0.6f, -0.6f, -0.6f, -0.6f, 0.6f, 0.6f, -0.6f, 0.6f, 0.6f, 0.6f,
0.6f, 0.6f, 0.6f, 0.6f, -0.6f, 0.6f, 0.6f, -0.6f, -0.6f, 0.6f,
-0.6f, -0.6f, -0.6f, 0.6f, -0.6f, -0.6f, 0.6f, -0.6f, 0.6f, 0.6f,
-0.6f, 0.6f, -0.6f, -0.6f, 0.6f, -0.6f, -0.6f, -0.6f, 0.6f, -0.6f,
-0.6f, 0.6f, 0.6f, -0.6f, 0.6f, 0.6f, 0.6f, 0.6f, 0.6f, 0.6f, 0.6f,
-0.6f, 0.6f, 0.6f, -0.6f, -0.6f, 0.6f, 0.6f, -0.6f, -0.6f, 0.6f,
-0.6f, -0.6f, 0.6f, 0.6f, -0.6f, 0.6f, 0.6f, 0.6f, 0.6f, 0.6f,
0.6f, 0.6f, -0.6f, -0.6f, 0.6f, -0.6f, -0.6f, -0.6f, -0.6f, -0.6f,
-0.6f, 0.6f, -0.6f, -0.6f, 0.6f, -0.6f, 0.6f, 0.6f, -0.6f, 0.6f,
-0.6f, };
// ๅฎไน็ซๆนไฝๆ้่ฆ็6ไธช้ข๏ผไธๅ
ฑๆฏ12ไธชไธ่งๅฝขๆ้็้กถ็น๏ผ
private byte[] cubeFacets = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, };
// ๅฎไน็บน็่ดดๅพ็ๅบงๆ ๆฐๆฎ
private float[] cubeTextures = { 1.0000f, 1.0000f, 1.0000f, 0.0000f,
0.0000f, 0.0000f, 0.0000f, 0.0000f, 0.0000f, 1.0000f, 1.0000f,
1.0000f, 0.0000f, 1.0000f, 1.0000f, 1.0000f, 1.0000f, 0.0000f,
1.0000f, 0.0000f, 0.0000f, 0.0000f, 0.0000f, 1.0000f, 0.0000f,
1.0000f, 1.0000f, 1.0000f, 1.0000f, 0.0000f, 1.0000f, 0.0000f,
0.0000f, 0.0000f, 0.0000f, 1.0000f, 0.0000f, 1.0000f, 1.0000f,
1.0000f, 1.0000f, 0.0000f, 1.0000f, 0.0000f, 0.0000f, 0.0000f,
0.0000f, 1.0000f, 0.0000f, 1.0000f, 1.0000f, 1.0000f, 1.0000f,
0.0000f, 1.0000f, 0.0000f, 0.0000f, 0.0000f, 0.0000f, 1.0000f,
0.0000f, 1.0000f, 1.0000f, 1.0000f, 1.0000f, 0.0000f, 1.0000f,
0.0000f, 0.0000f, 0.0000f, 0.0000f, 1.0000f };
private Context context;
private FloatBuffer cubeVerticesBuffer;
private ByteBuffer cubeFacetsBuffer;
private FloatBuffer cubeTexturesBuffer;
// ๅฎไนๆฌ็จๅบๆไฝฟ็จ็็บน็
private int texture;
public MyRenderer(Context main) {
this.context = main;
// ๅฐ็ซๆนไฝ็้กถ็นไฝ็ฝฎๆฐๆฎๆฐ็ปๅ
่ฃ
ๆFloatBuffer;
cubeVerticesBuffer = floatBufferUtil(cubeVertices);
// ๅฐ็ซๆนไฝ็6ไธช้ข๏ผ12ไธชไธ่งๅฝข๏ผ็ๆฐ็ปๅ
่ฃ
ๆByteBuffer
cubeFacetsBuffer = ByteBuffer.wrap(cubeFacets);
// ๅฐ็ซๆนไฝ็็บน็่ดดๅพ็ๅบงๆ ๆฐๆฎๅ
่ฃ
ๆFloatBuffer
cubeTexturesBuffer = floatBufferUtil(cubeTextures);
}
@Override
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
// ๅ
ณ้ญๆๆๅจ
gl.glDisable(GL10.GL_DITHER);
// ่ฎพ็ฝฎ็ณป็ปๅฏน้่ง่ฟ่กไฟฎๆญฃ
gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_FASTEST);
// ็จ้ป่ฒๆธ
ๅฑ
gl.glClearColor(0, 0, 0, 0);
// ่ฎพ็ฝฎ้ดๅฝฑๅนณๆปๆจกๅผ
gl.glShadeModel(GL10.GL_SMOOTH);
// ๅฏ็จๆทฑๅบฆๆต่ฏ๏ผ่ฎฉOๅทGLES่ท่ธชๆฏไธช็ฉไฝ็ๅจZ่ฝดไธ็ๆทฑๅบฆ๏ผ้ฟๅ
ๅ้ข็็ฉไฝ้ฎๆกๅ้ข็็ฉไฝ
gl.glEnable(GL10.GL_DEPTH_TEST);
// ่ฎพ็ฝฎๆทฑๅบฆๆต่ฏ็็ฑปๅ
gl.glDepthFunc(GL10.GL_LEQUAL);
// ๅฏ็จ2D็บน็่ดดๅพ
gl.glEnable(GL10.GL_TEXTURE_2D);
// ่ฃ
่ฝฝ็บน็
loadTexture(gl);
Log.d("GL", "GL_RENDERER = " + gl.glGetString(GL10.GL_RENDERER));
Log.d("GL", "GL_VENDOR = " + gl.glGetString(GL10.GL_VENDOR));
Log.d("GL", "GL_VERSION = " + gl.glGetString(GL10.GL_VERSION));
Log.i("GL", "GL_EXTENSIONS = " + gl.glGetString(GL10.GL_EXTENSIONS));
}
@Override
public void onSurfaceChanged(GL10 gl, int width, int height) {
// ่ฎพ็ฝฎ3D่ง็ช็ๅคงๅฐๅไฝ็ฝฎ๏ผๅไธคไธชๆฏ่ง็ช็ไฝ็ฝฎ๏ผๅ้ขไธคไธชๆฏ่ง็ช็ๅฎฝๅบฆ
gl.glViewport(0, 0, width, height);
// GL_PROJECTIONๅฐๅฝๅ็ฉ้ตๆจกๅผ่ฎพไธบๆๅฝฑ็ฉ้ต๏ผ้่งๅพ๏ผ่ถ่ฟ็่ตทๆฅ่ถๅฐ
// GL_MODELVIEWๆจกๅ่งๅพ๏ผไปปไฝๆฐ็ๅๆข้ฝไผๅฝฑๅ็ฉ้ตไธญ็ๆๆ็ฉไฝ
gl.glMatrixMode(GL10.GL_PROJECTION);
// ๅๅงๅๅไฝ็ฉ้ต
gl.glLoadIdentity();
// ่ฎก็ฎ้่ง่ง็ช็ๅฎฝๅบฆใ้ซๅบฆๆฏ
float ratio = (float) width / height;
// ่ฐ็จๆญคๆนๆณ่ฎพ็ฝฎ้่ง่ง็ช็็ฉบ้ดๅคงๅฐใ
gl.glFrustumf(-ratio, ratio, -1, 1, 1, 10);
}
@Override
public void onDrawFrame(GL10 gl) {
float angley = 0f;
float anglex = 0f;
anglex = ((MainActivity) context).anglex;
angley = ((MainActivity) context).angley;
// ๆธ
้คๅฑๅน็ผๅญๅๆทฑๅบฆ็ผๅญ
gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
// ๅฏ็จ้กถ็นๅบงๆ ๆฐๆฎ
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
// ๅฏ็จ่ดดๅพๅบงๆ ๆฐ็ปๆฐๆฎ
gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
// ่ฎพ็ฝฎๅฝๅ็ฉ้ตๆจกๅผไธบๆจกๅ่งๅพใ
gl.glMatrixMode(GL10.GL_MODELVIEW);
gl.glLoadIdentity();
// ๆ็ปๅพไธญๅฟ็งปๅ
ฅๅฑๅน2ไธชๅไฝ
gl.glTranslatef(0f, 0.0f, -5.0f);
// ๆ่ฝฌๅพๅฝข
gl.glRotatef(angley, 0, 1, 0);
gl.glRotatef(anglex, 1, 0, 0);
gl.glColor4f(1f, 1f, 1f, 1f);
// ่ฎพ็ฝฎ้กถ็น็ไฝ็ฝฎๆฐๆฎ
gl.glVertexPointer(3, GL10.GL_FLOAT, 0, cubeVerticesBuffer);
// ่ฎพ็ฝฎ่ดดๅพ็ๅบงๆ ๆฐๆฎ
gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, cubeTexturesBuffer);
// ๆง่ก็บน็่ดดๅพ
gl.glBindTexture(GL10.GL_TEXTURE_2D, texture); // โข
// ๆcubeFacetsBufferๆๅฎ็้ข็ปๅถไธ่งๅฝข
gl.glDrawElements(GL10.GL_TRIANGLES, cubeFacetsBuffer.remaining(),
GL10.GL_UNSIGNED_BYTE, cubeFacetsBuffer);
// ็ปๅถ็ปๆ
gl.glFinish();
// ็ฆ็จ้กถ็นใ็บน็ๅบงๆ ๆฐ็ป
gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
GLU.gluLookAt(gl, 0, 0, -5, 0f, 0f, 0f, 0f, 1.0f, 0.0f);
}
private void loadTexture(GL10 gl) {
Bitmap bitmap = null;
try {
// ๅ ่ฝฝไฝๅพ
bitmap = BitmapFactory.decodeResource(context.getResources(),
R.drawable.ic_launcher);
int[] textures = new int[1];
// ๆๅฎ็ๆNไธช็บน็๏ผ็ฌฌไธไธชๅๆฐๆๅฎ็ๆ1ไธช็บน็๏ผ๏ผ
// texturesๆฐ็ปๅฐ่ด่ดฃๅญๅจๆๆ็บน็็ไปฃๅทใ
gl.glGenTextures(1, textures, 0);
// ่ทๅtextures็บน็ๆฐ็ปไธญ็็ฌฌไธไธช็บน็
texture = textures[0];
// ้็ฅOpenGLๅฐtexture็บน็็ปๅฎๅฐGL10.GL_TEXTURE_2D็ฎๆ ไธญ
gl.glBindTexture(GL10.GL_TEXTURE_2D, texture);
// ่ฎพ็ฝฎ็บน็่ขซ็ผฉๅฐ๏ผ่ท็ฆป่ง็นๅพ่ฟๆถ่ขซ็ผฉๅฐ๏ผๆถๅ็ๆปคๆณขๆนๅผ
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER,
GL10.GL_NEAREST);
// ่ฎพ็ฝฎ็บน็่ขซๆพๅคง๏ผ่ท็ฆป่ง็นๅพ่ฟๆถ่ขซๆนๆณ๏ผๆถๅ็ๆปคๆณขๆนๅผ
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER,
GL10.GL_LINEAR);
// ่ฎพ็ฝฎๅจๆจชๅใ็บตๅไธ้ฝๆฏๅนณ้บ็บน็
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
GL10.GL_REPEAT);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
GL10.GL_REPEAT);
// ๅ ่ฝฝไฝๅพ็ๆ็บน็
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);
} finally {
// ็ๆ็บน็ไนๅ๏ผๅๆถไฝๅพ
if (bitmap != null)
bitmap.recycle();
}
}
// ๅฎไนไธไธชๅทฅๅ
ทๆนๆณ๏ผๅฐfloat[]ๆฐ็ป่ฝฌๆขไธบOpenGL ESๆ้็FloatBuffer
private FloatBuffer floatBufferUtil(float[] arr) {
FloatBuffer mBuffer;
// ๅๅงๅByteBuffer๏ผ้ฟๅบฆไธบarrๆฐ็ป็้ฟๅบฆ*4๏ผๅ ไธบไธไธชintๅ 4ไธชๅญ่
ByteBuffer qbb = ByteBuffer.allocateDirect(arr.length * 4);
// ๆฐ็ปๆๅ็จnativeOrder
qbb.order(ByteOrder.nativeOrder());
mBuffer = qbb.asFloatBuffer();
mBuffer.put(arr);
mBuffer.position(0);
return mBuffer;
}
}
| [
"devryan@163.com"
] | devryan@163.com |
3142b132945cfcb30ccb21d435941be9516318ca | 17e8438486cb3e3073966ca2c14956d3ba9209ea | /dso/tags/2.7.0/code/base/dso-statistics/src/com/tc/statistics/cli/GathererConnection.java | f9063d13a6d9b0769faca00a3abddaf5a7a9d071 | [] | no_license | sirinath/Terracotta | fedfc2c4f0f06c990f94b8b6c3b9c93293334345 | 00a7662b9cf530dfdb43f2dd821fa559e998c892 | refs/heads/master | 2021-01-23T05:41:52.414211 | 2015-07-02T15:21:54 | 2015-07-02T15:21:54 | 38,613,711 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,920 | java | /*
* All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
*/
package com.tc.statistics.cli;
import com.tc.management.JMXConnectorProxy;
import com.tc.management.beans.L2MBeanNames;
import com.tc.management.beans.TCServerInfoMBean;
import com.tc.statistics.beans.StatisticsLocalGathererMBean;
import com.tc.statistics.beans.StatisticsMBeanNames;
import java.io.IOException;
import javax.management.MBeanServerConnection;
import javax.management.MBeanServerInvocationHandler;
import javax.management.remote.JMXConnector;
public class GathererConnection {
public static final String DEFAULT_HOST = "localhost";
public static final int DEFAULT_PORT = 9520;
private String host = DEFAULT_HOST;
private int port = DEFAULT_PORT;
private StatisticsLocalGathererMBean gatherer;
private TCServerInfoMBean info;
public GathererConnection() {
//
}
public StatisticsLocalGathererMBean getGatherer() {
return gatherer;
}
public String getHost() {
return host;
}
public void setHost(final String host) {
this.host = host;
}
public int getPort() {
return port;
}
public void setPort(final int port) {
this.port = port;
}
public int getDSOListenPort() {
return info.getDSOListenPort();
}
public void connect() throws IOException {
JMXConnector jmxc = new JMXConnectorProxy(host, port);
// create the server connection
MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
// setup the mbeans
gatherer = (StatisticsLocalGathererMBean)MBeanServerInvocationHandler
.newProxyInstance(mbsc, StatisticsMBeanNames.STATISTICS_GATHERER, StatisticsLocalGathererMBean.class, true);
info = (TCServerInfoMBean)MBeanServerInvocationHandler
.newProxyInstance(mbsc, L2MBeanNames.TC_SERVER_INFO, TCServerInfoMBean.class, false);
}
}
| [
"foshea@7fc7bbf3-cf45-46d4-be06-341739edd864"
] | foshea@7fc7bbf3-cf45-46d4-be06-341739edd864 |
f95070c273b393e064011ed05f2da89f62535253 | 31f609157ae46137cf96ce49e217ce7ae0008b1e | /bin/custom/myExtention/src/com/project/MyExtentionStandalone.java | 1d99c5dbcc3d2e7aa413f4cd4fd75a23527f3eb4 | [] | no_license | natakolesnikova/hybrisCustomization | 91d56e964f96373781f91f4e2e7ca417297e1aad | b6f18503d406b65924c21eb6a414eb70d16d878c | refs/heads/master | 2020-05-23T07:16:39.311703 | 2019-05-15T15:08:38 | 2019-05-15T15:08:38 | 186,672,599 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,758 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package com.project;
import de.hybris.platform.core.Registry;
import de.hybris.platform.jalo.JaloSession;
import de.hybris.platform.util.RedeployUtilities;
import de.hybris.platform.util.Utilities;
/**
* Demonstration of how to write a standalone application that can be run directly from within eclipse or from the
* commandline.<br>
* To run this from commandline, just use the following command:<br>
* <code>
* java -jar bootstrap/bin/ybootstrap.jar "new com.project.MyExtentionStandalone().run();"
* </code> From eclipse, just run as Java Application. Note that you maybe need to add all other projects like
* ext-commerce, ext-pim to the Launch configuration classpath.
*/
public class MyExtentionStandalone
{
/**
* Main class to be able to run it directly as a java program.
*
* @param args
* the arguments from commandline
*/
public static void main(final String[] args)
{
new MyExtentionStandalone().run();
}
public void run()
{
Registry.activateStandaloneMode();
Registry.activateMasterTenant();
final JaloSession jaloSession = JaloSession.getCurrentSession();
System.out.println("Session ID: " + jaloSession.getSessionID()); //NOPMD
System.out.println("User: " + jaloSession.getUser()); //NOPMD
Utilities.printAppInfo();
RedeployUtilities.shutdown();
}
}
| [
"nataliia@spadoom.com"
] | nataliia@spadoom.com |
6bc04b4eb2985583c36809e1360cf0848c914c7e | 82eba08b9a7ee1bd1a5f83c3176bf3c0826a3a32 | /ZmailSoap/src/wsdl-test/generated/zcsclient/account/testSearchGalResponse.java | 1473c62fd61edcec044b1b6b559b253188d8d1e4 | [
"MIT"
] | permissive | keramist/zmailserver | d01187fb6086bf3784fe180bea2e1c0854c83f3f | 762642b77c8f559a57e93c9f89b1473d6858c159 | refs/heads/master | 2021-01-21T05:56:25.642425 | 2013-10-21T11:27:05 | 2013-10-22T12:48:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,533 | java | /*
* ***** BEGIN LICENSE BLOCK *****
*
* Zimbra Collaboration Suite Server
* Copyright (C) 2011, 2012 VMware, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.zimbra.com/license.
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
*
* ***** END LICENSE BLOCK *****
*/
package generated.zcsclient.account;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for searchGalResponse complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="searchGalResponse">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="cn" type="{urn:zmailAccount}contactInfo" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="sortBy" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="offset" type="{http://www.w3.org/2001/XMLSchema}int" />
* <attribute name="more" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* <attribute name="paginationSupported" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* <attribute name="tokenizeKey" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "searchGalResponse", propOrder = {
"cn"
})
public class testSearchGalResponse {
protected List<testContactInfo> cn;
@XmlAttribute(name = "sortBy")
protected String sortBy;
@XmlAttribute(name = "offset")
protected Integer offset;
@XmlAttribute(name = "more")
protected Boolean more;
@XmlAttribute(name = "paginationSupported")
protected Boolean paginationSupported;
@XmlAttribute(name = "tokenizeKey")
protected Boolean tokenizeKey;
/**
* Gets the value of the cn property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the cn property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getCn().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link testContactInfo }
*
*
*/
public List<testContactInfo> getCn() {
if (cn == null) {
cn = new ArrayList<testContactInfo>();
}
return this.cn;
}
/**
* Gets the value of the sortBy property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSortBy() {
return sortBy;
}
/**
* Sets the value of the sortBy property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSortBy(String value) {
this.sortBy = value;
}
/**
* Gets the value of the offset property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getOffset() {
return offset;
}
/**
* Sets the value of the offset property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setOffset(Integer value) {
this.offset = value;
}
/**
* Gets the value of the more property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isMore() {
return more;
}
/**
* Sets the value of the more property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setMore(Boolean value) {
this.more = value;
}
/**
* Gets the value of the paginationSupported property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isPaginationSupported() {
return paginationSupported;
}
/**
* Sets the value of the paginationSupported property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setPaginationSupported(Boolean value) {
this.paginationSupported = value;
}
/**
* Gets the value of the tokenizeKey property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isTokenizeKey() {
return tokenizeKey;
}
/**
* Sets the value of the tokenizeKey property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setTokenizeKey(Boolean value) {
this.tokenizeKey = value;
}
}
| [
"bourgerie.quentin@gmail.com"
] | bourgerie.quentin@gmail.com |
bf32e6d006d64b049d5157237cc7e7bf26700025 | 25587613b4eb203ac093b4b93aefd6c738b2a3d5 | /CommonShared/src/main/java/com/bluebrim/time/shared/CoBetterCalendar.java | b3eb3a0b9662944ca2f8e4e86c8dcc47f7f55017 | [
"Apache-2.0"
] | permissive | goranstack/bluebrim | 80b4f5d2aba0a5cadbda310d673b97ce64d84e6e | eb6edbeada72ed7fd1294391396432cb25575fe0 | refs/heads/master | 2021-05-02T07:39:42.782432 | 2018-06-19T14:30:14 | 2018-06-19T14:30:14 | 35,280,662 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,965 | java | package com.bluebrim.time.shared;
import java.util.*;
/**
* Simple subclass to GregorianCalendar for the purpose of minimizing
* overhead when performing conversion between milliseconds since 1970
* and year, month, day of month. Conversions that for sake of future
* compatability is best handled by GregorianCalendar. (Mostly with
* respect to daylight savings that may change in the future.)
*
* Although this overhead becomes less significant as more suitable
* classes for representing dates is adopted, the excessively
* restrictive API of Calendar is wasteful and has therefore been
* slightly improved.
*
* @author Markus Persson 2000-05-22
*/
public class CoBetterCalendar extends GregorianCalendar {
public CoBetterCalendar() {
super();
}
public CoBetterCalendar(int year, int month, int date) {
super(year, month, date);
}
public CoBetterCalendar(int year, int month, int date, int hour, int minute) {
super(year, month, date, hour, minute);
}
public CoBetterCalendar(int year, int month, int date, int hour, int minute, int second) {
super(year, month, date, hour, minute, second);
}
public CoBetterCalendar(Locale locale) {
super(locale);
}
public CoBetterCalendar(TimeZone zone) {
super(zone);
}
public CoBetterCalendar(TimeZone zone, Locale locale) {
super(zone, locale);
}
/**
* Gets this Calendar's current time as a long.
*
* This method has been made public for reasons described in
* the class comment.
*
* @return the current time as UTC milliseconds from the epoch.
* @author Markus Persson 2000-05-22
*/
public long getTimeInMillis() {
return super.getTimeInMillis();
}
/**
* Sets this Calendar's current time from the given long value.
*
* This method has been made public for reasons described in
* the class comment.
*
* @param date the new time in UTC milliseconds from the epoch.
* @author Markus Persson 2000-05-22
*/
public void setTimeInMillis(long millis) {
super.setTimeInMillis(millis);
}
}
| [
"goran.stack@atg.se"
] | goran.stack@atg.se |
26b63d9fbba882ab5d106d2ee39b120b6addc2ff | c8bf1df473f0a1cf5d4bd58e697570a6803790a6 | /src/main/java/org/exolab/castor/xml/schema/reader/AnnotationUnmarshaller.java | 5d64888a86c3b270ef932c4daec96f6fed2ac905 | [] | no_license | j-white/hacked-castor | 0adbe590c359fa5567856ea89e61541507800d76 | 6cd86a43f892643d15cfb089d34fc25cf49b6a69 | refs/heads/master | 2021-01-20T16:55:33.166799 | 2017-02-24T14:04:16 | 2017-02-24T14:04:16 | 82,838,036 | 0 | 1 | null | 2017-02-23T21:35:39 | 2017-02-22T18:20:40 | Java | UTF-8 | Java | false | false | 6,727 | java | /**
* Redistribution and use of this software and associated documentation
* ("Software"), with or without modification, are permitted provided
* that the following conditions are met:
*
* 1. Redistributions of source code must retain copyright
* statements and notices. Redistributions must also contain a
* copy of this document.
*
* 2. Redistributions in binary form must reproduce the
* above copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. The name "Exolab" must not be used to endorse or promote
* products derived from this Software without prior written
* permission of Intalio, Inc. For written permission,
* please contact info@exolab.org.
*
* 4. Products derived from this Software may not be called "Exolab"
* nor may "Exolab" appear in their names without prior written
* permission of Intalio, Inc. Exolab is a registered
* trademark of Intalio, Inc.
*
* 5. Due credit should be given to the Exolab Project
* (http://www.exolab.org/).
*
* THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Copyright 1999-2002 (C) Intalio, Inc. All Rights Reserved.
*
* $Id$
*/
package org.exolab.castor.xml.schema.reader;
//-- imported classes and packages
import org.exolab.castor.xml.AttributeSet;
import org.exolab.castor.xml.Namespaces;
import org.exolab.castor.xml.XMLException;
import org.exolab.castor.xml.schema.Annotation;
import org.exolab.castor.xml.schema.AppInfo;
import org.exolab.castor.xml.schema.Documentation;
import org.exolab.castor.xml.schema.SchemaNames;
/**
* A class for Unmarshalling Annotations
* @author <a href="mailto:kvisco@intalio.com">Keith Visco</a>
* @version $Revision$ $Date: 2003-03-03 00:05:44 -0700 (Mon, 03 Mar 2003) $
**/
public class AnnotationUnmarshaller extends ComponentReader {
//--------------------/
//- Member Variables -/
//--------------------/
/**
* The current ComponentReader
**/
private ComponentReader unmarshaller;
/**
* The current branch depth
**/
private int depth = 0;
/**
* The Annotation we are constructing
**/
private Annotation _annotation = null;
//----------------/
//- Constructors -/
//----------------/
/**
* Creates a new AnnotationUnmarshaller
* @param atts the AttributeList
**/
public AnnotationUnmarshaller (AttributeSet atts)
throws XMLException
{
super();
_annotation = new Annotation();
if ((atts != null) && (atts.getSize() > 0))
illegalAttribute(atts.getName(0));
} //-- AnnotationUnmarshaller
//-----------/
//- Methods -/
//-----------/
/**
* Returns the name of the element that this ComponentReader
* handles
* @return the name of the element that this ComponentReader
* handles
**/
public String elementName() {
return SchemaNames.ANNOTATION;
} //-- elementName
/**
*
**/
public Annotation getAnnotation() {
return _annotation;
} //-- getAnnotation
/**
* Returns the Object created by this Unmarshaller
* @return the object created by this Unmarshaller
**/
public Object getObject() {
return getAnnotation();
} //-- getObject
/**
* Signals the start of an element with the given name.
*
* @param name the NCName of the element. It is an error
* if the name is a QName (ie. contains a prefix).
* @param namespace the namespace of the element. This may be null.
* Note: A null namespace is not the same as the default namespace unless
* the default namespace is also null.
* @param atts the AttributeSet containing the attributes associated
* with the element.
* @param nsDecls the namespace declarations being declared for this
* element. This may be null.
**/
public void startElement(String name, String namespace, AttributeSet atts,
Namespaces nsDecls)
throws XMLException
{
//-- Do delagation if necessary
if (unmarshaller != null) {
unmarshaller.startElement(name, namespace, atts, nsDecls);
++depth;
return;
}
if (SchemaNames.APPINFO.equals(name)) {
unmarshaller = new AppInfoUnmarshaller(atts);
}
else if (SchemaNames.DOCUMENTATION.equals(name)) {
unmarshaller = new DocumentationUnmarshaller(atts);
}
else illegalElement(name);
} //-- startElement
/**
* Signals to end of the element with the given name.
*
* @param name the NCName of the element. It is an error
* if the name is a QName (ie. contains a prefix).
* @param namespace the namespace of the element.
**/
public void endElement(String name, String namespace)
throws XMLException
{
//-- Do delagation if necessary
if ((unmarshaller != null) && (depth > 0)) {
unmarshaller.endElement(name, namespace);
--depth;
return;
}
//-- have unmarshaller perform any necessary clean up
unmarshaller.finish();
//-- appinfo
if (SchemaNames.APPINFO.equals(name)) {
_annotation.addAppInfo( (AppInfo)unmarshaller.getObject());
}
//-- info
else {
_annotation.addDocumentation( (Documentation)unmarshaller.getObject());
}
unmarshaller = null;
} //-- endElement
public void characters(char[] ch, int start, int length)
throws XMLException
{
//-- Do delagation if necessary
if (unmarshaller != null) {
unmarshaller.characters(ch, start, length);
}
} //-- characters
} //-- ArchetypeUnmarshaller
| [
"jesse@opennms.org"
] | jesse@opennms.org |
eac71c5f0a2c336c8ffe273fc2c897ac391a28a2 | 0dccef976f19741f67479f32f15d76c1e90e7f94 | /ant.java | 34e8ad201f594b72103245beb5e96f4b9d353f26 | [] | no_license | Tominous/LabyMod-1.9 | a960959d67817b1300272d67bd942cd383dfd668 | 33e441754a0030d619358fc20ca545df98d55f71 | refs/heads/master | 2020-05-24T21:35:00.931507 | 2017-02-06T21:04:08 | 2017-02-06T21:04:08 | 187,478,724 | 1 | 0 | null | 2019-05-19T13:14:46 | 2019-05-19T13:14:46 | null | UTF-8 | Java | false | false | 3,263 | java | public class ant
extends ajp
{
public static final arp<ajp.b> d = arp.a("shape", ajp.b.class);
protected ant()
{
super(false);
w(this.A.b().a(d, ajp.b.a));
}
protected void b(aht โ, cj โ, arc โ, ajt โ)
{
if ((โ.u().m()) &&
(new ajp.a(this, โ, โ, โ).b() == 3)) {
a(โ, โ, โ, false);
}
}
public arr<ajp.b> g()
{
return d;
}
public arc a(int โ)
{
return u().a(d, ajp.b.a(โ));
}
public int e(arc โ)
{
return ((ajp.b)โ.c(d)).a();
}
public arc a(arc โ, aoe โ)
{
switch (ant.1.b[โ.ordinal()])
{
case 1:
switch (ant.1.a[((ajp.b)โ.c(d)).ordinal()])
{
case 1:
return โ.a(d, ajp.b.d);
case 2:
return โ.a(d, ajp.b.c);
case 3:
return โ.a(d, ajp.b.f);
case 4:
return โ.a(d, ajp.b.e);
case 5:
return โ.a(d, ajp.b.i);
case 6:
return โ.a(d, ajp.b.j);
case 7:
return โ.a(d, ajp.b.g);
case 8:
return โ.a(d, ajp.b.h);
}
case 2:
switch (ant.1.a[((ajp.b)โ.c(d)).ordinal()])
{
case 9:
return โ.a(d, ajp.b.b);
case 10:
return โ.a(d, ajp.b.a);
case 1:
return โ.a(d, ajp.b.e);
case 2:
return โ.a(d, ajp.b.f);
case 3:
return โ.a(d, ajp.b.d);
case 4:
return โ.a(d, ajp.b.c);
case 5:
return โ.a(d, ajp.b.j);
case 6:
return โ.a(d, ajp.b.g);
case 7:
return โ.a(d, ajp.b.h);
case 8:
return โ.a(d, ajp.b.i);
}
case 3:
switch (ant.1.a[((ajp.b)โ.c(d)).ordinal()])
{
case 9:
return โ.a(d, ajp.b.b);
case 10:
return โ.a(d, ajp.b.a);
case 1:
return โ.a(d, ajp.b.f);
case 2:
return โ.a(d, ajp.b.e);
case 3:
return โ.a(d, ajp.b.c);
case 4:
return โ.a(d, ajp.b.d);
case 5:
return โ.a(d, ajp.b.h);
case 6:
return โ.a(d, ajp.b.i);
case 7:
return โ.a(d, ajp.b.j);
case 8:
return โ.a(d, ajp.b.g);
}
break;
}
return โ;
}
public arc a(arc โ, amr โ)
{
ajp.b โ = (ajp.b)โ.c(d);
switch (ant.1.c[โ.ordinal()])
{
case 1:
switch (ant.1.a[โ.ordinal()])
{
case 3:
return โ.a(d, ajp.b.f);
case 4:
return โ.a(d, ajp.b.e);
case 5:
return โ.a(d, ajp.b.j);
case 6:
return โ.a(d, ajp.b.i);
case 7:
return โ.a(d, ajp.b.h);
case 8:
return โ.a(d, ajp.b.g);
}
break;
case 2:
switch (ant.1.a[โ.ordinal()])
{
case 1:
return โ.a(d, ajp.b.d);
case 2:
return โ.a(d, ajp.b.c);
case 5:
return โ.a(d, ajp.b.h);
case 6:
return โ.a(d, ajp.b.g);
case 7:
return โ.a(d, ajp.b.j);
case 8:
return โ.a(d, ajp.b.i);
}
break;
}
return super.a(โ, โ);
}
protected ard b()
{
return new ard(this, new arr[] { d });
}
}
| [
"admin@timo.de.vc"
] | admin@timo.de.vc |
1d1ef1dfc6ee5b69eb8adbcfa3fbf7855b63b117 | f7b61e0c874cb6f88c98f75001f78f55fca326e5 | /EclipseWorkspace/13 Spring Basics/src/main/java/com/slk/training/programs/Main.java | 6b28349f4ee4d471ca3e32959741a2b1dccd115e | [] | no_license | kayartaya-vinod/2018_12_SLK_BOOTCAMP | d37d12666c856add8ec4170031ac78cf874b6279 | 2968cc4df66d95cf9e6a3bde6c12fb2c974f556c | refs/heads/master | 2020-04-11T21:26:37.988127 | 2019-02-06T04:57:58 | 2019-02-06T04:57:58 | 162,105,751 | 0 | 17 | null | null | null | null | UTF-8 | Java | false | false | 6,973 | java | package com.slk.training.programs;
import java.util.List;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import com.slk.training.cfg.AppConfig5;
import com.slk.training.dao.DaoException;
import com.slk.training.dao.ProductDao;
import com.slk.training.entity.Product;
import com.slk.training.utils.KeyboardUtil;
public class Main {
ProductDao dao;
AnnotationConfigApplicationContext ctx;
public Main() {
ctx = new AnnotationConfigApplicationContext(AppConfig5.class);
dao = ctx.getBean("productDaoJdbcTemplateImpl", ProductDao.class);
}
public void start() {
int choice;
while ((choice = menu()) != 0) {
switch (choice) {
case 1:
listAllProducts();
break;
case 2:
listProductsByCategory();
break;
case 3:
listProductsByPriceRange();
break;
case 4:
displayProductById();
break;
case 5:
addNewProduct();
break;
case 6:
updateProduct();
break;
case 7:
searchAndDeleteProduct();
default:
System.out.println("Please enter a number between 1 and 7 or 0 to quit!");
}
}
ctx.close();
}
private void searchAndDeleteProduct() {
System.out.println("----------------------------------------------------------------------------");
try {
int id = KeyboardUtil.getInt("Enter id to search: ");
Product p = dao.getProduct(id);
if (p == null) {
System.out.println("No product found for id " + id);
System.out.println("----------------------------------------------------------------------------");
return;
}
System.out.println("Name : " + p.getName());
System.out.println("Category : " + p.getName());
System.out.println("Price : Rs." + p.getName());
System.out.println("----------------------------------------------------------------------------");
String confirm = KeyboardUtil.getString("Are you sure you want to delete this? (yes/no) : (no) ");
if (confirm.equalsIgnoreCase("yes")) {
dao.deleteProduct(id);
System.out.println("Product deleted successfully!");
}
} catch (DaoException e) {
System.out.println("There was an error: " + e);
}
}
private void updateProduct() {
System.out.println("----------------------------------------------------------------------------");
try {
int id = KeyboardUtil.getInt("Enter id to search: ");
Product p = dao.getProduct(id);
if (p == null) {
System.out.println("No product found for id " + id);
System.out.println("----------------------------------------------------------------------------");
return;
}
String input;
input = KeyboardUtil.getString("Name : [" + p.getName() + "] ");
if (input.trim().length() != 0) {
p.setName(input);
}
input = KeyboardUtil.getString("Category : [" + p.getCategory() + "] ");
if (input.trim().length() != 0) {
p.setCategory(input);
}
input = KeyboardUtil.getString("Price : [" + p.getPrice() + "] ");
if (input.trim().length() != 0) {
p.setPrice(Double.parseDouble(input));
}
dao.updateProduct(p);
System.out.println("Product details updated successfully!");
} catch (DaoException e) {
System.out.println("There was an error: " + e);
}
}
private void addNewProduct() {
System.out.println("----------------------------------------------------------------------------");
try {
int id = KeyboardUtil.getInt("Id : ");
String name = KeyboardUtil.getString("Name : ");
String category = KeyboardUtil.getString("Category : ");
double price = KeyboardUtil.getDouble("Price : ");
Product p = new Product(id, name, category, price);
dao.addProduct(p);
System.out.println("Product details added successfull!");
} catch (DaoException e) {
System.out.println("There was an error: " + e);
}
System.out.println("----------------------------------------------------------------------------");
}
private void displayProductById() {
System.out.println("----------------------------------------------------------------------------");
try {
int id = KeyboardUtil.getInt("Enter id to search: ");
Product p = dao.getProduct(id);
if (p == null) {
System.out.println("No product found for id " + id);
System.out.println("----------------------------------------------------------------------------");
return;
}
System.out.println("Name : " + p.getName());
System.out.println("Category : " + p.getCategory());
System.out.println("Price : Rs." + p.getPrice());
System.out.println("----------------------------------------------------------------------------");
} catch (DaoException e) {
System.out.println("There was an error: " + e);
}
}
private void listProductsByPriceRange() {
try {
double min = KeyboardUtil.getDouble("Enter min price: ");
double max = KeyboardUtil.getDouble("Enter max price: ");
List<Product> list = dao.getProductsByPriceRange(min, max);
displayProductList(list);
} catch (DaoException e) {
System.out.println("There was an error: " + e);
}
}
private void listProductsByCategory() {
try {
String category = KeyboardUtil.getString("Enter a category: ");
List<Product> list = dao.getProductsByCategory(category);
displayProductList(list);
} catch (DaoException e) {
System.out.println("There was an error: " + e);
}
}
private void listAllProducts() {
try {
List<Product> list = dao.getAllProducts();
displayProductList(list);
} catch (DaoException e) {
System.out.println("There was an error: " + e);
}
}
private void displayProductList(List<Product> list) {
System.out.println("----------------------------------------------------------------------------");
if (list.size() == 0) {
System.out.println("No products to display!");
System.out.println("----------------------------------------------------------------------------");
return;
}
System.out.printf("%-3s %-30s %-30s %10s\n", "Id", "Name", "Category", "Price");
System.out.println("----------------------------------------------------------------------------");
for (Product p : list) {
System.out.printf("%-3d %-30s %-30s %10.2f\n", p.getId(), p.getName(), p.getCategory(), p.getPrice());
}
System.out.println("----------------------------------------------------------------------------");
}
private int menu() {
System.out.println("1. List all products");
System.out.println("2. List products by category");
System.out.println("3. List products by price range");
System.out.println("4. Display product by id");
System.out.println("5. Add a new product");
System.out.println("6. Update a product");
System.out.println("7. Search and delete a product");
try {
return KeyboardUtil.getInt("Enter your choice (0 to exit): ");
} catch (Exception e) {
System.out.println("Invalid choice. Please enter a number!");
}
return -1;
}
public static void main(String[] args) {
new Main().start();
}
}
| [
"kayartaya.vinod@gmail.com"
] | kayartaya.vinod@gmail.com |
0aab1ef3785153aebaa9b23394c09940169ade1f | 7a21ff93edba001bef328a1e927699104bc046e5 | /project-parent/module-parent/api-module-parent/revenue-api/src/main/java/com/dotop/smartwater/project/module/api/revenue/impl/EverydayWaterRecordFactoryImpl.java | 5211a770065f9db88bf585ca94169e42d05dd7c4 | [] | no_license | 150719873/zhdt | 6ea1ca94b83e6db2012080f53060d4abaeaf12f5 | c755dacdd76b71fd14aba5e475a5862a8d92c1f6 | refs/heads/master | 2022-12-16T06:59:28.373153 | 2020-09-14T06:57:16 | 2020-09-14T06:57:16 | 299,157,259 | 1 | 0 | null | 2020-09-28T01:45:10 | 2020-09-28T01:45:10 | null | UTF-8 | Java | false | false | 6,122 | java | package com.dotop.smartwater.project.module.api.revenue.impl;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.dotop.smartwater.dependence.core.exception.FrameworkRuntimeException;
import com.dotop.smartwater.project.module.api.revenue.IEverydayWaterRecordFactory;
import com.dotop.smartwater.project.module.core.auth.local.AuthCasClient;
import com.dotop.smartwater.project.module.core.auth.vo.AreaNodeVo;
import com.dotop.smartwater.project.module.core.auth.vo.UserVo;
import com.dotop.smartwater.project.module.core.water.bo.EverydayWaterRecordBo;
import com.dotop.smartwater.project.module.core.water.form.EverydayWaterRecordForm;
import com.dotop.smartwater.project.module.core.water.vo.customize.CommunityDeviceCountVo;
import com.dotop.smartwater.project.module.core.water.vo.customize.CommunityOwnpayVo;
import com.dotop.smartwater.project.module.core.water.vo.customize.CommunityWaterVo;
import com.dotop.smartwater.project.module.core.water.vo.customize.StatisticsVo;
import com.dotop.smartwater.project.module.service.revenue.IEverydayWaterRecordService;
import com.dotop.water.tool.service.BaseInf;
/**
* ๆฏๆฅ็จๆฐด้
*
* @date 2019/2/26.
*/
@Component
public class EverydayWaterRecordFactoryImpl implements IEverydayWaterRecordFactory {
@Autowired
private IEverydayWaterRecordService iEverydayWaterRecordService;
@Override
public List<CommunityWaterVo> getWaterByMonth() {
UserVo user = AuthCasClient.getUser();
Map<String, AreaNodeVo> map = BaseInf.getAreaMaps(user.getUserid(), user.getTicket());
if (map.isEmpty()) {
return Collections.emptyList();
}
StringBuilder ids = new StringBuilder();
for (String key : map.keySet()) {
ids.append(key).append(",");
}
String str = ids.toString();
str = str.substring(0, str.length() - 1);
return iEverydayWaterRecordService.getWaterByMonth(user.getEnterpriseid(), str);
}
public List<StatisticsVo> getDeviceModes() {
UserVo user = AuthCasClient.getUser();
List<StatisticsVo> list = iEverydayWaterRecordService.getDeviceModes(user.getEnterpriseid());
if (list != null && list.size() > 0) {
for (StatisticsVo vo : list) {
if (StringUtils.isEmpty(vo.getName())) {
vo.setName("ไผ ็ป่กจ");
}
}
}
return list;
}
public List<StatisticsVo> getDeviceWarns() {
UserVo user = AuthCasClient.getUser();
return iEverydayWaterRecordService.getDeviceWarns(user.getEnterpriseid());
}
public List<StatisticsVo> getDeviceModels() {
UserVo user = AuthCasClient.getUser();
return iEverydayWaterRecordService.getDeviceModels(user.getEnterpriseid());
}
public List<StatisticsVo> getDevicePurposes() {
UserVo user = AuthCasClient.getUser();
return iEverydayWaterRecordService.getDevicePurposes(user.getEnterpriseid());
}
@Override
public List<CommunityDeviceCountVo> getDeviceCount() {
UserVo user = AuthCasClient.getUser();
Map<String, AreaNodeVo> map = BaseInf.getAreaMaps(user.getUserid(), user.getTicket());
if (map == null || map.size() == 0) {
return Collections.emptyList();
}
List<CommunityDeviceCountVo> list = iEverydayWaterRecordService.getDeviceCount(user.getEnterpriseid());
if (list.isEmpty()) {
return Collections.emptyList();
}
List<CommunityDeviceCountVo> list2 = new ArrayList<>();
for (CommunityDeviceCountVo cd : list) {
// 0ไธๆพ็คบ
// ๆพไธๅฐ่ฏดๆๆฒกๆๆ้
AreaNodeVo areaNode = map.get(String.valueOf(cd.getCommunityid()));
if (0 == cd.getCount() || areaNode == null) {
continue;
}
cd.setName(areaNode.getTitle());
list2.add(cd);
}
return list2;
}
@Override
public Map<String, Object> getCommunityOwnpay() {
UserVo user = AuthCasClient.getUser();
Map<String, Object> map = new HashMap<>(16);
final String OWNPAY_MONTH_STR = "ownpayMonthList";
// ๅฝๆๆฌ ่ดนๅ่กจๆฐๆฎ
List<CommunityOwnpayVo> list = iEverydayWaterRecordService.getCommunityOwnpay(user.getEnterpriseid());
if (list.isEmpty()) {
map.put(OWNPAY_MONTH_STR, list);
return map;
}
Map<String, AreaNodeVo> areaMap = BaseInf.getAreaMaps(String.valueOf(user.getUserid()), user.getTicket());
if (areaMap.isEmpty()) {
map.put(OWNPAY_MONTH_STR, list);
return map;
}
List<CommunityOwnpayVo> list2 = new ArrayList<>();
for (CommunityOwnpayVo cd : list) {
// ๆพไธๅฐ่ฏดๆๆฒกๆๆ้
AreaNodeVo areaNode = areaMap.get(String.valueOf(cd.getCommunityid()));
if (areaNode == null) {
continue;
}
cd.setCommunityname(areaNode.getTitle());
list2.add(cd);
}
map.put(OWNPAY_MONTH_STR, list2);
return map;
}
@Override
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = FrameworkRuntimeException.class)
public int insert(EverydayWaterRecordForm everydayWaterRecordForm) {
UserVo user = AuthCasClient.getUser();
String userBy = user.getAccount();
Date curr = new Date();
// ไธๅก้ป่พ
EverydayWaterRecordBo everydayWaterRecordBo = new EverydayWaterRecordBo();
BeanUtils.copyProperties(everydayWaterRecordForm, everydayWaterRecordBo);
everydayWaterRecordBo.setEnterpriseid(user.getEnterpriseid());
everydayWaterRecordBo.setUserBy(userBy);
everydayWaterRecordBo.setCurr(curr);
return iEverydayWaterRecordService.insert(everydayWaterRecordBo);
}
@Override
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = FrameworkRuntimeException.class)
public int addEveryDayWaterRecord() {
return iEverydayWaterRecordService.addEveryDayWaterRecord();
}
@Override
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = FrameworkRuntimeException.class)
public int updateEveryDayWaterRecord() {
return iEverydayWaterRecordService.updateEveryDayWaterRecord();
}
}
| [
"2216502193@qq.com"
] | 2216502193@qq.com |
a5df3e132738e8839521df02c5d5786374b0c64c | e59b853b28a02d4417296064ba6b7594bb2decb0 | /src/test/java/com/liujun/search/element/download/charsetFlow/TestHtmlCharsetFlow.java | 3450955eb4c471ce467a2e9c34f7fe7d7e1155fe | [] | no_license | miloluojia/searchEngine | b68c61177e10f9a20bda2a1c7a97a57d37096f43 | a8b3efa5ec9a2fa3b917ffe499b497c66b49eefa | refs/heads/master | 2023-04-22T05:56:24.891316 | 2021-12-24T05:59:55 | 2021-12-24T05:59:55 | 265,804,839 | 0 | 0 | null | 2020-05-21T09:14:55 | 2020-05-21T09:14:54 | null | UTF-8 | Java | false | false | 1,475 | java | package com.liujun.search.element.download.charsetFlow;
import com.liujun.search.utilscode.element.html.HtmlReaderUtils;
import org.apache.commons.io.FileUtils;
import org.apache.http.entity.ContentType;
import org.junit.Assert;
import org.junit.Test;
import java.io.File;
/**
* @author liujun
* @version 0.0.1
* @date 2019/04/30
*/
public class TestHtmlCharsetFlow {
@Test
public void testHtmlCode() throws Exception {
getHtmlCode(HtmlReaderUtils.GetErrorFile("html_error_16.html"));
getHtmlCode(HtmlReaderUtils.GetErrorFile("html_error_17.html"));
getHtmlCode(HtmlReaderUtils.GetErrorFile("html_error_18.html"));
getHtmlCode(HtmlReaderUtils.GetErrorFile("html_error_20.html"));
getHtmlCode(HtmlReaderUtils.GetErrorFile("html_error_21.html"));
}
public void getHtmlCode(File file) throws Exception {
System.out.println("file:" + file.getName());
byte[] bytes = FileUtils.readFileToByteArray(file);
String context = HtmlCharsetFlow.INSTANCE.htmlCharsetValue(bytes, null);
Assert.assertNotEquals(context, null);
}
@Test
public void failFile() throws Exception {
System.out.println(ContentType.DEFAULT_TEXT);
File file = HtmlReaderUtils.GetErrorFile("html_error_19.html");
System.out.println("file:" + file.getName());
byte[] bytes = FileUtils.readFileToByteArray(file);
String context = HtmlCharsetFlow.INSTANCE.htmlCharsetValue(bytes, null);
Assert.assertEquals(context, null);
}
}
| [
"422134235@qq.com"
] | 422134235@qq.com |
6e4eec68baf07cc6277bf232abbfa36b6f8f6258 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/29/29_f541208b6da700768342d9346d420263493f94a1/PasswordReader/29_f541208b6da700768342d9346d420263493f94a1_PasswordReader_s.java | 63d3304962bcae7458d61543f81cbfeee1be6c55 | [] | 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 | 4,667 | java | /*
* $Id: PasswordReader.java,v 1.1 2006/10/24 09:24:19 vtschopp Exp $
*
* Created on Aug 3, 2006 by tschopp
*
* Copyright (c) Members of the EGEE Collaboration. 2004.
* See http://eu-egee.org/partners/ for details on the copyright holders.
* For license conditions see the license file or http://eu-egee.org/license.html
*/
package org.glite.slcs.util;
import java.io.IOException;
import java.io.InputStream;
import java.io.PushbackInputStream;
import java.util.Arrays;
/**
* PasswordReader reads a password and masks the typed inputs.
*
* See article: Password Masking in the Java Programming Language
* http://java.sun.com/developer/technicalArticles/Security/pwordmask/
*
* Usage:
*
* <pre>
* char[] password= PasswordReader.getPassword(System.in, "Password: ");
* </pre>
*
* @author Valery Tschopp <tschopp@switch.ch>
* @version $Revision: 1.1 $
*/
public class PasswordReader implements Runnable {
/**
*
* @param in
* @param prompt
* @return
* @throws IOException
*/
public static final char[] getPassword(InputStream in, String prompt)
throws IOException {
PasswordReader maskingThread= new PasswordReader(prompt);
maskingThread.setEchoChar(' ');
Thread thread= new Thread(maskingThread);
thread.start();
char[] lineBuffer;
char[] buf;
buf= lineBuffer= new char[128];
int room= buf.length;
int offset= 0;
int c;
loop: while (true) {
switch (c= in.read()) {
case -1:
case '\n':
break loop;
case '\r':
int c2= in.read();
if ((c2 != '\n') && (c2 != -1)) {
if (!(in instanceof PushbackInputStream)) {
in= new PushbackInputStream(in);
}
((PushbackInputStream) in).unread(c2);
}
else {
break loop;
}
default:
if (--room < 0) {
buf= new char[offset + 128];
room= buf.length - offset - 1;
System.arraycopy(lineBuffer, 0, buf, 0, offset);
Arrays.fill(lineBuffer, ' ');
lineBuffer= buf;
}
buf[offset++]= (char) c;
break;
}
}
maskingThread.stopMasking();
if (offset == 0) {
return null;
}
char[] ret= new char[offset];
System.arraycopy(buf, 0, ret, 0, offset);
Arrays.fill(buf, ' ');
return ret;
}
private volatile boolean masking;
private char echochar= '*';
/**
* @param prompt
* The prompt displayed to the user
*/
private PasswordReader(String prompt) {
System.out.print(prompt);
System.out.flush();
}
/**
* Begin masking until asked to stop.
*/
public void run() {
int priority= Thread.currentThread().getPriority();
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
try {
masking= true;
while (masking) {
System.out.print("\010" + echochar);
try {
// attempt masking at this rate
Thread.sleep(1);
} catch (InterruptedException iex) {
Thread.currentThread().interrupt();
return;
}
}
} finally { // restore the original priority
Thread.currentThread().setPriority(priority);
}
}
/**
* Instruct the thread to stop masking.
*/
private void stopMasking() {
this.masking= false;
}
/**
* Sets the char to replace input
*/
private void setEchoChar(char c) {
this.echochar= c;
}
/**
* Test drive
*
* @param args
*/
public static void main(String[] args) {
try {
char[] password= PasswordReader.getPassword(System.in, "Password: ");
if (password != null) {
System.out.println("Password entered: "
+ String.valueOf(password));
}
else {
System.out.println("Empty password entered.");
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
0bf0ecdec468da83242f25612d2477f5fb124936 | 131f183263b7c208aaf31c93172151e6d18c4caf | /src/main/java/com/liang/lagou/springboot/AppConfig.java | 529310841be5fd1e9bc06da8045845e13a50d82a | [] | no_license | liangliangmax/liang-lagou-springboot | d7a43003f636c28c0734d1ce240ec5ba6a4ac311 | 56d259bf326d089c90c357cfa2626447590d000a | refs/heads/master | 2023-07-08T17:52:49.992437 | 2021-08-10T00:56:44 | 2021-08-10T00:56:44 | 394,482,216 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 184 | java | package com.liang.lagou.springboot;
import org.springframework.context.annotation.ComponentScan;
@ComponentScan(basePackages = {"com.liang.lagou.demo"})
public class AppConfig {
}
| [
"32696645+max-translia@users.noreply.github.com"
] | 32696645+max-translia@users.noreply.github.com |
c13d8948df657008f286eaf34c3560ed36f2d85f | 104ace4eca68e903d5b5a21e7d4831c9342d9f6a | /nswitch-federica/src/test/java/eu/novi/nswitch/federica/NswitchFedericaDefedrateTest.java | a6cd9802c043323f14892594179f5b05e7ccb1af | [] | no_license | vitorsfarias/novi-public | 136c8822acaf1c34c42cdc07090fa3c41ad4113c | 0932550a42ba1ca634225ccb3a4748336e69e022 | refs/heads/master | 2020-04-06T04:40:51.874424 | 2013-04-04T17:33:56 | 2013-04-04T17:33:56 | 68,409,912 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,478 | java | package eu.novi.nswitch.federica;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import org.junit.Test;
import com.jcraft.jsch.JSchException;
import eu.novi.connection.SSHConnection;
import eu.novi.nswitch.exceptions.IncorrectTopologyException;
public class NswitchFedericaDefedrateTest {
@Test
public void shouldThrowExceptionWhenNodeIpIsNull(){
//given
NswitchFederica nswitch = new NswitchFederica();
boolean isNull = false;
// when
try {
nswitch.defederate(null, "x", "x", "x", "x", "x");
} catch (IncorrectTopologyException e) {
isNull = true;
} catch (Exception e){
e.printStackTrace();
}
//then
finally{
assertTrue("nswitch-federica doesn't throw exception when nodeIp is null", isNull);
}
}
@Test
public void shouldThrowExceptionWhenNodeIpIsEmpty(){
//given
NswitchFederica nswitch = new NswitchFederica();
boolean isNull = false;
// when
try {
nswitch.defederate("", "x", "x", "x", "x", "x");
} catch (IncorrectTopologyException e) {
isNull = true;
} catch (Exception e){
e.printStackTrace();
}
//then
finally{
assertTrue("nswitch-federica doesn't throw exception when nodeIp is empty", isNull);
}
}
@Test
public void shouldThrowExceptionWhenSliceIdIsNull(){
//given
NswitchFederica nswitch = new NswitchFederica();
boolean isNull = false;
// when
try {
nswitch.defederate("x", null, "x", "x", "x", "x");
} catch (IncorrectTopologyException e) {
isNull = true;
} catch (Exception e){
e.printStackTrace();
}
//then
finally{
assertTrue("nswitch-federica doesn't throw exception when sliceId is null", isNull);
}
}
@Test
public void shouldThrowExceptionWhenSliceIdIsEmpty(){
//given
NswitchFederica nswitch = new NswitchFederica();
boolean isNull = false;
// when
try {
nswitch.defederate("x", "", "x", "x", "x", "x");
} catch (IncorrectTopologyException e) {
isNull = true;
} catch (Exception e){
e.printStackTrace();
}
//then
finally{
assertTrue("nswitch-federica doesn't throw exception when sliceId is empty", isNull);
}
}
@Test
public void shouldThrowExceptionWhenVlanIdIsNull(){
//given
NswitchFederica nswitch = new NswitchFederica();
boolean isNull = false;
// when
try {
nswitch.defederate("x", "x", null, "x", "x", "x");
} catch (IncorrectTopologyException e) {
isNull = true;
} catch (Exception e){
e.printStackTrace();
}
//then
finally{
assertTrue("nswitch-federica doesn't throw exception when vlanId is null", isNull);
}
}
@Test
public void shouldThrowExceptionWhenVlanIdIsEmpty(){
//given
NswitchFederica nswitch = new NswitchFederica();
boolean isNull = false;
// when
try {
nswitch.defederate("x", "x", "", "x", "x", "x");
} catch (IncorrectTopologyException e) {
isNull = true;
} catch (Exception e){
e.printStackTrace();
}
//then
finally{
assertTrue("nswitch-federica doesn't throw exception when vlanId is empty", isNull);
}
}
@Test
public void shouldThrowExceptionWhenSliceNameIsNull(){
//given
NswitchFederica nswitch = new NswitchFederica();
boolean isNull = false;
// when
try {
nswitch.defederate("x", "x", "x", null, "x", "x");
} catch (IncorrectTopologyException e) {
isNull = true;
} catch (Exception e){
e.printStackTrace();
}
//then
finally{
assertTrue("nswitch-federica doesn't throw exception when sliceName is empty", isNull);
}
}
@Test
public void shouldThrowExceptionWhenSliceNameIsEmpty(){
//given
NswitchFederica nswitch = new NswitchFederica();
boolean isNull = false;
// when
try {
nswitch.defederate("x", "x", "x", "", "x", "x");
} catch (IncorrectTopologyException e) {
isNull = true;
} catch (Exception e){
e.printStackTrace();
}
//then
finally{
assertTrue("nswitch-federica doesn't throw exception when sliceName is null", isNull);
}
}
@Test
public void shouldThrowExceptionWhenPrivateIpIsNull(){
//given
NswitchFederica nswitch = new NswitchFederica();
boolean isNull = false;
// when
try {
nswitch.defederate("x", "x", "x", "x", null, "x");
} catch (IncorrectTopologyException e) {
isNull = true;
} catch (Exception e){
e.printStackTrace();
}
//then
finally{
assertTrue("nswitch-federica doesn't throw exception when privateIp is empty", isNull);
}
}
@Test
public void shouldThrowExceptionWhenPrivateIpIsEmpty(){
//given
NswitchFederica nswitch = new NswitchFederica();
boolean isNull = false;
// when
try {
nswitch.defederate("x", "x", "x", "x", "", "x");
} catch (IncorrectTopologyException e) {
isNull = true;
} catch (Exception e){
e.printStackTrace();
}
//then
finally{
assertTrue("nswitch-federica doesn't throw exception when privateIp is null", isNull);
}
}
@Test
public void shouldThrowExceptionWhenNetmaskIsNull(){
//given
NswitchFederica nswitch = new NswitchFederica();
boolean isNull = false;
// when
try {
nswitch.defederate("x", "x", "x", "x", "x", null);
} catch (IncorrectTopologyException e) {
isNull = true;
} catch (Exception e){
e.printStackTrace();
}
//then
finally{
assertTrue("nswitch-federica doesn't throw exception when netmask is null", isNull);
}
}
@Test
public void shouldThrowExceptionWhenNetmaskIsEmpty(){
//given
NswitchFederica nswitch = new NswitchFederica();
boolean isNull = false;
// when
try {
nswitch.defederate("x", "x", "x", "x", "x", "");
} catch (IncorrectTopologyException e) {
isNull = true;
} catch (Exception e){
e.printStackTrace();
}
//then
finally{
assertTrue("nswitch-federica doesn't throw exception when netmask is empty", isNull);
}
}
@Test
public void shouldNotThrowExceptionWhenTryToMakeSSHConnection(){
//given
NswitchFederica nswitch = new NswitchFederica();
SSHConnection ssh = mock(SSHConnection.class);
nswitch.setSsh(ssh);
when(ssh.connected()).thenReturn(false);
boolean error = false;
// when
try {
nswitch.defederate("x", "x", "x", "x", "x", "x");
} catch (JSchException e){
error = true;
} catch (Exception e){
}
//then
finally{
assertFalse("nswitch-federica throws exception when try to connect via ssh", error);
} }
}
| [
"pikusa@man.poznan.pl"
] | pikusa@man.poznan.pl |
a9219ac871f716d9c94b595e76e3a0c141a6a984 | 313fde4adb3d77bb35c873bbfeecb3dce39a553b | /app/src/main/java/com/qgyyzs/globalcosmetics/http/Api/ProductLibarayApi.java | a369a7b418e27682ec573bac57fc5bbaeaeb4541 | [] | no_license | wangbo666/hzp | b41d37b63a90b7f83bb560b42dea8506619ce44a | ce75f47e36946c57d0ffd0a884f834e62be8bc15 | refs/heads/master | 2021-03-12T04:53:19.598350 | 2020-03-13T08:16:49 | 2020-03-13T08:16:49 | 246,590,994 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 485 | java | package com.qgyyzs.globalcosmetics.http.Api;
import com.qgyyzs.globalcosmetics.http.retrofit.HttpResponse;
import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
/**
* Created by Administrator on 2017/12/15 0015.
*/
public interface ProductLibarayApi {
@FormUrlEncoded
@POST("product/get_product_list")
Observable<HttpResponse> getProductList(@Field("jsonstr") String parm);
}
| [
"1052291325@qq.com"
] | 1052291325@qq.com |
53182bd070edc146e4864cb018b62bea729c1474 | 7daed08104deba2161d28b6e6ff29030f4c61dad | /gateway/src/main/java/com/okta/developer/gateway/config/FeignConfiguration.java | f2438b5a75b0dcbc37b1ecca9576cd09b566f066 | [] | no_license | mraible/jhipster-ms-oidc-improved | 836eacf5b41e3cf9cb6b1ba233e7c197cb72637a | 8d7eeb239b1801bc85cc89ba4cfa4169281dab98 | refs/heads/master | 2021-07-05T14:26:26.529620 | 2019-03-10T00:47:45 | 2019-03-10T00:47:45 | 172,806,559 | 0 | 0 | null | 2020-09-13T08:13:25 | 2019-02-26T23:23:25 | Java | UTF-8 | Java | false | false | 524 | java | package com.okta.developer.gateway.config;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@EnableFeignClients(basePackages = "com.okta.developer.gateway")
public class FeignConfiguration {
/**
* Set the Feign specific log level to log client REST requests.
*/
@Bean
feign.Logger.Level feignLoggerLevel() {
return feign.Logger.Level.BASIC;
}
}
| [
"matt.raible@okta.com"
] | matt.raible@okta.com |
192ce1dbf8595b6fec47b6c130433b332b0a8dfe | e7cb38a15026d156a11e4cf0ea61bed00b837abe | /groundwork-gw-vijava/vijava/src/main/java/com/doublecloud/vim25/HostPlugStoreTopologyPlugin.java | 53aaa72c9f0e441a5b86d477eb80ab1d6cba0c72 | [
"BSD-3-Clause"
] | permissive | wang-shun/groundwork-trunk | 5e0ce72c739fc07f634aeefc8f4beb1c89f128af | ea1ca766fd690e75c3ee1ebe0ec17411bc651a76 | refs/heads/master | 2020-04-01T08:50:03.249587 | 2018-08-20T21:21:57 | 2018-08-20T21:21:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,470 | java | /*================================================================================
Copyright (c) 2013 Steve Jin. 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 names of copyright holders 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 COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
================================================================================*/
package com.doublecloud.vim25;
/**
* @author Steve Jin (http://www.doublecloud.org)
* @version 5.1
*/
@SuppressWarnings("all")
public class HostPlugStoreTopologyPlugin extends DynamicData {
public String key;
public String name;
public String[] device;
public String[] claimedPath;
public String getKey() {
return this.key;
}
public String getName() {
return this.name;
}
public String[] getDevice() {
return this.device;
}
public String[] getClaimedPath() {
return this.claimedPath;
}
public void setKey(String key) {
this.key=key;
}
public void setName(String name) {
this.name=name;
}
public void setDevice(String[] device) {
this.device=device;
}
public void setClaimedPath(String[] claimedPath) {
this.claimedPath=claimedPath;
}
} | [
"gibaless@gmail.com"
] | gibaless@gmail.com |
8fbf37c99f829659bfadddd8fb922494364a7bea | 784ae808ea202f4c917a0878ddc0a8600d4a8b00 | /Week5/hibernate-demo-wezley/src/main/java/com/revature/models/InstructorDetail.java | 0232266aed6d136beaba52370c8b7db067706c52 | [] | no_license | jurczakn/1811Java-Nick | 6a33e4418d80707a82f77942bc9131264a5bbb09 | 5712117a0720b7b56611c5c7574d12a93fe06f81 | refs/heads/master | 2020-04-04T11:48:24.595512 | 2019-01-07T21:33:19 | 2019-01-07T21:33:19 | 155,904,091 | 0 | 0 | null | 2018-12-19T20:08:58 | 2018-11-02T18:05:16 | Java | UTF-8 | Java | false | false | 2,064 | java | package com.revature.models;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@Entity
@Table(name="INSTRUCTOR_DETAILS")
@SequenceGenerator(name="instruct_detail_seq", sequenceName="instructor_detail_seq", allocationSize=1)
public class InstructorDetail {
@Id
@Column(name="id")
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="instruct_detail_seq")
private int id;
@Column(name="focus")
private String focus;
@Column(name="hobby")
private String hobby;
/*
* Including a one-to-one mapping here establishes a bi-directional relationship to our Instructor class.
*
* "mappedBy" tells Hibernate:
* - look at the instructorDetail property in the Instructor class
* - use that information from Instructor class @JoinColumn to help find the associated instructor
*/
@OneToOne(mappedBy="instructorDetail", cascade=CascadeType.ALL)
private Instructor instructor;
public InstructorDetail() { }
public InstructorDetail(String focus, String hobby) {
super();
this.focus = focus;
this.hobby = hobby;
}
public InstructorDetail(int id, String focus, String hobby) {
super();
this.id = id;
this.focus = focus;
this.hobby = hobby;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getFocus() {
return focus;
}
public void setFocus(String focus) {
this.focus = focus;
}
public String getHobby() {
return hobby;
}
public void setHobby(String hobby) {
this.hobby = hobby;
}
public Instructor getInstructor() {
return instructor;
}
public void setInstructor(Instructor instructor) {
this.instructor = instructor;
}
@Override
public String toString() {
return "InstructorDetail [id=" + id + ", focus=" + focus + ", hobby=" + hobby + "]";
}
}
| [
"nickolas.jurczak@gmail.com"
] | nickolas.jurczak@gmail.com |
64fd9dd5c0eae948bebc51de7ceab5a04db91ec6 | 4f4ddc396fa1dfc874780895ca9b8ee4f7714222 | /src/java/com/gensym/ntw/OkInfo.java | e0f501b9867ed8733c4d6e35c098fd2382ceedb0 | [] | no_license | UtsavChokshiCNU/GenSym-Test2 | 3214145186d032a6b5a7486003cef40787786ba0 | a48c806df56297019cfcb22862dd64609fdd8711 | refs/heads/master | 2021-01-23T23:14:03.559378 | 2017-09-09T14:20:09 | 2017-09-09T14:20:09 | 102,960,203 | 3 | 5 | null | null | null | null | UTF-8 | Java | false | false | 2,497 | java | /*
* Copyright (C) 1986-2017 Gensym Corporation. All Rights Reserved.
*
* OkInfo.java
*
*/
package com.gensym.ntw;
import com.gensym.util.Sequence;
import com.gensym.util.Symbol;
class OkInfo {
private String machineName;
void setMachineName(String n) { machineName = n; }
String getMachineName() { return machineName; }
private String machineID;
void setMachineID(String n) { machineID = n; }
String getMachineID() { return machineID; }
private int code1;
void setCode1(int c) { code1 = c; }
int getCode1() { return code1; }
private int code2;
void setCode2(int c) { code2 = c; }
int getCode2() { return code2; }
private int code3;
void setCode3(int c) { code3 = c; }
int getCode3() { return code3; }
private int code4;
void setCode4(int c) { code4 = c; }
int getCode4() { return code4; }
private int code5;
void setCode5(int c) { code5 = c; }
int getCode5() { return code5; }
private boolean temporaryLicense;
void setTemporaryLicense(boolean b) { temporaryLicense = b; }
boolean getTemporaryLicense() { return temporaryLicense; }
private Sequence from;
void setFrom(Sequence f) { from = f; }
Sequence getFrom() { return from; }
private Sequence to;
void setTo(Sequence t) { to = t; }
Sequence getTo() { return to; }
private Symbol level;
void setLevel(Symbol l) { level = l; }
Symbol getLevel() { return level; }
/* Not counting processes in this version (if ever) */
//private int processCount;
//void setProcessCount(int n) { processCount = n; }
//int getProcessCount() { return processCount; }
static final Symbol DEVELOPMENT = Symbol.intern("DEVELOPMENT");
OkInfo() {
temporaryLicense = false;
level = DEVELOPMENT;
// processCount = 1;
}
String describe() {
String s = "OkInfo object";
s += "\n machine: " + machineName;
s += "\n id: \"" + machineID + "\"";
s += "\n codes: " + String.valueOf(code1) + " " + String.valueOf(code2) +
" " + String.valueOf(code3) + " " + String.valueOf(code4) +
" " + String.valueOf(code5);
s += "\n level: " + level;
//s += "\n process limit: " + String.valueOf(processCount);
if ( temporaryLicense ) {
s += "\n from: " + String.valueOf(from.elementAt(0)) + " " +
from.elementAt(1) + " " + String.valueOf(from.elementAt(2));
s += "\n to: " + String.valueOf(to.elementAt(0)) + " " +
to.elementAt(1) + " " + String.valueOf(to.elementAt(2));
}
return s;
}
}
| [
"utsavchokshi@Utsavs-MacBook-Pro.local"
] | utsavchokshi@Utsavs-MacBook-Pro.local |
80fc72a54c5edc395d169ae73303586f58041bb2 | 50c407c3dfdaf4e40319352472a487614f167f7a | /JMPatrol/app/src/main/java/com/ecity/cswatersupply/service/NetService.java | e6675c8849f4d59a57918373ecaa7e19fec8d5a7 | [] | no_license | TonyTong1993/JiangMenPatrol | e8e966da912e993c3b6c99998968b79385f7b534 | cae541cde1e5254efe6ecc3a7647912893d4d2c5 | refs/heads/master | 2020-03-27T17:42:19.462460 | 2018-09-07T10:16:12 | 2018-09-07T10:16:12 | 146,868,143 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,269 | java | package com.ecity.cswatersupply.service;
import org.json.JSONObject;
import com.ecity.android.httpforandroid.http.HttpRequestType;
import com.ecity.cswatersupply.event.ResponseEventStatus;
import com.ecity.cswatersupply.network.ARequestCallback;
import com.ecity.cswatersupply.network.RequestExecutor;
import com.ecity.cswatersupply.network.RequestParameter.IRequestParameter;
import com.ecity.cswatersupply.network.request.QueryNetNodeParameter;
import com.ecity.cswatersupply.network.response.AServerResponse;
public class NetService {
private volatile static NetService instance;
private NetService() {
}
public static NetService getInstance() {
if (instance == null) {
synchronized (NetService.class) {
if (instance == null) {
instance = new NetService();
}
}
}
return instance;
}
public void queryNode(final String url, final String where, final boolean returnGeometry) {
RequestExecutor.execute(new ARequestCallback<AServerResponse>() {
@Override
public HttpRequestType getRequestType() {
return HttpRequestType.GET;
}
@Override
public String getUrl() {
return url + "/query";
}
@Override
public IRequestParameter prepareParameters() {
QueryNetNodeParameter parameter = new QueryNetNodeParameter();
parameter.setReturnGeometry(returnGeometry);
parameter.setWhere(where);
return parameter;
}
@Override
public int getEventId() {
return ResponseEventStatus.NET_SERVER_QUERY_NODE;
}
@Override
protected boolean getParseByGson() {
return false;
}
@Override
protected Object customParse(JSONObject jsonObj) {
return jsonObj;
}
@Override
public Class<AServerResponse> getResponseClass() {
return AServerResponse.class;
}
});
}
}
| [
"zzht@ZZHTdeiMac.lan"
] | zzht@ZZHTdeiMac.lan |
e01a929867ba2128b8437ce3b6d14dffe945ca7d | 41650d800965e07477d46e5161dd18b541067e5a | /src/main/java/com/dmatek/zgb/controller/setting/aspect/NodeAspect.java | 23fe9bfc48a1582197fc604d2eee62f2526e4746 | [] | no_license | 287396159/ZGBWEBSSM | 7a9a0a53fb8423f48bbbb80c1e5bd18cc2ba95ee | 90eccec48e2fc6bf8db9254f62ac296608d7e781 | refs/heads/master | 2022-07-15T11:54:47.976581 | 2019-08-27T09:01:41 | 2019-08-27T09:01:41 | 204,664,275 | 0 | 0 | null | 2022-06-21T01:45:24 | 2019-08-27T09:08:42 | JavaScript | UTF-8 | Java | false | false | 1,095 | java | package com.dmatek.zgb.controller.setting.aspect;
import java.util.List;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;
import com.dmatek.zgb.db.pojo.setting.Node;
@Component
@Aspect
public class NodeAspect {
private static final String REFER_TYPE_NAME = "ๅ่้ป";
private static final String NODE_TYPE_NAME = "ๆธๆ็ฏ้ป";
@Around(value = "execution(* com.dmatek.zgb.db.setting.service.imp.NodeServiceImp.find*(..))")
public Object findNodesAdvice(ProceedingJoinPoint joinPoint){
Object[] args = joinPoint.getArgs();
Object obj = null;
try {
obj = joinPoint.proceed(args);
} catch (Throwable e) {
e.printStackTrace();
}
if(obj instanceof List) {
@SuppressWarnings("unchecked")
List<Object> nodes = (List<Object>) obj;
for (Object object : nodes) {
if (object instanceof Node) {
Node node = (Node) object;
node.setTypeName(node.getType()==0?REFER_TYPE_NAME:NODE_TYPE_NAME);
}
}
}
return obj;
}
}
| [
"admin@qq.com"
] | admin@qq.com |
540be9462e64a9c45b3fca5243be90c11f472e08 | 53699b7247e77ae70f4af6b718b05098de08615f | /Netty4.0.0-CR1/src/io/netty/example/http/websocketx/client/WebSocketClient.java | a9742de48fc951e38657c72f30453a9e09b73257 | [] | no_license | zogwei/allProject | fc758b2aa827c9540b456b0e637392244dbe6225 | 0cb62453d2a4d8c9b6ab8c08dede6e68989934f3 | refs/heads/master | 2021-01-25T06:36:57.899097 | 2013-11-29T09:19:08 | 2013-11-29T09:19:08 | 28,529,921 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,636 | java | /*
* Copyright 2012 The Netty Project
*
* The Netty Project 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.
*/
//The MIT License
//
//Copyright (c) 2009 Carl Bystrลกm
//
//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 io.netty.example.http.websocketx.client;
import io.netty.bootstrap.Bootstrap;
import io.netty.buffer.Unpooled;
import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.codec.http.DefaultHttpHeaders;
import io.netty.handler.codec.http.HttpClientCodec;
import io.netty.handler.codec.http.HttpHeaders;
import io.netty.handler.codec.http.HttpObjectAggregator;
import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame;
import io.netty.handler.codec.http.websocketx.PingWebSocketFrame;
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
import io.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory;
import io.netty.handler.codec.http.websocketx.WebSocketVersion;
import java.net.URI;
public class WebSocketClient {
private final URI uri;
public WebSocketClient(URI uri) {
this.uri = uri;
}
public void run() throws Exception {
Bootstrap b = new Bootstrap();
try {
String protocol = uri.getScheme();
if (!"ws".equals(protocol)) {
throw new IllegalArgumentException("Unsupported protocol: " + protocol);
}
HttpHeaders customHeaders = new DefaultHttpHeaders();
customHeaders.add("MyHeader", "MyValue");
// Connect with V13 (RFC 6455 aka HyBi-17). You can change it to V08 or V00.
// If you change it to V00, ping is not supported and remember to change
// HttpResponseDecoder to WebSocketHttpResponseDecoder in the pipeline.
final WebSocketClientHandler handler =
new WebSocketClientHandler(
WebSocketClientHandshakerFactory.newHandshaker(
uri, WebSocketVersion.V13, null, false, customHeaders));
b.group(new NioEventLoopGroup())
.channel(NioSocketChannel.class)
.handler(new ChannelInitializer<SocketChannel>() {
@Override
public void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast("http-codec", new HttpClientCodec());
pipeline.addLast("aggregator", new HttpObjectAggregator(8192));
pipeline.addLast("ws-handler", handler);
}
});
System.out.println("WebSocket Client connecting");
Channel ch = b.connect(uri.getHost(), uri.getPort()).sync().channel();
handler.handshakeFuture().sync();
// Send 10 messages and wait for responses
System.out.println("WebSocket Client sending message");
for (int i = 0; i < 10; i++) {
ch.write(new TextWebSocketFrame("Message #" + i));
}
// Ping
System.out.println("WebSocket Client sending ping");
ch.write(new PingWebSocketFrame(Unpooled.copiedBuffer(new byte[]{1, 2, 3, 4, 5, 6})));
// Close
System.out.println("WebSocket Client sending close");
ch.write(new CloseWebSocketFrame());
// WebSocketClientHandler will close the connection when the server
// responds to the CloseWebSocketFrame.
ch.closeFuture().sync();
} finally {
b.shutdown();
}
}
public static void main(String[] args) throws Exception {
URI uri;
if (args.length > 0) {
uri = new URI(args[0]);
} else {
uri = new URI("ws://localhost:8080/websocket");
}
new WebSocketClient(uri).run();
}
}
| [
"zogwei@gmail.com@60187b04-42e5-a1eb-cd66-7b3f5e7d8f8a"
] | zogwei@gmail.com@60187b04-42e5-a1eb-cd66-7b3f5e7d8f8a |
5002919b93ccb1ff41d77389c8e7a6e42b4f46d5 | dd018727426610ae7aa3215bf49c2791b25c9c4d | /src/main/java/com/robertx22/age_of_exile/database/data/stats/types/core_stats/Vitality.java | 4d0e1680485bb0534b8d123fc86e189cc5da7d72 | [] | no_license | DevNodachi/Age-of-Exile | b821256283c153f9d387a4c63b572f864aaf4e4d | c8931d3611fd876545c120e0334ae55c96795aba | refs/heads/master | 2023-01-06T10:59:09.317844 | 2020-11-02T12:12:51 | 2020-11-02T12:12:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,041 | java | package com.robertx22.age_of_exile.database.data.stats.types.core_stats;
import com.robertx22.age_of_exile.database.data.StatModifier;
import com.robertx22.age_of_exile.database.data.stats.types.core_stats.base.BaseCoreStat;
import com.robertx22.age_of_exile.database.data.stats.types.resources.health.Health;
import com.robertx22.age_of_exile.database.data.stats.types.resources.health.HealthRegen;
import com.robertx22.age_of_exile.uncommon.enumclasses.ModType;
import java.util.Arrays;
public class Vitality extends BaseCoreStat {
public static final String GUID = "vitality";
public static final Vitality INSTANCE = new Vitality();
private Vitality() {
super(Arrays.asList(
new StatModifier(1.2F, 1.2F, Health.getInstance(), ModType.FLAT),
new StatModifier(0.1F, 0.1F, HealthRegen.getInstance(), ModType.FLAT)
));
}
@Override
public String GUID() {
return GUID;
}
@Override
public String locNameForLangFile() {
return "Vitality";
}
}
| [
"treborx555@gmail.com"
] | treborx555@gmail.com |
d4a718e73ae4b98e311b3aaec6c6bf3092ec4469 | ea94f400eebb896582876e2e9b0440eb018cf78e | /drools-osgi/drools-karaf-itests-domain-model/src/main/java/org/drools/karaf/itest/blueprint/domain/Drink.java | d966551f0a941bcbd3ffe3d42b34f61ec877d879 | [
"Apache-2.0"
] | permissive | mengshijian/droolsjbpm-integration | 1cb2a2d0822fb50fd9ecf67dc96d2e3d296f6559 | 15bb9f5548e8c838bfa5515037a1dc8d4bf58930 | refs/heads/master | 2021-01-20T03:47:11.535619 | 2016-08-31T14:39:10 | 2016-08-31T14:39:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,271 | java | package org.drools.karaf.itest.blueprint.domain;
import java.io.Serializable;
/**
* Created by jpetrlik on 8/18/16.
*/
public class Drink implements Serializable {
private final String name;
private final boolean containsAlcohol;
public Drink(final String name, final boolean containsAlcohol) {
this.name = name;
this.containsAlcohol = containsAlcohol;
}
public String getName() {
return this.name;
}
public boolean containsAlcohol() {
return this.containsAlcohol;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Drink drink = (Drink) o;
if (containsAlcohol != drink.containsAlcohol) return false;
return !(name != null ? !name.equals(drink.name) : drink.name != null);
}
@Override
public int hashCode() {
int result = name != null ? name.hashCode() : 0;
result = 31 * result + (containsAlcohol ? 1 : 0);
return result;
}
@Override
public String toString() {
return "Drink{" +
"name='" + name + '\'' +
", containsAlcohol=" + containsAlcohol +
'}';
}
}
| [
"mario.fusco@gmail.com"
] | mario.fusco@gmail.com |
73ddb9aff59f7d1878218e43676580e4958e02f4 | 5e4100a6611443d0eaa8774a4436b890cfc79096 | /src/main/java/com/alipay/api/response/AlipayCommerceIotDeviceAudioQueryResponse.java | ae30f535815acacdd89111bab88394cb200da1dc | [
"Apache-2.0"
] | permissive | coderJL/alipay-sdk-java-all | 3b471c5824338e177df6bbe73ba11fde8bc51a01 | 4f4ed34aaf5a320a53a091221e1832f1fe3c3a87 | refs/heads/master | 2020-07-15T22:57:13.705730 | 2019-08-14T10:37:41 | 2019-08-14T10:37:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 770 | java | package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.commerce.iot.device.audio.query response.
*
* @author auto create
* @since 1.0, 2019-06-21 14:34:19
*/
public class AlipayCommerceIotDeviceAudioQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 1215276358215496493L;
/**
* ่ฎพๅคไธ็่ฏญ้ณๅ่กจ.ๆ ผๅผไธบjsonๅญ็ฌฆไธฒ. audioIdไธบ่ฏญ้ณid,playTypeไธบๆญๆพๅบๆฏ,ๅๅผไธบTRADEๆCUSTOM_AUDIO
*/
@ApiField("audio_list")
private String audioList;
public void setAudioList(String audioList) {
this.audioList = audioList;
}
public String getAudioList( ) {
return this.audioList;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
a5cc542ac29925246a10f9bfc8f2cc6fd5059e33 | b1cd433831b46c0365de7631c27632b4f47ca30b | /src/com/facebook/buck/step/fs/CopyStep.java | af4b41af54655c3639e37fdb3dec085617647cbb | [
"Apache-2.0"
] | permissive | johngummadi/buck | f78c5559dcbc9dd81f439fd295d3ef262fdfe7c4 | ef355b5741986054710ac06fb936ed11f5e6758a | refs/heads/master | 2021-04-15T07:39:27.316357 | 2013-07-16T18:38:09 | 2013-07-16T19:10:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,873 | java | /*
* Copyright 2012-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package com.facebook.buck.step.fs;
import com.facebook.buck.shell.ShellStep;
import com.facebook.buck.step.ExecutionContext;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
public class CopyStep extends ShellStep {
private final String source;
private final String destination;
private final boolean shouldRecurse;
public CopyStep(String source, String destination, boolean shouldRecurse) {
this.source = Preconditions.checkNotNull(source);
this.destination = Preconditions.checkNotNull(destination);
this.shouldRecurse = shouldRecurse;
}
public CopyStep(String source, String destination) {
this(source, destination, false /* shouldRecurse */);
}
@Override
public String getShortName(ExecutionContext context) {
return "cp";
}
@Override
protected ImmutableList<String> getShellCommandInternal(
ExecutionContext context) {
ImmutableList.Builder<String> args = ImmutableList.builder();
args.add("cp");
if (shouldRecurse) {
args.add("-R");
}
args.add(source);
args.add(destination);
return args.build();
}
public String getSource() {
return source;
}
public String getDestination() {
return destination;
}
}
| [
"mbolin@fb.com"
] | mbolin@fb.com |
b710239968b6740d41b3a113ede8a77b949b8e27 | 9025cb38e70e8f40a7c5b75094a4c08645ed4b5c | /src/main/java/org/ditto/easyhan/repository/Constants.java | 258ef7d63b16e645ef7e78f1f19caf289a0e15cc | [
"Apache-2.0"
] | permissive | conanchen/easyhan-cloud | 14dc37cdb209be8c3ee974b8d1f79a551c99875b | 227ff71231607fe0f35d1f67236e830e86897c27 | refs/heads/master | 2021-08-30T13:07:07.396400 | 2017-12-17T14:06:25 | 2017-12-17T14:06:25 | 107,637,240 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 327 | java | package org.ditto.easyhan.repository;
public class Constants {
public final static String USER_WORD_CACHE_NAME="CACHE_USER_WORD";
// public static final String TEST_USERID = "test_user_id_01";
public static final String USER_CACHE_NAME = "CACHE_USER";
public static final String WORD_CACHE_NAME="CACHE_WORD";
}
| [
"chenchunhai@changhongit.com"
] | chenchunhai@changhongit.com |
481712c58397db86c7e84770d12637971a851116 | 83ba1ffe094176c7c6036a9ea47751b031941fc4 | /sdks/java/core/src/main/java/org/apache/beam/sdk/runners/inprocess/TransformExecutorService.java | 600102f6653cdbf83f37fd2e2d767c28d3fe313e | [
"Apache-2.0"
] | permissive | Sil1991/gcpdf-demo | b7b57f476bb5bce5e80e4c160512a52937036241 | 88ecd538a30f009b239a1b320ab6ad75f6901ae0 | refs/heads/master | 2022-11-24T23:36:03.156413 | 2018-04-10T15:29:49 | 2018-04-10T15:29:49 | 128,814,619 | 1 | 0 | Apache-2.0 | 2022-11-16T08:29:25 | 2018-04-09T18:13:21 | Java | UTF-8 | Java | false | false | 1,379 | 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.beam.sdk.runners.inprocess;
/**
* Schedules and completes {@link TransformExecutor TransformExecutors}, controlling concurrency as
* appropriate for the {@link StepAndKey} the executor exists for.
*/
interface TransformExecutorService {
/**
* Schedule the provided work to be eventually executed.
*/
void schedule(TransformExecutor<?> work);
/**
* Finish executing the provided work. This may cause additional
* {@link TransformExecutor TransformExecutors} to be evaluated.
*/
void complete(TransformExecutor<?> completed);
}
| [
"jason_l_l@qq.com"
] | jason_l_l@qq.com |
4da5a2cffea73da96679eeb69e44cf6727f004c0 | 4b6368d31e71caa342b581e9ea7aacb6642ef7a7 | /trunk/src/main/java/eyedev/_01/Option.java | 40776a7a3e8482ece4e0917cae07d946c31d27c0 | [] | no_license | BGCX067/eye-ocr-svn-to-git | b1982c595fdbd0f7b2c6c04d251c6a4ed1700e2a | 1f8cff851930b29aeef4be309585bdba7219cfea | refs/heads/master | 2021-01-13T12:55:17.115523 | 2015-12-28T14:11:54 | 2015-12-28T14:11:54 | 48,699,481 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 627 | java | package eyedev._01;
public class Option {
public enum Type { floatOption }
public HasOptions owner;
public String name;
public Type type;
public String value;
public Option(HasOptions owner, String name, Type type, String value) {
this.owner = owner;
this.name = name;
this.type = type;
this.value = value;
}
public void setValue(String value) {
this.value = value;
owner.changeOption(this);
}
public float floatValue() {
try {
return Float.parseFloat(value);
} catch (NumberFormatException e) {
return Float.NaN;
}
}
}
| [
"you@example.com"
] | you@example.com |
9c41bf2814309477bcede244e0a8fc541cc771a3 | 278c419602462c1eb9904695aef90c9efdc6fb6d | /benchmarks/Programmes_Tcas/TcasKO37/TcasKO37_Specs/TcasKO37_t1072.java | 6c1e45540f27d61486ba9eff139cf4d8d684dc73 | [] | no_license | mdbekkouche/LocFaultsTool | 33d36b1c0fc6fc548ee38fb9ef120d34da521364 | e88bccdf6a6f1c76f01f3c31d1810c7033c490ad | refs/heads/master | 2022-11-08T21:33:00.957604 | 2022-10-31T16:32:06 | 2022-10-31T16:32:06 | 59,208,482 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,591 | java | class tcastest
{
/*@ requires
@ (Cur_Vertical_Sep == 755)
@ && (High_Confidence == true)
@ && (Two_of_Three_Reports_Valid == false)
@ && (Own_Tracked_Alt == 749)
@ && (Own_Tracked_Alt_Rate == 387)
@ && (Other_Tracked_Alt == 139)
@ && (Alt_Layer_Value == 2)
@ && (Up_Separation == 477)
@ && (Down_Separation == 850)
@ && (Other_RAC == 1)
@ && (Other_Capability == 2)
@ && (Climb_Inhibit == true)
@ && (Positive_RA_Alt_Thresh[0] == 0)
@ && (Positive_RA_Alt_Thresh[1] == 0)
@ && (Positive_RA_Alt_Thresh[2] == 0)
@ && (Positive_RA_Alt_Thresh[3] == 0)
@ && (Positive_RA_Alt_Thresh[4] == 0);
@ ensures
@ (alt_sep == 0);
@*/
int tcas(int Cur_Vertical_Sep,boolean High_Confidence,boolean Two_of_Three_Reports_Valid,int Own_Tracked_Alt,int Own_Tracked_Alt_Rate,int Other_Tracked_Alt,int Alt_Layer_Value,int Up_Separation,int Down_Separation,int Other_RAC,int Other_Capability,boolean Climb_Inhibit,int[] Positive_RA_Alt_Thresh)
{
int OLEV;
int MAXALTDIFF;
int MINSEP;
int NOZCROSS;
int NO_INTENT;
int TCAS_TA;
int UNRESOLVED;
int UPWARD_RA;
int DOWNWARD_RA;
boolean enabled;
boolean tcas_equipped;
boolean intent_not_known;
boolean need_upward_RA;
boolean need_downward_RA;
int alt_sep;
boolean upward_preferred;
int upward_crossing_situation;
boolean resultat;
int Inhibit_Biased_Climb;
int upward_crossing_situation;
OLEV = 600;
MAXALTDIFF = 600;
MINSEP = 300;
NOZCROSS = 100;
NO_INTENT = 0;
TCAS_TA = 1;
UNRESOLVED = 0;
UPWARD_RA = 1;
DOWNWARD_RA = 2;
Positive_RA_Alt_Thresh[0] = 400;
Positive_RA_Alt_Thresh[1] = 500;
Positive_RA_Alt_Thresh[2] = 640;
Positive_RA_Alt_Thresh[3] = 740;
enabled = (High_Confidence) && (Own_Tracked_Alt_Rate <= OLEV) && (Cur_Vertical_Sep > MAXALTDIFF);
tcas_equipped = (Other_Capability == TCAS_TA);
intent_not_known = ((Two_of_Three_Reports_Valid) && (Other_RAC == NO_INTENT));
alt_sep = UNRESOLVED;
if ((enabled) && (((tcas_equipped) && (intent_not_known)) || !(tcas_equipped)))
{
if (Climb_Inhibit){
Inhibit_Biased_Climb=Up_Separation + NOZCROSS;
}
else{
Inhibit_Biased_Climb=Up_Separation;
}
if (Inhibit_Biased_Climb > Down_Separation)
{
resultat = (!(Own_Tracked_Alt < Other_Tracked_Alt) || ((Own_Tracked_Alt < Other_Tracked_Alt) && !(Down_Separation >= Positive_RA_Alt_Thresh[0]))); /* use of wrong array index, the instruction should be : resultat = (!(Own_Tracked_Alt < Other_Tracked_Alt) || ((Own_Tracked_Alt < Other_Tracked_Alt) && !(Down_Separation >= Positive_RA_Alt_Thresh[Alt_Layer_Value])));*/
}
else
{
resultat = (Other_Tracked_Alt < Own_Tracked_Alt) && (Cur_Vertical_Sep >= MINSEP) && (Up_Separation >= Positive_RA_Alt_Thresh[0]); /* use of wrong array index, the instruction should be : resultat = (Other_Tracked_Alt < Own_Tracked_Alt) && (Cur_Vertical_Sep >= MINSEP) && (Up_Separation >= Positive_RA_Alt_Thresh[Alt_Layer_Value]); */
}
need_upward_RA= (resultat) && (Own_Tracked_Alt < Other_Tracked_Alt);
if (Climb_Inhibit){
Inhibit_Biased_Climb=Up_Separation + NOZCROSS;
}
else{
Inhibit_Biased_Climb=Up_Separation;
}
if (Inhibit_Biased_Climb > Down_Separation)
{
resultat = (Own_Tracked_Alt < Other_Tracked_Alt) && (Cur_Vertical_Sep >= MINSEP) && (Down_Separation >= Positive_RA_Alt_Thresh[0]); /* use of wrong array index, the instruction should be resultat = (Own_Tracked_Alt < Other_Tracked_Alt) && (Cur_Vertical_Sep >= MINSEP) && (Down_Separation >= Positive_RA_Alt_Thresh[Alt_Layer_Value]); */
}
else
{
resultat = !(Other_Tracked_Alt < Own_Tracked_Alt) || (((Other_Tracked_Alt < Own_Tracked_Alt)) && (Up_Separation >= Positive_RA_Alt_Thresh[0])); /* use of wrong array index, the instruction should be : resultat = !(Other_Tracked_Alt < Own_Tracked_Alt) || (((Other_Tracked_Alt < Own_Tracked_Alt)) && (Up_Separation >= Positive_RA_Alt_Thresh[Alt_Layer_Value])); */
}
need_downward_RA=(resultat) && (Other_Tracked_Alt < Own_Tracked_Alt);
if ((need_upward_RA) && (need_downward_RA)){
// unreachable: requires Own_Below_Threat and Own_Above_Threat
// to both be true - that requires Own_Tracked_Alt < Other_Tracked_Alt
// and Other_Tracked_Alt < Own_Tracked_Alt, which isn't possible
alt_sep = UNRESOLVED;
}
else if (need_upward_RA){
alt_sep = UPWARD_RA;
}
else if (need_downward_RA)
{alt_sep = DOWNWARD_RA;}
else
{alt_sep = UNRESOLVED;}
}
return alt_sep;
}
}
| [
"mdbekkouche@gmail.com"
] | mdbekkouche@gmail.com |
281dd1e98dc41c210da44661718ea4628784d3a2 | 4b8261d7c0368e070b3e1001d985923c95a980c0 | /src/main/java/com/rookied/service/base/TblEmailSendService.java | 3f505354db8e4871a7e801eb8361a4238de72902 | [] | no_license | rookiezq/family_service_platform | 2a0ef2e2fad6eca5c41ef45c76a777b2798f4dfc | fa45face2a70050106449a6b49266c2c45ad1055 | refs/heads/master | 2023-07-02T21:57:12.782229 | 2021-08-12T04:26:44 | 2021-08-12T04:26:44 | 393,382,905 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 299 | java | package com.rookied.service.base;
import com.rookied.bean.TblEmailSend;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* ้ฎไปถๅ้ ๆๅก็ฑป
* </p>
*
* @author rookied
* @since 2021-08-06
*/
public interface TblEmailSendService extends IService<TblEmailSend> {
}
| [
"rookiezq@icloud.com"
] | rookiezq@icloud.com |
2a493b204b42071b293267569bdf1d71c04457aa | e52f88dfe64b13bd9360b0f802183bcb379d3bc6 | /core/src/main/java/org/adamalang/translator/tree/expressions/linq/Offset.java | 6cfbea5f463b341de14f2ea496ac5cbf149ab3ca | [
"MIT"
] | permissive | mathgladiator/adama-lang | addfc85111fe329eb23942605457b77e4f59d5d2 | a03326cc678aaac5f566606408a708b5f871553d | refs/heads/master | 2023-09-01T02:35:07.985525 | 2023-08-31T23:47:07 | 2023-08-31T23:47:07 | 245,283,238 | 94 | 14 | MIT | 2023-09-10T18:12:37 | 2020-03-05T22:47:40 | Java | UTF-8 | Java | false | false | 2,182 | java | /*
* This file is subject to the terms and conditions outlined in the
* file 'LICENSE' (it's dual licensed) located in the root directory
* near the README.md which you should also read. For more information
* about the project which owns this file, see https://www.adama-platform.com/ .
*
* (c) 2021 - 2023 by Adama Platform Initiative, LLC
*/
package org.adamalang.translator.tree.expressions.linq;
import org.adamalang.translator.env.ComputeContext;
import org.adamalang.translator.env.Environment;
import org.adamalang.translator.env.FreeEnvironment;
import org.adamalang.translator.parser.token.Token;
import org.adamalang.translator.tree.expressions.Expression;
import org.adamalang.translator.tree.types.TyType;
import java.util.function.Consumer;
/** skip the first elements of a list */
public class Offset extends LinqExpression {
public final Token offsetToken;
public final Expression offset;
public Offset(final Expression sql, final Token offsetToken, final Expression offset) {
super(sql);
ingest(sql);
this.offsetToken = offsetToken;
this.offset = offset;
ingest(offset);
}
@Override
public void emit(final Consumer<Token> yielder) {
sql.emit(yielder);
yielder.accept(offsetToken);
offset.emit(yielder);
}
@Override
protected TyType typingInternal(final Environment environment, final TyType suggestion) {
final var computeEnv = environment.scopeWithComputeContext(ComputeContext.Computation);
final var typeSql = sql.typing(computeEnv, null);
environment.rules.IsNativeListOfStructure(typeSql, false);
environment.rules.IsInteger(offset.typing(computeEnv, null), false);
return typeSql;
}
@Override
public void writeJava(final StringBuilder sb, final Environment environment) {
final var computeEnv = environment.scopeWithComputeContext(ComputeContext.Computation);
sql.writeJava(sb, environment);
sb.append(".skip(").append(intermediateExpression ? "false, " : "true, ");
offset.writeJava(sb, computeEnv);
sb.append(")");
}
@Override
public void free(FreeEnvironment environment) {
sql.free(environment);
offset.free(environment);
}
}
| [
"48896921+mathgladiator@users.noreply.github.com"
] | 48896921+mathgladiator@users.noreply.github.com |
0e5a67cc2ffc148b86d3b9181157eea1fe570a2c | d60e287543a95a20350c2caeabafbec517cabe75 | /LACCPlus/Cloudstack/2446_1.java | 6fc5ea4e26d9e3e6b9526c7c2a24701750b91e1e | [
"MIT"
] | permissive | sgholamian/log-aware-clone-detection | 242067df2db6fd056f8d917cfbc143615c558b2c | 9993cb081c420413c231d1807bfff342c39aa69a | refs/heads/main | 2023-07-20T09:32:19.757643 | 2021-08-27T15:02:50 | 2021-08-27T15:02:50 | 337,837,827 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 733 | java | //,temp,VmwareManagerImpl.java,687,702,temp,VmwareResource.java,6470,6487
//,3
public class xxx {
@Override
public File getSystemVMKeyFile() {
URL url = this.getClass().getClassLoader().getResource("scripts/vm/systemvm/id_rsa.cloud");
File keyFile = null;
if (url != null) {
keyFile = new File(url.getPath());
}
if (keyFile == null || !keyFile.exists()) {
keyFile = new File("/usr/share/cloudstack-common/scripts/vm/systemvm/id_rsa.cloud");
}
assert (keyFile != null);
if (!keyFile.exists()) {
s_logger.error("Unable to locate id_rsa.cloud in your setup at " + keyFile.toString());
}
return keyFile;
}
}; | [
"sgholami@uwaterloo.ca"
] | sgholami@uwaterloo.ca |
ff08a5f1128bebec958d634a0326ad99bcc9f7ad | e49497f1a4c3cc142e16c68090ff232e87e306c3 | /app/src/main/java/com/mc/phonelive/bean/GzInfoBeanPic.java | 3a4d27dbcc76886025a938ef482d4dccbb16013e | [] | no_license | woshihfh0123/miaocha_gz | 2fb03bf1d98d9e838e72315e846825b29b9d09f4 | 0b427a97c4663bee4698495f88b1d58e78be05d0 | refs/heads/main | 2023-01-02T07:02:51.180903 | 2020-10-25T09:58:07 | 2020-10-25T09:58:07 | 307,067,453 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 3,899 | java | package com.mc.phonelive.bean;
public class GzInfoBeanPic extends LiveBean {
private String uid;
private String avatar;
private String avatar_thumb;
private String user_nicename;
private String title;
private String city;
private String stream;
private String pull;
private String thumb;
private String isvideo;
private int type;
private String type_val;
private String game_action;
private String goodnum;
private String anyway;
private String starttime;
private String nums;
private String goods_count;
private int sex;
private String level;
private String level_anchor;
private String game;
public String getUid() {
return uid;
}
public void setUid(String uid) {
this.uid = uid;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public String getAvatar_thumb() {
return avatar_thumb;
}
public void setAvatar_thumb(String avatar_thumb) {
this.avatar_thumb = avatar_thumb;
}
public String getUser_nicename() {
return user_nicename;
}
public void setUser_nicename(String user_nicename) {
this.user_nicename = user_nicename;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getStream() {
return stream;
}
public void setStream(String stream) {
this.stream = stream;
}
public String getPull() {
return pull;
}
public void setPull(String pull) {
this.pull = pull;
}
public String getThumb() {
return thumb;
}
public void setThumb(String thumb) {
this.thumb = thumb;
}
public String getIsvideo() {
return isvideo;
}
public void setIsvideo(String isvideo) {
this.isvideo = isvideo;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getType_val() {
return type_val;
}
public void setType_val(String type_val) {
this.type_val = type_val;
}
public String getGame_action() {
return game_action;
}
public void setGame_action(String game_action) {
this.game_action = game_action;
}
public String getGoodnum() {
return goodnum;
}
public void setGoodnum(String goodnum) {
this.goodnum = goodnum;
}
public String getAnyway() {
return anyway;
}
public void setAnyway(String anyway) {
this.anyway = anyway;
}
public String getStarttime() {
return starttime;
}
public void setStarttime(String starttime) {
this.starttime = starttime;
}
public String getNums() {
return nums;
}
public void setNums(String nums) {
this.nums = nums;
}
public String getGoods_count() {
return goods_count;
}
public void setGoods_count(String goods_count) {
this.goods_count = goods_count;
}
public int getSex() {
return sex;
}
public void setSex(int sex) {
this.sex = sex;
}
public String getLevel() {
return level;
}
public void setLevel(String level) {
this.level = level;
}
public String getLevel_anchor() {
return level_anchor;
}
public void setLevel_anchor(String level_anchor) {
this.level_anchor = level_anchor;
}
public String getGame() {
return game;
}
public void setGame(String game) {
this.game = game;
}
}
| [
"529395283@qq.com"
] | 529395283@qq.com |
b5889d3e0b78ca63294a7843eb1f602b2b9a92f5 | f12ae2d71115fe4d8aa04bdca261b72cf5496399 | /Day22/src/com/wanchenyang/learn/ArrayListContainsDemo.java | 0d3f578d394f849af470bbcefae32c0ad65e3d6b | [] | no_license | wanchenyang521/iGeek | 0fe5323839cd669dc5a060e00013f5318ffb7ede | 420c76a0c2ab92b16c673774dc008cf0eeabc07e | refs/heads/master | 2020-04-26T07:19:47.852086 | 2019-04-23T03:11:12 | 2019-04-23T03:11:12 | 173,390,991 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,014 | java | package com.wanchenyang.learn;
import java.util.ArrayList;
import java.util.HashSet;
/**
* @author zx
* @date 2019ๅนด4ๆ3ๆฅ
* @version 1.0
* @description:
*
* ArrayListไธญcontainsๆนๆณ
*
*/
public class ArrayListContainsDemo {
public static void main(String[] args) {
ArrayList<Person> list = new ArrayList<Person>();
ArrayList<String> list2 = new ArrayList<String>();
HashSet<Person> list3 = new HashSet<Person>();
list2.add("ๆดๅฎไธ");
list2.add("ๅผ ๆ");
list2.add("้ๅฒ");
System.out.println(list2);
System.out.println(list2.contains("้ๅฒ"));
//ๆทปๅ ๆฐๆฎ
Person p1 = new Person("็ๅ", 20);
Person p2 = new Person("ๆๅญ่ดค", 20);
Person p3 = new Person("ๅผ ้่", 18);
list.add(p1);
list.add(p2);
list.add(p3);
list3.add(p1);
list3.add(p2);
list3.add(p3);
list3.add(new Person("ๅผ ้่", 18));
System.out.println("list3:"+list3);
//System.out.println(list.contains(new Person("ๅผ ้่", 20)));
}
}
| [
"wan1183254286@icloud.com"
] | wan1183254286@icloud.com |
7a82f473cdba2c9855003610f0a0d0b167aaffd8 | d528fe4f3aa3a7eca7c5ba4e0aee43421e60857f | /src/xsgzgl/gygl/lfryxxgl/LfrydjForm.java | b1ce831fd758ad7f365d2e2f22c452e71486695a | [] | no_license | gxlioper/xajd | 81bd19a7c4b9f2d1a41a23295497b6de0dae4169 | b7d4237acf7d6ffeca1c4a5a6717594ca55f1673 | refs/heads/master | 2022-03-06T15:49:34.004924 | 2019-11-19T07:43:25 | 2019-11-19T07:43:25 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 4,468 | java | /**
* @้จ้จ:ๅญฆๅทฅไบงๅไบไธ้จ
* @ๆฅๆ๏ผ2014-8-19 ไธๅ03:02:55
*/
package xsgzgl.gygl.lfryxxgl;
import org.apache.struts.action.ActionForm;
import xgxt.comm.search.SearchModel;
import xgxt.utils.Pages;
import com.zfsoft.xgxt.comm.export.model.ExportModel;
/**
* @็ณป็ปๅ็งฐ: ๅญฆ็ๅทฅไฝ็ฎก็็ณป็ป
* @ๆจกๅๅ็งฐ: ๅ
ฌๅฏ็ฎก็
* @็ฑปๅ่ฝๆ่ฟฐ: ๆฅ่ฎฟไบบๅ็ป่ฎฐ็ฎก็
* @ไฝ่
๏ผ ๆฒๆๆณข[ๅทฅๅท:1123]
* @ๆถ้ด๏ผ 2014-8-19 ไธๅ03:02:55
* @็ๆฌ๏ผ V1.0
* @ไฟฎๆน่ฎฐๅฝ: ็ฑปไฟฎๆน่
-ไฟฎๆนๆฅๆ-ไฟฎๆน่ฏดๆ
*/
public class LfrydjForm extends ActionForm {
private static final long serialVersionUID = 1L;
private Pages pages = new Pages();
private SearchModel searchModel = new SearchModel();
private ExportModel exportModel = new ExportModel();
private String type;
private String lfrdjid;
private String lfrxm;
private String lfrxb;
private String lfsj;
private String lqsj;
private String lfrlxdh;
private String lfrsfzh;
private String zbry;
private String bz;
private String xh;
private String xm;
private String xymc;
private String zymc;
private String bjmc;
private String ldmc;
private String qsh;
private String lddm; //ๆฅผๆ ไปฃ็
private String lfsydm; //ๆฅ่ฎฟไบ็ฑไปฃ็
private String lfsymc; //ๆฅ่ฎฟไบ็ฑๅ็งฐ
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Pages getPages() {
return pages;
}
public void setPages(Pages pages) {
this.pages = pages;
}
public SearchModel getSearchModel() {
return searchModel;
}
public void setSearchModel(SearchModel searchModel) {
this.searchModel = searchModel;
}
public ExportModel getExportModel() {
return exportModel;
}
public void setExportModel(ExportModel exportModel) {
this.exportModel = exportModel;
}
public String getLfrdjid() {
return lfrdjid;
}
public void setLfrdjid(String lfrdjid) {
this.lfrdjid = lfrdjid;
}
public String getLfrxm() {
return lfrxm;
}
public void setLfrxm(String lfrxm) {
this.lfrxm = lfrxm;
}
public String getLfrxb() {
return lfrxb;
}
public void setLfrxb(String lfrxb) {
this.lfrxb = lfrxb;
}
public String getLfsj() {
return lfsj;
}
public void setLfsj(String lfsj) {
this.lfsj = lfsj;
}
public String getLqsj() {
return lqsj;
}
public void setLqsj(String lqsj) {
this.lqsj = lqsj;
}
public String getLfrlxdh() {
return lfrlxdh;
}
public void setLfrlxdh(String lfrlxdh) {
this.lfrlxdh = lfrlxdh;
}
public String getLfrsfzh() {
return lfrsfzh;
}
public void setLfrsfzh(String lfrsfzh) {
this.lfrsfzh = lfrsfzh;
}
public String getZbry() {
return zbry;
}
public void setZbry(String zbry) {
this.zbry = zbry;
}
public String getBz() {
return bz;
}
public void setBz(String bz) {
this.bz = bz;
}
public String getXh() {
return xh;
}
public void setXh(String xh) {
this.xh = xh;
}
public String getXm() {
return xm;
}
public void setXm(String xm) {
this.xm = xm;
}
public String getXymc() {
return xymc;
}
public void setXymc(String xymc) {
this.xymc = xymc;
}
public String getZymc() {
return zymc;
}
public void setZymc(String zymc) {
this.zymc = zymc;
}
public String getBjmc() {
return bjmc;
}
public void setBjmc(String bjmc) {
this.bjmc = bjmc;
}
public String getLdmc() {
return ldmc;
}
public void setLdmc(String ldmc) {
this.ldmc = ldmc;
}
public String getQsh() {
return qsh;
}
public void setQsh(String qsh) {
this.qsh = qsh;
}
/**
* @return the lddm
*/
public String getLddm() {
return lddm;
}
/**
* @param lddm่ฆ่ฎพ็ฝฎ็ lddm
*/
public void setLddm(String lddm) {
this.lddm = lddm;
}
/**
* @return the lfsydm
*/
public String getLfsydm() {
return lfsydm;
}
/**
* @param lfsydm่ฆ่ฎพ็ฝฎ็ lfsydm
*/
public void setLfsydm(String lfsydm) {
this.lfsydm = lfsydm;
}
/**
* @return the lfsymc
*/
public String getLfsymc() {
return lfsymc;
}
/**
* @param lfsymc่ฆ่ฎพ็ฝฎ็ lfsymc
*/
public void setLfsymc(String lfsymc) {
this.lfsymc = lfsymc;
}
}
| [
"1398796456@qq.com"
] | 1398796456@qq.com |
b2c58701ed1fb994f2615287845ecd67cfd82807 | 0b01ac8d488f0c958f9f1ae43fb09370e80a95c0 | /app/src/main/java/com/example/advanceDemo/view/FilterDemoAdapter.java | 98966adcfc933a1a111f89a372a7eab254e62923 | [] | no_license | foquanlin/LanSoEditor_advance | 1374ceb4b9d158a4118de2695d42e37f8eae1d37 | 07f31932d2bf982d2af0f6015dd491a57b88efc3 | refs/heads/master | 2020-03-30T09:21:34.759269 | 2018-09-03T02:35:53 | 2018-09-03T02:35:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,197 | java | package com.example.advanceDemo.view;
import android.content.Context;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.lansoeditor.advanceDemo.R;
import com.lansosdk.videoeditor.FilterList;
public class FilterDemoAdapter extends BaseAdapter {
FilterList bmpList;
private LayoutInflater mInflater;
public FilterDemoAdapter(Context con, FilterList bmpList) {
// mInflater=LayoutInflater.from(con);
this.bmpList = bmpList;
mInflater = (LayoutInflater) con
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);// LayoutInflater.from(mContext);
}
@Override
public int getCount() {
if (bmpList != null) {
return bmpList.getBitmapSize();
} else {
return 0;
}
}
@Override
public Object getItem(int position) {
return position;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder;
if (convertView == null) {
viewHolder = new ViewHolder();
convertView = mInflater.inflate(R.layout.filter_item, null);
viewHolder.ivImage = (ImageView) convertView
.findViewById(R.id.id_filter_item_iv);
viewHolder.tvName = (TextView) convertView
.findViewById(R.id.id_filter_item_tv);
convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) convertView.getTag();
}
if (position < bmpList.getBitmapSize()) {
Bitmap bmp = bmpList.getBitmap(position);
if (bmp != null) {
viewHolder.ivImage.setImageBitmap(bmp);
}
}
viewHolder.tvName.setText(bmpList.getName(position));
return convertView;
}
private static class ViewHolder {
private TextView tvName;
private ImageView ivImage;
}
} | [
"support@lansongtech.com"
] | support@lansongtech.com |
aec9c79e3609ed5826059c6c83ac464169bfb8ca | a3bce33e0c73f714017d656982eecd5dde635245 | /ASMSample01/jars/asm-4.0/test/conform/org/objectweb/asm/util/TraceSignatureVisitorUnitTest.java | 119e941c1fcfb2495bc53e97b1d5adbceaae409b | [
"BSD-3-Clause"
] | permissive | miho/asm-playground | 08079e345fa8aaacc72ad6b66936cc499c8937df | 6c73c1b915eef1dfcb56ce03703f7ca7fbe701e6 | refs/heads/master | 2021-01-01T17:37:27.376002 | 2012-05-09T21:07:45 | 2012-05-09T21:07:45 | 4,276,476 | 9 | 2 | null | null | null | null | UTF-8 | Java | false | false | 7,932 | java | /***
* ASM tests
* Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders 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 org.objectweb.asm.util;
import java.util.StringTokenizer;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.signature.SignatureReader;
/**
* TraceSignatureVisitor unit tests.
*
* @author Eugene Kuleshov
*/
public class TraceSignatureVisitorUnitTest extends TestCase {
public final static String[] DATA = {
"C|E|<E extends java.lang.Enum<E>> implements java.lang.Comparable<E>, java.io.Serializable"
+ "|<E:Ljava/lang/Enum<TE;>;>Ljava/lang/Object;Ljava/lang/Comparable<TE;>;Ljava/io/Serializable;",
"C|I|<D extends java.lang.reflect.GenericDeclaration> extends java.lang.reflect.Type"
+ "|<D::Ljava/lang/reflect/GenericDeclaration;>Ljava/lang/Object;Ljava/lang/reflect/Type;",
"C|C|<K, V> extends java.util.AbstractMap<K, V> implements java.util.concurrent.ConcurrentMap<K, V>, java.io.Serializable"
+ "|<K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/AbstractMap<TK;TV;>;Ljava/util/concurrent/ConcurrentMap<TK;TV;>;Ljava/io/Serializable;",
"C|C|<K extends java.lang.Enum<K>, V> extends java.util.AbstractMap<K, V> implements java.io.Serializable, java.lang.Cloneable"
+ "|<K:Ljava/lang/Enum<TK;>;V:Ljava/lang/Object;>Ljava/util/AbstractMap<TK;TV;>;Ljava/io/Serializable;Ljava/lang/Cloneable;",
"F|C|java.lang.Class<?>|Ljava/lang/Class<*>;",
"F|C|java.lang.reflect.Constructor<T>|Ljava/lang/reflect/Constructor<TT;>;",
"F|C|T[]|[TT;",
"F|C|java.util.Hashtable<?, ?>|Ljava/util/Hashtable<**>;",
"F|C|java.util.concurrent.atomic.AtomicReferenceFieldUpdater<java.io.BufferedInputStream, byte[]>"
+ "|Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater<Ljava/io/BufferedInputStream;[B>;",
"F|C|AA<byte[][]>|LAA<[[B>;",
"F|C|AA<java.util.Map<java.lang.String, java.lang.String>[][]>"
+ "|LAA<[[Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;>;",
"F|C|java.util.Hashtable<java.lang.Object, java.lang.String>"
+ "|Ljava/util/Hashtable<Ljava/lang/Object;Ljava/lang/String;>;",
"M|C|void(boolean, byte, char, short, int, float, long, double)"
+ "|(ZBCSIFJD)V",
"M|C|void()E, F|()V^TE;^TF;",
"M|C|java.lang.Class<? extends E><E extends java.lang.Class>()"
+ "|<E:Ljava/lang/Class;>()Ljava/lang/Class<+TE;>;",
"M|C|java.lang.Class<? super E><E extends java.lang.Class>()"
+ "|<E:Ljava/lang/Class;>()Ljava/lang/Class<-TE;>;",
"M|C|void(A<E>.B)|(LA<TE;>.B;)V",
"M|C|void(A<E>.B<F>)|(LA<TE;>.B<TF;>;)V",
"M|C|void(java.lang.String, java.lang.Class<?>, java.lang.reflect.Method[], java.lang.reflect.Method, java.lang.reflect.Method)"
+ "|(Ljava/lang/String;Ljava/lang/Class<*>;[Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V",
"M|C|java.util.Map<java.lang.Object, java.lang.String>(java.lang.Object, java.util.Map<java.lang.Object, java.lang.String>)"
+ "|(Ljava/lang/Object;Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;)Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;",
"M|C|java.util.Map<java.lang.Object, java.lang.String><T>(java.lang.Object, java.util.Map<java.lang.Object, java.lang.String>, T)"
+ "|<T:Ljava/lang/Object;>(Ljava/lang/Object;Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;TT;)Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;",
"M|C|java.util.Map<java.lang.Object, java.lang.String><E, T extends java.lang.Comparable<E>>(java.lang.Object, java.util.Map<java.lang.Object, java.lang.String>, T)"
+ "|<E:Ljava/lang/Object;T::Ljava/lang/Comparable<TE;>;>(Ljava/lang/Object;Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;TT;)Ljava/util/Map<Ljava/lang/Object;Ljava/lang/String;>;", };
public static TestSuite suite() {
TestSuite suite = new TestSuite(TraceSignatureVisitorUnitTest.class.getName());
for (int i = 0; i < DATA.length; i++) {
suite.addTest(new TraceSignatureVisitorUnitTest(new TestData(DATA[i])));
}
return suite;
}
private TestData data;
private TraceSignatureVisitorUnitTest(final TestData data) {
super("testSignature");
this.data = data;
}
public void testSignature() {
TraceSignatureVisitor d = new TraceSignatureVisitor(data.access);
SignatureReader r = new SignatureReader(data.signature);
switch (data.type) {
case 'C':
r.accept(d);
assertEquals(data.declaration, d.getDeclaration());
break;
case 'F':
r.acceptType(d);
assertEquals(data.declaration, d.getDeclaration());
break;
case 'M':
r.accept(d);
String fullMethodDeclaration = d.getReturnType()
+ d.getDeclaration()
+ (d.getExceptions() != null ? d.getExceptions() : "");
assertEquals(data.declaration, fullMethodDeclaration);
break;
}
}
@Override
public String getName() {
return super.getName() + " " + data.signature;
}
public static class TestData {
public final char type;
public final int access;
public final String declaration;
public final String signature;
public TestData(final String data) {
StringTokenizer st = new StringTokenizer(data, "|");
this.type = st.nextToken().charAt(0);
String acc = st.nextToken();
switch (acc.charAt(0)) {
case 'E':
this.access = Opcodes.ACC_ENUM;
break;
case 'I':
this.access = Opcodes.ACC_INTERFACE;
break;
case 'A':
this.access = Opcodes.ACC_ANNOTATION;
break;
default:
this.access = 0;
}
this.declaration = st.nextToken();
this.signature = st.nextToken();
}
}
}
| [
"info@michaelhoffer.de"
] | info@michaelhoffer.de |
7586cc5b2f7992822b26e20f3a67bb65631304bc | 7d0f81b6a106a12273691ede231953d6878fa4bc | /schedfox/SchedfoxBackend/src/main/java/rmischeduleserver/mysqlconnectivity/queries/problem_solver/clear_out_non_contacted_problem_solvers_query.java | 75e0134302cf18d0986b4698d3165e4cff123c1d | [] | no_license | nitinguptaetz/schedfoxnitin | 2f178e945462f2823aaac095b6bd98720930c5a1 | 2f3f54f2e9a93cc7958688b3ca0740e9dbe68867 | refs/heads/master | 2021-01-14T10:58:22.249402 | 2015-05-25T23:59:28 | 2015-05-25T23:59:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,033 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package rmischeduleserver.mysqlconnectivity.queries.problem_solver;
import rmischeduleserver.mysqlconnectivity.queries.GeneralQueryFormat;
/**
*
* @author user
*/
public class clear_out_non_contacted_problem_solvers_query extends GeneralQueryFormat {
@Override
public boolean hasAccess() {
return true;
}
@Override
public boolean hasPreparedStatement() {
return true;
}
@Override
public String getPreparedStatementString() {
StringBuilder sql = new StringBuilder();
sql.append("DELETE FROM problem_solver_contacts WHERE ");
sql.append("contact_type = ? AND problem_solver_contact_id IN ");
sql.append(" (SELECT problem_solver_contact_id FROM ");
sql.append(" problem_solver_contact ");
sql.append(" WHERE ");
sql.append(" ps_id = ? ");
sql.append(" )");
return sql.toString();
}
}
| [
"raj.jsp@gmail.com"
] | raj.jsp@gmail.com |
0750d0311b008a35928d1b25a6005988197cdc15 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/kickstarter--android-oss/b802349592cf0b48e7fcffc872e62bff011782be/before/Comment.java | b8e5fa88bc7fc43aab8813397ca5aad57a6e7ca0 | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,089 | java | package com.kickstarter.models;
import android.os.Parcel;
import android.os.Parcelable;
import com.hannesdorfmann.parcelableplease.annotation.ParcelablePlease;
import org.joda.time.DateTime;
@ParcelablePlease
public class Comment implements Parcelable {
public String body = null;
public DateTime created_at = null;
public User author = null;
public Integer id = null;
public String body() {
return body;
}
public DateTime createdAt() {
return created_at;
}
public User author() {
return author;
}
public Integer id() {
return id;
}
@Override
public int describeContents() { return 0; }
@Override
public void writeToParcel(Parcel dest, int flags) {CommentParcelablePlease.writeToParcel(this, dest, flags);}
public static final Creator<Comment> CREATOR = new Creator<Comment>() {
public Comment createFromParcel(Parcel source) {
Comment target = new Comment();
CommentParcelablePlease.readFromParcel(target, source);
return target;
}
public Comment[] newArray(int size) {return new Comment[size];}
};
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
f9ae63ef50b9242263028d66dce3df05e1c97fc7 | c9d6e13155e6bf77fec7d6a73938b4370d2737ce | /src/test/java/com/gtdq/netty/netty/NettyApplicationTests.java | 800e3293fa3d8ef0939531c7d05a2935febe595e | [
"Apache-2.0"
] | permissive | MrLawrenc/Netty_Study | a606359e177a26f3f06708ad95ea7284074ee06c | 93648ad35f1648dac5da8cc9f1d6e83fc768d355 | refs/heads/master | 2022-06-26T19:48:31.742353 | 2020-03-01T06:01:02 | 2020-03-01T06:01:02 | 201,901,155 | 2 | 0 | Apache-2.0 | 2022-06-17T02:25:19 | 2019-08-12T09:38:56 | Java | UTF-8 | Java | false | false | 345 | java | package com.gtdq.netty.netty;
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 NettyApplicationTests {
@Test
public void contextLoads() {
}
}
| [
"mrliu943903861@163.com"
] | mrliu943903861@163.com |
bcdbb50a1df849de5b557cd54526ec89a1b5c7fc | 161bea50f281dce31fc4ae30b13b357fee99e53d | /toprank-pad-web/src/main/java/cc/toprank/byd/entity/P_ProductAttributeValueMappingEntity.java | 85dc85b4faa74c4a76faafed351ac0539005eada | [] | no_license | jeluck/toprank-pad | 735201c543f8137cf4e3b585c40e5059cc1b097f | c5b74a69b41fcbe18c2aef752a32e912bf564486 | refs/heads/master | 2020-03-21T13:10:12.060575 | 2018-06-25T13:56:37 | 2018-06-25T13:56:37 | 138,591,388 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 703 | java | package cc.toprank.byd.entity;
import cc.toprank.byd.entity.P_ProductAttributeValueMappingEntityBase;
/**********************************************************************************************************************
*
* ็ๆๆๆ๏ผ(c)2016๏ผ ๆทฑๅณๅธๆๆถฆ่ฎก็ฎๆบ่ฝฏไปถๅผๅๆ้ๅ
ฌๅธ
*
* ่ฏฅ็ฑปไธบ่ชๅจ็ๆ็ๅฎไฝ็ฑปๅบ็ฑป๏ผไธ่ฝๆๅจไฟฎๆนใ
* ๅฆๆ้่ฆๆฉๅฑ็ๅญๆฎต๏ผ่ฏทๅจP_ProductAttributeValueMapping็ฑปไธญ่ฟ่กไฟฎๆน
*
* ********************************************************************************************************************/
public class P_ProductAttributeValueMappingEntity extends P_ProductAttributeValueMappingEntityBase {
} | [
"549815578@qq.com"
] | 549815578@qq.com |
e4ed26ea75e67bf6c7f7f7727c868632e92d6b2e | a79adc816c936ac1438d0caf8d49208ab5fb61ce | /src/main/java/com/arteysoft/hbn/UsuarioRepository.java | 0f30a6f0650cda36ec841bd96047a8135ec2343e | [] | no_license | Jregueira/AccHbn02 | 3a4c6e6b615a780b148541faa19a6679c3b86944 | 3bd6f749d6dcd7d4014e96907ae2c5b4b552353b | refs/heads/master | 2020-05-07T19:46:09.764922 | 2019-04-11T15:59:24 | 2019-04-11T15:59:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,557 | java | package com.arteysoft.hbn;
import java.lang.reflect.Type;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
public class UsuarioRepository<T> {
private SessionFactory sessionFactory;
public UsuarioRepository(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
public Usuario obtener(String id) {
Session session = sessionFactory.openSession();
Usuario u = session.get(Usuario.class, id);
session.close();
return u;
}
public void grabar(Usuario usu) {
Session session = sessionFactory.openSession();
Transaction tx = null;
try {
tx = session.beginTransaction();
session.save(usu);
tx.commit();
}
catch (RuntimeException ex) {
System.out.println("ERROR EXCEPTION");
tx.rollback();
}
finally {
session.close();
}
}
public void modificar(Usuario usu) {
Session session = sessionFactory.openSession();
Transaction tx = null;
try {
tx = session.beginTransaction();
session.update(usu);
tx.commit();
}
catch (RuntimeException ex) {
System.out.println("---------------");
System.out.println("ERROR EXCEPTION");
System.out.println("---------------");
tx.rollback();
}
finally {
session.close();
}
}
}
| [
"arteysoft@gmail.com"
] | arteysoft@gmail.com |
81c522fa260c8edd6f25d3700c2abc973b5903d1 | 1ec62a7e351ed029b2141ee01432d2fc8c44f43a | /WisdomSoft/msnet/win031/win031_6/main.cs | f183bf806cfcc7d406ae69df731bdc6bc38fd522 | [] | no_license | hataka/codingground | 7a1b555d13b8e42320f5f5e4898664191da16a47 | 53d2b204ae2e0fb13bd6d293e07c68066226e26b | refs/heads/master | 2021-01-20T01:34:16.778320 | 2019-02-02T04:27:14 | 2019-02-02T04:27:14 | 89,292,259 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 957 | cs | // -*- mode: java -*- Time-stamp: <2017-01-06 12:14:42 kahata>
/*================================================================
* title:
* file:
* path; msnet/win031/win031_6/main.cs
* url: msnet/win031/win031_6/main.cs
* created: Time-stamp: <2017-01-06 12:14:42 kahata>
* revision: $Id$
* Programmed By: kahata
* To compile:
* To run:
* link: http://wisdom.sakura.ne.jp/
* link: http://wisdom.sakura.ne.jp/system/msnet/msnet_win31.html
* description:
*
*================================================================*/
using System;
using System.Windows.Forms;
class WinMain : Form {
public static void Main(string[] args) {
Application.Run(new WinMain());
}
public WinMain() {
MainMenu mm = new MainMenu();
MenuItem[] mi = {
new MenuItem("Rena") , new MenuItem("Yuki") ,
new MenuItem("Mimi")
};
mi[1].Break = true;
mi[2].BarBreak = true;
mm.MenuItems.Add("Kitty on your lap" , mi);
Menu = mm;
}
}
| [
"kazuhiko.hata@nifty.com"
] | kazuhiko.hata@nifty.com |
006c041aae2e0ebd1e4b9835e2d9612a72f7727a | 1e01fcee701ac97458ce8b3179b76ccd0138dc1a | /src/java/rrhh/entity/RhFormaPago.java | 80db78fe39a2b411d3b05f7b783d238e548ccf19 | [] | no_license | wpalomo/EJBShrimp | 56ddbf838d952a899e6e14746de6b02d7efc3f35 | 8ace041011b1a72064b415d313bfb1db33f4643f | refs/heads/master | 2021-05-05T19:21:19.077512 | 2016-04-04T14:22:04 | 2016-04-04T14:22:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,091 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package rrhh.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
/**
*
* @author fconza
*/
@Entity
@Table(name = "rh_forma_pago", schema = "recursoshumanos")
@NamedQueries({
@NamedQuery(name = "RhFormaPago.findAll", query = "SELECT r FROM RhFormaPago r"),
@NamedQuery(name = "RhFormaPago.findByFpSecuencial", query = "SELECT r FROM RhFormaPago r WHERE r.fpSecuencial = :fpSecuencial"),
@NamedQuery(name = "RhFormaPago.findByFpDetalle", query = "SELECT r FROM RhFormaPago r WHERE r.fpDetalle = :fpDetalle"),
@NamedQuery(name = "RhFormaPago.findByFpInactivo", query = "SELECT r FROM RhFormaPago r WHERE r.fpInactivo = :fpInactivo"),
@NamedQuery(name = "RhFormaPago.findBySecEmpresa", query = "SELECT r FROM RhFormaPago r WHERE r.secEmpresa = :secEmpresa"),
@NamedQuery(name = "RhFormaPago.findBySecCodigo", query = "SELECT r FROM RhFormaPago r WHERE r.secCodigo = :secCodigo"),
@NamedQuery(name = "RhFormaPago.findByCtaEmpresa", query = "SELECT r FROM RhFormaPago r WHERE r.ctaEmpresa = :ctaEmpresa"),
@NamedQuery(name = "RhFormaPago.findByCtaCodigo", query = "SELECT r FROM RhFormaPago r WHERE r.ctaCodigo = :ctaCodigo"),
@NamedQuery(name = "RhFormaPago.findByUsrEmpresa", query = "SELECT r FROM RhFormaPago r WHERE r.usrEmpresa = :usrEmpresa"),
@NamedQuery(name = "RhFormaPago.findByUsrCodigo", query = "SELECT r FROM RhFormaPago r WHERE r.usrCodigo = :usrCodigo"),
@NamedQuery(name = "RhFormaPago.findByUsrFechaInserta", query = "SELECT r FROM RhFormaPago r WHERE r.usrFechaInserta = :usrFechaInserta")})
public class RhFormaPago implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "fp_secuencial")
private Integer fpSecuencial;
@Basic(optional = false)
@Column(name = "fp_detalle")
private String fpDetalle;
@Basic(optional = false)
@Column(name = "fp_inactivo")
private boolean fpInactivo;
@Basic(optional = false)
@Column(name = "sec_empresa")
private String secEmpresa;
@Basic(optional = false)
@Column(name = "sec_codigo")
private String secCodigo;
@Basic(optional = false)
@Column(name = "cta_empresa")
private String ctaEmpresa;
@Basic(optional = false)
@Column(name = "cta_codigo")
private String ctaCodigo;
@Basic(optional = false)
@Column(name = "usr_empresa")
private String usrEmpresa;
@Basic(optional = false)
@Column(name = "usr_codigo")
private String usrCodigo;
@Basic(optional = false)
@Column(name = "usr_fecha_inserta")
@Temporal(TemporalType.TIMESTAMP)
private Date usrFechaInserta;
public RhFormaPago() {
}
public RhFormaPago(Integer fpSecuencial) {
this.fpSecuencial = fpSecuencial;
}
public RhFormaPago(Integer fpSecuencial, String fpDetalle, boolean fpInactivo, String secEmpresa, String secCodigo, String ctaEmpresa, String ctaCodigo, String usrEmpresa, String usrCodigo, Date usrFechaInserta) {
this.fpSecuencial = fpSecuencial;
this.fpDetalle = fpDetalle;
this.fpInactivo = fpInactivo;
this.secEmpresa = secEmpresa;
this.secCodigo = secCodigo;
this.ctaEmpresa = ctaEmpresa;
this.ctaCodigo = ctaCodigo;
this.usrEmpresa = usrEmpresa;
this.usrCodigo = usrCodigo;
this.usrFechaInserta = usrFechaInserta;
}
public Integer getFpSecuencial() {
return fpSecuencial;
}
public void setFpSecuencial(Integer fpSecuencial) {
this.fpSecuencial = fpSecuencial;
}
public String getFpDetalle() {
return fpDetalle;
}
public void setFpDetalle(String fpDetalle) {
this.fpDetalle = fpDetalle;
}
public boolean getFpInactivo() {
return fpInactivo;
}
public void setFpInactivo(boolean fpInactivo) {
this.fpInactivo = fpInactivo;
}
public String getSecEmpresa() {
return secEmpresa;
}
public void setSecEmpresa(String secEmpresa) {
this.secEmpresa = secEmpresa;
}
public String getSecCodigo() {
return secCodigo;
}
public void setSecCodigo(String secCodigo) {
this.secCodigo = secCodigo;
}
public String getCtaEmpresa() {
return ctaEmpresa;
}
public void setCtaEmpresa(String ctaEmpresa) {
this.ctaEmpresa = ctaEmpresa;
}
public String getCtaCodigo() {
return ctaCodigo;
}
public void setCtaCodigo(String ctaCodigo) {
this.ctaCodigo = ctaCodigo;
}
public String getUsrEmpresa() {
return usrEmpresa;
}
public void setUsrEmpresa(String usrEmpresa) {
this.usrEmpresa = usrEmpresa;
}
public String getUsrCodigo() {
return usrCodigo;
}
public void setUsrCodigo(String usrCodigo) {
this.usrCodigo = usrCodigo;
}
public Date getUsrFechaInserta() {
return usrFechaInserta;
}
public void setUsrFechaInserta(Date usrFechaInserta) {
this.usrFechaInserta = usrFechaInserta;
}
@Override
public int hashCode() {
int hash = 0;
hash += (fpSecuencial != null ? fpSecuencial.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof RhFormaPago)) {
return false;
}
RhFormaPago other = (RhFormaPago) object;
if ((this.fpSecuencial == null && other.fpSecuencial != null) || (this.fpSecuencial != null && !this.fpSecuencial.equals(other.fpSecuencial))) {
return false;
}
return true;
}
@Override
public String toString() {
return "rrhh.entity.RhFormaPago[ fpSecuencial=" + fpSecuencial + " ]";
}
}
| [
"caguachisaca@gmail.com"
] | caguachisaca@gmail.com |
3d09e0a6aea83963b765832438b8c08af67f4651 | 1ce48fcc3d037f74e4a5941724a47102c3e51c7a | /platform-web-ui/src/main/java/ua/com/fielden/platform/web/centre/api/crit/impl/IntegerCriterionWidget.java | 2349d0bd00b53d1b841919dfcc85657ea3c48a4f | [] | no_license | jhou-pro/tg | 825e3f18f3437003c77905468f416c01fc52b1a7 | 9e73c58fece40be93ddc3bb105fbd5484e1ab393 | refs/heads/master | 2021-01-18T03:36:12.486334 | 2016-06-09T03:08:08 | 2016-06-09T03:08:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,245 | java | package ua.com.fielden.platform.web.centre.api.crit.impl;
import ua.com.fielden.platform.web.view.master.api.widgets.spinner.impl.SpinnerWidget;
/**
* An implementation for integer (or long) double-editor criterion.
*
* @author TG Team
*
*/
public class IntegerCriterionWidget extends AbstractRangeCriterionWidget {
/**
* Creates an instance of {@link IntegerCriterionWidget} for specified entity type and property name.
*
* @param criteriaType
* @param propertyName
*/
public IntegerCriterionWidget(final Class<?> root, final Class<?> managedType, final String propertyName) {
super("centre/criterion/multi/range/tg-range-criterion", propertyName,
new SpinnerWidget(
AbstractCriterionWidget.generateTitleDesc(root, managedType, propertyName).getKey(),
AbstractCriterionWidget.generateNames(root, managedType, propertyName).getKey()
),
new SpinnerWidget(
AbstractCriterionWidget.generateTitleDesc(root, managedType, propertyName).getValue(),
AbstractCriterionWidget.generateNames(root, managedType, propertyName).getValue()
));
}
}
| [
"jhou.pro@gmail.com"
] | jhou.pro@gmail.com |
c5b725824c3cbea3f31186c66b1b8a6453b337f2 | 0ca9a0873d99f0d69b78ed20292180f513a20d22 | /src/main/java/com/google/errorprone/annotations/concurrent/LazyInit.java | a38dbb11f2db0a0aeef15e6b865eff3537c45ae9 | [] | no_license | Eliminater74/com.google.android.tvlauncher | 44361fbbba097777b99d7eddd6e03d4bbe5f4d60 | e8284f9970d77a05042a57e9c2173856af7c4246 | refs/heads/master | 2021-01-14T23:34:04.338366 | 2020-02-24T16:39:53 | 2020-02-24T16:39:53 | 242,788,539 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 460 | java | package com.google.errorprone.annotations.concurrent;
import com.google.errorprone.annotations.IncompatibleModifiers;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.lang.model.element.Modifier;
@Target({ElementType.FIELD})
@IncompatibleModifiers({Modifier.FINAL})
@Retention(RetentionPolicy.RUNTIME)
public @interface LazyInit {
}
| [
"eliminater74@gmail.com"
] | eliminater74@gmail.com |
aa969d7dce9ceb04db9a043a48b2e29e67556778 | 89c27984ee4db802711beb5195a0f8460134bf9a | /src/main/java/ca/eandb/util/io/CompositeOutputStream.java | 5235d7b72d867241210ece2b31d6f333142c7da7 | [
"MIT"
] | permissive | bwkimmel/java-util | 4dfa3056320b9224b0fd21eaf7e6fac4cf8df1c3 | 0c03664d42f0e6b111f64447f222aa73c2819e5c | refs/heads/master | 2021-01-21T05:05:33.219372 | 2017-09-30T20:35:00 | 2017-09-30T20:35:00 | 6,963,436 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,911 | java | /*
* Copyright (c) 2008 Bradley W. Kimmel
*
* 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 ca.eandb.util.io;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
/**
* An <code>OutputStream</code> that duplicates output to multiple child
* <code>OutputStream</code>s.
*
* @author Brad Kimmel
*/
public class CompositeOutputStream extends OutputStream {
/** The <code>List</code> of child <code>OutputStream</code>s. */
private final List<OutputStream> children = new ArrayList<OutputStream>();
/**
* Adds a child <code>OutputStream</code>.
* @param child The <code>OutputStream</code> to add.
* @return This instance.
*/
public final CompositeOutputStream addChild(OutputStream child) {
children.add(child);
return this;
}
/* (non-Javadoc)
* @see java.io.OutputStream#close()
*/
@Override
public void close() throws IOException {
for (OutputStream child : children) {
child.close();
}
}
/* (non-Javadoc)
* @see java.io.OutputStream#flush()
*/
@Override
public void flush() throws IOException {
for (OutputStream child : children) {
child.flush();
}
}
/* (non-Javadoc)
* @see java.io.OutputStream#write(byte[], int, int)
*/
@Override
public void write(byte[] b, int off, int len) throws IOException {
for (OutputStream child : children) {
child.write(b, off, len);
}
}
/* (non-Javadoc)
* @see java.io.OutputStream#write(byte[])
*/
@Override
public void write(byte[] b) throws IOException {
for (OutputStream child : children) {
child.write(b);
}
}
/* (non-Javadoc)
* @see java.io.OutputStream#write(int)
*/
@Override
public void write(int b) throws IOException {
for (OutputStream child : children) {
child.write(b);
}
}
}
| [
"intrepidca@gmail.com"
] | intrepidca@gmail.com |
1e959055d178c0de18e515c2168e233fd468de93 | 26183990a4c6b9f6104e6404ee212239da2d9f62 | /components/online_review_ajax_support/src/java/tests/com/cronos/onlinereview/ajax/failuretests/FailureTests.java | 349274cc906ca4104f4a2bdae70026934eb8d62f | [] | no_license | topcoder-platform/tc-java-components | 34c5798ece342a9f1804daeb5acc3ea4b0e0765b | 51b204566eb0df3902624c15f4fb69b5f99dc61b | refs/heads/dev | 2023-08-08T22:09:32.765506 | 2022-02-25T06:23:56 | 2022-02-25T06:23:56 | 138,811,944 | 0 | 8 | null | 2022-02-23T21:06:12 | 2018-06-27T01:10:36 | Rich Text Format | UTF-8 | Java | false | false | 1,769 | java | /**
*
* Copyright (c) 2006, TopCoder, Inc. All rights reserved
*/
package com.cronos.onlinereview.ajax.failuretests;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import com.cronos.onlinereview.ajax.failuretests.handlers.CommonHandlerFailureTest;
import com.cronos.onlinereview.ajax.failuretests.handlers.LoadTimelineTemplateHandlerFailureTest;
import com.cronos.onlinereview.ajax.failuretests.handlers.PlaceAppealHandlerFailureTest;
import com.cronos.onlinereview.ajax.failuretests.handlers.ReviewCommonHandlerFailureTest;
import com.cronos.onlinereview.ajax.failuretests.handlers.SetScorecardStatusHandlerFailureTest;
import com.cronos.onlinereview.ajax.failuretests.handlers.SetTimelineNotificationHandlerFailureTest;
import com.cronos.onlinereview.ajax.failuretests.handlers.ResolveAppealHandlerFailureTest;
/**
* <p>This test case aggregates all Failure test cases.</p>
*
* @author TopCoder
* @version 1.0
*/
public class FailureTests extends TestCase {
public static Test suite() {
final TestSuite suite = new TestSuite();
suite.addTest(AjaxRequestFailureTest.suite());
suite.addTest(AjaxResponseFailureTest.suite());
suite.addTest(AjaxSupportServletFailureTest.suite());
suite.addTest(CommonHandlerFailureTest.suite());
suite.addTest(LoadTimelineTemplateHandlerFailureTest.suite());
suite.addTest(PlaceAppealHandlerFailureTest.suite());
suite.addTest(ResolveAppealHandlerFailureTest.suite());
suite.addTest(ReviewCommonHandlerFailureTest.suite());
suite.addTest(SetScorecardStatusHandlerFailureTest.suite());
suite.addTest(SetTimelineNotificationHandlerFailureTest.suite());
return suite;
}
}
| [
"pvmagacho@gmail.com"
] | pvmagacho@gmail.com |
20d645c9b1b16b70c9b5fad5bf4fb4edb45c77f6 | 0e97171d925d8b72dde03148a974e743d24e96a7 | /FinancieraQuat-v2/FinancieraQuat/src/main/java/com/quat/dao/ProyectoDAO.java | 0886eef23d7c9ce8db60915b6358748a2d273353 | [] | no_license | badillosoft/java-quat | 50916aed28f43a3fd1a102e8dabdfcdae6871a29 | 6cb568ae3149f0e8f873cc6f70b2a8b88d7c2d0d | refs/heads/master | 2020-03-10T07:58:48.293674 | 2018-06-09T18:54:14 | 2018-06-09T18:54:14 | 129,275,010 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 283 | java | package com.quat.dao;
import org.springframework.data.repository.CrudRepository;
import org.springframework.transaction.annotation.Transactional;
import com.quat.dto.ProyectoDTO;
@Transactional
public interface ProyectoDAO extends CrudRepository<ProyectoDTO, Long>{
}
| [
"badillo.soft@hotmail.com"
] | badillo.soft@hotmail.com |
7e94c407fe62d8c9a681e2c02bc916bc5cda2716 | 9c0d7e84e99bea9d8e0db5ebc40b3de153198fa1 | /DataProcessingDSLPart1/ASEProject-Metamodel.diagram/src/pipelineproject/diagram/providers/assistants/PipelineprojectModelingAssistantProviderOfGtClause2EditPart.java | f43aaaad6275eede1d2ee008161beeac4b262caa | [] | no_license | FrancescoPinto/DataProcessingDSL | ea36221638d15c69948abe3386bc73a7ae899e3f | eff66e28aa1e575f0817332c6281506582704d20 | refs/heads/master | 2022-04-24T09:59:55.097385 | 2020-04-20T18:57:30 | 2020-04-20T18:57:30 | 257,376,186 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 315 | java | /*
*
*/
package pipelineproject.diagram.providers.assistants;
import pipelineproject.diagram.providers.PipelineprojectModelingAssistantProvider;
/**
* @generated
*/
public class PipelineprojectModelingAssistantProviderOfGtClause2EditPart
extends PipelineprojectModelingAssistantProvider {
}
| [
"francesco1.pinto@mail.polimi.it"
] | francesco1.pinto@mail.polimi.it |
20fb1a6dddafc729015f605460e558a598a9409f | c5c30ad08c63ec0b955b338f70518e7662357e6f | /com/sun/corba/se/spi/activation/ServerAlreadyRegisteredHolder.java | 1601414a597adadba0e10724ada60501356153da | [] | no_license | shawnxjf1/jdk-src-read | 635fef8469759b3fe7d8fd3259c2f761f061e690 | 2bcb3b80577b5ff0404acdcf1e7a39d059dd781f | refs/heads/master | 2016-09-22T13:50:07.107771 | 2016-08-15T11:49:57 | 2016-08-15T11:49:57 | 65,729,824 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,179 | java | package com.sun.corba.se.spi.activation;
/**
* com/sun/corba/se/spi/activation/ServerAlreadyRegisteredHolder.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from d:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u20/1074/corba/src/share/classes/com/sun/corba/se/spi/activation/activation.idl
* Wednesday, July 30, 2014 1:52:57 PM PDT
*/
public final class ServerAlreadyRegisteredHolder implements org.omg.CORBA.portable.Streamable
{
public com.sun.corba.se.spi.activation.ServerAlreadyRegistered value = null;
public ServerAlreadyRegisteredHolder ()
{
}
public ServerAlreadyRegisteredHolder (com.sun.corba.se.spi.activation.ServerAlreadyRegistered initialValue)
{
value = initialValue;
}
public void _read (org.omg.CORBA.portable.InputStream i)
{
value = com.sun.corba.se.spi.activation.ServerAlreadyRegisteredHelper.read (i);
}
public void _write (org.omg.CORBA.portable.OutputStream o)
{
com.sun.corba.se.spi.activation.ServerAlreadyRegisteredHelper.write (o, value);
}
public org.omg.CORBA.TypeCode _type ()
{
return com.sun.corba.se.spi.activation.ServerAlreadyRegisteredHelper.type ();
}
}
| [
"shawn_angel@qq.com"
] | shawn_angel@qq.com |
c22129a269412fbfa476e026529dd0ff68955242 | c06cf1c0ae48490d05f0bc41a143976f2d50c982 | /logging/file/src/main/java/org/pasut/test/spring/boot/logging/file/Main.java | 663f967742770723cd7b20f541795ba417aa8d1a | [] | no_license | vrmsreddy/test-pring-boot | 6f03b98f98a261f4352bb6acd008adc6487783de | 7b8a9b2fb0218feca90e253670782543839c5185 | refs/heads/master | 2021-01-19T19:25:54.690273 | 2015-02-09T21:02:44 | 2015-02-09T21:02:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 743 | java | package org.pasut.test.spring.boot.logging.file;
import org.apache.log4j.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@EnableAutoConfiguration //como agregue la dependencia web (tomcat + spring MVC), asume que estoy creando una aplicacion web
public class Main {
private final static Logger log = Logger.getLogger(Main.class);
@RequestMapping("/")
String hello() {
log.debug("Llama a Hello");
return "Hola";
}
public static void main(String[] args) {
SpringApplication.run(Main.class, args);
}
}
| [
"pasutmarcelo@gmail.com"
] | pasutmarcelo@gmail.com |
b70f075ce9cfdc3a77c9c0fe74fd5ae12f27a76a | e0532d36d933f76c1a3ccf90dcb78489ee01501e | /middlegroudInterfaceTest/src/main/java/com/duoweidu/model/hsq/ZhimaZhimaskulistData.java | ba627a040f72401cdb1a536c502d6e7331047a4b | [] | no_license | wuhaiyanwhy/jiekouzidonghua_dwd | ff7bdbbcc21683d2d592ea48624b476dd9ff027f | 1627453a5ad678b5438ad424ca1f23e0de2b3aa0 | refs/heads/master | 2022-07-15T16:40:14.545287 | 2019-10-25T08:32:34 | 2019-10-25T08:32:34 | 217,483,394 | 1 | 0 | null | 2022-06-29T17:44:05 | 2019-10-25T08:03:53 | HTML | UTF-8 | Java | false | false | 583 | java | package com.duoweidu.model.hsq;
import java.util.ArrayList;
public class ZhimaZhimaskulistData {
public String type;
public String titleText;
public String titleImg;
public ArrayList<ListModel> list;
public int totalCnt;
public int totalPage;
public String currentPage;
public static class ListModel {
public int id;
public int sku_id;
public String zm_sku_name;
public int price;
public int show_price;
public int discount;
public String thumbnail;
public int left_stock;
}
}
| [
"1174837652@qq.com"
] | 1174837652@qq.com |
0a93915785f931f7ba7f4d39de30436c8c4e4a19 | 2d60e0d2c1c23d27b5dd76aa262f6b9cb036f014 | /src/main/java/com/hashmapinc/tempus/WitsmlObjects/v1411/StimStageFlowPathType.java | d03c8fe4b5da75fe4de15ddff3f6877f7cf3ad2b | [
"Apache-2.0"
] | permissive | antolantic/WitsmlObjectsLibrary | aaf850c33d1dafd5162d52b808c70da792d14052 | 3e154f60a7b8514119acc5b05513fc8d31037fca | refs/heads/master | 2020-04-05T08:17:09.770594 | 2017-12-07T22:58:09 | 2017-12-07T22:58:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,178 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2017.06.26 at 03:00:38 PM CDT
//
package com.hashmapinc.tempus.WitsmlObjects.v1411;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for StimStageFlowPathType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre> {@code
* <simpleType name="StimStageFlowPathType">
* <restriction base="{http://www.witsml.org/schemas/1series}abstractTypeEnum">
* <enumeration value="annulus"/>
* <enumeration value="casing"/>
* <enumeration value="coiled tubing"/>
* <enumeration value="drill pipe"/>
* <enumeration value="open hole"/>
* <enumeration value="tubing"/>
* <enumeration value="tubing and annulus"/>
* <enumeration value="unknown"/>
* </restriction>
* </simpleType>
* } </pre>
*
*/
@XmlType(name = "StimStageFlowPathType")
@XmlEnum
public enum StimStageFlowPathType {
/**
* Fluid is conducted through the annulus, (volume between casing and tubing).
*
*/
@XmlEnumValue("annulus")
ANNULUS("annulus"),
/**
* Fluid is conducted through the casing, (no tubing present).
*
*/
@XmlEnumValue("casing")
CASING("casing"),
/**
* Fluid is conducted through the coiled tubing, including some length of
* tubing on the reel at surface.
*
*/
@XmlEnumValue("coiled tubing")
COILED_TUBING("coiled tubing"),
/**
* Fluid is conducted through the drill pipe.
*
*/
@XmlEnumValue("drill pipe")
DRILL_PIPE("drill pipe"),
/**
* Fluid is conducted through the open hole.
*
*/
@XmlEnumValue("open hole")
OPEN_HOLE("open hole"),
/**
* Fluid is conducted through the tubing.
*
*/
@XmlEnumValue("tubing")
TUBING("tubing"),
/**
* Fluid is conducted through
* both the tubing and annulus, simultaneously.
*
*/
@XmlEnumValue("tubing and annulus")
TUBING_AND_ANNULUS("tubing and annulus"),
/**
* The value is not known. This value should not be used
* in normal situations. All reasonable attempts should be made to determine
* the appropriate value. Use of this value may result in rejection in some situations.
*
*/
@XmlEnumValue("unknown")
UNKNOWN("unknown");
private final String value;
StimStageFlowPathType(String v) {
value = v;
}
public String value() {
return value;
}
public static StimStageFlowPathType fromValue(String v) {
for (StimStageFlowPathType c: StimStageFlowPathType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
| [
"chris.herrera@hashmapinc.com"
] | chris.herrera@hashmapinc.com |
7a02a42fc6cead79e7326640d46f1fe62f586887 | f548935b31db33edfeac16c36470410a458bb1a6 | /src/org/exolab/castor/builder/types/XSGYearMonth.java | cf9f7bdd1b2fc99148daf2b5d89caa49c3c536a0 | [] | no_license | sashapotapovich/castorJSON | 521e019ccca557a57f6ccdf01666b85a5871a940 | 370fbab834dbae121f304642f5379050dc80ad23 | refs/heads/master | 2020-03-30T12:54:53.241215 | 2018-10-02T12:13:25 | 2018-10-02T12:13:25 | 151,247,740 | 0 | 0 | null | 2018-10-02T12:04:34 | 2018-10-02T12:04:34 | null | UTF-8 | Java | false | false | 4,737 | java | /*
* Copyright 2007 Arnaud Blandin, Ralf Joachim
*
* 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.exolab.castor.builder.types;
import org.exolab.javasource.JClass;
import org.exolab.javasource.JSourceCode;
import org.exolab.javasource.JType;
/**
* The xsd:gYearMonth XML Schema type.
*
* @author <a href="mailto:blandin AT intalio DOT com">Arnaud Blandin</a>
* @author <a href="mailto:ralf DOT joachim AT syscon DOT eu">Ralf Joachim</a>
* @version $Revision $ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $
*/
public final class XSGYearMonth extends AbstractRangeFacet {
// --------------------------------------------------------------------------
/** Name of this XSType. */
public static final String NAME = "gYearMonth";
/** Type number of this XSType. */
public static final short TYPE = XSType.GYEARMONTH_TYPE;
/** The JType represented by this XSType. */
private static final JType JTYPE = new JClass("org.exolab.castor.types.GYearMonth");
// --------------------------------------------------------------------------
/**
* {@inheritDoc}
*/
public String getName() {
return NAME;
}
/**
* {@inheritDoc}
*/
public short getType() {
return TYPE;
}
/**
* {@inheritDoc}
*/
public boolean isPrimitive() {
return false;
}
/**
* {@inheritDoc}
*/
public boolean isDateTime() {
return true;
}
/**
* {@inheritDoc}
*/
public JType getJType() {
return JTYPE;
}
/**
* {@inheritDoc}
*/
public String newInstanceCode() {
return "new " + getJType().getName() + "();";
}
/**
* {@inheritDoc}
*/
public String createToJavaObjectCode(final String variableName) {
return variableName;
}
/**
* {@inheritDoc}
*/
public String createFromJavaObjectCode(final String variableName) {
return "(" + getJType().getName() + ") " + variableName;
}
// --------------------------------------------------------------------------
/**
* {@inheritDoc}
*/
public void validationCode(final JSourceCode jsc, final String fixedValue,
final String validatorInstanceName) {
jsc.add("org.exolab.castor.xml.validators.DateTimeValidator typeValidator;\n"
+ "typeValidator = new org.exolab.castor.xml.validators.DateTimeValidator();\n"
+ "{0}.setValidator(typeValidator);", validatorInstanceName);
if (fixedValue != null) {
jsc.add("try {\n" + " typeValidator.setFixed({0});\n"
+ "} catch (java.text.ParseException pe) {\n"
+ " System.out.println(\"ParseException\" + pe);\n" + "}", fixedValue);
}
codePatternFacet(jsc, "typeValidator");
codeWhiteSpaceFacet(jsc, "typeValidator");
if (hasMinimum() || hasMaximum()) {
jsc.add("try {");
// minInclusive / minExclusive facets (only one or the other, never both)
if (getMinInclusive() != null) {
jsc.add(" org.exolab.castor.types.GYearMonth min;\n"
+ " min = org.exolab.castor.types.GYearMonth.parseGYearMonth(\"{0}\");\n"
+ " typeValidator.setMinInclusive(min);", getMinInclusive());
} else if (getMinExclusive() != null) {
jsc.add(" org.exolab.castor.types.GYearMonth min;\n"
+ " min = org.exolab.castor.types.GYearMonth.parseGYearMonth(\"{0}\");\n"
+ " typeValidator.setMinExclusive(min);", getMinExclusive());
}
// maxInclusive / maxExclusive facets (only one or the other, never both)
if (getMaxInclusive() != null) {
jsc.add(" org.exolab.castor.types.GYearMonth max;\n"
+ " max = org.exolab.castor.types.GYearMonth.parseGYearMonth(\"{0}\");\n"
+ " typeValidator.setMaxInclusive(max);", getMaxInclusive());
} else if (getMaxExclusive() != null) {
jsc.add(" org.exolab.castor.types.GYearMonth max;\n"
+ " max = org.exolab.castor.types.GYearMonth.parseGYearMonth(\"{0}\");\n"
+ " typeValidator.setMaxExclusive(max);", getMaxExclusive());
}
jsc.add("} catch (java.text.ParseException pe) {\n"
+ " System.out.println(\"ParseException\" + pe);\n" + "}", "");
}
}
// --------------------------------------------------------------------------
}
| [
"="
] | = |
f21c3463296f3b98cf5e1bf0abd25d34005ead8e | 6c9fbb7e83b671671a2f951371c06aa3694cdcc3 | /adsopenadmin/src/main/java/org/broadleafcommerce/openadmin/server/service/artifact/image/effects/chain/filter/BaseFilter.java | a2056b0da2c3d2e4180279df9efeb36e10db4e27 | [] | no_license | buchiramreddy/ActiveDiscounts | 19aeca79cfdc8902d1a58d48b24f5591d68a8d95 | d71f900ded641ab7404df9a19241f60b03ae58bf | refs/heads/master | 2021-05-27T10:16:54.107132 | 2013-11-06T19:12:04 | 2013-11-06T19:12:04 | 11,724,930 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,691 | java | /*
* Copyright 2008-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.broadleafcommerce.openadmin.server.service.artifact.image.effects.chain.filter;
import java.awt.RenderingHints;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.awt.image.BufferedImageOp;
import java.awt.image.ColorModel;
import java.awt.image.IndexColorModel;
import java.util.Map;
import org.broadleafcommerce.openadmin.server.service.artifact.OperationBuilder;
/**
* DOCUMENT ME!
*
* @author $author$
* @version $Revision$, $Date$
*/
public abstract class BaseFilter implements BufferedImageOp, OperationBuilder {
//~ Instance fields --------------------------------------------------------------------------------------------------
/** DOCUMENT ME! */
protected RenderingHints hints;
//~ Methods ----------------------------------------------------------------------------------------------------------
/* (non-Javadoc)
* @see java.awt.image.BufferedImageOp#createCompatibleDestImage(java.awt.image.BufferedImage, java.awt.image.ColorModel)
*/
@Override public BufferedImage createCompatibleDestImage(BufferedImage src,
ColorModel destCM) {
BufferedImage image;
if (destCM == null) {
destCM = src.getColorModel();
// Not much support for ICM
if (destCM instanceof IndexColorModel) {
destCM = ColorModel.getRGBdefault();
}
}
int w = src.getWidth();
int h = src.getHeight();
image = new BufferedImage(destCM,
destCM.createCompatibleWritableRaster(w, h),
destCM.isAlphaPremultiplied(), null);
return image;
}
//~ ------------------------------------------------------------------------------------------------------------------
/**
* DOCUMENT ME!
*
* @param src DOCUMENT ME!
* @param destCM DOCUMENT ME!
* @param width DOCUMENT ME!
* @param height DOCUMENT ME!
*
* @return DOCUMENT ME!
*/
public BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel destCM, int width, int height) {
BufferedImage image;
if (destCM == null) {
destCM = src.getColorModel();
// Not much support for ICM
if (destCM instanceof IndexColorModel) {
destCM = ColorModel.getRGBdefault();
}
}
image = new BufferedImage(destCM,
destCM.createCompatibleWritableRaster(width, height),
destCM.isAlphaPremultiplied(), null);
return image;
}
//~ ------------------------------------------------------------------------------------------------------------------
/* (non-Javadoc)
* @see java.awt.image.BufferedImageOp#getBounds2D(java.awt.image.BufferedImage)
*/
@Override public Rectangle2D getBounds2D(BufferedImage src) {
return src.getRaster().getBounds();
}
//~ ------------------------------------------------------------------------------------------------------------------
/* (non-Javadoc)
* @see java.awt.image.BufferedImageOp#getPoint2D(java.awt.geom.Point2D, java.awt.geom.Point2D)
*/
@Override public Point2D getPoint2D(Point2D srcPt, Point2D dstPt) {
if (dstPt == null) {
dstPt = new Point2D.Float();
}
dstPt.setLocation(srcPt.getX(), srcPt.getY());
return dstPt;
}
//~ ------------------------------------------------------------------------------------------------------------------
/* (non-Javadoc)
* @see java.awt.image.BufferedImageOp#getRenderingHints()
*/
@Override public RenderingHints getRenderingHints() {
return hints;
}
//~ ------------------------------------------------------------------------------------------------------------------
/**
* DOCUMENT ME!
*
* @param key DOCUMENT ME!
* @param parameterMap DOCUMENT ME!
*
* @return DOCUMENT ME!
*/
protected boolean containsMyFilterParams(String key, Map<String, String> parameterMap) {
for (String paramKey : parameterMap.keySet()) {
if (paramKey.startsWith(key)) {
return true;
}
}
return false;
}
} // end class BaseFilter
| [
"bchittepu@cmcagile.com"
] | bchittepu@cmcagile.com |
d0c17cd305de7353aca9f7a12ebe8d4a5747ef72 | 61602d4b976db2084059453edeafe63865f96ec5 | /com/google/gson/internal/bind/SqlDateTypeAdapter.java | 63d23ad29a7f2ee17b59fc7dcce89d6e963916d2 | [] | no_license | ZoranLi/thunder | 9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0 | 0778679ef03ba1103b1d9d9a626c8449b19be14b | refs/heads/master | 2020-03-20T23:29:27.131636 | 2018-06-19T06:43:26 | 2018-06-19T06:43:26 | 137,848,886 | 12 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,463 | java | package com.google.gson.internal.bind;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.sql.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
public final class SqlDateTypeAdapter extends TypeAdapter<Date> {
public static final TypeAdapterFactory FACTORY = new TypeAdapterFactory() {
public final <T> TypeAdapter<T> create(Gson gson, TypeToken<T> typeToken) {
return typeToken.getRawType() == Date.class ? new SqlDateTypeAdapter() : null;
}
};
private final DateFormat format = new SimpleDateFormat("MMM d, yyyy");
public final synchronized Date read(JsonReader jsonReader) throws IOException {
if (jsonReader.peek() == JsonToken.NULL) {
jsonReader.nextNull();
return null;
}
try {
return new Date(this.format.parse(jsonReader.nextString()).getTime());
} catch (Throwable e) {
throw new JsonSyntaxException(e);
}
}
public final synchronized void write(JsonWriter jsonWriter, Date date) throws IOException {
jsonWriter.value(date == null ? null : this.format.format(date));
}
}
| [
"lizhangliao@xiaohongchun.com"
] | lizhangliao@xiaohongchun.com |
a2ab2902a3051cf3fd5fbeb7be9d1f0aa92b9fd0 | e63363389e72c0822a171e450a41c094c0c1a49c | /Mate20_9_0_0/src/main/java/com/android/server/security/inseservice/InSEService.java | e9f0d98510522805e3c85333f303608637ae4239 | [] | no_license | solartcc/HwFrameWorkSource | fc23ca63bcf17865e99b607cc85d89e16ec1b177 | 5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad | refs/heads/master | 2022-12-04T21:14:37.581438 | 2020-08-25T04:30:43 | 2020-08-25T04:30:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,672 | java | package com.android.server.security.inseservice;
import android.content.Context;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.IHwBinder.DeathRecipient;
import android.os.Looper;
import android.os.Message;
import android.os.SystemProperties;
import android.util.Log;
import com.android.server.security.core.IHwSecurityPlugin;
import com.android.server.security.core.IHwSecurityPlugin.Creator;
import huawei.android.security.inse.IInSEService.Stub;
import vendor.huawei.hardware.huawei_security_vnode.V1_0.IHwSecurityVNode;
public class InSEService extends Stub implements IHwSecurityPlugin {
public static final Object BINDLOCK = new Object();
public static final Creator CREATOR = new Creator() {
public IHwSecurityPlugin createPlugin(Context context) {
if (InSEService.HW_DEBUG) {
Log.d(InSEService.TAG, "create InSEService");
}
return new InSEService(context);
}
public String getPluginPermission() {
return InSEService.INSE_MANAGER_PERMISSION;
}
};
private static final boolean HW_DEBUG;
private static final String INSE_HIDL_SERVICE_NAME = "HwInSExtNode";
private static final String INSE_MANAGER_PERMISSION = "huawei.android.permission.INSE_PERMISSION";
private static final int MAX_INSE_HIDL_DEAMON_REGISTER_TIMES = 10;
private static final int MSG_INSE_HIDL_DEAMON_SERVIE_REGISTER = 1;
private static final int RET_DEFAULT_ERROR_VALUE = -1001;
private static final int RET_EXCEPTION_WHEN_INSE_CALL = -1002;
private static final int RET_INSE_HIDL_DEAMON_IS_NOT_READY = -1000;
private static final String TAG = "InSEServicePlugin";
private static final int TRY_GET_HIDL_DEAMON_DEALY_MILLIS = 1000;
private static HwInSEHidlHandler mHwInSEHidlHandler;
private static HandlerThread mHwInSEThread;
private Context mContext = null;
private DeathRecipient mInSEHidlDeamonDeathRecipient = new DeathRecipient() {
public void serviceDied(long cookie) {
if (InSEService.mHwInSEHidlHandler != null) {
Log.e(InSEService.TAG, "inse hidl deamon service has died, try to reconnect it later.");
InSEService.this.vNode = null;
InSEService.mHwInSEHidlHandler.sendEmptyMessageDelayed(1, 1000);
}
}
};
private int mInSEHidlDeamonRegisterTryTimes = 0;
private IHwSecurityVNode vNode;
private final class HwInSEHidlHandler extends Handler {
public HwInSEHidlHandler(Looper looper) {
super(looper);
}
public void handleMessage(Message msg) {
String str;
if (msg.what != 1) {
str = InSEService.TAG;
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("handler thread received unknown message : ");
stringBuilder.append(msg.what);
Log.e(str, stringBuilder.toString());
return;
}
try {
InSEService.this.vNode = IHwSecurityVNode.getService(InSEService.INSE_HIDL_SERVICE_NAME, true);
} catch (Exception e) {
Log.e(InSEService.TAG, "Try get inse hidl deamon servcie failed in handler message.");
}
if (InSEService.this.vNode != null) {
InSEService.this.mInSEHidlDeamonRegisterTryTimes = 0;
try {
InSEService.this.vNode.linkToDeath(InSEService.this.mInSEHidlDeamonDeathRecipient, 0);
} catch (Exception e2) {
Log.e(InSEService.TAG, "Exception occured when linkToDeath in handle message");
}
} else {
InSEService.this.mInSEHidlDeamonRegisterTryTimes = InSEService.this.mInSEHidlDeamonRegisterTryTimes + 1;
if (InSEService.this.mInSEHidlDeamonRegisterTryTimes < 10) {
str = InSEService.TAG;
StringBuilder stringBuilder2 = new StringBuilder();
stringBuilder2.append("inse hidl daemon service is not ready, try times : ");
stringBuilder2.append(InSEService.this.mInSEHidlDeamonRegisterTryTimes);
Log.e(str, stringBuilder2.toString());
InSEService.mHwInSEHidlHandler.sendEmptyMessageDelayed(1, 1000);
} else {
Log.e(InSEService.TAG, "inse hidl daemon service connection failed.");
}
}
if (InSEService.HW_DEBUG) {
Log.d(InSEService.TAG, "handler thread received request inse hidl deamon message.");
}
}
}
static {
boolean z = SystemProperties.get("ro.secure", "1").equals("0") || Log.HWINFO || (Log.HWModuleLog && Log.isLoggable(TAG, 4));
HW_DEBUG = z;
}
public InSEService(Context context) {
this.mContext = context;
}
public IBinder asBinder() {
checkPermission(INSE_MANAGER_PERMISSION);
return this;
}
public void onStart() {
if (HW_DEBUG) {
Log.d(TAG, "InSEService start");
}
mHwInSEThread = new HandlerThread(TAG);
mHwInSEThread.start();
mHwInSEHidlHandler = new HwInSEHidlHandler(mHwInSEThread.getLooper());
}
public void onStop() {
if (mHwInSEHidlHandler != null) {
mHwInSEHidlHandler = null;
}
if (mHwInSEThread != null) {
mHwInSEThread.quitSafely();
mHwInSEThread = null;
}
try {
if (HW_DEBUG) {
Log.d(TAG, "close InSEService");
}
} catch (UnsatisfiedLinkError e) {
String str = TAG;
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("stop error");
stringBuilder.append(e.toString());
Log.e(str, stringBuilder.toString());
}
}
private void checkPermission(String permission) {
Context context = this.mContext;
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("Must have ");
stringBuilder.append(permission);
stringBuilder.append(" permission.");
context.enforceCallingOrSelfPermission(permission, stringBuilder.toString());
}
public int inSE_PowerOnDelayed(int time, int id) {
checkPermission(INSE_MANAGER_PERMISSION);
if (HW_DEBUG) {
Log.d(TAG, "current inse feature is a stub function now");
}
return id < 0 ? -1 : 1;
}
}
| [
"lygforbs0@mail.com"
] | lygforbs0@mail.com |
af27a4ef6e3ced8af1ae3086271cdcff764e87f3 | 473b76b1043df2f09214f8c335d4359d3a8151e0 | /benchmark/bigclonebenchdata_completed/9088422.java | 529005031217ddb1a5f28163d877de3c99c6ee6f | [] | no_license | whatafree/JCoffee | 08dc47f79f8369af32e755de01c52d9a8479d44c | fa7194635a5bd48259d325e5b0a190780a53c55f | refs/heads/master | 2022-11-16T01:58:04.254688 | 2020-07-13T20:11:17 | 2020-07-13T20:11:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,311 | java |
class c9088422 {
public static MyHelperClass ENCODE;
//public MyHelperClass ENCODE;
public static boolean encodeFileToFile(String infile, String outfile) {
boolean success = false;
java.io.InputStream in = null;
java.io.OutputStream out = null;
try {
in =(java.io.InputStream)(Object) new InputStream((BufferedInputStream)(Object)new java.io.BufferedInputStream(new java.io.FileInputStream(infile)), ENCODE);
out = new java.io.BufferedOutputStream(new java.io.FileOutputStream(outfile));
byte[] buffer = new byte[65536];
int read = -1;
while ((read = in.read(buffer)) >= 0) {
out.write(buffer, 0, read);
}
success = true;
} catch (java.io.IOException exc) {
exc.printStackTrace();
} finally {
try {
in.close();
} catch (Exception exc) {
}
try {
out.close();
} catch (Exception exc) {
}
}
return success;
}
}
// Code below this line has been added to remove errors
class MyHelperClass {
}
class InputStream {
InputStream(BufferedInputStream o0, MyHelperClass o1){}
InputStream(){}}
class BufferedInputStream {
}
| [
"piyush16066@iiitd.ac.in"
] | piyush16066@iiitd.ac.in |
dbc8738c13090d1a9deca91e70296dd99779903e | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/MOCKITO-10b-1-13-SPEA2-WeightedSum:TestLen:CallDiversity/org/mockito/exceptions/Reporter_ESTest.java | 33b76e2ec2523d22d8d9a6a32e7d0cf70c31ea01 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 818 | java | /*
* This file was automatically generated by EvoSuite
* Mon Apr 06 16:35:44 UTC 2020
*/
package org.mockito.exceptions;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
import org.mockito.exceptions.Reporter;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class Reporter_ESTest extends Reporter_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
Reporter reporter0 = new Reporter();
Class<String> class0 = String.class;
// Undeclared exception!
reporter0.serializableWontWorkForObjectsThatDontImplementSerializable(class0);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
1b05b88dd23535f4d63d5d628e9b36a1d2b41c92 | d15803d5b16adab18b0aa43d7dca0531703bac4a | /com/google/android/gms/common/stats/zze.java | 6ac930526afaccaa48c7878372d3618ec7310340 | [] | no_license | kenuosec/Decompiled-Whatsapp | 375c249abdf90241be3352aea38eb32a9ca513ba | 652bec1376e6cd201d54262cc1d4e7637c6334ed | refs/heads/master | 2021-12-08T15:09:13.929944 | 2016-03-23T06:04:08 | 2016-03-23T06:04:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,765 | java | package com.google.android.gms.common.stats;
import android.os.SystemClock;
import android.support.v4.util.SimpleArrayMap;
import android.util.Log;
public class zze {
private final long zzafP;
private final int zzafQ;
private final SimpleArrayMap zzafR;
public zze() {
this.zzafP = 60000;
this.zzafQ = 10;
this.zzafR = new SimpleArrayMap(10);
}
public zze(int i, long j) {
this.zzafP = j;
this.zzafQ = i;
this.zzafR = new SimpleArrayMap();
}
private void zzb(long j, long j2) {
boolean z = zzd.a;
int size = this.zzafR.size() - 1;
while (size >= 0) {
if (j2 - ((Long) this.zzafR.valueAt(size)).longValue() > j) {
this.zzafR.removeAt(size);
}
int i = size - 1;
if (!z) {
size = i;
} else {
return;
}
}
}
public Long zzcy(String str) {
Long l;
boolean z = zzd.a;
long elapsedRealtime = SystemClock.elapsedRealtime();
long j = this.zzafP;
synchronized (this) {
do {
if (this.zzafR.size() < this.zzafQ) {
break;
}
zzb(j, elapsedRealtime);
j /= 2;
Log.w("ConnectionTracker", "The max capacity " + this.zzafQ + " is not enough. Current durationThreshold is: " + j);
} while (!z);
l = (Long) this.zzafR.put(str, Long.valueOf(elapsedRealtime));
}
return l;
}
public boolean zzcz(String str) {
boolean z;
synchronized (this) {
z = this.zzafR.remove(str) != null;
}
return z;
}
}
| [
"gigalitelk@gmail.com"
] | gigalitelk@gmail.com |
6706075e495403133a23f41b1f84972151cd8292 | 0529524c95045b3232f6553d18a7fef5a059545e | /app/src/androidTest/java/TestCase_6298BDF78BF45145CCA2A051DCC55543B6E4F61CD9E438967AB708A385E53CB6__1790730958.java | ad959fe4f31b0a9393fb0b8fdfce05cfe52d31dc | [] | no_license | sunxiaobiu/BasicUnitAndroidTest | 432aa3e10f6a1ef5d674f269db50e2f1faad2096 | fed24f163d21408ef88588b8eaf7ce60d1809931 | refs/heads/main | 2023-02-11T21:02:03.784493 | 2021-01-03T10:07:07 | 2021-01-03T10:07:07 | 322,577,379 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 329 | java | import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
public class TestCase_6298BDF78BF45145CCA2A051DCC55543B6E4F61CD9E438967AB708A385E53CB6__1790730958 {
@Test
public void testCase() throws Exception {
// $FF: Couldn't be decompiled
}
}
| [
"sunxiaobiu@gmail.com"
] | sunxiaobiu@gmail.com |
8d806b8deb8c200e435a2cf0d8b9f7d09c118e28 | 7bea7fb60b5f60f89f546a12b43ca239e39255b5 | /src/java/rmi/server/RMISocketFactory.java | 8df93affb289d1413b8dc312110f97d67fb85633 | [] | no_license | sorakeet/fitcorejdk | 67623ab26f1defb072ab473f195795262a8ddcdd | f946930a826ddcd688b2ddbb5bc907d2fc4174c3 | refs/heads/master | 2021-01-01T05:52:19.696053 | 2017-07-15T01:33:41 | 2017-07-15T01:33:41 | 97,292,673 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,910 | java | /**
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package java.rmi.server;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketException;
public abstract class RMISocketFactory
implements RMIClientSocketFactory, RMIServerSocketFactory{
private static RMISocketFactory factory=null;
private static RMISocketFactory defaultSocketFactory;
private static RMIFailureHandler handler=null;
public RMISocketFactory(){
super();
}
public synchronized static RMISocketFactory getSocketFactory(){
return factory;
}
public synchronized static void setSocketFactory(RMISocketFactory fac)
throws IOException{
if(factory!=null){
throw new SocketException("factory already defined");
}
SecurityManager security=System.getSecurityManager();
if(security!=null){
security.checkSetFactory();
}
factory=fac;
}
public synchronized static RMISocketFactory getDefaultSocketFactory(){
if(defaultSocketFactory==null){
defaultSocketFactory=
new sun.rmi.transport.proxy.RMIMasterSocketFactory();
}
return defaultSocketFactory;
}
public synchronized static RMIFailureHandler getFailureHandler(){
return handler;
}
public synchronized static void setFailureHandler(RMIFailureHandler fh){
SecurityManager security=System.getSecurityManager();
if(security!=null){
security.checkSetFactory();
}
handler=fh;
}
public abstract Socket createSocket(String host,int port)
throws IOException;
public abstract ServerSocket createServerSocket(int port)
throws IOException;
}
| [
"panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7"
] | panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7 |
45b5e5549bf83ee0c8b5bd4b3db43e564676536b | 943d6f3e551c9f1b1460dc55d0cec55fa94faf79 | /src/leetcode/nov/SmallestDivisior.java | 3e6055448158c6f5b06e27e45ea19c90d4a9d105 | [] | no_license | enataraj/Coding | 1dab3a8361724e0fed60d14b12ad550c99b196e1 | 1bfe76b053f215437f02c872b184f51d617f151f | refs/heads/master | 2023-08-12T12:36:58.698618 | 2021-10-04T06:33:37 | 2021-10-04T06:33:37 | 272,099,079 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,235 | java | package leetcode.nov;
public class SmallestDivisior {
public int smallestDivisor(int[] nums, int threshold) {
int lo = 0, hi = (int) 1e6;
while (hi > lo + 1) {
int mid = lo + (hi - lo) / 2;
if (ok(nums, mid, threshold)) {
hi = mid;
} else {
lo = mid;
}
}
return hi;
}
//Is sum of each 'num / mid' not greater than threshold?
//FFFFF'T'TTTTTT
private boolean ok(int[] nums, int mid, int threshold) {
int res = 0;
for (int n : nums) {
res += (n + mid - 1) / mid;
}
return res <= threshold;
}
public int smallestDivisor_app1(int[] nums, int threshold) {
int max = nums[0];
for(int num : nums){
max = Math.max(num, max);
}
int left = 1;
int right = max;
while(left < right){
int mid = left + (right - left)/2;
int res = 0;
for(int num : nums){
res += (num + mid - 1) / mid;
}
if(res <= threshold){
right = mid;
}
else{
left = mid + 1;
}
}
return left;
}
public int smallestDivisorParin(int[] nums, int threshold) {
int low = 1,
high = getMax(nums);
while (low < high) {
int mid = low + (high - low) / 2,
divisionSum = getDivisionSum(nums, mid);
if (divisionSum <= threshold) {
high = mid;
} else {
low = mid + 1;
}
}
return low;
}
private int getDivisionSum(int[] nums, int divisor) {
int divisionSum = 0;
for (int num: nums) {
divisionSum += (int) Math.ceil((double) num / (double) divisor);
}
return divisionSum;
}
private int getMax(int[] nums) {
int max = 0;
for (int num : nums) {
max = Math.max(max, num);
}
return max;
}
}
| [
"enataraj@cisco.com"
] | enataraj@cisco.com |
dc9892d0074ccf5c48189b8bf7d8d47e91ed0bec | 59f9102cbcb7a0ca6ffd6840e717e8648ab2f12a | /jdk6/org/omg/CosNaming/BindingListHolder.java | 60445697afe07a5f5dfa52ccee036d1adead310b | [] | no_license | yuanhua1/ruling_java | 77a52b2f9401c5392bf1409fc341ab794c555ee5 | 7f4b47c9f013c5997f138ddc6e4f916cc7763476 | refs/heads/master | 2020-08-22T22:50:35.762836 | 2019-06-24T15:39:54 | 2019-06-24T15:39:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 944 | java | package org.omg.CosNaming;
/**
* org/omg/CosNaming/BindingListHolder.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/org/omg/CosNaming/nameservice.idl
* Friday, January 20, 2012 10:38:38 AM GMT-08:00
*/
/**
* List of Bindings.
*/
public final class BindingListHolder implements org.omg.CORBA.portable.Streamable
{
public org.omg.CosNaming.Binding value[] = null;
public BindingListHolder ()
{
}
public BindingListHolder (org.omg.CosNaming.Binding[] initialValue)
{
value = initialValue;
}
public void _read (org.omg.CORBA.portable.InputStream i)
{
value = org.omg.CosNaming.BindingListHelper.read (i);
}
public void _write (org.omg.CORBA.portable.OutputStream o)
{
org.omg.CosNaming.BindingListHelper.write (o, value);
}
public org.omg.CORBA.TypeCode _type ()
{
return org.omg.CosNaming.BindingListHelper.type ();
}
}
| [
"massimo.paladin@gmail.com"
] | massimo.paladin@gmail.com |
3b6873aceb8d212266e73e849899437f9bcd82f0 | f5aacd77191465d923ad982adaf32460737f94d2 | /smxknife-java/src/main/java/com/smxknife/java2/thread/forkjoin/demo03/_Run_RecursiveTask_get.java | c79551431ec5df45e71752d0c904b22b7d7db31d | [] | no_license | smxknife/smxknife | a0a87b5624aaa2bf3c82b05f2180a79bcbc65170 | f6f3ed40bb998d9aea8cba4936ccfa738e4a35b9 | refs/heads/master | 2023-03-15T03:43:16.570846 | 2022-04-05T06:07:47 | 2022-04-05T06:07:47 | 122,691,839 | 1 | 0 | null | 2023-03-08T17:25:34 | 2018-02-24T01:46:19 | Java | UTF-8 | Java | false | false | 696 | java | package com.smxknife.java2.thread.forkjoin.demo03;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.ForkJoinTask;
import java.util.concurrent.TimeUnit;
/**
* @author smxknife
* 2019/8/31
*/
public class _Run_RecursiveTask_get {
public static void main(String[] args) throws ExecutionException, InterruptedException {
ForkJoinPool pool = new ForkJoinPool();
RecursiveTask03 task03 = new RecursiveTask03();
System.out.println(task03.hashCode());
ForkJoinTask<Integer> forkJoinTask = pool.submit(task03);
System.out.println(forkJoinTask.hashCode() + " " + forkJoinTask.get());
TimeUnit.SECONDS.sleep(5);
}
}
| [
"2323937771@qq.com"
] | 2323937771@qq.com |
238b13c87b667ae90f2cbe6bf72843e78783a64b | 4bbfa242353fe0485fb2a1f75fdd749c7ee05adc | /ims-core/framework/com/ailk/openbilling/persistence/imsxdr/entity/SPayOffMode.java | 36bbb54623a0fb53c4578fbc797f8225d4aa4c2d | [] | no_license | 859162000/infosystem | 88b23a5b386600503ec49b14f3b4da4df7a6d091 | 96d4d50cd9964e713bb95520d6eeb7e4aa32c930 | refs/heads/master | 2021-01-20T04:39:24.383807 | 2017-04-01T10:59:24 | 2017-04-01T10:59:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,252 | java | package com.ailk.openbilling.persistence.imsxdr.entity;
import javax.persistence.Entity;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAccessType;
import com.ailk.easyframe.web.common.annotation.Sdl;
import com.ailk.easyframe.sdl.sdlbuffer.CsdlStructObject;
import com.ailk.easyframe.sdl.sdlbuffer.MemberTypeInfo;
import javax.xml.bind.annotation.XmlTransient;
import com.google.gson.annotations.Expose;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.builder.HashCodeBuilder;
import com.ailk.easyframe.web.common.dal.IComplexEntity;
import java.util.List;
import jef.codegen.support.NotModified;
/**
* This class is generated automatically by Asiainfo-Linkage EasyFrame.
*
*/
@NotModified
@Entity
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(propOrder={"monitorCdr","billingType","payforBillingType"})
@Sdl(module="MXdr")
public class SPayOffMode extends CsdlStructObject implements IComplexEntity{
public final static String COL_MONITOR_CDR = "MONITOR_CDR";
public final static String COL_BILLING_TYPE = "BILLING_TYPE";
public final static String COL_PAYFOR_BILLING_TYPE = "PAYFOR_BILLING_TYPE";
public final static int IDX_MONITOR_CDR = 0;
public final static int IDX_BILLING_TYPE = 1;
public final static int IDX_PAYFOR_BILLING_TYPE = 2;
/**
*
*/
@XmlElement(name="monitorCdr")
@Sdl
private int monitorCdr;
/**
*
*/
@XmlElement(name="billingType")
@Sdl
private int billingType;
/**
*
*/
@XmlElement(name="payforBillingType")
@Sdl
private int payforBillingType;
public void setMonitorCdr(int obj){
this.monitorCdr = obj;
onFieldSet(0, obj);
}
public int getMonitorCdr(){
return monitorCdr;
}
public void setBillingType(int obj){
this.billingType = obj;
onFieldSet(1, obj);
}
public int getBillingType(){
return billingType;
}
public void setPayforBillingType(int obj){
this.payforBillingType = obj;
onFieldSet(2, obj);
}
public int getPayforBillingType(){
return payforBillingType;
}
public List<MemberTypeInfo> getMemberInfoList(){
return memberTypeInfoList;
}
public SPayOffMode(){
m_llMarkers = new long[1]; // used marker
m_llUsedMarkers = new long[1]; // used marker
fieldNum = 3;
markerNum = 1;
}
/**
* ๅๅปบcopyๆนๆณ
*/
public SPayOffMode(SPayOffMode arg0){
copy(arg0);
}
public void copy(final SPayOffMode rhs){
if (rhs == null)return;
this.m_llMarker = rhs.m_llMarker;
this.m_llUsedMarker = rhs.m_llUsedMarker;
this.fieldNum = rhs.fieldNum;
this.markerNum = rhs.markerNum;
for (int i = 0; i < markerNum; i++) {
m_llMarkers[i] = rhs.m_llMarkers[i];
m_llUsedMarkers[i] = rhs.m_llUsedMarkers[i];
}
monitorCdr = rhs.monitorCdr;
billingType = rhs.billingType;
payforBillingType = rhs.payforBillingType;
}
public boolean equals(final Object rhs0){
if (rhs0 == null)return false;
SPayOffMode rhs=(SPayOffMode)rhs0;
if(!ObjectUtils.equals(monitorCdr, rhs.monitorCdr)) return false;
if(!ObjectUtils.equals(billingType, rhs.billingType)) return false;
if(!ObjectUtils.equals(payforBillingType, rhs.payforBillingType)) return false;
return true;
}
public int hashCode(){
return new HashCodeBuilder()
.append(monitorCdr)
.append(billingType)
.append(payforBillingType)
.toHashCode();
}
protected static java.util.List<MemberTypeInfo> memberTypeInfoList = new java.util.ArrayList<MemberTypeInfo>(3);
public static final long BITS_ALL_MARKER = 0x4L;
public static final long BITS_NOT_NULL_MARKER = 0x0L;
public static final String SZ_TYPE_NAME = "com.ailk.openbilling.persistence.imsxdr.entity.SPayOffMode";
@XmlTransient
@Expose(deserialize = false, serialize = false)
protected long m_llMarker = 0l; // null marker
@XmlTransient
@Expose(deserialize = false, serialize = false)
protected long m_llUsedMarker = 0l; // used marker
static{
memberTypeInfoList.add(MemberTypeInfo.get(SPayOffMode.class, "MONITOR_CDR", 0, int.class));
memberTypeInfoList.add(MemberTypeInfo.get(SPayOffMode.class, "BILLING_TYPE", 1, int.class));
memberTypeInfoList.add(MemberTypeInfo.get(SPayOffMode.class, "PAYFOR_BILLING_TYPE", 2, int.class));
}
} | [
"ljyshiqian@126.com"
] | ljyshiqian@126.com |
d825b656fd71d32c274cd15aa3e0265f585a092d | e89dc01c95b8b45404f971517c2789fd21657749 | /src/main/java/com/alipay/api/response/AlipayOfflineMarketReporterrorCreateResponse.java | 3f923865073958bec49b84f289f647fed60865f5 | [
"Apache-2.0"
] | permissive | guoweiecust/alipay-sdk-java-all | 3370466eec70c5422c8916c62a99b1e8f37a3f46 | bb2b0dc8208a7a0ab8521a52f8a5e1fcef61aeb9 | refs/heads/master | 2023-05-05T07:06:47.823723 | 2021-05-25T15:26:21 | 2021-05-25T15:26:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 391 | java | package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.offline.market.reporterror.create response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipayOfflineMarketReporterrorCreateResponse extends AlipayResponse {
private static final long serialVersionUID = 6849668224368315161L;
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
9b32751cb664f3de671a7302b6b37f124aba415a | d461286b8aa5d9606690892315a007062cb3e0f3 | /src/main/java/com/ziaan/scorm/multi/MultipartFilter.java | 68797a71825d5057fa1656cb629b771c698c5a07 | [] | no_license | leemiran/NISE_DEV | f85b26c78aaa5ffadc62c0512332c9bdfe5813b6 | 6b618946945d8afa08826cb98b5359f295ff0c73 | refs/heads/master | 2020-08-07T05:04:38.474163 | 2019-10-10T01:55:33 | 2019-10-10T01:55:33 | 212,016,199 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,318 | java | // Decompiled by Jad v1.5.7d. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http:// www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3)
// Source File Name: MultipartFilter.java
package com.ziaan.scorm.multi;
import java.io.File;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
// Referenced classes of package com.ziaan.scorm.multi:
// MultipartWrapper
public class MultipartFilter
implements Filter
{
public FilterConfig getFilterConfig() {
return config;
}
public void setFilterConfig(FilterConfig arg0 ) {
}
public MultipartFilter()
{
config = null;
dir = null;
}
public void init(FilterConfig filterconfig)
throws ServletException
{
config = filterconfig;
dir = filterconfig.getInitParameter("uploadDir");
if ( dir == null )
{
File file = (File)filterconfig.getServletContext().getAttribute("javax.servlet.context.tempdir");
if ( file != null )
dir = file.toString();
else
throw new ServletException("MultipartFilter: No upload directory found: set an uploadDir init parameter or ensure the javax.servlet.context.tempdir directory is valid");
}
}
public void destroy()
{
config = null;
}
public void doFilter(ServletRequest servletrequest, ServletResponse servletresponse, FilterChain filterchain)
throws IOException, ServletException
{
HttpServletRequest httpservletrequest = (HttpServletRequest)servletrequest;
String s = httpservletrequest.getHeader("Content-Type");
if ( s == null || !s.startsWith("multipart/form-data"))
{
filterchain.doFilter(servletrequest, servletresponse);
} else
{
MultipartWrapper multipartwrapper = new MultipartWrapper(httpservletrequest, dir);
filterchain.doFilter(multipartwrapper, servletresponse);
}
}
private FilterConfig config;
private String dir;
}
| [
"knise@10.60.223.121"
] | knise@10.60.223.121 |
45535d02ebfc5f6969ec02255849c766a125953a | e2fc116abc589fecc9f292c14abc7d6d8e6c0726 | /joy-design-pattern-yanmo/src/main/java/cn/javass/dp/adapter/example5/LogModel.java | 0150a01cbc1c343a77e1d1a57c0acf4051d998bc | [] | no_license | joycgj/smc-multi-project | 00d918f84ff61c5092b83a8a54f31e7f57ea34f4 | 1d72b47e7d6e876df711b2bdfe883ec89546cf97 | refs/heads/master | 2021-06-02T16:32:52.882168 | 2016-04-18T12:40:52 | 2016-04-18T12:40:52 | 20,757,048 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,254 | java | package cn.javass.dp.adapter.example5;
import java.io.*;
/**
* ๆฅๅฟๆฐๆฎๅฏน่ฑก
*/
public class LogModel implements Serializable {
/**
* ๆฅๅฟ็ผๅท
*/
private String logId;
/**
* ๆไฝไบบๅ
*/
private String operateUser;
/**
* ๆไฝๆถ้ด๏ผไปฅyyyy-MM-dd HH:mm:ss็ๆ ผๅผ่ฎฐๅฝ
*/
private String operateTime;
/**
* ๆฅๅฟๅ
ๅฎน
*/
private String logContent;
public String getLogId() {
return logId;
}
public void setLogId(String logId) {
this.logId = logId;
}
public String getOperateUser() {
return operateUser;
}
public void setOperateUser(String operateUser) {
this.operateUser = operateUser;
}
public String getOperateTime() {
return operateTime;
}
public void setOperateTime(String operateTime) {
this.operateTime = operateTime;
}
public String getLogContent() {
return logContent;
}
public void setLogContent(String logContent) {
this.logContent = logContent;
}
public String toString() {
return "logId=" + logId + ",operateUser=" + operateUser + ",operateTime" + operateTime + ",logContent=" + logContent;
}
}
| [
"gaojiechen@sohu-inc.com"
] | gaojiechen@sohu-inc.com |
a9b7196780cb1fa779b431b8b8a871f13f7fbf40 | 8169b23c8a4c59642d113b2045d28558ff3f4848 | /cloud-provider-payment8003-zk/src/main/java/com/coderman/payment/service/PaymentService.java | 16f1dc2ebe573c4f17d0ecc0343463807f2751fe | [
"Apache-2.0"
] | permissive | Sugariscool/spring-cloud-hoxton | 796f92325fc7bf9a87766d3f319d298d75ce4cc7 | c7901d6db8f1c9137de7d27e7dfbd0d29c0a2754 | refs/heads/main | 2023-01-24T22:00:17.811851 | 2020-12-10T08:16:06 | 2020-12-10T08:16:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 568 | java | package com.coderman.payment.service;
import com.coderman.payment.model.Payment;
import java.math.BigDecimal;
import java.util.List;
/**
* @Author zhangyukang
* @Date 2020/12/4 12:27
* @Version 1.0
**/
public interface PaymentService {
/**
* ๆฅ่ฏขๆฏไปไฟกๆฏ
* @param id
* @return
*/
Payment findById(Long id);
/**
* ๆฏไปๆฅๅฃ
* @param money
* @param orderId
*/
void create(String orderId,BigDecimal money);
/**
* ๆๆๆฏไปๆตๆฐด
* @return
*/
List<Payment> listAll();
}
| [
"3053161401@qq.com"
] | 3053161401@qq.com |
8383b4be94bd92d17e771764d4e3e95c78d6dbff | ceeacb5157b67b43d40615daf5f017ae345816db | /generated/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HybridConnectionKeyImpl.java | fb38008a9e8e7f38c3373399f08d8928adc2ec06 | [
"LicenseRef-scancode-generic-cla"
] | no_license | ChenTanyi/autorest.java | 1dd9418566d6b932a407bf8db34b755fe536ed72 | 175f41c76955759ed42b1599241ecd876b87851f | refs/heads/ci | 2021-12-25T20:39:30.473917 | 2021-11-07T17:23:04 | 2021-11-07T17:23:04 | 218,717,967 | 0 | 0 | null | 2020-11-18T14:14:34 | 2019-10-31T08:24:24 | Java | UTF-8 | Java | false | false | 1,592 | java | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.appservice.generated.implementation;
import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionKeyInner;
import com.azure.resourcemanager.appservice.generated.models.HybridConnectionKey;
public final class HybridConnectionKeyImpl implements HybridConnectionKey {
private HybridConnectionKeyInner innerObject;
private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager;
HybridConnectionKeyImpl(
HybridConnectionKeyInner innerObject,
com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
public String id() {
return this.innerModel().id();
}
public String name() {
return this.innerModel().name();
}
public String type() {
return this.innerModel().type();
}
public String kind() {
return this.innerModel().kind();
}
public String sendKeyName() {
return this.innerModel().sendKeyName();
}
public String sendKeyValue() {
return this.innerModel().sendKeyValue();
}
public HybridConnectionKeyInner innerModel() {
return this.innerObject;
}
private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() {
return this.serviceManager;
}
}
| [
"actions@github.com"
] | actions@github.com |
592752ca0fb64171e1f8ce98138c2b8b914393b2 | e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3 | /src/chosun/ciis/ps/pbs/reader/dm/PS_U_BO_READERINFO_ONEDM.java | c4d8fc85decce8d686d744ae6f595909ff41986a | [] | no_license | nosmoon/misdevteam | 4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60 | 1829d5bd489eb6dd307ca244f0e183a31a1de773 | refs/heads/master | 2020-04-15T15:57:05.480056 | 2019-01-10T01:12:01 | 2019-01-10T01:12:01 | 164,812,547 | 1 | 0 | null | null | null | null | UHC | Java | false | false | 8,385 | java | /***************************************************************************************************
* ํ์ผ๋ช
: PS_U_BO_READERINFO_ONE.java
* ๊ธฐ๋ฅ : ๋
์ - ์ง๊ตญ ์ถํ ๋
์ ์์
* ์์ฑ์ผ์ : 2007-03-28
* ์์ฑ์ : ์ ํํ
***************************************************************************************************/
/***************************************************************************************************
* ์์ ๋ด์ญ :
* ์์ ์ :
* ์์ ์ผ์ :
* ๋ฐฑ์
:
***************************************************************************************************/
package chosun.ciis.ps.pbs.reader.dm;
import java.sql.*;
import oracle.jdbc.driver.*;
import somo.framework.db.*;
import somo.framework.util.*;
import chosun.ciis.ps.pbs.reader.ds.*;
import chosun.ciis.ps.pbs.reader.rec.*;
/**
* ๋
์ - ์ง๊ตญ ์ถํ ์์
*
*/
public class PS_U_BO_READERINFO_ONEDM extends somo.framework.db.BaseDM implements java.io.Serializable{
public String incmgpers;
public String rdr_no;
public String medicd;
public String termsubsno;
public String acq_bocd;
public String sendmthd;
public String dstccd;
public String dlvno;
public String bo_rdr_no;
public PS_U_BO_READERINFO_ONEDM(){}
public PS_U_BO_READERINFO_ONEDM(String incmgpers, String rdr_no, String medicd, String termsubsno, String acq_bocd, String sendmthd, String dstccd, String dlvno, String bo_rdr_no){
this.incmgpers = incmgpers;
this.rdr_no = rdr_no;
this.medicd = medicd;
this.termsubsno = termsubsno;
this.acq_bocd = acq_bocd;
this.sendmthd = sendmthd;
this.dstccd = dstccd;
this.dlvno = dlvno;
this.bo_rdr_no = bo_rdr_no;
}
public void setIncmgpers(String incmgpers){
this.incmgpers = incmgpers;
}
public void setRdr_no(String rdr_no){
this.rdr_no = rdr_no;
}
public void setMedicd(String medicd){
this.medicd = medicd;
}
public void setTermsubsno(String termsubsno){
this.termsubsno = termsubsno;
}
public void setAcq_bocd(String acq_bocd){
this.acq_bocd = acq_bocd;
}
public void setSendmthd(String sendmthd){
this.sendmthd = sendmthd;
}
public void setDstccd(String dstccd){
this.dstccd = dstccd;
}
public void setDlvno(String dlvno){
this.dlvno = dlvno;
}
public void setBo_rdr_no(String bo_rdr_no){
this.bo_rdr_no = bo_rdr_no;
}
public String getIncmgpers(){
return this.incmgpers;
}
public String getRdr_no(){
return this.rdr_no;
}
public String getMedicd(){
return this.medicd;
}
public String getTermsubsno(){
return this.termsubsno;
}
public String getAcq_bocd(){
return this.acq_bocd;
}
public String getSendmthd(){
return this.sendmthd;
}
public String getDstccd(){
return this.dstccd;
}
public String getDlvno(){
return this.dlvno;
}
public String getBo_rdr_no(){
return this.bo_rdr_no;
}
public String getSQL(){
return "{ call SP_PS_U_BO_READERINFO_ONE( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) }";
}
public void setParams(CallableStatement cstmt, BaseDM bdm) throws SQLException{
PS_U_BO_READERINFO_ONEDM dm = (PS_U_BO_READERINFO_ONEDM)bdm;
cstmt.registerOutParameter(1, Types.VARCHAR);
cstmt.registerOutParameter(2, Types.VARCHAR);
cstmt.setString(3, dm.incmgpers);
cstmt.setString(4, dm.rdr_no);
cstmt.setString(5, dm.medicd);
cstmt.setString(6, dm.termsubsno);
cstmt.setString(7, dm.acq_bocd);
cstmt.setString(8, dm.sendmthd);
cstmt.setString(9, dm.dstccd);
cstmt.setString(10, dm.dlvno);
cstmt.setString(11, dm.bo_rdr_no);
}
public BaseDataSet createDataSetObject(){
return new chosun.ciis.ps.pbs.reader.ds.PS_U_BO_READERINFO_ONEDataSet();
}
}
/*----------------------------------------------------------------------------------------------------
Web Tier์์ req.getParameter() ์ฒ๋ฆฌ ๋ฐ ๊ฒฐ๊ณผํ์ธ ๊ฒ์ฌ์ ์ฌ์ฉํ์ญ์์ค.
String incmgpers = req.getParameter("incmgpers");
if( incmgpers == null){
System.out.println(this.toString+" : incmgpers is null" );
}else{
System.out.println(this.toString+" : incmgpers is "+incmgpers );
}
String rdr_no = req.getParameter("rdr_no");
if( rdr_no == null){
System.out.println(this.toString+" : rdr_no is null" );
}else{
System.out.println(this.toString+" : rdr_no is "+rdr_no );
}
String medicd = req.getParameter("medicd");
if( medicd == null){
System.out.println(this.toString+" : medicd is null" );
}else{
System.out.println(this.toString+" : medicd is "+medicd );
}
String termsubsno = req.getParameter("termsubsno");
if( termsubsno == null){
System.out.println(this.toString+" : termsubsno is null" );
}else{
System.out.println(this.toString+" : termsubsno is "+termsubsno );
}
String acq_bocd = req.getParameter("acq_bocd");
if( acq_bocd == null){
System.out.println(this.toString+" : acq_bocd is null" );
}else{
System.out.println(this.toString+" : acq_bocd is "+acq_bocd );
}
String sendmthd = req.getParameter("sendmthd");
if( sendmthd == null){
System.out.println(this.toString+" : sendmthd is null" );
}else{
System.out.println(this.toString+" : sendmthd is "+sendmthd );
}
String dstccd = req.getParameter("dstccd");
if( dstccd == null){
System.out.println(this.toString+" : dstccd is null" );
}else{
System.out.println(this.toString+" : dstccd is "+dstccd );
}
String dlvno = req.getParameter("dlvno");
if( dlvno == null){
System.out.println(this.toString+" : dlvno is null" );
}else{
System.out.println(this.toString+" : dlvno is "+dlvno );
}
String bo_rdr_no = req.getParameter("bo_rdr_no");
if( bo_rdr_no == null){
System.out.println(this.toString+" : bo_rdr_no is null" );
}else{
System.out.println(this.toString+" : bo_rdr_no is "+bo_rdr_no );
}
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier์์ req.getParameter() ์ฒ๋ฆฌ์ ์ฌ์ฉํ์ญ์์ค.
String incmgpers = Util.checkString(req.getParameter("incmgpers"));
String rdr_no = Util.checkString(req.getParameter("rdr_no"));
String medicd = Util.checkString(req.getParameter("medicd"));
String termsubsno = Util.checkString(req.getParameter("termsubsno"));
String acq_bocd = Util.checkString(req.getParameter("acq_bocd"));
String sendmthd = Util.checkString(req.getParameter("sendmthd"));
String dstccd = Util.checkString(req.getParameter("dstccd"));
String dlvno = Util.checkString(req.getParameter("dlvno"));
String bo_rdr_no = Util.checkString(req.getParameter("bo_rdr_no"));
----------------------------------------------------------------------------------------------------*//*----------------------------------------------------------------------------------------------------
Web Tier์์ ํ๊ธ์ฒ๋ฆฌ์ ๋์์ req.getParameter() ์ฒ๋ฆฌ์ ์ฌ์ฉํ์ญ์์ค.
String incmgpers = Util.Uni2Ksc(Util.checkString(req.getParameter("incmgpers")));
String rdr_no = Util.Uni2Ksc(Util.checkString(req.getParameter("rdr_no")));
String medicd = Util.Uni2Ksc(Util.checkString(req.getParameter("medicd")));
String termsubsno = Util.Uni2Ksc(Util.checkString(req.getParameter("termsubsno")));
String acq_bocd = Util.Uni2Ksc(Util.checkString(req.getParameter("acq_bocd")));
String sendmthd = Util.Uni2Ksc(Util.checkString(req.getParameter("sendmthd")));
String dstccd = Util.Uni2Ksc(Util.checkString(req.getParameter("dstccd")));
String dlvno = Util.Uni2Ksc(Util.checkString(req.getParameter("dlvno")));
String bo_rdr_no = Util.Uni2Ksc(Util.checkString(req.getParameter("bo_rdr_no")));
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier์์ DM ํ์ผ์ ๋ณ์๋ฅผ ์ค์ ์ ์ฌ์ฉํ์ญ์์ค.
dm.setIncmgpers(incmgpers);
dm.setRdr_no(rdr_no);
dm.setMedicd(medicd);
dm.setTermsubsno(termsubsno);
dm.setAcq_bocd(acq_bocd);
dm.setSendmthd(sendmthd);
dm.setDstccd(dstccd);
dm.setDlvno(dlvno);
dm.setBo_rdr_no(bo_rdr_no);
----------------------------------------------------------------------------------------------------*/
/* ์์ฑ์๊ฐ : Fri Mar 30 14:47:54 KST 2007 */ | [
"DLCOM000@172.16.30.11"
] | DLCOM000@172.16.30.11 |
c28b637c5516029ad08de06d4941dc640cad4867 | 9b112ccf52c54ca42a372d01b47d02f213f60de6 | /app/src/main/java/com/ay/lxunhan/ui/public_ac/activity/PayResultActivity.java | f4798a5568f9e5ee62b72918d339e74505870c49 | [] | no_license | jialangji/lxunhan | 80f16e86c0bc3d8a384165d5f404d81e7041ad57 | 5673bcac47dc84336cfd0849ec2fcad0a9f7a7fa | refs/heads/master | 2022-12-03T08:14:44.498291 | 2020-08-21T09:07:03 | 2020-08-21T09:07:08 | 268,482,744 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,128 | java | package com.ay.lxunhan.ui.public_ac.activity;
import android.content.Context;
import android.content.Intent;
import android.view.KeyEvent;
import android.widget.ImageView;
import com.ay.lxunhan.R;
import com.ay.lxunhan.base.BaseActivity;
import com.ay.lxunhan.base.BasePresenter;
import com.ay.lxunhan.ui.my.activity.PayActivity;
import com.ay.lxunhan.utils.AppManager;
import butterknife.BindView;
import butterknife.OnClick;
public class PayResultActivity extends BaseActivity {
@BindView(R.id.iv_pay)
ImageView ivPay;
@Override
public BasePresenter initPresenter() {
return null;
}
@Override
protected int getLayoutId() {
return R.layout.activity_pay_result;
}
@Override
protected int getBarColor() {
return R.color.white;
}
@Override
protected boolean barTextIsDark() {
return true;
}
@Override
protected void initView() {
super.initView();
int payType=getIntent().getIntExtra("type",-1);
switch (payType){
case 1:
ivPay.setImageResource(R.drawable.ic_pay_success);
break;
case 2:
ivPay.setImageResource(R.drawable.ic_pay_error);
break;
case 3:
ivPay.setImageResource(R.drawable.ic_pay_cancel);
break;
}
}
public static void startPayResultActivity(Context context,int type){
Intent intent=new Intent(context,PayResultActivity.class);
intent.putExtra("type",type);
context.startActivity(intent);
}
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK ) {
//do something.
AppManager.getAppManager().finishActivity(PayActivity.class);
finish();
return true;
} else {
return super.dispatchKeyEvent(event);
}
}
@OnClick(R.id.rl_finish)
public void onViewClicked() {
AppManager.getAppManager().finishActivity(PayActivity.class);
finish();
}
}
| [
"1401319133@qq.com"
] | 1401319133@qq.com |
9682d5a7b3333ef4001cf4c2b8820d6e3a13dcf3 | f89d8a84896f78e5bcf0d88fc4cca7d08fbb958e | /vitro-core/utilities/buildutils/src/edu/cornell/mannlib/vitro/utilities/revisioninfo/InfoResponseParser.java | acd6849ac930bb798e338c8fa9d7101be4432cd0 | [] | no_license | Data-to-Insight-Center/sead-vivo | c65ca49f663ec3770b8ad25e009d1a90c476ec56 | c82ac568e5fc4691fa7d4981328b8049bfdc87f5 | refs/heads/master | 2020-04-15T06:15:38.963277 | 2020-02-01T16:17:13 | 2020-02-01T16:17:13 | 14,767,397 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,409 | java | /*
Copyright (c) 2013, Cornell University
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 Cornell University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package edu.cornell.mannlib.vitro.utilities.revisioninfo;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Parse the response that we got from SVN info.
*
* Not thread-safe.
*/
public class InfoResponseParser {
private static final Pattern URL_PATTERN = Pattern.compile("URL: (\\S+)");
private static final Pattern ROOT_PATTERN = Pattern
.compile("Repository Root: (\\S+)");
private static final String TRUNK_PREFIX = "/trunk";
private static final String TAGS_PREFIX = "/tags/";
private static final String BRANCHES_PREFIX = "/branches/";
private final String infoResponse;
private String path;
public InfoResponseParser(String infoResponse) {
this.infoResponse = infoResponse;
}
public String parse() {
try {
path = figurePath();
if (isTrunkPath()) {
return "trunk";
} else if (isTagPath()) {
return "tag " + getTagName();
} else if (isBranchPath()) {
return "branch " + getBranchName();
} else {
return null;
}
} catch (Exception e) {
System.err.println(e);
return null;
}
}
private String figurePath() throws Exception {
if (infoResponse == null) {
throw new Exception("infoResponse is null.");
}
String url = getUrlFromResponse();
String root = getRootFromResponse();
if (!url.startsWith(root)) {
throw new Exception("url doesn't start with root.");
}
return url.substring(root.length());
}
private String getUrlFromResponse() throws Exception {
return findNonEmptyMatch(URL_PATTERN, 1);
}
private String getRootFromResponse() throws Exception {
return findNonEmptyMatch(ROOT_PATTERN, 1);
}
private String findNonEmptyMatch(Pattern pattern, int groupIndex)
throws Exception {
Matcher matcher = pattern.matcher(infoResponse);
if (!matcher.find()) {
throw new Exception("no match with '" + pattern + "'. Is your Subversion client out of date?");
}
String value = matcher.group(groupIndex);
if ((value == null) || (value.isEmpty())) {
throw new Exception("match with '" + pattern + "' is empty.");
}
return value;
}
private boolean isTrunkPath() {
return path.startsWith(TRUNK_PREFIX);
}
private boolean isTagPath() {
return path.startsWith(TAGS_PREFIX);
}
private String getTagName() {
return getFirstLevel(discardPrefix(path, TAGS_PREFIX));
}
private boolean isBranchPath() {
return path.startsWith(BRANCHES_PREFIX);
}
private String getBranchName() {
return getFirstLevel(discardPrefix(path, BRANCHES_PREFIX));
}
private String discardPrefix(String string, String prefix) {
if (string.length() < prefix.length()) {
return "";
} else {
return string.substring(prefix.length());
}
}
private String getFirstLevel(String string) {
int slashHere = string.indexOf('/');
if (slashHere == -1) {
return string;
} else {
return string.substring(0, slashHere);
}
}
}
| [
"kavchand@indiana.edu"
] | kavchand@indiana.edu |
1ac4ca50a04dda304cde600487b4f30ce278a2a1 | 2a3f19a4a2b91d9d715378aadb0b1557997ffafe | /sources/com/mcdonalds/sdk/services/analytics/enhancedKochava/EnhancedKochavaAnalyticsWrapper.java | 6063b0ec9c0d3f5212b58655af00fc01c8c6fa88 | [] | no_license | amelieko/McDonalds-java | ce5062f863f7f1cbe2677938a67db940c379d0a9 | 2fe00d672caaa7b97c4ff3acdb0e1678669b0300 | refs/heads/master | 2022-01-09T22:10:40.360630 | 2019-04-21T14:47:20 | 2019-04-21T14:47:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,193 | java | package com.mcdonalds.sdk.services.analytics.enhancedKochava;
import android.content.Context;
import android.text.TextUtils;
import com.kochava.base.Tracker;
import com.mcdonalds.sdk.services.analytics.AnalyticType;
import com.mcdonalds.sdk.services.analytics.AnalyticsArgs;
import com.mcdonalds.sdk.services.analytics.AnalyticsWrapper;
import com.mcdonalds.sdk.services.configuration.Configuration;
import com.newrelic.agent.android.instrumentation.JSONObjectInstrumentation;
import org.json.JSONObject;
public class EnhancedKochavaAnalyticsWrapper extends AnalyticsWrapper {
public static final String CONFIG_KEY = "EnhancedKochava";
public static final String KEY_ENABLED = "analytics.EnhancedKochava.enabled";
private static final String KEY_MARKET_ID = "analytics.EnhancedKochava.marketId";
private static final String KEY_NULL = "null";
private static final String KEY_PARAMS_DICTIONARY_APP_ID = "analytics.EnhancedKochava.paramsDictionary.kochavaAppId";
public EnhancedKochavaAnalyticsWrapper(Context context) {
super(context);
this.mContext = context;
}
public static String getMarketId() {
return Configuration.getSharedInstance().getStringForKey(KEY_MARKET_ID);
}
public void initialize() {
Tracker.configure(new Tracker.Configuration(this.mContext).setAppGuid((String) Configuration.getSharedInstance().getValueForKey(KEY_PARAMS_DICTIONARY_APP_ID)).setLogLevel(3));
}
public void log(AnalyticType event, AnalyticsArgs args) {
String eventName = (String) args.remove(AnalyticsArgs.DATAKEY_LABEL);
String eventValue = String.valueOf(args.get(AnalyticsArgs.DATAKEY_VALUE));
if (TextUtils.isEmpty(eventValue) || eventValue.equals("null")) {
if (args.isEmpty()) {
eventValue = "";
} else {
JSONObject json = new JSONObject(args);
eventValue = !(json instanceof JSONObject) ? json.toString() : JSONObjectInstrumentation.toString(json);
}
}
if (!TextUtils.isEmpty(eventName) && !eventName.equals("null")) {
Tracker.sendEvent(eventName, eventValue);
}
}
}
| [
"makfc1234@gmail.com"
] | makfc1234@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.