blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 332 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2 values | repo_name stringlengths 7 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 557 values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 77.7k | fork_events_count int64 0 48k | gha_license_id stringclasses 17 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 82 values | src_encoding stringclasses 28 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 7 5.41M | extension stringclasses 11 values | content stringlengths 7 5.41M | authors listlengths 1 1 | author stringlengths 0 161 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
659f484fdf0f2c1de873350e4e24a5f5141d4583 | ff1d39fbcef867034a7b28c73647e31a1576c761 | /hasor-rsf/rsf-registry/src/test/java/test/net/hasor/rsf/center/RsfCustomerClient.java | b6d30368c9ec72ef3c8d6be71df29304be962c1f | [
"Apache-2.0"
] | permissive | dalianpa/hasor | 154a9a346731a53309379247ccb68e4ae3203e15 | c6b36d711e206927ef67c46a801009c6421b0351 | refs/heads/master | 2020-11-28T08:05:33.034136 | 2019-06-02T08:24:43 | 2019-06-02T08:24:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,275 | java | package test.net.hasor.rsf.center;
import net.hasor.core.AppContext;
import net.hasor.core.Hasor;
import net.hasor.rsf.RsfApiBinder;
import net.hasor.rsf.RsfClient;
import net.hasor.rsf.RsfModule;
import test.net.hasor.rsf.services.EchoService;
/**
*
* @version : 2014年9月12日
* @author 赵永春 (zyc@hasor.net)
*/
public class RsfCustomerClient {
public static void main(String[] args) throws Throwable {
//Client
AppContext clientContext = Hasor.createAppContext("/center/client-config.xml", new RsfModule() {
public void loadModule(RsfApiBinder apiBinder) throws Throwable {
apiBinder.rsfService(EchoService.class).register();
}
});
System.out.println("server start.");
//
//Client -> Server
RsfClient client = clientContext.getInstance(RsfClient.class);
EchoService echoService = client.wrapper(EchoService.class);
for (int i = 0; i < 2000; i++) {
try {
Thread.sleep(1000);
String res = echoService.sayHello("Hello Word");
System.out.println(res);
} catch (Exception e) {
System.out.println("call failed ->" + e.getMessage());
}
}
}
} | [
"zyc@hasor.net"
] | zyc@hasor.net |
851250c7fc7818bc334f587109c78c420ad55b24 | 53f5a941261609775dc3eedf0cb487956b734ab0 | /com.samsung.accessory.atticmgr/sources/com/samsung/accessory/hearablemgr/core/notification/NotificationTTSCore.java | 7bca9c431445112593f967a6306e7add318d17d3 | [] | no_license | ThePBone/BudsProAnalysis | 4a3ede6ba6611cc65598d346b5a81ea9c33265c0 | 5b04abcae98d1ec8d35335d587b628890383bb44 | refs/heads/master | 2023-02-18T14:24:57.731752 | 2021-01-17T12:44:58 | 2021-01-17T12:44:58 | 322,783,234 | 16 | 1 | null | null | null | null | UTF-8 | Java | false | false | 27,930 | java | package com.samsung.accessory.hearablemgr.core.notification;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.provider.Settings;
import android.speech.tts.TextToSpeech;
import android.speech.tts.UtteranceProgressListener;
import com.samsung.accessory.atticmgr.R;
import com.samsung.accessory.hearablemgr.Application;
import com.samsung.accessory.hearablemgr.common.preference.PreferenceKey;
import com.samsung.accessory.hearablemgr.common.preference.Preferences;
import com.samsung.accessory.hearablemgr.common.util.Util;
import com.samsung.android.fotaagent.update.UpdateInterface;
import java.util.LinkedList;
import java.util.Locale;
import seccompat.android.util.Log;
public class NotificationTTSCore {
public static final String ACTION_CHANGE_THEME = "com.samsung.android.theme.themecenter.THEME_APPLY";
private static final String TAG = "Attic_NotificationTTSCore";
public static final int TTS_START = 0;
public static final int TTS_STOP = 1;
private String PARAM_UTTERANCE_ID_ALARM = "tts_with_a2dp_alarm";
private String PARAM_UTTERANCE_ID_CALL = "tts_with_sco_call";
private String PARAM_UTTERANCE_ID_MUSIC = "tts_with_a2dp_music";
private String PARAM_UTTERANCE_ID_SLIENCE = "tts_with_slience";
private TextToSpeech.OnInitListener initAlarmTTSListener = new TextToSpeech.OnInitListener() {
/* class com.samsung.accessory.hearablemgr.core.notification.NotificationTTSCore.AnonymousClass6 */
public void onInit(int i) {
if (i == 0) {
if (Preferences.getString(PreferenceKey.NOTIFICATION_LANGUAGE, null) == null && NotificationTTSCore.this.mTTS != null) {
Locale tTSLanguage = NotificationTTSCoreUtil.getTTSLanguage(NotificationTTSCore.this.mTTS);
if (tTSLanguage != null) {
Log.d(NotificationTTSCore.TAG, "initAlarmTTSListener, set Phone TTS Lang = " + tTSLanguage.getLanguage());
Preferences.putString(PreferenceKey.NOTIFICATION_LANGUAGE, tTSLanguage.getLanguage());
} else {
Log.e(NotificationTTSCore.TAG, "initAlarmTTSListener, locale is null ");
}
}
NotificationTTSCore notificationTTSCore = NotificationTTSCore.this;
notificationTTSCore.speakAlarm(notificationTTSCore.mAlarmMsg);
}
}
};
private TextToSpeech.OnInitListener initCallTTSListener = new TextToSpeech.OnInitListener() {
/* class com.samsung.accessory.hearablemgr.core.notification.NotificationTTSCore.AnonymousClass8 */
public void onInit(int i) {
if (i == 0) {
if (Preferences.getString(PreferenceKey.NOTIFICATION_LANGUAGE, null) == null && NotificationTTSCore.this.mTTS != null) {
Locale tTSLanguage = NotificationTTSCoreUtil.getTTSLanguage(NotificationTTSCore.this.mTTS);
if (tTSLanguage != null) {
Log.d(NotificationTTSCore.TAG, "initCallTTSListener, set Phone TTS Lang = " + tTSLanguage.getLanguage());
Preferences.putString(PreferenceKey.NOTIFICATION_LANGUAGE, tTSLanguage.getLanguage());
} else {
Log.e(NotificationTTSCore.TAG, "initCallTTSListener, locale is null ");
}
}
NotificationTTSCore notificationTTSCore = NotificationTTSCore.this;
notificationTTSCore.speakCall(notificationTTSCore.mCallMsg);
}
}
};
private NotificationMessage mAlarmMsg = null;
protected AudioManager.OnAudioFocusChangeListener mAudioFocusListener = new AudioManager.OnAudioFocusChangeListener() {
/* class com.samsung.accessory.hearablemgr.core.notification.NotificationTTSCore.AnonymousClass1 */
public void onAudioFocusChange(int i) {
Log.d(NotificationTTSCore.TAG, "focus = " + i);
if (i == -2 || i == -1) {
NotificationTTSCore.this.stopTTS(false);
}
}
};
private AudioManager mAudioManager;
private NotificationMessage mCallMsg = null;
private int mCallState = 0;
private BroadcastReceiver mChangeTTS = new BroadcastReceiver() {
/* class com.samsung.accessory.hearablemgr.core.notification.NotificationTTSCore.AnonymousClass3 */
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
Log.d(NotificationTTSCore.TAG, "action:" + action);
if (action.equals(NotificationConstants.ACTION_CHANGE_TTS)) {
if (NotificationTTSCore.this.mTTS.stop() == -1) {
Log.d(NotificationTTSCore.TAG, "mTTS.stop = -1");
NotificationTTSCore.this.release();
NotificationTTSCore notificationTTSCore = NotificationTTSCore.this;
notificationTTSCore.makeTTS(notificationTTSCore.mContext);
}
} else if (action.equals(NotificationTTSCore.ACTION_CHANGE_THEME)) {
Log.d(NotificationTTSCore.TAG, "change theme");
NotificationTTSCore.this.release();
NotificationTTSCore notificationTTSCore2 = NotificationTTSCore.this;
notificationTTSCore2.makeTTS(notificationTTSCore2.mContext);
}
}
};
private Context mContext;
private NotificationMessage mCurMessage = null;
private Handler mHandler = new Handler() {
/* class com.samsung.accessory.hearablemgr.core.notification.NotificationTTSCore.AnonymousClass2 */
public void handleMessage(Message message) {
Log.d(NotificationTTSCore.TAG, "mTTSControlHandler() : " + message.what);
int i = message.what;
if (i == 0) {
Log.d(NotificationTTSCore.TAG, "TTS_START");
NotificationTTSCore.this.speakTTS();
} else if (i == 1) {
Log.d(NotificationTTSCore.TAG, "TTS_STOP");
removeMessages(0);
if (NotificationTTSCore.this.isSpeaking()) {
NotificationTTSCore.this.stopTTS(true);
}
}
}
};
private LinkedList<NotificationMessage> mMsgQueue = new LinkedList<>();
private Bundle mNeedRingtoneMute;
private Bundle mParamsAlarm;
private Bundle mParamsCall;
private Bundle mParamsMusic;
private Bundle mParamsSlience;
private NotificationSpeakListener mSpeakCallBack = null;
private TextToSpeech mTTS = null;
private int mprevCallState = 0;
private final Object syncObj = new Object();
public void setCallState(int i) {
this.mprevCallState = this.mCallState;
this.mCallState = i;
}
public int getprevCallState() {
return this.mprevCallState;
}
public NotificationTTSCore(Context context, NotificationSpeakListener notificationSpeakListener, int i) {
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(NotificationConstants.ACTION_CHANGE_TTS);
intentFilter.addAction(ACTION_CHANGE_THEME);
context.registerReceiver(this.mChangeTTS, intentFilter);
Log.d(TAG, "TTSCore()");
this.mSpeakCallBack = notificationSpeakListener;
this.mContext = context;
this.mCallState = i;
this.mParamsMusic = new Bundle();
this.mParamsMusic.putInt("streamType", 3);
this.mParamsMusic.putString("utteranceId", this.PARAM_UTTERANCE_ID_MUSIC);
this.mParamsAlarm = new Bundle();
this.mParamsAlarm.putInt("streamType", 3);
this.mParamsAlarm.putString("utteranceId", this.PARAM_UTTERANCE_ID_ALARM);
this.mParamsCall = new Bundle();
this.mParamsCall.putInt("streamType", 0);
this.mParamsCall.putString("utteranceId", this.PARAM_UTTERANCE_ID_CALL);
this.mParamsSlience = new Bundle();
this.mParamsSlience.putInt("streamType", 3);
this.mParamsSlience.putString("utteranceId", this.PARAM_UTTERANCE_ID_SLIENCE);
this.mAudioManager = (AudioManager) this.mContext.getSystemService("audio");
makeTTS(context);
}
public void release() {
Log.d(TAG, "release()");
if (this.mTTS != null) {
this.mSpeakCallBack.VoiceNotificationSpeakCompleted(NotificationMessage.TYPE_NORMAL);
Log.d(TAG, "release()::mTTS.reset() and mTTS.shutdown()");
reset();
this.mTTS.shutdown();
this.mTTS = null;
}
}
public boolean isSpeaking() {
TextToSpeech textToSpeech = this.mTTS;
return textToSpeech != null && textToSpeech.isSpeaking();
}
public boolean isQueueEmpty() {
LinkedList<NotificationMessage> linkedList = this.mMsgQueue;
return linkedList == null || linkedList.size() <= 0;
}
public void insert(NotificationMessage notificationMessage, boolean z) {
Log.d(TAG, "insert()");
if (Preferences.getBoolean(PreferenceKey.NOTIFICATION_ENABLE, true)) {
synchronized (this.syncObj) {
if (z) {
this.mMsgQueue.push(notificationMessage);
} else {
this.mMsgQueue.add(notificationMessage);
}
}
}
}
public void stopTTS(boolean z) {
Log.d(TAG, "stopTTS():clearAll = " + z);
Log.d(TAG, "mTTS :" + this.mTTS);
TextToSpeech textToSpeech = this.mTTS;
if (textToSpeech != null) {
textToSpeech.stop();
}
if (z) {
reset();
}
}
public void reset() {
LinkedList<NotificationMessage> linkedList = this.mMsgQueue;
if (linkedList != null && linkedList.size() > 0) {
synchronized (this.syncObj) {
Log.d(TAG, "reset(), mMsgQueue is clear");
this.mMsgQueue.clear();
}
}
}
public int getMsgQsize() {
LinkedList<NotificationMessage> linkedList = this.mMsgQueue;
if (linkedList != null) {
return linkedList.size();
}
return 0;
}
public Handler getHandler() {
return this.mHandler;
}
public void makeTTS(Context context) {
Log.d(TAG, "makeTTS()");
TextToSpeech textToSpeech = this.mTTS;
if (textToSpeech == null || textToSpeech.getVoices() == null) {
Log.d(TAG, "mTTS is null");
this.mTTS = new TextToSpeech(context, new TextToSpeech.OnInitListener() {
/* class com.samsung.accessory.hearablemgr.core.notification.NotificationTTSCore.AnonymousClass4 */
public void onInit(int i) {
Log.d(NotificationTTSCore.TAG, "onInit()");
if (i == 0) {
if (Preferences.getString(PreferenceKey.NOTIFICATION_LANGUAGE, null) == null && NotificationTTSCore.this.mTTS != null) {
Locale tTSLanguage = NotificationTTSCoreUtil.getTTSLanguage(NotificationTTSCore.this.mTTS);
Log.d(NotificationTTSCore.TAG, "onInit():getTTSLanguage(mTTS) = " + tTSLanguage);
if (tTSLanguage != null) {
Log.d(NotificationTTSCore.TAG, "onInit():locale.getLanguage() = " + tTSLanguage.getLanguage());
Preferences.putString(PreferenceKey.NOTIFICATION_LANGUAGE, tTSLanguage.getLanguage());
} else {
Log.e(NotificationTTSCore.TAG, "onInit():locale is null");
}
}
if (NotificationTTSCore.this.mTTS != null) {
NotificationTTSCore.this.speakTTS();
return;
}
return;
}
Log.d(NotificationTTSCore.TAG, "onInit(), Could not initialize TextToSpeech.");
}
});
return;
}
speakTTS();
}
/* access modifiers changed from: private */
/* access modifiers changed from: public */
private void speakTTS() {
int i;
String notificationMessageString;
if (!Application.getCoreService().isConnected()) {
Log.d(TAG, "speakTTS:: Not connected");
return;
}
Log.d(TAG, "speakTTS():isSpeaking = " + isSpeaking());
if (this.mCallState == 0 && !isSpeaking()) {
Log.d(TAG, "mMsgQueue size = " + this.mMsgQueue.size());
if (this.mMsgQueue.size() > 0) {
synchronized (this.syncObj) {
i = 0;
this.mCurMessage = this.mMsgQueue.get(0);
try {
this.mMsgQueue.remove(0);
} catch (IndexOutOfBoundsException e) {
e.printStackTrace();
}
}
if (Preferences.getBoolean(PreferenceKey.NOTIFICATION_ENABLE, true) && (notificationMessageString = NotificationTTSCoreUtil.getNotificationMessageString(this.mCurMessage, this.mContext, this.mTTS)) != null) {
this.mTTS.setOnUtteranceProgressListener(new UtteranceProgressListener() {
/* class com.samsung.accessory.hearablemgr.core.notification.NotificationTTSCore.AnonymousClass5 */
public void onDone(String str) {
Log.d(NotificationTTSCore.TAG, "speakTTS()::onDone()");
if (str.equals(NotificationTTSCore.this.PARAM_UTTERANCE_ID_SLIENCE)) {
Log.d(NotificationTTSCore.TAG, "onDone() - slience");
return;
}
int abandonAudioFocus = NotificationTTSCore.this.mAudioManager.abandonAudioFocus(NotificationTTSCore.this.mAudioFocusListener);
Log.d(NotificationTTSCore.TAG, "onDone():abandonAudioFocus = " + abandonAudioFocus);
Log.d(NotificationTTSCore.TAG, "mMsgQueue Size = " + NotificationTTSCore.this.mMsgQueue.size() + ", mCallState = " + NotificationTTSCore.this.mCallState);
if (NotificationTTSCore.this.mMsgQueue.size() <= 0 || NotificationTTSCore.this.mCallState != 0) {
NotificationTTSCore.this.mSpeakCallBack.VoiceNotificationSpeakCompleted(NotificationMessage.TYPE_NORMAL);
return;
}
Log.d(NotificationTTSCore.TAG, "onDone(), send message TTS_START");
NotificationTTSCore.this.mHandler.sendEmptyMessage(0);
}
public void onStop(String str, boolean z) {
Log.d(NotificationTTSCore.TAG, "speakTTS()::onStop()");
onDone(str);
}
public void onError(String str) {
onDone(str);
}
public void onStart(String str) {
Log.d(NotificationTTSCore.TAG, "speakTTS()::onStart()");
Log.d(NotificationTTSCore.TAG, "onStart():isSpeaking =" + NotificationTTSCore.this.isSpeaking());
if (!str.equals(NotificationTTSCore.this.PARAM_UTTERANCE_ID_SLIENCE)) {
NotificationTTSCore.this.mSpeakCallBack.VoiceNotificationSpeakStarted(NotificationMessage.TYPE_NORMAL, NotificationTTSCore.this.mCurMessage.getPkgName());
}
}
});
if (seccompat.android.media.AudioManager.proxysemIsRecordActive(this.mAudioManager, -1)) {
Log.d(TAG, "using VR");
return;
}
int requestAudioFocus = this.mAudioManager.requestAudioFocus(this.mAudioFocusListener, 3, 3);
if (requestAudioFocus == 1) {
this.mTTS.addSpeech(",....", this.mContext.getPackageName(), R.raw.slience_500ms);
this.mTTS.speak(",....", 1, this.mParamsSlience, this.PARAM_UTTERANCE_ID_SLIENCE);
i = this.mTTS.speak(notificationMessageString, 1, this.mParamsMusic, this.PARAM_UTTERANCE_ID_MUSIC);
Log.d(TAG, "speakTTS(), AUDIOFOCUS_REQUEST_GRANTED");
} else if (requestAudioFocus == 0) {
Log.d(TAG, "speakTTS(), AUDIOFOCUS_REQUEST_FAILED");
}
Log.d(TAG, "speakTTS():mTTS.speak = " + i);
return;
}
return;
}
Log.d(TAG, "speakTTS(), queue is emplty, so send complete spp msg");
}
}
public void makeAlarm(Context context, NotificationMessage notificationMessage) {
Log.d(TAG, "makeAlarm()");
this.mAlarmMsg = notificationMessage;
TextToSpeech textToSpeech = this.mTTS;
if (textToSpeech == null || textToSpeech.getVoices() == null) {
this.mTTS = new TextToSpeech(context, this.initAlarmTTSListener);
} else {
speakAlarm(this.mAlarmMsg);
}
}
/* access modifiers changed from: private */
/* access modifiers changed from: public */
private void speakAlarm(NotificationMessage notificationMessage) {
Log.d(TAG, "speakAlarm(), message = " + notificationMessage.toString() + ", isSpeaking = " + isSpeaking());
TextToSpeech textToSpeech = this.mTTS;
if (textToSpeech != null) {
textToSpeech.setOnUtteranceProgressListener(new UtteranceProgressListener() {
/* class com.samsung.accessory.hearablemgr.core.notification.NotificationTTSCore.AnonymousClass7 */
public void onDone(String str) {
if (str.equals(NotificationTTSCore.this.PARAM_UTTERANCE_ID_SLIENCE)) {
Log.d(NotificationTTSCore.TAG, "speakAlarm()::onDone() - slience");
return;
}
Log.d(NotificationTTSCore.TAG, "speakAlarm()::onDone()");
Log.d(NotificationTTSCore.TAG, "onDone(), abandonAudioFocus");
NotificationTTSCore.this.mAudioManager.abandonAudioFocus(NotificationTTSCore.this.mAudioFocusListener);
NotificationTTSCore.this.mSpeakCallBack.VoiceNotificationSpeakCompleted(NotificationMessage.TYPE_ALARM);
}
public void onStop(String str, boolean z) {
Log.d(NotificationTTSCore.TAG, "speakAlarm()::onStop()");
onDone(str);
}
public void onError(String str) {
onDone(str);
}
public void onStart(String str) {
Log.d(NotificationTTSCore.TAG, "speakAlarm()::onStart()");
if (!str.equals(NotificationTTSCore.this.PARAM_UTTERANCE_ID_SLIENCE)) {
NotificationTTSCore.this.mSpeakCallBack.VoiceNotificationSpeakStarted(NotificationMessage.TYPE_ALARM, NotificationConstants.ALARM_PACKAGENAME);
}
}
});
String notificationMessageString = NotificationTTSCoreUtil.getNotificationMessageString(notificationMessage, this.mContext, this.mTTS);
if (notificationMessageString != null && !notificationMessageString.equals("")) {
if (seccompat.android.media.AudioManager.proxysemIsRecordActive(this.mAudioManager, -1)) {
Log.d(TAG, "using VR");
return;
}
int requestAudioFocus = this.mAudioManager.requestAudioFocus(this.mAudioFocusListener, 3, 2);
if (requestAudioFocus == 1) {
this.mTTS.addSpeech(",....", this.mContext.getPackageName(), R.raw.slience_500ms);
this.mTTS.speak(",....", 1, this.mParamsSlience, this.PARAM_UTTERANCE_ID_SLIENCE);
this.mTTS.speak(notificationMessageString, 1, this.mParamsAlarm, this.PARAM_UTTERANCE_ID_ALARM);
Log.d(TAG, "speakAlarm(), AUDIOFOCUS_REQUEST_GRANTED");
} else if (requestAudioFocus == 0) {
Log.d(TAG, "speakAlarm(), AUDIOFOCUS_REQUEST_FAILED");
}
}
}
}
public void makeCall(Context context, NotificationMessage notificationMessage) {
Log.d(TAG, "makeCall()");
this.mCallMsg = notificationMessage;
if (this.mCallState != 1) {
Log.d(TAG, "mCallState is not ringing");
return;
}
TextToSpeech textToSpeech = this.mTTS;
if (textToSpeech == null || textToSpeech.getVoices() == null) {
this.mTTS = new TextToSpeech(context, this.initCallTTSListener);
} else {
speakCall(this.mCallMsg);
}
}
/* access modifiers changed from: private */
/* access modifiers changed from: public */
private void speakCall(NotificationMessage notificationMessage) {
Log.d(TAG, "speakCall():message = " + notificationMessage.toString() + ", isSpeaking = " + isSpeaking());
TextToSpeech textToSpeech = this.mTTS;
if (textToSpeech != null) {
textToSpeech.setOnUtteranceProgressListener(new UtteranceProgressListener() {
/* class com.samsung.accessory.hearablemgr.core.notification.NotificationTTSCore.AnonymousClass9 */
public void onDone(String str) {
Log.d(NotificationTTSCore.TAG, "speakCall()::onDone()");
if (seccompat.android.media.AudioManager.proxyIsStreamMute(NotificationTTSCore.this.mAudioManager, 2) && NotificationTTSCore.this.mNeedRingtoneMute != null && NotificationTTSCore.this.mNeedRingtoneMute.getBoolean(str)) {
try {
Thread.sleep(250);
} catch (InterruptedException e) {
e.printStackTrace();
}
Log.d(NotificationTTSCore.TAG, "mNeedRingtoneMute.get(utteranceId)= " + NotificationTTSCore.this.mNeedRingtoneMute.get(str));
Log.d(NotificationTTSCore.TAG, "Incoming Call TTS DONE. need STREAM_RING mute false");
NotificationTTSCore.this.mAudioManager.adjustStreamVolume(2, 100, 0);
NotificationTTSCore.this.mNeedRingtoneMute.remove(str);
Log.d(NotificationTTSCore.TAG, "onDone::mNeedRingtoneMute= " + NotificationTTSCore.this.mNeedRingtoneMute);
}
NotificationTTSCore.this.mSpeakCallBack.VoiceNotificationSpeakCompleted(NotificationMessage.TYPE_CALL);
}
public void onStop(String str, boolean z) {
Log.d(NotificationTTSCore.TAG, "speakCall()::onStop()");
onDone(str);
}
public void onError(String str) {
onDone(str);
}
public void onStart(String str) {
Log.d(NotificationTTSCore.TAG, "speakCall()::onStart()");
if (NotificationTTSCore.this.mNeedRingtoneMute == null) {
NotificationTTSCore.this.mNeedRingtoneMute = new Bundle();
}
if (!seccompat.android.media.AudioManager.proxyIsStreamMute(NotificationTTSCore.this.mAudioManager, 2)) {
if (Build.VERSION.SDK_INT >= 26 && Util.isChinaModel()) {
try {
Thread.sleep(UpdateInterface.HOLDING_AFTER_BT_CONNECTED);
} catch (Exception e) {
e.printStackTrace();
}
}
if (Build.VERSION.SDK_INT >= 23) {
Bundle call = NotificationTTSCore.this.mContext.getContentResolver().call(Uri.parse("content://com.android.phone.callsettings"), "get_voice_control_incoming", (String) null, (Bundle) null);
if (call != null) {
if (call.getInt("voice_control_incoming") == 0) {
Log.d(NotificationTTSCore.TAG, "Incoming Call TTS START. STREAM_RING mute true");
NotificationTTSCore.this.mNeedRingtoneMute.putBoolean(str, true);
NotificationTTSCore.this.mAudioManager.adjustStreamVolume(2, -100, 0);
} else if (call.getInt("voice_control_incoming") == 1) {
NotificationTTSCore.this.mNeedRingtoneMute.putBoolean(str, false);
Log.d(NotificationTTSCore.TAG, "do not StreamMute");
}
}
} else if (Settings.System.getInt(NotificationTTSCore.this.mContext.getContentResolver(), "voice_input_control_incomming_calls", 0) == 1) {
NotificationTTSCore.this.mNeedRingtoneMute.putBoolean(str, false);
Log.d(NotificationTTSCore.TAG, "do not StreamMute");
} else {
Log.d(NotificationTTSCore.TAG, "Incoming Call TTS START. STREAM_RING mute true");
NotificationTTSCore.this.mNeedRingtoneMute.putBoolean(str, true);
NotificationTTSCore.this.mAudioManager.adjustStreamVolume(2, -100, 0);
}
}
NotificationTTSCore.this.mSpeakCallBack.VoiceNotificationSpeakStarted(NotificationMessage.TYPE_CALL, NotificationConstants.INCOMING_CALL_PACKAGENAME);
}
});
this.mCallMsg = notificationMessage;
String notificationMessageString = NotificationTTSCoreUtil.getNotificationMessageString(this.mCallMsg, this.mContext, this.mTTS);
if (notificationMessageString != null && !notificationMessageString.equals("")) {
if (Preferences.getBoolean(PreferenceKey.NOTIFICATION_CALL_REPEAT, true)) {
notificationMessageString = notificationMessageString + ". " + notificationMessageString;
}
if (this.mCallState == 1) {
Log.d(TAG, "mCallState is ringing");
this.mTTS.speak(notificationMessageString, 0, this.mParamsCall, this.PARAM_UTTERANCE_ID_CALL);
return;
}
Log.d(TAG, "mCallState is not ringing, so do not start CALL TTS");
}
}
}
}
| [
"thebone.main@gmail.com"
] | thebone.main@gmail.com |
d39008a81a0ed072ce1983e76756ce73aa66772c | f80d9c8048f2ac72dc253c65cca6e4547e467817 | /A149.java | 8292c40cd08af26987196998bffc16bfaff444e8 | [
"Apache-2.0"
] | permissive | asthakri50/30DaysOfCodeforces | f15f0981b19e001c460bb58b534cf80ff578f6d9 | bdc3f2a324e31108abbf72d3329c603d1c7fad3b | refs/heads/main | 2023-03-09T03:41:39.062413 | 2021-02-23T10:55:44 | 2021-02-23T10:55:44 | 332,750,208 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 865 | java | import java.util.Scanner;
import java.util.Arrays;
public class A149 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int k = scan.nextInt();
int[] months = new int[12];
int total = 0;
for (int i = 0; i < 12; i++) {
months[i] = scan.nextInt();
total = total + months[i];
}
if (k == 0) {
System.out.println(0);
System.exit(0);
}
if (k > total) {
System.out.println(-1);
System.exit(0);
}
Arrays.sort(months);
int count = 0;
int sum = 0;
for (int i = 11; i >= 0; i--) {
sum = sum + months[i];
count++;
if (sum >= k) {
break;
}
}
System.out.println(count);
}
} | [
"astha.kri50@gmail.com"
] | astha.kri50@gmail.com |
42c11cb18eea265651268c1d76fab98be7f6ff03 | 86bfd3f3a253191f6dbbac722242feb4a6d68be7 | /base/src/main/java/com/xcj/web/controller/common/IndexController.java | a3d0e53345d795812595d72548497f28d76f9f5f | [] | no_license | duanlizhi/base | b8ee7b739d5b99a34928bc9f2266f3dae121374f | f258aebf619901613bb9e1a40b6697907d10228c | refs/heads/master | 2020-07-06T10:46:38.563616 | 2016-08-19T09:05:56 | 2016-08-19T09:05:56 | 66,068,328 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 967 | java | /**
*
*/
package com.xcj.web.controller.common;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.xcj.admin.service.user.UserService;
/**
* <b>function:</b>
* @project xcjpar
* @package com.xcj.web.controller.user
* @fileName com.xcj.*
* @createDate Aug 21, 2014 3:02:05 PM
* @author su_jian
*/
@Controller("indexController")
@RequestMapping("/web/index")
public class IndexController {
@Resource(name="userServiceImpl")
private UserService userService;
@RequestMapping(value="")
public ModelAndView indexs(HttpServletRequest request,HttpServletResponse response,ModelMap model) {
return new ModelAndView("/web/index_jsp",model);
}
}
| [
"702565362@qq.com"
] | 702565362@qq.com |
cfd7723056b2fc845680c8366131e75a4bad52fe | a2534bb03b1645c0b974bceb9d38e86198061954 | /app/src/main/java/demo/gyw/com/myapplication/weiget/staggeredGridView/ScrollerCompatIcs.java | d42d6543428ca708aa6f2e9e97de6f2fdd990acf | [] | no_license | gyw520gyw/MyApplication | ae9b06452bcdaaaccecc8d0d1658ccf4bc7fa3d3 | 541dfe0c787aa27e90d1b181a9acb8d0abf1dc3a | refs/heads/master | 2021-01-21T13:57:40.174136 | 2019-10-29T02:31:23 | 2019-10-29T02:31:23 | 50,829,003 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,008 | java | /*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package demo.gyw.com.myapplication.weiget.staggeredGridView;
import android.annotation.TargetApi;
import android.os.Build;
import android.widget.Scroller;
/**
* ICS API access for Scroller
*/
class ScrollerCompatIcs {
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public static float getCurrVelocity(Scroller scroller) {
return scroller.getCurrVelocity();
}
}
| [
"gyw0829@foxmail.com"
] | gyw0829@foxmail.com |
de29a46554fb65d3afaf8402b19644adfba29dd8 | d1eacacc58f107843df6accd03ac74c42d702437 | /src/personasempleados/Comercial.java | a8e749c86a4c94a69bf9bdad56515129696000b9 | [] | no_license | krack11/PersonasEmpleados | f231cc7411611a24c667b0745a5d589fe5c26283 | 45bcdf0f8acafcc6ac2601eed1343123be1dd674 | refs/heads/master | 2020-04-19T04:17:03.287809 | 2019-01-28T12:34:14 | 2019-01-28T12:34:14 | 167,958,726 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,205 | java | package personasempleados;
public class Comercial extends Empleado {
private String zona;
private double comision;
public Comercial() {
}
public Comercial(String zon, double com){
this.zona=zon;
this.comision=com;
}
public Comercial(Empleado e,String zon, double com){
super(e);
this.zona=zon;
this.comision=com;
}
public Comercial(String zon, double comi,int numEmp, double sal, Persona p){
super(numEmp, sal, p);
this.zona=zon;
this.comision=comi;
}
public Comercial(String zon, double comi,int numEmp, double sal,String nom, String ape, int ed,String lo, String ca,int num){
super(numEmp, sal, nom, ape, ed, lo, ca, num);
}
public String getZona() {
return this.zona;
}
public void setZona(String val) {
this.zona=val;
}
public double getComision() {
return this.comision;
}
public void setComision(double val) {
this.comision=val;
}
@Override
public String toString() {
return ("Zona: " +zona + " Comision: " + comision + super.toString());
}
}
| [
"45623221+krack11@users.noreply.github.com"
] | 45623221+krack11@users.noreply.github.com |
bc4d3ae525d22497395dd60b00652d8f7285de4e | 7e7c749228d0fddd2c417fd14866b87d330dd916 | /School/FindBriefcase/src/Room.java | d0c602dc93dcd14ee5447ace6aac1c289e905757 | [] | no_license | victorkwak/Projects | f8d838dc3219d41a0e874c82c774e305b18a1824 | 646fdf06a37e865b32400f122b02e65fa5b5312f | refs/heads/master | 2020-05-16T05:50:33.325038 | 2015-03-03T10:37:40 | 2015-03-03T10:37:40 | 19,307,237 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 717 | java | /**
* CS 141: Introduction to Programming and Problem Solving
* Professor: Edwin Rodriguez
* <p/>
* Programming Assignment #N
* <p/>
* <description-of-assignment>
* <p/>
* Team #N / Victor Kwak
* <team-member-names-if-team-assignment>
*/
/**
* The rooms are where the briefcase, the objective of the game, is hidden.
*/
public class Room extends Objects {
private String room;
/**
* Constructor for the Room class.
*/
public Room() {
room = "|_|";
setX(x);
setY(y);
getX();
getY();
}
/**
* Returns the symbolic representation of "room"
*
* @return
*/
public String toString() {
return room;
}
}
| [
"victorkwak@gmail.com"
] | victorkwak@gmail.com |
1896847d30473d9c7490943c11222597c8aa1f42 | b3b73d4c1ead0a501757a866be10a5e88bab5ea7 | /lib/src/main/java/net/maidsafe/safe_authenticator/CallbackResultAppExchangeInfoArrayLen.java | 06755f07a230a846da1be7c46805daa2b0563cde | [
"BSD-3-Clause",
"MIT",
"BSD-2-Clause"
] | permissive | vigneshwara044/safe_app_java | 91213a8c7de0e7f1d825bb4b4e23c96ab24c87f9 | a41149915858b25ec51012df3431bbdcf378dbd8 | refs/heads/master | 2020-04-09T07:16:10.325667 | 2019-02-28T13:48:32 | 2019-02-28T13:48:32 | 160,148,199 | 0 | 0 | NOASSERTION | 2019-02-25T10:25:57 | 2018-12-03T07:15:28 | Java | UTF-8 | Java | false | false | 691 | java | // Copyright 2018 MaidSafe.net limited.
//
// This SAFE Network Software is licensed to you under the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT> or the Modified
// BSD license <LICENSE-BSD or https://opensource.org/licenses/BSD-3-Clause>,
// at your option. This file may not be copied, modified, or distributed
// except according to those terms. Please review the Licences for the
// specific language governing permissions and limitations relating to use
// of the SAFE Network Software.
package net.maidsafe.safe_authenticator;
public interface CallbackResultAppExchangeInfoArrayLen {
public void call(FfiResult result, AppExchangeInfo[] appExchangeInfo);
}
| [
"krishnaof1988@gmail.com"
] | krishnaof1988@gmail.com |
208267f875124d493cca93b6389afc0e64cb1219 | cd84185235de7fae018e59aa65548be6e56c7daa | /spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/services/endpoints/package-info.java | 4e1f359224c290b9b70ea62bb922aedf10b49a07 | [
"Apache-2.0"
] | permissive | karsunke/spring-boot-admin | 64f87a33353552368c6e893b73d032cf95079fee | 5a45b6ba213e27c11a5611584ed8ab738baf7799 | refs/heads/master | 2023-01-06T15:49:51.714098 | 2020-11-05T07:50:21 | 2020-11-05T07:50:21 | 310,237,892 | 1 | 0 | Apache-2.0 | 2020-11-05T08:40:23 | 2020-11-05T08:40:23 | null | UTF-8 | Java | false | false | 801 | java | /*
* Copyright 2014-2018 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.
*/
@NonNullApi
@NonNullFields
package de.codecentric.boot.admin.server.services.endpoints;
import org.springframework.lang.NonNullApi;
import org.springframework.lang.NonNullFields;
| [
"johannes.edmeier@codecentric.de"
] | johannes.edmeier@codecentric.de |
e587d2e1babaf7549878d3093a31a63c3aa7ed89 | fe351d0eeab054650ea8e94d7572f88f7f774e24 | /Viajes/src/com/example/viajes/PantallaCombio.java | 98c4902304c9bbc1d96c709593b0a10bf420c755 | [] | no_license | carloslongares/Android | 2407d0d0b86f08200c451cc449e14c2d5593dc96 | 48f926688d2fa70a80c9de6d5f8848ea9ca8f3dd | refs/heads/master | 2020-12-30T14:56:00.589894 | 2014-02-20T12:53:22 | 2014-02-20T12:53:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,031 | java | package com.example.viajes;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.EditText;
import android.widget.TextView;
public class PantallaCombio extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.pantallacambio);
final TextView lblDineroRecibido = (TextView)findViewById(R.id.dineroIntroducido);
final TextView lblDineroAPagar = (TextView)findViewById(R.id.precioFinalCambio);
final TextView lblDineroCambio = (TextView)findViewById(R.id.cambioDinero);
Bundle bundle = getIntent().getExtras();
float dineroRecibido=bundle.getFloat("DINERO");
float dineroAPagar=bundle.getFloat("PRECIO");
float dineroCambio = dineroRecibido - dineroAPagar;
lblDineroRecibido.setText(String.valueOf(dineroRecibido));
lblDineroAPagar.setText(String.valueOf(dineroAPagar));
float billete5=0;
float billete10=0;
float billete20=0;
float billete50=0;
float billete100=0;
float billete200=0;
float billete500=0;
billete500=(int)(dineroCambio/500.0);
dineroCambio-=billete500*500;
billete200=(int)(dineroCambio/200.0);
dineroCambio-=billete200*200;
billete100=(int)(dineroCambio/100.0);
dineroCambio-=billete100*100;
billete50=(int)(dineroCambio/50.0);
dineroCambio-=billete50*50;
billete20=(int)(dineroCambio/20.0);
dineroCambio-=billete20*20;
billete10=(int)(dineroCambio/10.0);
dineroCambio-=billete10*10;
String resultado =" billete500: "+billete500+
"\n billetes de 200: "+billete200+
"\n billetes de 100: "+billete100+
"\n billetes de 50: "+billete50+
"\n billetes de 20: "+billete20+
"\n billetes de 20: "+billete10+
"\n monedas restantes: "+dineroCambio+" euros.";
lblDineroCambio.setText(String.valueOf(resultado));
}
}
| [
"longares18@gmail.com"
] | longares18@gmail.com |
f55989e3ff95df115037e03620f211a11318db74 | 943d6f3e551c9f1b1460dc55d0cec55fa94faf79 | /src/leetcode/july/ReverseString.java | 884d283a27c5b16ae832ab5fff251304e3b95c39 | [] | 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,539 | java | package leetcode.july;
public class ReverseString {
public String reverseWords(String s) {
if (s == null || s.length() == 0) {
return s;
}
s = s.trim();
char[] charArray = s.toCharArray();
int i = 0, j = charArray.length - 1;
while (i <= j) {
char tmp = charArray[i];
charArray[i] = charArray[j];
charArray[j] = tmp;
i++;
j--;
}
System.out.println(new String(charArray));
int beginIdx = 0;
int endInx = 0;
for (i = 0; i < charArray.length; i++) {
if (charArray[i] == ' ' || i == charArray.length - 1) {
endInx = i - 1;
while (beginIdx <= endInx) {
char tmp = charArray[beginIdx];
charArray[beginIdx] = charArray[endInx];
charArray[endInx] = tmp;
beginIdx++;
endInx--;
}
beginIdx = i + 1;
}
if (i == charArray.length - 1) {
endInx = i;
while (beginIdx <= endInx) {
char tmp = charArray[beginIdx];
charArray[beginIdx] = charArray[endInx];
charArray[endInx] = tmp;
beginIdx++;
endInx--;
}
}
}
return new String(charArray);
}
private void reverse(char[] charArray,int beginIdx,int endInx) {
while (beginIdx <= endInx) {
char tmp = charArray[beginIdx];
charArray[beginIdx] = charArray[endInx];
charArray[endInx] = tmp;
beginIdx++;
endInx--;
}
}
public String reverseWords_optimized(String s) {
String[] str = s.split(" ");
StringBuffer sBuff = new StringBuffer();
for(int i=str.length-1;i>=0;i--){
if(!str[i].isEmpty()){
sBuff= sBuff.append(str[i]);
if(i!=0){
sBuff.append(" ");
}
}
}
return sBuff.toString().trim();
}
public static void main(String[] args) {
String s = "ate good example";
ReverseString obj = new ReverseString();
System.out.println(s.length());
s = obj.reverseWords(s);
System.out.println(s);
System.out.println(s.length());
}
}
| [
"enataraj@cisco.com"
] | enataraj@cisco.com |
2a0ff64cf9650cf3045d96e6be45895a4d19f7e0 | d558eb3a84cb5330084f806545e59e1df0aaea21 | /core-module/src/main/java/com/bootcamp/coremodule/repositories/ProductVariationRepository.java | 511e68f7f776b6602fb49712353acf1a19fb9564 | [] | no_license | aknegi/eureka-server | 0d7da8036567b914a74c95ad8ae3c4b71514115d | 3d43bb8abd63a9fbd06b87746b923a8b4ad1f49e | refs/heads/main | 2023-06-18T11:59:57.726981 | 2021-07-18T07:04:19 | 2021-07-18T07:04:19 | 387,112,217 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,010 | java | package com.bootcamp.coremodule.repositories;
import com.bootcamp.coremodule.entities.ProductVariation;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Lock;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.QueryHints;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import javax.persistence.LockModeType;
import javax.persistence.QueryHint;
import java.util.List;
import java.util.Optional;
@Repository
public interface ProductVariationRepository extends CrudRepository<ProductVariation, Long> {
@Query(" FROM ProductVariation WHERE product.id= :id")
List<ProductVariation> findByProductId(long id, Pageable pageable);
@Query(value = "select MIN(price) from product_variation where product_id IN (select id from product where category_id=:category_id and deleted=false)", nativeQuery = true)
Double getMinPrice(@Param("category_id") Long categoryId);
@Query(value = "select MAX(price) from product_variation where product_id IN (select id from product where category_id=:category_id and deleted=false)", nativeQuery = true)
Double getMaxPrice(@Param("category_id") Long categoryId);
@Modifying
@Query(value = "delete from product_variation where product_id= :id", nativeQuery = true)
void deleteByProductId(@Param("id") long id);
@Query(" FROM ProductVariation WHERE product.id= :id")
List<ProductVariation> findByCustomerId(long id, Pageable pageable);
@Lock(LockModeType.PESSIMISTIC_WRITE)
@QueryHints({@QueryHint(name = "javax.persistence.lock.timeout", value = "3000")})
Optional<ProductVariation> findById(long id);
/* @Modifying
@Query("UPDATE ProductVariation set deleted = true where productId= :id")
void deleteByProduct(@Param("id") long id);*/
}
| [
"aknegi021@gmail.com"
] | aknegi021@gmail.com |
2aab7f07fc5933f624220c949b2720a1be206e0b | 8a5fc0c5e638fe00d5b0fe5d116e31727525dea9 | /hkt/client/swingui-exp/src/main/java/com/hkt/swingexp/app/report/entity/ReportRevenue.java | c4877b58dc50d226f92308ebdc5b37294b74e576 | [] | no_license | ngthedung/learn-java | e4510a60a6b91490ccb0eb75e9c9dbed963edfa9 | 1d33f4b8376384b4919182f0fe3fa06c36a02ac6 | refs/heads/master | 2021-01-10T07:06:50.748610 | 2016-02-04T08:44:26 | 2016-02-04T08:44:26 | 47,745,756 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,950 | java | package com.hkt.swingexp.app.report.entity;
import java.util.List;
import javax.swing.JLabel;
public class ReportRevenue {
public static enum Type {
ROOT, PARENT, CHILD, INVOICE
};
private String node;
private String name;
private String column1;
private String column2;
private String column3;
private String column4;
private String column5;
private String column6;
private String column7;
private Type type;
private String parent;
private List<ReportRevenue> listChild;
private int index;
private boolean widen = false;
private JLabel labelIcon;
public ReportRevenue(String node, String column1, String column2, String column3, int index) {
this.node = node;
this.column1 = column1;
this.column2 = column2;
this.column3 = column3;
this.index = index;
labelIcon = new JLabel();
labelIcon.setHorizontalTextPosition(JLabel.LEFT);
labelIcon.setVerticalTextPosition(JLabel.CENTER);
}
public ReportRevenue(String node, String column1, String column2, String column3, String column4, int index) {
this.node = node;
this.column1 = column1;
this.column2 = column2;
this.column3 = column3;
this.column4 = column4;
this.index = index;
labelIcon = new JLabel();
labelIcon.setHorizontalTextPosition(JLabel.LEFT);
labelIcon.setVerticalTextPosition(JLabel.CENTER);
}
public ReportRevenue(String node, String column1, String column2, String column3, String column4, String column5,String column6, String column7, int index) {
this.node = node;
this.column1 = column1;
this.column2 = column2;
this.column3 = column3;
this.column4 = column4;
this.column5 = column5;
this.column6 = column6;
this.column7 = column7;
this.index = index;
labelIcon = new JLabel();
labelIcon.setHorizontalTextPosition(JLabel.LEFT);
labelIcon.setVerticalTextPosition(JLabel.CENTER);
}
public ReportRevenue() {
}
public String getNode() {
return node;
}
public void setNode(String node) {
this.node = node;
}
public String getColumn1() {
return column1;
}
public void setColumn1(String column1) {
this.column1 = column1;
}
public String getColumn2() {
return column2;
}
public void setColumn2(String column2) {
this.column2 = column2;
}
public String getColumn3() {
return column3;
}
public void setColumn3(String column3) {
this.column3 = column3;
}
public String getColumn4() {
return column4;
}
public void setColumn4(String column4) {
this.column4 = column4;
}
public String getColumn5() {
return column5;
}
public void setColumn5(String column5) {
this.column5 = column5;
}
public String getColumn6() {
return column6;
}
public void setColumn6(String column6) {
this.column6 = column6;
}
public String getColumn7() {
return column7;
}
public void setColumn7(String column7) {
this.column7 = column7;
}
public int getIndex() {
return index;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public void setIndex(int index) {
this.index = index;
}
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
public String getParent() {
return parent;
}
public void setParent(String parent) {
this.parent = parent;
}
public List<ReportRevenue> getListChild() {
return listChild;
}
public void setListChild(List<ReportRevenue> listChild) {
this.listChild = listChild;
}
public boolean isWiden() {
return widen;
}
public void setWiden(boolean widen) {
this.widen = widen;
}
public JLabel getLabelIcon() {
return labelIcon;
}
public void setLabelIcon(JLabel labelIcon) {
this.labelIcon = labelIcon;
this.labelIcon.setHorizontalTextPosition(JLabel.LEFT);
this.labelIcon.setVerticalTextPosition(JLabel.CENTER);
}
@Override
public String toString() {
return node;
}
}
| [
"ngthedung.com@gmail.com"
] | ngthedung.com@gmail.com |
bff16ef92ea878a368773ac976c8e89a54daa6aa | 71300d333d5d02f3c59e540985b4594054837caf | /Chapter8/Cone.java | 0f6d8d925a4ce117aaf939b93e39773aab2b1613 | [] | no_license | SpaceLamb/CPSC1100DataStructures | 680a9441775061117cbe4c345b7dafd84376cb93 | 6054056bf5592634f662e6fdf1f62ebad5f2fcac | refs/heads/main | 2023-08-11T15:05:01.543786 | 2021-09-16T21:29:37 | 2021-09-16T21:29:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,539 | java | /* Cone.java: class that calcualtes volume and surface of a cone
Author Noah Parker
07/2/2021
*/
import java.util.*;
public class Cone {
// Cone: Cone class
double h;
double r;
public Cone(double h , double r){
// What It Does: instantiate object variables
// How It Works: Calls to constructor
this.h = h;
this.r = r;
}
public double Volume(double r, double h){
// What It Does: Returns volume for cone
// How It Works: Using the formula calculates it
h = (1.0 / 3.0) * Math.PI * Math.pow(r,2) * h;
int temp = (int)(h * Math.pow(10 , 2));
return ((double)temp)/Math.pow(10 , 2);
}
public double Surface(double r, double h){
// What It Does: Returns surface for cone
// How It Works: Using the formula calculates it
h = Math.PI * r * (h + r);
int temp = (int)(h * Math.pow(10 , 2));
return ((double)temp) / Math.pow(10 , 2);
}
public static void main(String[] args){
// What It Does: Demostrates correctness of object methods
// How It Works: Instantiate a object and call its methods
Scanner in = new Scanner(System.in);
System.out.println("Please enter the radius: ");
double r = in.nextDouble();
System.out.println("Please enter the height: ");
double h = in.nextDouble();
Cone oCone = new Cone(h,r);
System.out.println("The volume of the cone is: "+oCone.Volume(r,h));
System.out.println("The surface area of the cone is: "+oCone.Surface(r,h));
}
}
| [
"noreply@github.com"
] | noreply@github.com |
d3a77b6ab69caf902ed630d64948dcdabf1a0ddd | 3b91ed788572b6d5ac4db1bee814a74560603578 | /com/tencent/mm/plugin/appbrand/compat/a/b$r.java | 62676cf99495f511ded93d602b3a9e090f3cd355 | [] | no_license | linsir6/WeChat_java | a1deee3035b555fb35a423f367eb5e3e58a17cb0 | 32e52b88c012051100315af6751111bfb6697a29 | refs/heads/master | 2020-05-31T05:40:17.161282 | 2018-08-28T02:07:02 | 2018-08-28T02:07:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 141 | java | package com.tencent.mm.plugin.appbrand.compat.a;
import com.tencent.mm.plugin.appbrand.compat.a.b.g;
public interface b$r {
g adL();
}
| [
"707194831@qq.com"
] | 707194831@qq.com |
190434d349f6e81098fdde3026fcdb63ff5b906d | 346cb7bfcb19eeed649e8c96c677b5a95fa3ca28 | /src/thebesttexteditorsofar/ornot/ThebesttexteditorsofarOrnot.java | 79958ffc325a6ce60a0f4d9880013b303cad964d | [] | no_license | guilmour/thebesttexteditorsofarornot | 06022b8c171f81e31460f651528516b960ade865 | 91a5a7c7e1211f774a1fe0283200fafc77370c1f | refs/heads/master | 2020-05-17T14:57:41.789378 | 2015-02-28T23:40:52 | 2015-02-28T23:40:52 | 31,479,524 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 413 | java |
package thebesttexteditorsofar.ornot;
import java.util.*;
import java.awt.Image;
import java.awt.Toolkit;
public class ThebesttexteditorsofarOrnot {
public static void main(String[] args) {
Janela janela = new Janela();
janela.setLocation(200, 200);
janela.setIconImage(Toolkit.getDefaultToolkit().getImage("ico.png"));
janela.setVisible(true);
}
}
| [
"guilmour@guilst.com"
] | guilmour@guilst.com |
f83ec2ce547a1399f8533c7390b976b69b715603 | 806f76edfe3b16b437be3eb81639d1a7b1ced0de | /src/com/huawei/hwbtsdk/btmanager/C4653m.java | 0d52a2e24529b0ee343c8e94553980d6d800c5cb | [] | no_license | magic-coder/huawei-wear-re | 1bbcabc807e21b2fe8fe9aa9d6402431dfe3fb01 | 935ad32f5348c3d8c8d294ed55a5a2830987da73 | refs/heads/master | 2021-04-15T18:30:54.036851 | 2018-03-22T07:16:50 | 2018-03-22T07:16:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 18,289 | java | package com.huawei.hwbtsdk.btmanager;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import com.huawei.hwbtsdk.p057b.p400b.C4625b;
import com.huawei.hwbtsdk.p399a.C4610m;
import com.huawei.hwcommonmodel.C0973a;
import com.huawei.hwcommonmodel.datatypes.DeviceInfo;
import com.huawei.p190v.C2538c;
/* compiled from: BTDeviceSendCommandUtil */
class C4653m extends Handler {
final /* synthetic */ C4648h f17048a;
public C4653m(C4648h c4648h, Looper looper) {
this.f17048a = c4648h;
super(looper);
}
public void handleMessage(Message message) {
super.handleMessage(message);
switch (message.what) {
case 1:
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Receive SEND_COMMAND Message and sendResult = " + this.f17048a.f17017V + " size:" + this.f17048a.f17039v.size()});
if (this.f17048a.f17039v.size() != 0) {
int s = this.f17048a.m22343s();
C4625b c4625b = (C4625b) this.f17048a.f17039v.get(s);
if (c4625b == null) {
return;
}
byte[] bArr;
if (2 == this.f17048a.f17026i) {
if (!this.f17048a.f17040w) {
boolean z;
C4625b b;
this.f17048a.f16998C = c4625b.m22125i();
this.f17048a.f16999D = c4625b.m22126j();
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"ServiceID = " + this.f17048a.f16998C + " CommandID = " + this.f17048a.f16999D});
if (c4625b.m22120e()) {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Command need ack."});
this.f17048a.f17040w = true;
this.f17048a.f17011P = 3;
}
if (this.f17048a.f17024g != null) {
DeviceInfo d = this.f17048a.f17024g.d();
if (d != null && 2 == d.getDeviceBTType()) {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Current device type is ble."});
if (!(9 == this.f17048a.f16998C || 10 == this.f17048a.f16998C)) {
if (1 != this.f17048a.f16998C) {
z = true;
} else if (!(1 == this.f17048a.f16999D || 14 == this.f17048a.f16999D || 15 == this.f17048a.f16999D || 19 == this.f17048a.f16999D)) {
z = true;
}
if (z) {
bArr = null;
if (this.f17048a.f17023f == null) {
bArr = C4610m.m21977a(this.f17048a.f17021d, c4625b.m22116c(), this.f17048a.f17023f.getAddress(), this.f17048a.f17017V);
} else {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"mBTDevice is null"});
}
if (bArr == null) {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Get encryptData info."});
c4625b.m22108a(bArr.length);
c4625b.m22111a(bArr);
} else {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Do not get encryptData info."});
c4625b.m22108a(c4625b.m22116c().length);
c4625b.m22111a(c4625b.m22116c());
}
}
if (!c4625b.m22120e()) {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Do not need ack."});
this.f17048a.f17017V = this.f17048a.m22309b(c4625b);
} else {
this.f17048a.f17012Q = 0;
do {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Send V2 Command timeout with ReSendTime = " + this.f17048a.f17012Q});
if (this.f17048a.f17012Q != 0 && 1 == this.f17048a.f16998C && 5 == this.f17048a.f16999D) {
b = C4610m.m21980b();
bArr = null;
if (this.f17048a.f17023f == null) {
bArr = C4610m.m21977a(this.f17048a.f17021d, b.m22116c(), this.f17048a.f17023f.getAddress(), this.f17048a.f17017V);
} else {
C2538c.a("0xA0200006", "01", 1, "BTDeviceSendCommandUtil", new Object[]{"mBTDevice is null"});
}
if (bArr == null) {
c4625b.m22111a(bArr);
c4625b.m22108a(bArr.length);
} else {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"encryptData is null."});
}
}
this.f17048a.f17017V = this.f17048a.m22309b(c4625b);
if (this.f17048a.f17012Q == 0) {
}
} while (this.f17048a.f17011P > this.f17048a.f17012Q);
}
synchronized (C4648h.f16993X) {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Remove V2 Command from list."});
if (s < this.f17048a.f17039v.size() || s < 0) {
C2538c.b("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Remove fail for index is not in rang, mBTDeviceCommandList.size() = " + this.f17048a.f17039v.size()});
} else {
this.f17048a.f17039v.remove(s);
}
}
return;
}
}
}
z = false;
if (z) {
bArr = null;
if (this.f17048a.f17023f == null) {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"mBTDevice is null"});
} else {
bArr = C4610m.m21977a(this.f17048a.f17021d, c4625b.m22116c(), this.f17048a.f17023f.getAddress(), this.f17048a.f17017V);
}
if (bArr == null) {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Do not get encryptData info."});
c4625b.m22108a(c4625b.m22116c().length);
c4625b.m22111a(c4625b.m22116c());
} else {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Get encryptData info."});
c4625b.m22108a(bArr.length);
c4625b.m22111a(bArr);
}
}
if (!c4625b.m22120e()) {
this.f17048a.f17012Q = 0;
do {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Send V2 Command timeout with ReSendTime = " + this.f17048a.f17012Q});
b = C4610m.m21980b();
bArr = null;
if (this.f17048a.f17023f == null) {
C2538c.a("0xA0200006", "01", 1, "BTDeviceSendCommandUtil", new Object[]{"mBTDevice is null"});
} else {
bArr = C4610m.m21977a(this.f17048a.f17021d, b.m22116c(), this.f17048a.f17023f.getAddress(), this.f17048a.f17017V);
}
if (bArr == null) {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"encryptData is null."});
} else {
c4625b.m22111a(bArr);
c4625b.m22108a(bArr.length);
}
this.f17048a.f17017V = this.f17048a.m22309b(c4625b);
if (this.f17048a.f17012Q == 0) {
}
break;
} while (this.f17048a.f17011P > this.f17048a.f17012Q);
}
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Do not need ack."});
this.f17048a.f17017V = this.f17048a.m22309b(c4625b);
synchronized (C4648h.f16993X) {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Remove V2 Command from list."});
if (s < this.f17048a.f17039v.size()) {
}
C2538c.b("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Remove fail for index is not in rang, mBTDeviceCommandList.size() = " + this.f17048a.f17039v.size()});
}
return;
}
return;
} else if (!this.f17048a.f17040w && this.f17048a.f17041x != null) {
this.f17048a.f17040w = true;
this.f17048a.f17011P = 3;
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Set Sending flag true."});
byte[] c = c4625b.m22116c();
this.f17048a.f17008M = c4625b.m22124h();
if (1 == this.f17048a.f17026i) {
this.f17048a.f16998C = c4625b.m22125i();
this.f17048a.f16999D = c4625b.m22126j();
c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"SEND_COMMAND Msg with mServiceID = " + this.f17048a.f16998C + " mCommandID = " + this.f17048a.f16999D});
if (this.f17048a.f17008M != 1) {
bArr = this.f17048a.m22303a(c4625b.m22116c(), c4625b.m22124h());
} else {
if (c4625b.m22123g()) {
if ((byte) 7 == c[0] && (byte) 2 == c[1]) {
c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Need change command ID for set userInfo."});
c[1] = (byte) 9;
this.f17048a.f16999D = 9;
} else if ((byte) 2 == c[0] && (byte) 1 == c[1]) {
c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Need change command ID for send message."});
c[1] = (byte) 3;
this.f17048a.f16999D = 3;
}
}
bArr = this.f17048a.m22364a(c);
}
} else {
try {
Thread.sleep(5);
} catch (Exception e) {
c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Exception is :" + e.getMessage()});
}
this.f17048a.f16998C = c[0];
this.f17048a.f16999D = c[1];
int b2 = c4625b.m22112b() - 2;
bArr = new byte[b2];
for (int i = 0; i < b2; i++) {
bArr[i] = c[i + 2];
}
}
if (bArr != null) {
c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Is command need encrypt ?: " + c4625b.m22123g()});
if (c4625b.m22123g()) {
if (this.f17048a.f17023f != null) {
bArr = C4610m.m21976a(this.f17048a.f17021d, bArr, this.f17048a.f17023f.getAddress());
} else {
c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"mBTDevice is null."});
}
}
c.a("01", 0, "BTDeviceSendCommandUtil", new Object[]{"After encryptTLVs & transferV2ToV1, btV1Command = " + C0973a.a(bArr)});
this.f17048a.f17041x.m22110a(c4625b.m22120e());
this.f17048a.f17041x.m22109a(c4625b.m22107a());
this.f17048a.f17041x.m22115c(c4625b.m22121f());
this.f17048a.f17041x.m22113b(c4625b.m22117d());
this.f17048a.f17041x.m22111a(bArr);
this.f17048a.f17041x.m22108a(bArr.length);
this.f17048a.f17041x.m22118d(c4625b.m22124h());
this.f17048a.f17041x.m22114b(c4625b.m22123g());
this.f17048a.f17041x.m22119e(c4625b.m22125i());
this.f17048a.f17041x.m22122f(c4625b.m22126j());
this.f17048a.f17012Q = 0;
do {
c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Send V1 Command timeout with ReSendTime = " + this.f17048a.f17012Q});
if (this.f17048a.f17012Q != 0 && 1 == this.f17048a.f16998C && 5 == this.f17048a.f16999D) {
byte[] a = this.f17048a.m22364a(C4610m.m21980b().m22116c());
if (a != null) {
this.f17048a.f17041x.m22111a(a);
this.f17048a.f17041x.m22108a(a.length);
}
}
this.f17048a.m22309b(this.f17048a.f17041x);
if (this.f17048a.f17012Q != 0) {
}
synchronized (C4648h.f16993X) {
c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Remove V1 Command from list, iCommandIndex = " + s});
if (s < this.f17048a.f17039v.size() || s < 0) {
c.b("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Remove fail for index is not in rang, mBTDeviceCommandList.size() = " + this.f17048a.f17039v.size()});
} else {
this.f17048a.f17039v.remove(s);
}
}
return;
} while (this.f17048a.f17011P > this.f17048a.f17012Q);
synchronized (C4648h.f16993X) {
c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Remove V1 Command from list, iCommandIndex = " + s});
if (s < this.f17048a.f17039v.size()) {
}
c.b("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Remove fail for index is not in rang, mBTDeviceCommandList.size() = " + this.f17048a.f17039v.size()});
}
return;
}
return;
} else {
return;
}
}
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"mBTDeviceCommandList has no command."});
return;
case 2:
if (this.f17048a.f17024g != null) {
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Receive CONNECT_TIMEOUT_COMMAND Message."});
C2538c.a("01", 1, "BTDeviceSendCommandUtil", new Object[]{"Start to disconnect service."});
this.f17048a.f17024g.b();
return;
}
return;
default:
return;
}
}
}
| [
"lebedev1537@gmail.com"
] | lebedev1537@gmail.com |
64431c1cb0f6250a11c0f83ed4df640e34cbfe30 | 9f65281e6cb83c01fecead700dcff831906dd5b4 | /app/src/main/java/com/yhkj/yymall/view/pageindicatorview/draw/drawer/Drawer.java | 81fa2996609dcff9635956fa7439e3a6b5444d1a | [] | no_license | wqf6146/NewLife | a9e712e9c1132598bc5e30bb15a66c0f0fd03d70 | 7b366891c66316b844dc254f4af5b7f8e4022692 | refs/heads/master | 2021-09-08T03:19:05.628164 | 2018-03-06T12:14:52 | 2018-03-06T12:14:53 | 109,638,800 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,516 | java | package com.yhkj.yymall.view.pageindicatorview.draw.drawer;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.support.annotation.NonNull;
import com.yhkj.yymall.view.pageindicatorview.animation.data.Value;
import com.yhkj.yymall.view.pageindicatorview.draw.data.Indicator;
import com.yhkj.yymall.view.pageindicatorview.draw.drawer.type.*;
public class Drawer {
private BasicDrawer basicDrawer;
private ColorDrawer colorDrawer;
private ScaleDrawer scaleDrawer;
private WormDrawer wormDrawer;
private SlideDrawer slideDrawer;
private FillDrawer fillDrawer;
private ThinWormDrawer thinWormDrawer;
private DropDrawer dropDrawer;
private SwapDrawer swapDrawer;
private int position;
private int coordinateX;
private int coordinateY;
public Drawer(@NonNull Indicator indicator) {
Paint paint = new Paint();
paint.setStyle(Paint.Style.FILL);
paint.setAntiAlias(true);
basicDrawer = new BasicDrawer(paint, indicator);
colorDrawer = new ColorDrawer(paint, indicator);
scaleDrawer = new ScaleDrawer(paint, indicator);
wormDrawer = new WormDrawer(paint, indicator);
slideDrawer = new SlideDrawer(paint, indicator);
fillDrawer = new FillDrawer(paint, indicator);
thinWormDrawer = new ThinWormDrawer(paint, indicator);
dropDrawer = new DropDrawer(paint, indicator);
swapDrawer = new SwapDrawer(paint, indicator);
}
public void setup(int position, int coordinateX, int coordinateY) {
this.position = position;
this.coordinateX = coordinateX;
this.coordinateY = coordinateY;
}
public void drawBasic(@NonNull Canvas canvas, boolean isSelectedItem) {
if (colorDrawer != null) {
basicDrawer.draw(canvas, position, isSelectedItem, coordinateX, coordinateY);
}
}
public void drawColor(@NonNull Canvas canvas, @NonNull Value value) {
if (colorDrawer != null) {
colorDrawer.draw(canvas, value, position, coordinateX, coordinateY);
}
}
public void drawScale(@NonNull Canvas canvas, @NonNull Value value) {
if (scaleDrawer != null) {
scaleDrawer.draw(canvas, value, position, coordinateX, coordinateY);
}
}
public void drawWorm(@NonNull Canvas canvas, @NonNull Value value) {
if (wormDrawer != null) {
wormDrawer.draw(canvas, value, coordinateX, coordinateY);
}
}
public void drawSlide(@NonNull Canvas canvas, @NonNull Value value) {
if (slideDrawer != null) {
slideDrawer.draw(canvas, value, coordinateX, coordinateY);
}
}
public void drawFill(@NonNull Canvas canvas, @NonNull Value value) {
if (fillDrawer != null) {
fillDrawer.draw(canvas, value, position, coordinateX, coordinateY);
}
}
public void drawThinWorm(@NonNull Canvas canvas, @NonNull Value value) {
if (thinWormDrawer != null) {
thinWormDrawer.draw(canvas, value, coordinateX, coordinateY);
}
}
public void drawDrop(@NonNull Canvas canvas, @NonNull Value value) {
if (dropDrawer != null) {
dropDrawer.draw(canvas, value, coordinateX, coordinateY);
}
}
public void drawSwap(@NonNull Canvas canvas, @NonNull Value value) {
if (swapDrawer != null) {
swapDrawer.draw(canvas, value, position, coordinateX, coordinateY);
}
}
}
| [
"346806726@qq.com"
] | 346806726@qq.com |
a76dc6398a9972f84482093469a8f44497887bf0 | 7bbb8a6503e0841ef9ff75368848d89d7a66654b | /com.wt.studio.plugin.modeldesigner/src/com/wt/studio/plugin/modeldesigner/wizards/NewDataDesignerWizard.java | f30aff197bfa84340b7156e9f7c651011fdd855e | [
"MIT"
] | permissive | eseawind/wt-studio | a8e7b68dd35bcefd1216902a6c949f1341b63947 | 949e2190ecb265ecca9738b6b1ffb964ca0a7b72 | refs/heads/master | 2021-01-18T13:26:59.710839 | 2014-12-10T01:51:53 | 2014-12-10T01:51:53 | 38,356,902 | 1 | 0 | null | 2015-07-01T07:38:14 | 2015-07-01T07:38:13 | null | UTF-8 | Java | false | false | 3,994 | java | package com.wt.studio.plugin.modeldesigner.wizards;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
public class NewDataDesignerWizard extends Wizard implements INewWizard
{
private DataDesignerWizardPage page;
private ISelection selection;
public NewDataDesignerWizard()
{
setNeedsProgressMonitor(true);
}
public NewDataDesignerWizard(ISelection selection)
{
setNeedsProgressMonitor(true);
this.selection = selection;
}
/**
*
*/
@Override
public void init(IWorkbench arg0, IStructuredSelection selection)
{
this.selection = selection;
}
/**
* 向导的finish处理
*/
@Override
public boolean performFinish()
{
final String containerName = this.page.getContainerName();
final String fileName = this.page.getFileName();
IRunnableWithProgress op = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException
{
try {
doFinish(containerName, fileName, monitor);
} catch (CoreException e) {
e.printStackTrace();
}
}
};
try {
getContainer().run(true, false, op);
} catch (InterruptedException e) {
return false;
} catch (InvocationTargetException e) {
Throwable realException = e.getTargetException();
MessageDialog.openError(getShell(), "Error", realException.getMessage());
return false;
}
return true;
}
@Override
public void addPages()
{
this.page = new DataDesignerWizardPage(this.selection);
addPage(this.page);
}
private void doFinish(String containerName, String fileName, IProgressMonitor monitor)
throws CoreException
{
monitor.beginTask("Creating " + fileName, 2);
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IResource resource = root.findMember(new Path(containerName));
if ((!resource.exists()) || (!(resource instanceof IContainer))) {
throwCoreException("Container \"" + containerName + "\" does not exist.");
}
IContainer container = (IContainer) resource;
final IFile file = container.getFile(new Path(fileName));
try {
InputStream stream = openContentStream();
if (file.exists())
file.setContents(stream, true, true, monitor);
else {
file.create(stream, true, monitor);
}
stream.close();
} catch (IOException localIOException) {
}
monitor.worked(1);
monitor.setTaskName("Opening file for editing...");
getShell().getDisplay().asyncExec(new Runnable() {
public void run()
{
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getActivePage();
try {
IDE.openEditor(page, file, true);
} catch (PartInitException localPartInitException) {
}
}
});
monitor.worked(1);
}
private void throwCoreException(String message) throws CoreException
{
IStatus status = new Status(4, "DataDesigner", 0, message, null);
throw new CoreException(status);
}
private InputStream openContentStream()
{
String contents = "";
return new ByteArrayInputStream(contents.getBytes());
}
} | [
"yinglin2268@gmail.com"
] | yinglin2268@gmail.com |
f0194c67c2b98b2a7aca38fade0348fd56526808 | 3a08cb991c1c352740990446a4a99e5de1c7a7df | /src/com/groom/dao/impl/QuizDAOImpl1.java | 5d5aeec704d42f5946dba5cb7da9216843256def | [] | no_license | srikanthkoyyada/groom4more | 1a19fcbe67255271c47545e7281c343458171719 | 41b9550e1171eddd2ebf04d91d928828ee3521c0 | refs/heads/master | 2021-08-24T15:23:07.997202 | 2017-12-10T06:47:47 | 2017-12-10T06:47:47 | 106,992,339 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 177,264 | java | /* */ package com.groom.dao.impl;
/* */
/* */ import com.groom.bean.QuizPoints;
/* */ import com.groom.dao.BaseDAO;
/* */ import com.groom.dao.QuizDAO;
/* */ import com.groom.util.GroomUtil;
/* */ import java.io.PrintStream;
/* */ import java.sql.Connection;
/* */ import java.sql.PreparedStatement;
/* */ import java.sql.ResultSet;
/* */ import java.sql.SQLException;
/* */ import java.util.List;
/* */ import javax.sql.DataSource;
/* */ import org.apache.commons.lang3.StringUtils;
/* */
/* */ public class QuizDAOImpl
/* */ extends BaseDAO
/* */ implements QuizDAO
/* */ {
/* */ /* Error */
/* */ public List<com.groom.bean.QuizQuestionDetails> getQuizDetails(String category, int topicid)
/* */ throws SQLException
/* */ {
/* */ // Byte code:
/* */ // 0: getstatic 23 com/groom/dao/impl/QuizDAOImpl:ds Ljavax/sql/DataSource;
/* */ // 3: invokeinterface 27 1 0
/* */ // 8: astore_3
/* */ // 9: aconst_null
/* */ // 10: astore 4
/* */ // 12: aconst_null
/* */ // 13: astore 5
/* */ // 15: new 33 java/util/ArrayList
/* */ // 18: dup
/* */ // 19: invokespecial 35 java/util/ArrayList:<init> ()V
/* */ // 22: astore 6
/* */ // 24: new 36 java/lang/StringBuilder
/* */ // 27: dup
/* */ // 28: ldc 38
/* */ // 30: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 33: aload_1
/* */ // 34: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 37: ldc 47
/* */ // 39: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 42: aload_1
/* */ // 43: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 46: ldc 49
/* */ // 48: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 51: ldc 51
/* */ // 53: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 56: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 59: astore 7
/* */ // 61: aload_3
/* */ // 62: aload 7
/* */ // 64: invokeinterface 57 2 0
/* */ // 69: astore 4
/* */ // 71: aload 4
/* */ // 73: iconst_1
/* */ // 74: iload_2
/* */ // 75: invokeinterface 63 3 0
/* */ // 80: aload 4
/* */ // 82: invokeinterface 69 1 0
/* */ // 87: astore 5
/* */ // 89: goto +222 -> 311
/* */ // 92: new 73 com/groom/bean/QuizQuestionDetails
/* */ // 95: dup
/* */ // 96: invokespecial 75 com/groom/bean/QuizQuestionDetails:<init> ()V
/* */ // 99: astore 8
/* */ // 101: aload 8
/* */ // 103: aload 5
/* */ // 105: ldc 76
/* */ // 107: invokeinterface 78 2 0
/* */ // 112: invokevirtual 84 com/groom/bean/QuizQuestionDetails:setQ_id (I)V
/* */ // 115: aload 8
/* */ // 117: aload 5
/* */ // 119: ldc 88
/* */ // 121: invokeinterface 90 2 0
/* */ // 126: invokevirtual 94 com/groom/bean/QuizQuestionDetails:setQuestion (Ljava/lang/String;)V
/* */ // 129: aload 8
/* */ // 131: aload 5
/* */ // 133: ldc 97
/* */ // 135: invokeinterface 90 2 0
/* */ // 140: invokevirtual 99 com/groom/bean/QuizQuestionDetails:setOption_a (Ljava/lang/String;)V
/* */ // 143: aload 8
/* */ // 145: aload 5
/* */ // 147: ldc 102
/* */ // 149: invokeinterface 90 2 0
/* */ // 154: invokevirtual 104 com/groom/bean/QuizQuestionDetails:setOption_b (Ljava/lang/String;)V
/* */ // 157: aload 8
/* */ // 159: aload 5
/* */ // 161: ldc 107
/* */ // 163: invokeinterface 90 2 0
/* */ // 168: invokevirtual 109 com/groom/bean/QuizQuestionDetails:setOption_c (Ljava/lang/String;)V
/* */ // 171: aload 8
/* */ // 173: aload 5
/* */ // 175: ldc 112
/* */ // 177: invokeinterface 90 2 0
/* */ // 182: invokevirtual 114 com/groom/bean/QuizQuestionDetails:setOption_d (Ljava/lang/String;)V
/* */ // 185: aload 8
/* */ // 187: aload 5
/* */ // 189: ldc 117
/* */ // 191: invokeinterface 90 2 0
/* */ // 196: invokevirtual 119 com/groom/bean/QuizQuestionDetails:setAnswer (Ljava/lang/String;)V
/* */ // 199: aload 8
/* */ // 201: aload 5
/* */ // 203: ldc 122
/* */ // 205: invokeinterface 78 2 0
/* */ // 210: invokevirtual 124 com/groom/bean/QuizQuestionDetails:setTopicid (I)V
/* */ // 213: aload 5
/* */ // 215: ldc 127
/* */ // 217: invokeinterface 90 2 0
/* */ // 222: ifnull +23 -> 245
/* */ // 225: aload 8
/* */ // 227: aload 5
/* */ // 229: ldc 127
/* */ // 231: invokeinterface 90 2 0
/* */ // 236: invokevirtual 129 java/lang/String:trim ()Ljava/lang/String;
/* */ // 239: invokevirtual 134 com/groom/bean/QuizQuestionDetails:setImage_name (Ljava/lang/String;)V
/* */ // 242: goto +17 -> 259
/* */ // 245: aload 8
/* */ // 247: aload 5
/* */ // 249: ldc 127
/* */ // 251: invokeinterface 90 2 0
/* */ // 256: invokevirtual 134 com/groom/bean/QuizQuestionDetails:setImage_name (Ljava/lang/String;)V
/* */ // 259: aload 8
/* */ // 261: aload 5
/* */ // 263: ldc -119
/* */ // 265: invokeinterface 90 2 0
/* */ // 270: invokevirtual 139 com/groom/bean/QuizQuestionDetails:setExplanation (Ljava/lang/String;)V
/* */ // 273: aload 8
/* */ // 275: aload 5
/* */ // 277: ldc -114
/* */ // 279: invokeinterface 90 2 0
/* */ // 284: invokevirtual 144 com/groom/bean/QuizQuestionDetails:setTest_by (Ljava/lang/String;)V
/* */ // 287: aload 8
/* */ // 289: aload 5
/* */ // 291: ldc -109
/* */ // 293: invokeinterface 78 2 0
/* */ // 298: invokevirtual 149 com/groom/bean/QuizQuestionDetails:setTest_time (I)V
/* */ // 301: aload 6
/* */ // 303: aload 8
/* */ // 305: invokeinterface 152 2 0
/* */ // 310: pop
/* */ // 311: aload 5
/* */ // 313: invokeinterface 158 1 0
/* */ // 318: ifne -226 -> 92
/* */ // 321: goto +86 -> 407
/* */ // 324: astore 7
/* */ // 326: aload 7
/* */ // 328: invokevirtual 162 java/sql/SQLException:printStackTrace ()V
/* */ // 331: aload 5
/* */ // 333: ifnull +10 -> 343
/* */ // 336: aload 5
/* */ // 338: invokeinterface 165 1 0
/* */ // 343: aload 4
/* */ // 345: ifnull +10 -> 355
/* */ // 348: aload 4
/* */ // 350: invokeinterface 168 1 0
/* */ // 355: aload_3
/* */ // 356: ifnull +85 -> 441
/* */ // 359: aload_3
/* */ // 360: invokeinterface 169 1 0
/* */ // 365: goto +76 -> 441
/* */ // 368: astore 9
/* */ // 370: aload 5
/* */ // 372: ifnull +10 -> 382
/* */ // 375: aload 5
/* */ // 377: invokeinterface 165 1 0
/* */ // 382: aload 4
/* */ // 384: ifnull +10 -> 394
/* */ // 387: aload 4
/* */ // 389: invokeinterface 168 1 0
/* */ // 394: aload_3
/* */ // 395: ifnull +9 -> 404
/* */ // 398: aload_3
/* */ // 399: invokeinterface 169 1 0
/* */ // 404: aload 9
/* */ // 406: athrow
/* */ // 407: aload 5
/* */ // 409: ifnull +10 -> 419
/* */ // 412: aload 5
/* */ // 414: invokeinterface 165 1 0
/* */ // 419: aload 4
/* */ // 421: ifnull +10 -> 431
/* */ // 424: aload 4
/* */ // 426: invokeinterface 168 1 0
/* */ // 431: aload_3
/* */ // 432: ifnull +9 -> 441
/* */ // 435: aload_3
/* */ // 436: invokeinterface 169 1 0
/* */ // 441: aload 6
/* */ // 443: areturn
/* */ // Line number table:
/* */ // Java source line #32 -> byte code offset #0
/* */ // Java source line #33 -> byte code offset #9
/* */ // Java source line #34 -> byte code offset #12
/* */ // Java source line #35 -> byte code offset #15
/* */ // Java source line #39 -> byte code offset #24
/* */ // Java source line #40 -> byte code offset #51
/* */ // Java source line #39 -> byte code offset #56
/* */ // Java source line #41 -> byte code offset #61
/* */ // Java source line #42 -> byte code offset #71
/* */ // Java source line #43 -> byte code offset #80
/* */ // Java source line #44 -> byte code offset #89
/* */ // Java source line #45 -> byte code offset #92
/* */ // Java source line #46 -> byte code offset #101
/* */ // Java source line #47 -> byte code offset #115
/* */ // Java source line #48 -> byte code offset #129
/* */ // Java source line #49 -> byte code offset #143
/* */ // Java source line #50 -> byte code offset #157
/* */ // Java source line #51 -> byte code offset #171
/* */ // Java source line #52 -> byte code offset #185
/* */ // Java source line #53 -> byte code offset #199
/* */ // Java source line #54 -> byte code offset #213
/* */ // Java source line #55 -> byte code offset #225
/* */ // Java source line #56 -> byte code offset #236
/* */ // Java source line #55 -> byte code offset #239
/* */ // Java source line #56 -> byte code offset #242
/* */ // Java source line #58 -> byte code offset #245
/* */ // Java source line #59 -> byte code offset #259
/* */ // Java source line #60 -> byte code offset #273
/* */ // Java source line #61 -> byte code offset #287
/* */ // Java source line #62 -> byte code offset #301
/* */ // Java source line #44 -> byte code offset #311
/* */ // Java source line #66 -> byte code offset #321
/* */ // Java source line #67 -> byte code offset #326
/* */ // Java source line #69 -> byte code offset #331
/* */ // Java source line #70 -> byte code offset #336
/* */ // Java source line #71 -> byte code offset #343
/* */ // Java source line #72 -> byte code offset #348
/* */ // Java source line #73 -> byte code offset #355
/* */ // Java source line #74 -> byte code offset #359
/* */ // Java source line #68 -> byte code offset #368
/* */ // Java source line #69 -> byte code offset #370
/* */ // Java source line #70 -> byte code offset #375
/* */ // Java source line #71 -> byte code offset #382
/* */ // Java source line #72 -> byte code offset #387
/* */ // Java source line #73 -> byte code offset #394
/* */ // Java source line #74 -> byte code offset #398
/* */ // Java source line #75 -> byte code offset #404
/* */ // Java source line #69 -> byte code offset #407
/* */ // Java source line #70 -> byte code offset #412
/* */ // Java source line #71 -> byte code offset #419
/* */ // Java source line #72 -> byte code offset #424
/* */ // Java source line #73 -> byte code offset #431
/* */ // Java source line #74 -> byte code offset #435
/* */ // Java source line #76 -> byte code offset #441
/* */ // Local variable table:
/* */ // start length slot name signature
/* */ // 0 444 0 this QuizDAOImpl
/* */ // 0 444 1 category String
/* */ // 0 444 2 topicid int
/* */ // 8 428 3 connection Connection
/* */ // 10 415 4 preparedStatement PreparedStatement
/* */ // 13 400 5 resultSet ResultSet
/* */ // 22 420 6 questionDetails List<com.groom.bean.QuizQuestionDetails>
/* */ // 59 4 7 query String
/* */ // 324 3 7 exception SQLException
/* */ // 99 205 8 details com.groom.bean.QuizQuestionDetails
/* */ // 368 37 9 localObject Object
/* */ // Exception table:
/* */ // from to target type
/* */ // 24 321 324 java/sql/SQLException
/* */ // 24 331 368 finally
/* */ }
/* */
/* */ /* Error */
/* */ public java.util.Map<Integer, String> getQuizAnswers(String questionIds, String category)
/* */ throws SQLException
/* */ {
/* */ // Byte code:
/* */ // 0: getstatic 23 com/groom/dao/impl/QuizDAOImpl:ds Ljavax/sql/DataSource;
/* */ // 3: invokeinterface 27 1 0
/* */ // 8: astore_3
/* */ // 9: aconst_null
/* */ // 10: astore 4
/* */ // 12: aconst_null
/* */ // 13: astore 5
/* */ // 15: new 195 java/util/HashMap
/* */ // 18: dup
/* */ // 19: invokespecial 197 java/util/HashMap:<init> ()V
/* */ // 22: astore 6
/* */ // 24: new 36 java/lang/StringBuilder
/* */ // 27: dup
/* */ // 28: ldc -58
/* */ // 30: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 33: aload_2
/* */ // 34: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 37: ldc -56
/* */ // 39: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 42: aload_1
/* */ // 43: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 46: ldc -54
/* */ // 48: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 51: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 54: astore 7
/* */ // 56: aload_3
/* */ // 57: aload 7
/* */ // 59: invokeinterface 57 2 0
/* */ // 64: astore 4
/* */ // 66: aload 4
/* */ // 68: invokeinterface 69 1 0
/* */ // 73: astore 5
/* */ // 75: goto +32 -> 107
/* */ // 78: aload 6
/* */ // 80: aload 5
/* */ // 82: ldc 76
/* */ // 84: invokeinterface 78 2 0
/* */ // 89: invokestatic 204 java/lang/Integer:valueOf (I)Ljava/lang/Integer;
/* */ // 92: aload 5
/* */ // 94: ldc 117
/* */ // 96: invokeinterface 90 2 0
/* */ // 101: invokeinterface 210 3 0
/* */ // 106: pop
/* */ // 107: aload 5
/* */ // 109: invokeinterface 158 1 0
/* */ // 114: ifne -36 -> 78
/* */ // 117: goto +86 -> 203
/* */ // 120: astore 7
/* */ // 122: aload 7
/* */ // 124: invokevirtual 162 java/sql/SQLException:printStackTrace ()V
/* */ // 127: aload 5
/* */ // 129: ifnull +10 -> 139
/* */ // 132: aload 5
/* */ // 134: invokeinterface 165 1 0
/* */ // 139: aload 4
/* */ // 141: ifnull +10 -> 151
/* */ // 144: aload 4
/* */ // 146: invokeinterface 168 1 0
/* */ // 151: aload_3
/* */ // 152: ifnull +85 -> 237
/* */ // 155: aload_3
/* */ // 156: invokeinterface 169 1 0
/* */ // 161: goto +76 -> 237
/* */ // 164: astore 8
/* */ // 166: aload 5
/* */ // 168: ifnull +10 -> 178
/* */ // 171: aload 5
/* */ // 173: invokeinterface 165 1 0
/* */ // 178: aload 4
/* */ // 180: ifnull +10 -> 190
/* */ // 183: aload 4
/* */ // 185: invokeinterface 168 1 0
/* */ // 190: aload_3
/* */ // 191: ifnull +9 -> 200
/* */ // 194: aload_3
/* */ // 195: invokeinterface 169 1 0
/* */ // 200: aload 8
/* */ // 202: athrow
/* */ // 203: aload 5
/* */ // 205: ifnull +10 -> 215
/* */ // 208: aload 5
/* */ // 210: invokeinterface 165 1 0
/* */ // 215: aload 4
/* */ // 217: ifnull +10 -> 227
/* */ // 220: aload 4
/* */ // 222: invokeinterface 168 1 0
/* */ // 227: aload_3
/* */ // 228: ifnull +9 -> 237
/* */ // 231: aload_3
/* */ // 232: invokeinterface 169 1 0
/* */ // 237: aload 6
/* */ // 239: areturn
/* */ // Line number table:
/* */ // Java source line #82 -> byte code offset #0
/* */ // Java source line #83 -> byte code offset #9
/* */ // Java source line #84 -> byte code offset #12
/* */ // Java source line #85 -> byte code offset #15
/* */ // Java source line #87 -> byte code offset #24
/* */ // Java source line #88 -> byte code offset #37
/* */ // Java source line #87 -> byte code offset #51
/* */ // Java source line #89 -> byte code offset #56
/* */ // Java source line #91 -> byte code offset #66
/* */ // Java source line #92 -> byte code offset #75
/* */ // Java source line #94 -> byte code offset #78
/* */ // Java source line #95 -> byte code offset #92
/* */ // Java source line #94 -> byte code offset #101
/* */ // Java source line #92 -> byte code offset #107
/* */ // Java source line #98 -> byte code offset #117
/* */ // Java source line #99 -> byte code offset #122
/* */ // Java source line #101 -> byte code offset #127
/* */ // Java source line #102 -> byte code offset #132
/* */ // Java source line #103 -> byte code offset #139
/* */ // Java source line #104 -> byte code offset #144
/* */ // Java source line #105 -> byte code offset #151
/* */ // Java source line #106 -> byte code offset #155
/* */ // Java source line #100 -> byte code offset #164
/* */ // Java source line #101 -> byte code offset #166
/* */ // Java source line #102 -> byte code offset #171
/* */ // Java source line #103 -> byte code offset #178
/* */ // Java source line #104 -> byte code offset #183
/* */ // Java source line #105 -> byte code offset #190
/* */ // Java source line #106 -> byte code offset #194
/* */ // Java source line #107 -> byte code offset #200
/* */ // Java source line #101 -> byte code offset #203
/* */ // Java source line #102 -> byte code offset #208
/* */ // Java source line #103 -> byte code offset #215
/* */ // Java source line #104 -> byte code offset #220
/* */ // Java source line #105 -> byte code offset #227
/* */ // Java source line #106 -> byte code offset #231
/* */ // Java source line #108 -> byte code offset #237
/* */ // Local variable table:
/* */ // start length slot name signature
/* */ // 0 240 0 this QuizDAOImpl
/* */ // 0 240 1 questionIds String
/* */ // 0 240 2 category String
/* */ // 8 224 3 connection Connection
/* */ // 10 211 4 preparedStatement PreparedStatement
/* */ // 13 196 5 resultSet ResultSet
/* */ // 22 216 6 answers java.util.Map<Integer, String>
/* */ // 54 4 7 query String
/* */ // 120 3 7 exception SQLException
/* */ // 164 37 8 localObject Object
/* */ // Exception table:
/* */ // from to target type
/* */ // 24 117 120 java/sql/SQLException
/* */ // 24 127 164 finally
/* */ }
/* */
/* */ public boolean saveQuizPoints(QuizPoints quizPoints)
/* */ throws SQLException
/* */ {
/* 113 */ Connection connection = ds.getConnection();
/* 114 */ PreparedStatement preparedStatement = null;
/* 115 */ ResultSet resultSet = null;
/* */ try
/* */ {
/* 118 */ String query = "INSERT INTO " +
/* 119 */ quizPoints.getCateogry() +
/* 120 */ "_TEST_POINTS(USER_ID,POINTS,TOPIC_ID,QUESTION_IDS,TIME,TEST_DATE,ANSWERS_GIVEN) VALUES(?,?,?,?,?,?,?)";
/* */
/* 122 */ preparedStatement = connection.prepareStatement(query);
/* 123 */ preparedStatement.setInt(1, quizPoints.getU_id());
/* 124 */ preparedStatement.setInt(2, quizPoints.getPoints());
/* 125 */ preparedStatement.setInt(3, quizPoints.getTopicid());
/* 126 */ preparedStatement.setString(4, quizPoints.getQuestionIds());
/* 127 */ preparedStatement.setTime(5, quizPoints.getTime());
/* 128 */ preparedStatement.setDate(6, quizPoints.getTestDate());
/* 129 */ preparedStatement.setString(7, quizPoints.getAnswers());
/* */
/* 131 */ int status = preparedStatement.executeUpdate();
/* 132 */ if (status == 1)
/* 133 */ return true;
/* */ } catch (SQLException exception) {
/* 135 */ exception.printStackTrace();
/* */ } finally {
/* 137 */ if (resultSet != null)
/* 138 */ resultSet.close();
/* 139 */ if (preparedStatement != null)
/* 140 */ preparedStatement.close();
/* 141 */ if (connection != null) {
/* 142 */ connection.close();
/* */ }
/* */ }
/* 137 */ if (resultSet != null)
/* 138 */ resultSet.close();
/* 139 */ if (preparedStatement != null)
/* 140 */ preparedStatement.close();
/* 141 */ if (connection != null) {
/* 142 */ connection.close();
/* */ }
/* 144 */ return false;
/* */ }
/* */
/* */ public boolean getTestsAttemptedByUserStaus(int userid, String category)
/* */ throws SQLException
/* */ {
/* 150 */ Connection connection = ds.getConnection();
/* 151 */ PreparedStatement preparedStatement = null;
/* 152 */ ResultSet resultSet = null;
/* */ try
/* */ {
/* 155 */ String query = "SELECT * FROM " + category +
/* 156 */ "_TEST_POINTS WHERE USER_ID=? AND TEST_DATE=?";
/* 157 */ preparedStatement = connection.prepareStatement(query);
/* 158 */ preparedStatement.setInt(1, userid);
/* 159 */ preparedStatement.setDate(2, GroomUtil.getCurrentDate());
/* 160 */ resultSet = preparedStatement.executeQuery();
/* 161 */ if (resultSet.next()) {
/* 162 */ return true;
/* */ }
/* */ } catch (SQLException exception) {
/* 165 */ exception.printStackTrace();
/* */ } finally {
/* 167 */ if (resultSet != null)
/* 168 */ resultSet.close();
/* 169 */ if (preparedStatement != null)
/* 170 */ preparedStatement.close();
/* 171 */ if (connection != null) {
/* 172 */ connection.close();
/* */ }
/* */ }
/* 167 */ if (resultSet != null)
/* 168 */ resultSet.close();
/* 169 */ if (preparedStatement != null)
/* 170 */ preparedStatement.close();
/* 171 */ if (connection != null) {
/* 172 */ connection.close();
/* */ }
/* */
/* 175 */ return false;
/* */ }
/* */
/* */ /* Error */
/* */ public List<com.groom.bean.TestsTopicList> getTestTopics(int userid, String category, int standard, int test_category_id)
/* */ throws SQLException
/* */ {
/* */ // Byte code:
/* */ // 0: getstatic 23 com/groom/dao/impl/QuizDAOImpl:ds Ljavax/sql/DataSource;
/* */ // 3: invokeinterface 27 1 0
/* */ // 8: astore 5
/* */ // 10: aconst_null
/* */ // 11: astore 6
/* */ // 13: aconst_null
/* */ // 14: astore 7
/* */ // 16: new 33 java/util/ArrayList
/* */ // 19: dup
/* */ // 20: invokespecial 35 java/util/ArrayList:<init> ()V
/* */ // 23: astore 8
/* */ // 25: new 36 java/lang/StringBuilder
/* */ // 28: dup
/* */ // 29: ldc_w 275
/* */ // 32: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 35: aload_2
/* */ // 36: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 39: ldc_w 288
/* */ // 42: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 45: invokestatic 279 com/groom/util/GroomUtil:getCurrentDate ()Ljava/sql/Date;
/* */ // 48: invokevirtual 290 java/lang/StringBuilder:append (Ljava/lang/Object;)Ljava/lang/StringBuilder;
/* */ // 51: ldc_w 293
/* */ // 54: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 57: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 60: astore 9
/* */ // 62: aload 5
/* */ // 64: aload 9
/* */ // 66: invokeinterface 57 2 0
/* */ // 71: astore 6
/* */ // 73: aload 6
/* */ // 75: iconst_1
/* */ // 76: iload_3
/* */ // 77: invokeinterface 63 3 0
/* */ // 82: aload 6
/* */ // 84: iconst_2
/* */ // 85: iload 4
/* */ // 87: invokeinterface 63 3 0
/* */ // 92: aload 6
/* */ // 94: invokeinterface 69 1 0
/* */ // 99: astore 7
/* */ // 101: new 295 java/util/Date
/* */ // 104: dup
/* */ // 105: invokestatic 279 com/groom/util/GroomUtil:getCurrentDate ()Ljava/sql/Date;
/* */ // 108: invokevirtual 297 java/sql/Date:getTime ()J
/* */ // 111: invokespecial 302 java/util/Date:<init> (J)V
/* */ // 114: astore 10
/* */ // 116: new 305 java/text/SimpleDateFormat
/* */ // 119: dup
/* */ // 120: ldc_w 307
/* */ // 123: invokespecial 309 java/text/SimpleDateFormat:<init> (Ljava/lang/String;)V
/* */ // 126: astore 11
/* */ // 128: aload 11
/* */ // 130: aload 11
/* */ // 132: aload 10
/* */ // 134: invokevirtual 310 java/text/SimpleDateFormat:format (Ljava/util/Date;)Ljava/lang/String;
/* */ // 137: invokevirtual 314 java/text/SimpleDateFormat:parse (Ljava/lang/String;)Ljava/util/Date;
/* */ // 140: astore 10
/* */ // 142: goto +274 -> 416
/* */ // 145: new 318 com/groom/bean/TestsTopicList
/* */ // 148: dup
/* */ // 149: invokespecial 320 com/groom/bean/TestsTopicList:<init> ()V
/* */ // 152: astore 12
/* */ // 154: aload 12
/* */ // 156: aload 7
/* */ // 158: ldc 122
/* */ // 160: invokeinterface 78 2 0
/* */ // 165: invokevirtual 321 com/groom/bean/TestsTopicList:setTopicId (I)V
/* */ // 168: aload 12
/* */ // 170: aload 7
/* */ // 172: ldc_w 324
/* */ // 175: invokeinterface 90 2 0
/* */ // 180: invokevirtual 326 com/groom/bean/TestsTopicList:setTopicName (Ljava/lang/String;)V
/* */ // 183: aload 12
/* */ // 185: aload 7
/* */ // 187: ldc_w 329
/* */ // 190: invokeinterface 78 2 0
/* */ // 195: invokevirtual 331 com/groom/bean/TestsTopicList:setTopicClass (I)V
/* */ // 198: aload 12
/* */ // 200: aload 7
/* */ // 202: ldc_w 334
/* */ // 205: invokeinterface 336 2 0
/* */ // 210: invokevirtual 340 java/sql/Date:toString ()Ljava/lang/String;
/* */ // 213: invokevirtual 341 com/groom/bean/TestsTopicList:setTestDate (Ljava/lang/String;)V
/* */ // 216: new 295 java/util/Date
/* */ // 219: dup
/* */ // 220: aload 7
/* */ // 222: ldc_w 334
/* */ // 225: invokeinterface 336 2 0
/* */ // 230: invokevirtual 297 java/sql/Date:getTime ()J
/* */ // 233: invokespecial 302 java/util/Date:<init> (J)V
/* */ // 236: astore 13
/* */ // 238: aload 11
/* */ // 240: aload 11
/* */ // 242: aload 13
/* */ // 244: invokevirtual 310 java/text/SimpleDateFormat:format (Ljava/util/Date;)Ljava/lang/String;
/* */ // 247: invokevirtual 314 java/text/SimpleDateFormat:parse (Ljava/lang/String;)Ljava/util/Date;
/* */ // 250: astore 13
/* */ // 252: aload 13
/* */ // 254: aload 10
/* */ // 256: invokevirtual 344 java/util/Date:compareTo (Ljava/util/Date;)I
/* */ // 259: ifgt +13 -> 272
/* */ // 262: aload 13
/* */ // 264: aload 10
/* */ // 266: invokevirtual 344 java/util/Date:compareTo (Ljava/util/Date;)I
/* */ // 269: ifne +14 -> 283
/* */ // 272: aload 12
/* */ // 274: ldc_w 348
/* */ // 277: invokevirtual 350 com/groom/bean/TestsTopicList:setIsKeyAndResultAvailable (Ljava/lang/String;)V
/* */ // 280: goto +11 -> 291
/* */ // 283: aload 12
/* */ // 285: ldc_w 353
/* */ // 288: invokevirtual 350 com/groom/bean/TestsTopicList:setIsKeyAndResultAvailable (Ljava/lang/String;)V
/* */ // 291: new 36 java/lang/StringBuilder
/* */ // 294: dup
/* */ // 295: ldc_w 275
/* */ // 298: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 301: aload_2
/* */ // 302: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 305: ldc_w 355
/* */ // 308: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 311: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 314: astore 14
/* */ // 316: aload 5
/* */ // 318: aload 14
/* */ // 320: invokeinterface 57 2 0
/* */ // 325: astore 6
/* */ // 327: aload 6
/* */ // 329: iconst_1
/* */ // 330: iload_1
/* */ // 331: invokeinterface 63 3 0
/* */ // 336: aload 6
/* */ // 338: iconst_2
/* */ // 339: aload 7
/* */ // 341: ldc 122
/* */ // 343: invokeinterface 78 2 0
/* */ // 348: invokeinterface 63 3 0
/* */ // 353: aload 6
/* */ // 355: invokeinterface 69 1 0
/* */ // 360: astore 15
/* */ // 362: aload 15
/* */ // 364: invokeinterface 158 1 0
/* */ // 369: ifeq +29 -> 398
/* */ // 372: aload 12
/* */ // 374: ldc_w 353
/* */ // 377: invokevirtual 357 com/groom/bean/TestsTopicList:setIsStudentAttempted (Ljava/lang/String;)V
/* */ // 380: aload 12
/* */ // 382: aload 15
/* */ // 384: ldc_w 360
/* */ // 387: invokeinterface 90 2 0
/* */ // 392: invokevirtual 362 com/groom/bean/TestsTopicList:setQuestionIdsList (Ljava/lang/String;)V
/* */ // 395: goto +11 -> 406
/* */ // 398: aload 12
/* */ // 400: ldc_w 348
/* */ // 403: invokevirtual 357 com/groom/bean/TestsTopicList:setIsStudentAttempted (Ljava/lang/String;)V
/* */ // 406: aload 8
/* */ // 408: aload 12
/* */ // 410: invokeinterface 152 2 0
/* */ // 415: pop
/* */ // 416: aload 7
/* */ // 418: invokeinterface 158 1 0
/* */ // 423: ifne -278 -> 145
/* */ // 426: goto +136 -> 562
/* */ // 429: astore 9
/* */ // 431: aload 9
/* */ // 433: invokevirtual 162 java/sql/SQLException:printStackTrace ()V
/* */ // 436: aload 7
/* */ // 438: ifnull +10 -> 448
/* */ // 441: aload 7
/* */ // 443: invokeinterface 165 1 0
/* */ // 448: aload 6
/* */ // 450: ifnull +10 -> 460
/* */ // 453: aload 6
/* */ // 455: invokeinterface 168 1 0
/* */ // 460: aload 5
/* */ // 462: ifnull +136 -> 598
/* */ // 465: aload 5
/* */ // 467: invokeinterface 169 1 0
/* */ // 472: goto +126 -> 598
/* */ // 475: astore 9
/* */ // 477: aload 9
/* */ // 479: invokevirtual 365 java/text/ParseException:printStackTrace ()V
/* */ // 482: aload 7
/* */ // 484: ifnull +10 -> 494
/* */ // 487: aload 7
/* */ // 489: invokeinterface 165 1 0
/* */ // 494: aload 6
/* */ // 496: ifnull +10 -> 506
/* */ // 499: aload 6
/* */ // 501: invokeinterface 168 1 0
/* */ // 506: aload 5
/* */ // 508: ifnull +90 -> 598
/* */ // 511: aload 5
/* */ // 513: invokeinterface 169 1 0
/* */ // 518: goto +80 -> 598
/* */ // 521: astore 16
/* */ // 523: aload 7
/* */ // 525: ifnull +10 -> 535
/* */ // 528: aload 7
/* */ // 530: invokeinterface 165 1 0
/* */ // 535: aload 6
/* */ // 537: ifnull +10 -> 547
/* */ // 540: aload 6
/* */ // 542: invokeinterface 168 1 0
/* */ // 547: aload 5
/* */ // 549: ifnull +10 -> 559
/* */ // 552: aload 5
/* */ // 554: invokeinterface 169 1 0
/* */ // 559: aload 16
/* */ // 561: athrow
/* */ // 562: aload 7
/* */ // 564: ifnull +10 -> 574
/* */ // 567: aload 7
/* */ // 569: invokeinterface 165 1 0
/* */ // 574: aload 6
/* */ // 576: ifnull +10 -> 586
/* */ // 579: aload 6
/* */ // 581: invokeinterface 168 1 0
/* */ // 586: aload 5
/* */ // 588: ifnull +10 -> 598
/* */ // 591: aload 5
/* */ // 593: invokeinterface 169 1 0
/* */ // 598: aload 8
/* */ // 600: areturn
/* */ // Line number table:
/* */ // Java source line #181 -> byte code offset #0
/* */ // Java source line #182 -> byte code offset #10
/* */ // Java source line #183 -> byte code offset #13
/* */ // Java source line #184 -> byte code offset #16
/* */ // Java source line #187 -> byte code offset #25
/* */ // Java source line #188 -> byte code offset #39
/* */ // Java source line #189 -> byte code offset #45
/* */ // Java source line #187 -> byte code offset #57
/* */ // Java source line #191 -> byte code offset #62
/* */ // Java source line #192 -> byte code offset #73
/* */ // Java source line #193 -> byte code offset #82
/* */ // Java source line #194 -> byte code offset #92
/* */ // Java source line #196 -> byte code offset #101
/* */ // Java source line #197 -> byte code offset #105
/* */ // Java source line #196 -> byte code offset #111
/* */ // Java source line #198 -> byte code offset #116
/* */ // Java source line #199 -> byte code offset #128
/* */ // Java source line #200 -> byte code offset #142
/* */ // Java source line #202 -> byte code offset #145
/* */ // Java source line #203 -> byte code offset #154
/* */ // Java source line #204 -> byte code offset #168
/* */ // Java source line #205 -> byte code offset #183
/* */ // Java source line #206 -> byte code offset #198
/* */ // Java source line #208 -> byte code offset #216
/* */ // Java source line #209 -> byte code offset #222
/* */ // Java source line #208 -> byte code offset #225
/* */ // Java source line #209 -> byte code offset #230
/* */ // Java source line #208 -> byte code offset #233
/* */ // Java source line #210 -> byte code offset #238
/* */ // Java source line #216 -> byte code offset #252
/* */ // Java source line #217 -> byte code offset #262
/* */ // Java source line #218 -> byte code offset #272
/* */ // Java source line #219 -> byte code offset #280
/* */ // Java source line #220 -> byte code offset #283
/* */ // Java source line #221 -> byte code offset #291
/* */ // Java source line #222 -> byte code offset #305
/* */ // Java source line #221 -> byte code offset #311
/* */ // Java source line #223 -> byte code offset #316
/* */ // Java source line #224 -> byte code offset #327
/* */ // Java source line #225 -> byte code offset #336
/* */ // Java source line #226 -> byte code offset #353
/* */ // Java source line #227 -> byte code offset #355
/* */ // Java source line #226 -> byte code offset #360
/* */ // Java source line #228 -> byte code offset #362
/* */ // Java source line #229 -> byte code offset #372
/* */ // Java source line #230 -> byte code offset #380
/* */ // Java source line #231 -> byte code offset #384
/* */ // Java source line #230 -> byte code offset #392
/* */ // Java source line #232 -> byte code offset #395
/* */ // Java source line #233 -> byte code offset #398
/* */ // Java source line #235 -> byte code offset #406
/* */ // Java source line #200 -> byte code offset #416
/* */ // Java source line #238 -> byte code offset #426
/* */ // Java source line #239 -> byte code offset #431
/* */ // Java source line #245 -> byte code offset #436
/* */ // Java source line #246 -> byte code offset #441
/* */ // Java source line #247 -> byte code offset #448
/* */ // Java source line #248 -> byte code offset #453
/* */ // Java source line #249 -> byte code offset #460
/* */ // Java source line #250 -> byte code offset #465
/* */ // Java source line #240 -> byte code offset #475
/* */ // Java source line #241 -> byte code offset #477
/* */ // Java source line #245 -> byte code offset #482
/* */ // Java source line #246 -> byte code offset #487
/* */ // Java source line #247 -> byte code offset #494
/* */ // Java source line #248 -> byte code offset #499
/* */ // Java source line #249 -> byte code offset #506
/* */ // Java source line #250 -> byte code offset #511
/* */ // Java source line #244 -> byte code offset #521
/* */ // Java source line #245 -> byte code offset #523
/* */ // Java source line #246 -> byte code offset #528
/* */ // Java source line #247 -> byte code offset #535
/* */ // Java source line #248 -> byte code offset #540
/* */ // Java source line #249 -> byte code offset #547
/* */ // Java source line #250 -> byte code offset #552
/* */ // Java source line #251 -> byte code offset #559
/* */ // Java source line #245 -> byte code offset #562
/* */ // Java source line #246 -> byte code offset #567
/* */ // Java source line #247 -> byte code offset #574
/* */ // Java source line #248 -> byte code offset #579
/* */ // Java source line #249 -> byte code offset #586
/* */ // Java source line #250 -> byte code offset #591
/* */ // Java source line #253 -> byte code offset #598
/* */ // Local variable table:
/* */ // start length slot name signature
/* */ // 0 601 0 this QuizDAOImpl
/* */ // 0 601 1 userid int
/* */ // 0 601 2 category String
/* */ // 0 601 3 standard int
/* */ // 0 601 4 test_category_id int
/* */ // 8 584 5 connection Connection
/* */ // 11 569 6 preparedStatement PreparedStatement
/* */ // 14 554 7 resultSet ResultSet
/* */ // 23 576 8 topicLists List<com.groom.bean.TestsTopicList>
/* */ // 60 5 9 query String
/* */ // 429 3 9 exception SQLException
/* */ // 475 3 9 exception java.text.ParseException
/* */ // 114 151 10 currentDate java.util.Date
/* */ // 126 115 11 dateFormat java.text.SimpleDateFormat
/* */ // 152 257 12 topic com.groom.bean.TestsTopicList
/* */ // 236 27 13 testDate java.util.Date
/* */ // 314 5 14 pointsQuery String
/* */ // 360 23 15 userPointsResultSet ResultSet
/* */ // 521 39 16 localObject Object
/* */ // Exception table:
/* */ // from to target type
/* */ // 25 426 429 java/sql/SQLException
/* */ // 25 426 475 java/text/ParseException
/* */ // 25 436 521 finally
/* */ // 475 482 521 finally
/* */ }
/* */
/* */ public boolean incrementQuestionsAttemptedCount(List<Integer> qids, String category)
/* */ throws SQLException
/* */ {
/* 259 */ Connection connection = ds.getConnection();
/* 260 */ PreparedStatement preparedStatement = null;
/* */ try {
/* 262 */ String ids = StringUtils.join(qids, ",");
/* 263 */ String query = "UPDATE " + category +
/* 264 */ " SET NO_OF_ATTEMPTS=NO_OF_ATTEMPTS+1 WHERE Q_ID IN(" +
/* 265 */ ids + ")";
/* 266 */ System.out.println(query);
/* 267 */ preparedStatement = connection.prepareStatement(query);
/* 268 */ int updateStatus = preparedStatement.executeUpdate();
/* 269 */ if (updateStatus != 0)
/* 270 */ return true;
/* */ } catch (SQLException exception) {
/* 272 */ exception.printStackTrace();
/* */ }
/* */ finally {
/* 275 */ if (preparedStatement != null)
/* 276 */ preparedStatement.close();
/* 277 */ if (connection != null) {
/* 278 */ connection.close();
/* */ }
/* */ }
/* 275 */ if (preparedStatement != null)
/* 276 */ preparedStatement.close();
/* 277 */ if (connection != null) {
/* 278 */ connection.close();
/* */ }
/* */
/* 281 */ return false;
/* */ }
/* */
/* */ public boolean incrementCorrectQuestionsAttemptedCount(List<Integer> qids, String category)
/* */ throws SQLException
/* */ {
/* 287 */ Connection connection = ds.getConnection();
/* 288 */ PreparedStatement preparedStatement = null;
/* */ try {
/* 290 */ String ids = StringUtils.join(qids, ",");
/* 291 */ String query = "UPDATE " +
/* 292 */ category +
/* 293 */ " SET NO_OF_CORRECT_ANSWERS=NO_OF_CORRECT_ANSWERS+1 WHERE Q_ID IN(" +
/* 294 */ ids + ")";
/* 295 */ System.out.println(query);
/* 296 */ preparedStatement = connection.prepareStatement(query);
/* 297 */ int updateStatus = preparedStatement.executeUpdate();
/* 298 */ if (updateStatus != 0)
/* 299 */ return true;
/* */ } catch (SQLException exception) {
/* 301 */ exception.printStackTrace();
/* */ }
/* */ finally {
/* 304 */ if (preparedStatement != null)
/* 305 */ preparedStatement.close();
/* 306 */ if (connection != null) {
/* 307 */ connection.close();
/* */ }
/* */ }
/* 304 */ if (preparedStatement != null)
/* 305 */ preparedStatement.close();
/* 306 */ if (connection != null) {
/* 307 */ connection.close();
/* */ }
/* */
/* 310 */ return false;
/* */ }
/* */
/* */ /* Error */
/* */ public String getUserTestQuestionsIdsString(int topicid, int userid, String category)
/* */ throws SQLException
/* */ {
/* */ // Byte code:
/* */ // 0: getstatic 23 com/groom/dao/impl/QuizDAOImpl:ds Ljavax/sql/DataSource;
/* */ // 3: invokeinterface 27 1 0
/* */ // 8: astore 4
/* */ // 10: aconst_null
/* */ // 11: astore 5
/* */ // 13: aconst_null
/* */ // 14: astore 6
/* */ // 16: aconst_null
/* */ // 17: astore 7
/* */ // 19: new 36 java/lang/StringBuilder
/* */ // 22: dup
/* */ // 23: ldc_w 417
/* */ // 26: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 29: aload_3
/* */ // 30: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 33: ldc_w 355
/* */ // 36: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 39: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 42: astore 8
/* */ // 44: aload 4
/* */ // 46: aload 8
/* */ // 48: invokeinterface 57 2 0
/* */ // 53: astore 5
/* */ // 55: aload 5
/* */ // 57: iconst_1
/* */ // 58: iload_2
/* */ // 59: invokeinterface 63 3 0
/* */ // 64: aload 5
/* */ // 66: iconst_2
/* */ // 67: iload_1
/* */ // 68: invokeinterface 63 3 0
/* */ // 73: aload 5
/* */ // 75: invokeinterface 69 1 0
/* */ // 80: astore 6
/* */ // 82: goto +15 -> 97
/* */ // 85: aload 6
/* */ // 87: ldc_w 360
/* */ // 90: invokeinterface 90 2 0
/* */ // 95: astore 7
/* */ // 97: aload 6
/* */ // 99: invokeinterface 158 1 0
/* */ // 104: ifne -19 -> 85
/* */ // 107: goto +90 -> 197
/* */ // 110: astore 8
/* */ // 112: aload 8
/* */ // 114: invokevirtual 162 java/sql/SQLException:printStackTrace ()V
/* */ // 117: aload 6
/* */ // 119: ifnull +10 -> 129
/* */ // 122: aload 6
/* */ // 124: invokeinterface 165 1 0
/* */ // 129: aload 5
/* */ // 131: ifnull +10 -> 141
/* */ // 134: aload 5
/* */ // 136: invokeinterface 168 1 0
/* */ // 141: aload 4
/* */ // 143: ifnull +90 -> 233
/* */ // 146: aload 4
/* */ // 148: invokeinterface 169 1 0
/* */ // 153: goto +80 -> 233
/* */ // 156: astore 9
/* */ // 158: aload 6
/* */ // 160: ifnull +10 -> 170
/* */ // 163: aload 6
/* */ // 165: invokeinterface 165 1 0
/* */ // 170: aload 5
/* */ // 172: ifnull +10 -> 182
/* */ // 175: aload 5
/* */ // 177: invokeinterface 168 1 0
/* */ // 182: aload 4
/* */ // 184: ifnull +10 -> 194
/* */ // 187: aload 4
/* */ // 189: invokeinterface 169 1 0
/* */ // 194: aload 9
/* */ // 196: athrow
/* */ // 197: aload 6
/* */ // 199: ifnull +10 -> 209
/* */ // 202: aload 6
/* */ // 204: invokeinterface 165 1 0
/* */ // 209: aload 5
/* */ // 211: ifnull +10 -> 221
/* */ // 214: aload 5
/* */ // 216: invokeinterface 168 1 0
/* */ // 221: aload 4
/* */ // 223: ifnull +10 -> 233
/* */ // 226: aload 4
/* */ // 228: invokeinterface 169 1 0
/* */ // 233: aload 7
/* */ // 235: areturn
/* */ // Line number table:
/* */ // Java source line #316 -> byte code offset #0
/* */ // Java source line #317 -> byte code offset #10
/* */ // Java source line #318 -> byte code offset #13
/* */ // Java source line #319 -> byte code offset #16
/* */ // Java source line #321 -> byte code offset #19
/* */ // Java source line #322 -> byte code offset #33
/* */ // Java source line #321 -> byte code offset #39
/* */ // Java source line #324 -> byte code offset #44
/* */ // Java source line #325 -> byte code offset #55
/* */ // Java source line #326 -> byte code offset #64
/* */ // Java source line #327 -> byte code offset #73
/* */ // Java source line #328 -> byte code offset #82
/* */ // Java source line #329 -> byte code offset #85
/* */ // Java source line #328 -> byte code offset #97
/* */ // Java source line #333 -> byte code offset #107
/* */ // Java source line #334 -> byte code offset #112
/* */ // Java source line #336 -> byte code offset #117
/* */ // Java source line #337 -> byte code offset #122
/* */ // Java source line #338 -> byte code offset #129
/* */ // Java source line #339 -> byte code offset #134
/* */ // Java source line #340 -> byte code offset #141
/* */ // Java source line #341 -> byte code offset #146
/* */ // Java source line #335 -> byte code offset #156
/* */ // Java source line #336 -> byte code offset #158
/* */ // Java source line #337 -> byte code offset #163
/* */ // Java source line #338 -> byte code offset #170
/* */ // Java source line #339 -> byte code offset #175
/* */ // Java source line #340 -> byte code offset #182
/* */ // Java source line #341 -> byte code offset #187
/* */ // Java source line #342 -> byte code offset #194
/* */ // Java source line #336 -> byte code offset #197
/* */ // Java source line #337 -> byte code offset #202
/* */ // Java source line #338 -> byte code offset #209
/* */ // Java source line #339 -> byte code offset #214
/* */ // Java source line #340 -> byte code offset #221
/* */ // Java source line #341 -> byte code offset #226
/* */ // Java source line #343 -> byte code offset #233
/* */ // Local variable table:
/* */ // start length slot name signature
/* */ // 0 236 0 this QuizDAOImpl
/* */ // 0 236 1 topicid int
/* */ // 0 236 2 userid int
/* */ // 0 236 3 category String
/* */ // 8 219 4 connection Connection
/* */ // 11 204 5 preparedStatement PreparedStatement
/* */ // 14 189 6 resultSet ResultSet
/* */ // 17 217 7 questionids String
/* */ // 42 5 8 query String
/* */ // 110 3 8 exception SQLException
/* */ // 156 39 9 localObject Object
/* */ // Exception table:
/* */ // from to target type
/* */ // 19 107 110 java/sql/SQLException
/* */ // 19 117 156 finally
/* */ }
/* */
/* */ /* Error */
/* */ public List<com.groom.bean.QuizQuestionDetails> getQuizKey(String category, int topicid, int userid)
/* */ throws SQLException
/* */ {
/* */ // Byte code:
/* */ // 0: getstatic 23 com/groom/dao/impl/QuizDAOImpl:ds Ljavax/sql/DataSource;
/* */ // 3: invokeinterface 27 1 0
/* */ // 8: astore 4
/* */ // 10: aconst_null
/* */ // 11: astore 5
/* */ // 13: aconst_null
/* */ // 14: astore 6
/* */ // 16: new 33 java/util/ArrayList
/* */ // 19: dup
/* */ // 20: invokespecial 35 java/util/ArrayList:<init> ()V
/* */ // 23: astore 7
/* */ // 25: aload_0
/* */ // 26: iload_2
/* */ // 27: iload_3
/* */ // 28: aload_1
/* */ // 29: invokevirtual 423 com/groom/dao/impl/QuizDAOImpl:getUserTestQuestionsIdsString (IILjava/lang/String;)Ljava/lang/String;
/* */ // 32: astore 8
/* */ // 34: new 36 java/lang/StringBuilder
/* */ // 37: dup
/* */ // 38: ldc_w 275
/* */ // 41: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 44: aload_1
/* */ // 45: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 48: ldc -56
/* */ // 50: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 53: aload 8
/* */ // 55: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 58: ldc_w 425
/* */ // 61: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 64: aload 8
/* */ // 66: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 69: ldc -54
/* */ // 71: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 74: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 77: astore 9
/* */ // 79: getstatic 397 java/lang/System:out Ljava/io/PrintStream;
/* */ // 82: aload 9
/* */ // 84: invokevirtual 403 java/io/PrintStream:println (Ljava/lang/String;)V
/* */ // 87: aload 4
/* */ // 89: aload 9
/* */ // 91: invokeinterface 57 2 0
/* */ // 96: astore 5
/* */ // 98: aload_0
/* */ // 99: aload_1
/* */ // 100: iload_2
/* */ // 101: iload_3
/* */ // 102: invokespecial 427 com/groom/dao/impl/QuizDAOImpl:getUserAnswers (Ljava/lang/String;II)Ljava/lang/String;
/* */ // 105: astore 10
/* */ // 107: aload 5
/* */ // 109: invokeinterface 69 1 0
/* */ // 114: astore 6
/* */ // 116: iconst_0
/* */ // 117: istore 11
/* */ // 119: goto +240 -> 359
/* */ // 122: new 73 com/groom/bean/QuizQuestionDetails
/* */ // 125: dup
/* */ // 126: invokespecial 75 com/groom/bean/QuizQuestionDetails:<init> ()V
/* */ // 129: astore 12
/* */ // 131: aload 12
/* */ // 133: aload 6
/* */ // 135: ldc 76
/* */ // 137: invokeinterface 78 2 0
/* */ // 142: invokevirtual 84 com/groom/bean/QuizQuestionDetails:setQ_id (I)V
/* */ // 145: aload 12
/* */ // 147: aload 6
/* */ // 149: ldc 88
/* */ // 151: invokeinterface 90 2 0
/* */ // 156: invokevirtual 94 com/groom/bean/QuizQuestionDetails:setQuestion (Ljava/lang/String;)V
/* */ // 159: aload 12
/* */ // 161: aload 6
/* */ // 163: ldc 97
/* */ // 165: invokeinterface 90 2 0
/* */ // 170: invokevirtual 99 com/groom/bean/QuizQuestionDetails:setOption_a (Ljava/lang/String;)V
/* */ // 173: aload 12
/* */ // 175: aload 6
/* */ // 177: ldc 102
/* */ // 179: invokeinterface 90 2 0
/* */ // 184: invokevirtual 104 com/groom/bean/QuizQuestionDetails:setOption_b (Ljava/lang/String;)V
/* */ // 187: aload 12
/* */ // 189: aload 6
/* */ // 191: ldc 107
/* */ // 193: invokeinterface 90 2 0
/* */ // 198: invokevirtual 109 com/groom/bean/QuizQuestionDetails:setOption_c (Ljava/lang/String;)V
/* */ // 201: aload 12
/* */ // 203: aload 6
/* */ // 205: ldc 112
/* */ // 207: invokeinterface 90 2 0
/* */ // 212: invokevirtual 114 com/groom/bean/QuizQuestionDetails:setOption_d (Ljava/lang/String;)V
/* */ // 215: aload 12
/* */ // 217: aload 6
/* */ // 219: ldc 117
/* */ // 221: invokeinterface 90 2 0
/* */ // 226: invokevirtual 119 com/groom/bean/QuizQuestionDetails:setAnswer (Ljava/lang/String;)V
/* */ // 229: aload 12
/* */ // 231: aload 6
/* */ // 233: ldc 122
/* */ // 235: invokeinterface 78 2 0
/* */ // 240: invokevirtual 124 com/groom/bean/QuizQuestionDetails:setTopicid (I)V
/* */ // 243: aload 12
/* */ // 245: aload 6
/* */ // 247: ldc 127
/* */ // 249: invokeinterface 90 2 0
/* */ // 254: invokevirtual 134 com/groom/bean/QuizQuestionDetails:setImage_name (Ljava/lang/String;)V
/* */ // 257: aload 12
/* */ // 259: aload 6
/* */ // 261: ldc -119
/* */ // 263: invokeinterface 90 2 0
/* */ // 268: invokevirtual 139 com/groom/bean/QuizQuestionDetails:setExplanation (Ljava/lang/String;)V
/* */ // 271: aload 12
/* */ // 273: aload 6
/* */ // 275: ldc_w 431
/* */ // 278: invokeinterface 78 2 0
/* */ // 283: invokevirtual 433 com/groom/bean/QuizQuestionDetails:setNo_of_attempts (I)V
/* */ // 286: aload 12
/* */ // 288: aload 6
/* */ // 290: ldc_w 436
/* */ // 293: invokeinterface 78 2 0
/* */ // 298: invokevirtual 438 com/groom/bean/QuizQuestionDetails:setNo_of_correct_answers (I)V
/* */ // 301: aload 10
/* */ // 303: iload 11
/* */ // 305: invokevirtual 441 java/lang/String:charAt (I)C
/* */ // 308: invokestatic 445 java/lang/String:valueOf (C)Ljava/lang/String;
/* */ // 311: ldc_w 448
/* */ // 314: invokevirtual 450 java/lang/String:equals (Ljava/lang/Object;)Z
/* */ // 317: ifeq +14 -> 331
/* */ // 320: aload 12
/* */ // 322: ldc_w 453
/* */ // 325: invokevirtual 455 com/groom/bean/QuizQuestionDetails:setUserAnswer (Ljava/lang/String;)V
/* */ // 328: goto +18 -> 346
/* */ // 331: aload 12
/* */ // 333: aload 10
/* */ // 335: iload 11
/* */ // 337: invokevirtual 441 java/lang/String:charAt (I)C
/* */ // 340: invokestatic 445 java/lang/String:valueOf (C)Ljava/lang/String;
/* */ // 343: invokevirtual 455 com/groom/bean/QuizQuestionDetails:setUserAnswer (Ljava/lang/String;)V
/* */ // 346: aload 7
/* */ // 348: aload 12
/* */ // 350: invokeinterface 152 2 0
/* */ // 355: pop
/* */ // 356: iinc 11 1
/* */ // 359: aload 6
/* */ // 361: invokeinterface 158 1 0
/* */ // 366: ifne -244 -> 122
/* */ // 369: goto +90 -> 459
/* */ // 372: astore 9
/* */ // 374: aload 9
/* */ // 376: invokevirtual 162 java/sql/SQLException:printStackTrace ()V
/* */ // 379: aload 6
/* */ // 381: ifnull +10 -> 391
/* */ // 384: aload 6
/* */ // 386: invokeinterface 165 1 0
/* */ // 391: aload 5
/* */ // 393: ifnull +10 -> 403
/* */ // 396: aload 5
/* */ // 398: invokeinterface 168 1 0
/* */ // 403: aload 4
/* */ // 405: ifnull +90 -> 495
/* */ // 408: aload 4
/* */ // 410: invokeinterface 169 1 0
/* */ // 415: goto +80 -> 495
/* */ // 418: astore 13
/* */ // 420: aload 6
/* */ // 422: ifnull +10 -> 432
/* */ // 425: aload 6
/* */ // 427: invokeinterface 165 1 0
/* */ // 432: aload 5
/* */ // 434: ifnull +10 -> 444
/* */ // 437: aload 5
/* */ // 439: invokeinterface 168 1 0
/* */ // 444: aload 4
/* */ // 446: ifnull +10 -> 456
/* */ // 449: aload 4
/* */ // 451: invokeinterface 169 1 0
/* */ // 456: aload 13
/* */ // 458: athrow
/* */ // 459: aload 6
/* */ // 461: ifnull +10 -> 471
/* */ // 464: aload 6
/* */ // 466: invokeinterface 165 1 0
/* */ // 471: aload 5
/* */ // 473: ifnull +10 -> 483
/* */ // 476: aload 5
/* */ // 478: invokeinterface 168 1 0
/* */ // 483: aload 4
/* */ // 485: ifnull +10 -> 495
/* */ // 488: aload 4
/* */ // 490: invokeinterface 169 1 0
/* */ // 495: aload 7
/* */ // 497: areturn
/* */ // Line number table:
/* */ // Java source line #349 -> byte code offset #0
/* */ // Java source line #350 -> byte code offset #10
/* */ // Java source line #351 -> byte code offset #13
/* */ // Java source line #352 -> byte code offset #16
/* */ // Java source line #353 -> byte code offset #25
/* */ // Java source line #355 -> byte code offset #34
/* */ // Java source line #356 -> byte code offset #53
/* */ // Java source line #355 -> byte code offset #74
/* */ // Java source line #357 -> byte code offset #79
/* */ // Java source line #358 -> byte code offset #87
/* */ // Java source line #359 -> byte code offset #98
/* */ // Java source line #360 -> byte code offset #107
/* */ // Java source line #361 -> byte code offset #116
/* */ // Java source line #362 -> byte code offset #119
/* */ // Java source line #363 -> byte code offset #122
/* */ // Java source line #364 -> byte code offset #131
/* */ // Java source line #365 -> byte code offset #145
/* */ // Java source line #366 -> byte code offset #159
/* */ // Java source line #367 -> byte code offset #173
/* */ // Java source line #368 -> byte code offset #187
/* */ // Java source line #369 -> byte code offset #201
/* */ // Java source line #370 -> byte code offset #215
/* */ // Java source line #371 -> byte code offset #229
/* */ // Java source line #372 -> byte code offset #243
/* */ // Java source line #373 -> byte code offset #257
/* */ // Java source line #374 -> byte code offset #271
/* */ // Java source line #375 -> byte code offset #286
/* */ // Java source line #376 -> byte code offset #290
/* */ // Java source line #375 -> byte code offset #298
/* */ // Java source line #377 -> byte code offset #301
/* */ // Java source line #378 -> byte code offset #320
/* */ // Java source line #380 -> byte code offset #331
/* */ // Java source line #381 -> byte code offset #346
/* */ // Java source line #382 -> byte code offset #356
/* */ // Java source line #362 -> byte code offset #359
/* */ // Java source line #386 -> byte code offset #369
/* */ // Java source line #387 -> byte code offset #374
/* */ // Java source line #389 -> byte code offset #379
/* */ // Java source line #390 -> byte code offset #384
/* */ // Java source line #391 -> byte code offset #391
/* */ // Java source line #392 -> byte code offset #396
/* */ // Java source line #393 -> byte code offset #403
/* */ // Java source line #394 -> byte code offset #408
/* */ // Java source line #388 -> byte code offset #418
/* */ // Java source line #389 -> byte code offset #420
/* */ // Java source line #390 -> byte code offset #425
/* */ // Java source line #391 -> byte code offset #432
/* */ // Java source line #392 -> byte code offset #437
/* */ // Java source line #393 -> byte code offset #444
/* */ // Java source line #394 -> byte code offset #449
/* */ // Java source line #395 -> byte code offset #456
/* */ // Java source line #389 -> byte code offset #459
/* */ // Java source line #390 -> byte code offset #464
/* */ // Java source line #391 -> byte code offset #471
/* */ // Java source line #392 -> byte code offset #476
/* */ // Java source line #393 -> byte code offset #483
/* */ // Java source line #394 -> byte code offset #488
/* */ // Java source line #396 -> byte code offset #495
/* */ // Local variable table:
/* */ // start length slot name signature
/* */ // 0 498 0 this QuizDAOImpl
/* */ // 0 498 1 category String
/* */ // 0 498 2 topicid int
/* */ // 0 498 3 userid int
/* */ // 8 481 4 connection Connection
/* */ // 11 466 5 preparedStatement PreparedStatement
/* */ // 14 451 6 resultSet ResultSet
/* */ // 23 473 7 questionDetails List<com.groom.bean.QuizQuestionDetails>
/* */ // 32 33 8 qids String
/* */ // 77 13 9 query String
/* */ // 372 3 9 exception SQLException
/* */ // 105 229 10 userString String
/* */ // 117 240 11 i int
/* */ // 129 220 12 details com.groom.bean.QuizQuestionDetails
/* */ // 418 39 13 localObject Object
/* */ // Exception table:
/* */ // from to target type
/* */ // 34 369 372 java/sql/SQLException
/* */ // 34 379 418 finally
/* */ }
/* */
/* */ /* Error */
/* */ private String getUserAnswers(String category, int topicid, int userid)
/* */ throws SQLException
/* */ {
/* */ // Byte code:
/* */ // 0: getstatic 23 com/groom/dao/impl/QuizDAOImpl:ds Ljavax/sql/DataSource;
/* */ // 3: invokeinterface 27 1 0
/* */ // 8: astore 4
/* */ // 10: aconst_null
/* */ // 11: astore 5
/* */ // 13: aconst_null
/* */ // 14: astore 6
/* */ // 16: aconst_null
/* */ // 17: astore 7
/* */ // 19: new 36 java/lang/StringBuilder
/* */ // 22: dup
/* */ // 23: ldc_w 460
/* */ // 26: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 29: aload_1
/* */ // 30: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 33: ldc_w 355
/* */ // 36: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 39: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 42: astore 8
/* */ // 44: aload 4
/* */ // 46: aload 8
/* */ // 48: invokeinterface 57 2 0
/* */ // 53: astore 5
/* */ // 55: aload 5
/* */ // 57: iconst_1
/* */ // 58: iload_3
/* */ // 59: invokeinterface 63 3 0
/* */ // 64: aload 5
/* */ // 66: iconst_2
/* */ // 67: iload_2
/* */ // 68: invokeinterface 63 3 0
/* */ // 73: aload 5
/* */ // 75: invokeinterface 69 1 0
/* */ // 80: astore 6
/* */ // 82: goto +15 -> 97
/* */ // 85: aload 6
/* */ // 87: ldc_w 462
/* */ // 90: invokeinterface 90 2 0
/* */ // 95: astore 7
/* */ // 97: aload 6
/* */ // 99: invokeinterface 158 1 0
/* */ // 104: ifne -19 -> 85
/* */ // 107: goto +90 -> 197
/* */ // 110: astore 8
/* */ // 112: aload 8
/* */ // 114: invokevirtual 162 java/sql/SQLException:printStackTrace ()V
/* */ // 117: aload 6
/* */ // 119: ifnull +10 -> 129
/* */ // 122: aload 6
/* */ // 124: invokeinterface 165 1 0
/* */ // 129: aload 5
/* */ // 131: ifnull +10 -> 141
/* */ // 134: aload 5
/* */ // 136: invokeinterface 168 1 0
/* */ // 141: aload 4
/* */ // 143: ifnull +90 -> 233
/* */ // 146: aload 4
/* */ // 148: invokeinterface 169 1 0
/* */ // 153: goto +80 -> 233
/* */ // 156: astore 9
/* */ // 158: aload 6
/* */ // 160: ifnull +10 -> 170
/* */ // 163: aload 6
/* */ // 165: invokeinterface 165 1 0
/* */ // 170: aload 5
/* */ // 172: ifnull +10 -> 182
/* */ // 175: aload 5
/* */ // 177: invokeinterface 168 1 0
/* */ // 182: aload 4
/* */ // 184: ifnull +10 -> 194
/* */ // 187: aload 4
/* */ // 189: invokeinterface 169 1 0
/* */ // 194: aload 9
/* */ // 196: athrow
/* */ // 197: aload 6
/* */ // 199: ifnull +10 -> 209
/* */ // 202: aload 6
/* */ // 204: invokeinterface 165 1 0
/* */ // 209: aload 5
/* */ // 211: ifnull +10 -> 221
/* */ // 214: aload 5
/* */ // 216: invokeinterface 168 1 0
/* */ // 221: aload 4
/* */ // 223: ifnull +10 -> 233
/* */ // 226: aload 4
/* */ // 228: invokeinterface 169 1 0
/* */ // 233: aload 7
/* */ // 235: areturn
/* */ // Line number table:
/* */ // Java source line #401 -> byte code offset #0
/* */ // Java source line #402 -> byte code offset #10
/* */ // Java source line #403 -> byte code offset #13
/* */ // Java source line #404 -> byte code offset #16
/* */ // Java source line #406 -> byte code offset #19
/* */ // Java source line #407 -> byte code offset #33
/* */ // Java source line #406 -> byte code offset #39
/* */ // Java source line #408 -> byte code offset #44
/* */ // Java source line #409 -> byte code offset #55
/* */ // Java source line #410 -> byte code offset #64
/* */ // Java source line #411 -> byte code offset #73
/* */ // Java source line #412 -> byte code offset #82
/* */ // Java source line #413 -> byte code offset #85
/* */ // Java source line #412 -> byte code offset #97
/* */ // Java source line #417 -> byte code offset #107
/* */ // Java source line #418 -> byte code offset #112
/* */ // Java source line #420 -> byte code offset #117
/* */ // Java source line #421 -> byte code offset #122
/* */ // Java source line #422 -> byte code offset #129
/* */ // Java source line #423 -> byte code offset #134
/* */ // Java source line #424 -> byte code offset #141
/* */ // Java source line #425 -> byte code offset #146
/* */ // Java source line #419 -> byte code offset #156
/* */ // Java source line #420 -> byte code offset #158
/* */ // Java source line #421 -> byte code offset #163
/* */ // Java source line #422 -> byte code offset #170
/* */ // Java source line #423 -> byte code offset #175
/* */ // Java source line #424 -> byte code offset #182
/* */ // Java source line #425 -> byte code offset #187
/* */ // Java source line #426 -> byte code offset #194
/* */ // Java source line #420 -> byte code offset #197
/* */ // Java source line #421 -> byte code offset #202
/* */ // Java source line #422 -> byte code offset #209
/* */ // Java source line #423 -> byte code offset #214
/* */ // Java source line #424 -> byte code offset #221
/* */ // Java source line #425 -> byte code offset #226
/* */ // Java source line #427 -> byte code offset #233
/* */ // Local variable table:
/* */ // start length slot name signature
/* */ // 0 236 0 this QuizDAOImpl
/* */ // 0 236 1 category String
/* */ // 0 236 2 topicid int
/* */ // 0 236 3 userid int
/* */ // 8 219 4 connection Connection
/* */ // 11 204 5 preparedStatement PreparedStatement
/* */ // 14 189 6 resultSet ResultSet
/* */ // 17 217 7 userAnswers String
/* */ // 42 5 8 query String
/* */ // 110 3 8 exception SQLException
/* */ // 156 39 9 localObject Object
/* */ // Exception table:
/* */ // from to target type
/* */ // 19 107 110 java/sql/SQLException
/* */ // 19 117 156 finally
/* */ }
/* */
/* */ /* Error */
/* */ public QuizPoints getTopicScore(String category, int topicid, int userid, int total_questions)
/* */ throws SQLException
/* */ {
/* */ // Byte code:
/* */ // 0: getstatic 23 com/groom/dao/impl/QuizDAOImpl:ds Ljavax/sql/DataSource;
/* */ // 3: invokeinterface 27 1 0
/* */ // 8: astore 5
/* */ // 10: aconst_null
/* */ // 11: astore 6
/* */ // 13: aconst_null
/* */ // 14: astore 7
/* */ // 16: new 225 com/groom/bean/QuizPoints
/* */ // 19: dup
/* */ // 20: invokespecial 467 com/groom/bean/QuizPoints:<init> ()V
/* */ // 23: astore 8
/* */ // 25: new 36 java/lang/StringBuilder
/* */ // 28: dup
/* */ // 29: ldc_w 275
/* */ // 32: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 35: aload_1
/* */ // 36: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 39: ldc_w 355
/* */ // 42: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 45: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 48: astore 9
/* */ // 50: aload 5
/* */ // 52: aload 9
/* */ // 54: invokeinterface 57 2 0
/* */ // 59: astore 6
/* */ // 61: aload 6
/* */ // 63: iconst_1
/* */ // 64: iload_3
/* */ // 65: invokeinterface 63 3 0
/* */ // 70: aload 6
/* */ // 72: iconst_2
/* */ // 73: iload_2
/* */ // 74: invokeinterface 63 3 0
/* */ // 79: aload 6
/* */ // 81: invokeinterface 69 1 0
/* */ // 86: astore 7
/* */ // 88: goto +151 -> 239
/* */ // 91: aload 8
/* */ // 93: aload 7
/* */ // 95: ldc_w 468
/* */ // 98: invokeinterface 78 2 0
/* */ // 103: invokevirtual 470 com/groom/bean/QuizPoints:setU_id (I)V
/* */ // 106: aload 8
/* */ // 108: aload 7
/* */ // 110: ldc 122
/* */ // 112: invokeinterface 78 2 0
/* */ // 117: invokevirtual 473 com/groom/bean/QuizPoints:setTopicid (I)V
/* */ // 120: aload 8
/* */ // 122: aload 7
/* */ // 124: ldc_w 462
/* */ // 127: invokeinterface 90 2 0
/* */ // 132: invokevirtual 474 com/groom/bean/QuizPoints:setAnswers (Ljava/lang/String;)V
/* */ // 135: aload 8
/* */ // 137: aload 7
/* */ // 139: ldc_w 477
/* */ // 142: invokeinterface 78 2 0
/* */ // 147: invokevirtual 479 com/groom/bean/QuizPoints:setPoints (I)V
/* */ // 150: aload 8
/* */ // 152: aload 7
/* */ // 154: ldc_w 360
/* */ // 157: invokeinterface 90 2 0
/* */ // 162: invokevirtual 482 com/groom/bean/QuizPoints:setQuestionIds (Ljava/lang/String;)V
/* */ // 165: aload 8
/* */ // 167: aload 7
/* */ // 169: ldc_w 334
/* */ // 172: invokeinterface 336 2 0
/* */ // 177: invokevirtual 485 com/groom/bean/QuizPoints:setTestDate (Ljava/sql/Date;)V
/* */ // 180: aload 8
/* */ // 182: aload 7
/* */ // 184: ldc_w 488
/* */ // 187: invokeinterface 490 2 0
/* */ // 192: invokevirtual 493 com/groom/bean/QuizPoints:setTime (Ljava/sql/Time;)V
/* */ // 195: aload 7
/* */ // 197: ldc_w 462
/* */ // 200: invokeinterface 90 2 0
/* */ // 205: astore 10
/* */ // 207: aload 8
/* */ // 209: iload 4
/* */ // 211: aload 10
/* */ // 213: ldc_w 448
/* */ // 216: invokestatic 496 org/apache/commons/lang3/StringUtils:countMatches (Ljava/lang/CharSequence;Ljava/lang/CharSequence;)I
/* */ // 219: isub
/* */ // 220: invokevirtual 500 com/groom/bean/QuizPoints:setTotalAttempted (I)V
/* */ // 223: aload 8
/* */ // 225: aload 8
/* */ // 227: invokevirtual 503 com/groom/bean/QuizPoints:getTotalAttempted ()I
/* */ // 230: aload 8
/* */ // 232: invokevirtual 235 com/groom/bean/QuizPoints:getPoints ()I
/* */ // 235: isub
/* */ // 236: invokevirtual 506 com/groom/bean/QuizPoints:setWrongAnswers (I)V
/* */ // 239: aload 7
/* */ // 241: invokeinterface 158 1 0
/* */ // 246: ifne -155 -> 91
/* */ // 249: goto +90 -> 339
/* */ // 252: astore 9
/* */ // 254: aload 9
/* */ // 256: invokevirtual 162 java/sql/SQLException:printStackTrace ()V
/* */ // 259: aload 7
/* */ // 261: ifnull +10 -> 271
/* */ // 264: aload 7
/* */ // 266: invokeinterface 165 1 0
/* */ // 271: aload 6
/* */ // 273: ifnull +10 -> 283
/* */ // 276: aload 6
/* */ // 278: invokeinterface 168 1 0
/* */ // 283: aload 5
/* */ // 285: ifnull +90 -> 375
/* */ // 288: aload 5
/* */ // 290: invokeinterface 169 1 0
/* */ // 295: goto +80 -> 375
/* */ // 298: astore 11
/* */ // 300: aload 7
/* */ // 302: ifnull +10 -> 312
/* */ // 305: aload 7
/* */ // 307: invokeinterface 165 1 0
/* */ // 312: aload 6
/* */ // 314: ifnull +10 -> 324
/* */ // 317: aload 6
/* */ // 319: invokeinterface 168 1 0
/* */ // 324: aload 5
/* */ // 326: ifnull +10 -> 336
/* */ // 329: aload 5
/* */ // 331: invokeinterface 169 1 0
/* */ // 336: aload 11
/* */ // 338: athrow
/* */ // 339: aload 7
/* */ // 341: ifnull +10 -> 351
/* */ // 344: aload 7
/* */ // 346: invokeinterface 165 1 0
/* */ // 351: aload 6
/* */ // 353: ifnull +10 -> 363
/* */ // 356: aload 6
/* */ // 358: invokeinterface 168 1 0
/* */ // 363: aload 5
/* */ // 365: ifnull +10 -> 375
/* */ // 368: aload 5
/* */ // 370: invokeinterface 169 1 0
/* */ // 375: aload 8
/* */ // 377: areturn
/* */ // Line number table:
/* */ // Java source line #434 -> byte code offset #0
/* */ // Java source line #435 -> byte code offset #10
/* */ // Java source line #436 -> byte code offset #13
/* */ // Java source line #437 -> byte code offset #16
/* */ // Java source line #439 -> byte code offset #25
/* */ // Java source line #440 -> byte code offset #39
/* */ // Java source line #439 -> byte code offset #45
/* */ // Java source line #442 -> byte code offset #50
/* */ // Java source line #443 -> byte code offset #61
/* */ // Java source line #444 -> byte code offset #70
/* */ // Java source line #445 -> byte code offset #79
/* */ // Java source line #446 -> byte code offset #88
/* */ // Java source line #447 -> byte code offset #91
/* */ // Java source line #448 -> byte code offset #106
/* */ // Java source line #450 -> byte code offset #120
/* */ // Java source line #451 -> byte code offset #135
/* */ // Java source line #452 -> byte code offset #150
/* */ // Java source line #453 -> byte code offset #165
/* */ // Java source line #454 -> byte code offset #180
/* */ // Java source line #455 -> byte code offset #195
/* */ // Java source line #457 -> byte code offset #207
/* */ // Java source line #458 -> byte code offset #211
/* */ // Java source line #457 -> byte code offset #216
/* */ // Java source line #459 -> byte code offset #223
/* */ // Java source line #446 -> byte code offset #239
/* */ // Java source line #463 -> byte code offset #249
/* */ // Java source line #464 -> byte code offset #254
/* */ // Java source line #466 -> byte code offset #259
/* */ // Java source line #467 -> byte code offset #264
/* */ // Java source line #468 -> byte code offset #271
/* */ // Java source line #469 -> byte code offset #276
/* */ // Java source line #470 -> byte code offset #283
/* */ // Java source line #471 -> byte code offset #288
/* */ // Java source line #465 -> byte code offset #298
/* */ // Java source line #466 -> byte code offset #300
/* */ // Java source line #467 -> byte code offset #305
/* */ // Java source line #468 -> byte code offset #312
/* */ // Java source line #469 -> byte code offset #317
/* */ // Java source line #470 -> byte code offset #324
/* */ // Java source line #471 -> byte code offset #329
/* */ // Java source line #472 -> byte code offset #336
/* */ // Java source line #466 -> byte code offset #339
/* */ // Java source line #467 -> byte code offset #344
/* */ // Java source line #468 -> byte code offset #351
/* */ // Java source line #469 -> byte code offset #356
/* */ // Java source line #470 -> byte code offset #363
/* */ // Java source line #471 -> byte code offset #368
/* */ // Java source line #473 -> byte code offset #375
/* */ // Local variable table:
/* */ // start length slot name signature
/* */ // 0 378 0 this QuizDAOImpl
/* */ // 0 378 1 category String
/* */ // 0 378 2 topicid int
/* */ // 0 378 3 userid int
/* */ // 0 378 4 total_questions int
/* */ // 8 361 5 connection Connection
/* */ // 11 346 6 preparedStatement PreparedStatement
/* */ // 14 331 7 resultSet ResultSet
/* */ // 23 353 8 quizPoints QuizPoints
/* */ // 48 5 9 query String
/* */ // 252 3 9 exception SQLException
/* */ // 205 7 10 answerString String
/* */ // 298 39 11 localObject Object
/* */ // Exception table:
/* */ // from to target type
/* */ // 25 249 252 java/sql/SQLException
/* */ // 25 259 298 finally
/* */ }
/* */
/* */ /* Error */
/* */ public com.groom.bean.UserRankBean getUserRankInSubjectTopic(String subject, int user_id, int topic_id)
/* */ throws SQLException
/* */ {
/* */ // Byte code:
/* */ // 0: getstatic 23 com/groom/dao/impl/QuizDAOImpl:ds Ljavax/sql/DataSource;
/* */ // 3: invokeinterface 27 1 0
/* */ // 8: astore 4
/* */ // 10: aconst_null
/* */ // 11: astore 5
/* */ // 13: aconst_null
/* */ // 14: astore 6
/* */ // 16: new 513 com/groom/bean/UserRankBean
/* */ // 19: dup
/* */ // 20: invokespecial 515 com/groom/bean/UserRankBean:<init> ()V
/* */ // 23: astore 7
/* */ // 25: aload 4
/* */ // 27: invokeinterface 516 1 0
/* */ // 32: astore 8
/* */ // 34: aload 8
/* */ // 36: ldc_w 520
/* */ // 39: invokeinterface 522 2 0
/* */ // 44: pop
/* */ // 45: aload 8
/* */ // 47: ldc_w 528
/* */ // 50: invokeinterface 522 2 0
/* */ // 55: pop
/* */ // 56: new 36 java/lang/StringBuilder
/* */ // 59: dup
/* */ // 60: ldc_w 530
/* */ // 63: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 66: aload_1
/* */ // 67: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 70: ldc_w 532
/* */ // 73: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 76: ldc_w 534
/* */ // 79: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 82: aload_1
/* */ // 83: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 86: ldc_w 536
/* */ // 89: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 92: ldc_w 538
/* */ // 95: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 98: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 101: astore 9
/* */ // 103: getstatic 397 java/lang/System:out Ljava/io/PrintStream;
/* */ // 106: aload 9
/* */ // 108: invokevirtual 403 java/io/PrintStream:println (Ljava/lang/String;)V
/* */ // 111: aload 4
/* */ // 113: aload 9
/* */ // 115: invokeinterface 57 2 0
/* */ // 120: astore 5
/* */ // 122: aload 5
/* */ // 124: iconst_1
/* */ // 125: iload_3
/* */ // 126: invokeinterface 63 3 0
/* */ // 131: aload 5
/* */ // 133: iconst_2
/* */ // 134: iload_3
/* */ // 135: invokeinterface 63 3 0
/* */ // 140: aload 5
/* */ // 142: iconst_3
/* */ // 143: iload_2
/* */ // 144: invokeinterface 63 3 0
/* */ // 149: aload 5
/* */ // 151: invokeinterface 69 1 0
/* */ // 156: astore 6
/* */ // 158: goto +123 -> 281
/* */ // 161: aload 7
/* */ // 163: aload 6
/* */ // 165: ldc_w 468
/* */ // 168: invokeinterface 78 2 0
/* */ // 173: invokevirtual 540 com/groom/bean/UserRankBean:setUser_id (I)V
/* */ // 176: aload 7
/* */ // 178: aload 6
/* */ // 180: ldc_w 477
/* */ // 183: invokeinterface 78 2 0
/* */ // 188: invokevirtual 543 com/groom/bean/UserRankBean:setPoints (I)V
/* */ // 191: aload 7
/* */ // 193: aload 6
/* */ // 195: ldc_w 544
/* */ // 198: invokeinterface 78 2 0
/* */ // 203: invokevirtual 546 com/groom/bean/UserRankBean:setRank (I)V
/* */ // 206: aload 7
/* */ // 208: aload 6
/* */ // 210: ldc_w 549
/* */ // 213: invokeinterface 78 2 0
/* */ // 218: invokevirtual 551 com/groom/bean/UserRankBean:setTotal_ranks (I)V
/* */ // 221: aload 6
/* */ // 223: ldc_w 544
/* */ // 226: invokeinterface 78 2 0
/* */ // 231: i2d
/* */ // 232: aload 6
/* */ // 234: ldc_w 549
/* */ // 237: invokeinterface 78 2 0
/* */ // 242: i2d
/* */ // 243: ddiv
/* */ // 244: dstore 10
/* */ // 246: new 554 java/text/DecimalFormat
/* */ // 249: dup
/* */ // 250: ldc_w 556
/* */ // 253: invokespecial 558 java/text/DecimalFormat:<init> (Ljava/lang/String;)V
/* */ // 256: astore 12
/* */ // 258: aload 7
/* */ // 260: aload 12
/* */ // 262: ldc2_w 559
/* */ // 265: dload 10
/* */ // 267: ldc2_w 559
/* */ // 270: dmul
/* */ // 271: dsub
/* */ // 272: invokevirtual 561 java/text/DecimalFormat:format (D)Ljava/lang/String;
/* */ // 275: invokestatic 564 java/lang/Double:parseDouble (Ljava/lang/String;)D
/* */ // 278: invokevirtual 570 com/groom/bean/UserRankBean:setSubject_percentile (D)V
/* */ // 281: aload 6
/* */ // 283: invokeinterface 158 1 0
/* */ // 288: ifne -127 -> 161
/* */ // 291: getstatic 397 java/lang/System:out Ljava/io/PrintStream;
/* */ // 294: aload 7
/* */ // 296: invokevirtual 574 com/groom/bean/UserRankBean:getRank ()I
/* */ // 299: invokevirtual 577 java/io/PrintStream:println (I)V
/* */ // 302: getstatic 397 java/lang/System:out Ljava/io/PrintStream;
/* */ // 305: aload 7
/* */ // 307: invokevirtual 579 com/groom/bean/UserRankBean:getTotal_ranks ()I
/* */ // 310: invokevirtual 577 java/io/PrintStream:println (I)V
/* */ // 313: goto +90 -> 403
/* */ // 316: astore 8
/* */ // 318: aload 8
/* */ // 320: invokevirtual 162 java/sql/SQLException:printStackTrace ()V
/* */ // 323: aload 6
/* */ // 325: ifnull +10 -> 335
/* */ // 328: aload 6
/* */ // 330: invokeinterface 165 1 0
/* */ // 335: aload 5
/* */ // 337: ifnull +10 -> 347
/* */ // 340: aload 5
/* */ // 342: invokeinterface 168 1 0
/* */ // 347: aload 4
/* */ // 349: ifnull +90 -> 439
/* */ // 352: aload 4
/* */ // 354: invokeinterface 169 1 0
/* */ // 359: goto +80 -> 439
/* */ // 362: astore 13
/* */ // 364: aload 6
/* */ // 366: ifnull +10 -> 376
/* */ // 369: aload 6
/* */ // 371: invokeinterface 165 1 0
/* */ // 376: aload 5
/* */ // 378: ifnull +10 -> 388
/* */ // 381: aload 5
/* */ // 383: invokeinterface 168 1 0
/* */ // 388: aload 4
/* */ // 390: ifnull +10 -> 400
/* */ // 393: aload 4
/* */ // 395: invokeinterface 169 1 0
/* */ // 400: aload 13
/* */ // 402: athrow
/* */ // 403: aload 6
/* */ // 405: ifnull +10 -> 415
/* */ // 408: aload 6
/* */ // 410: invokeinterface 165 1 0
/* */ // 415: aload 5
/* */ // 417: ifnull +10 -> 427
/* */ // 420: aload 5
/* */ // 422: invokeinterface 168 1 0
/* */ // 427: aload 4
/* */ // 429: ifnull +10 -> 439
/* */ // 432: aload 4
/* */ // 434: invokeinterface 169 1 0
/* */ // 439: aload 7
/* */ // 441: areturn
/* */ // Line number table:
/* */ // Java source line #479 -> byte code offset #0
/* */ // Java source line #480 -> byte code offset #10
/* */ // Java source line #481 -> byte code offset #13
/* */ // Java source line #482 -> byte code offset #16
/* */ // Java source line #484 -> byte code offset #25
/* */ // Java source line #485 -> byte code offset #34
/* */ // Java source line #486 -> byte code offset #45
/* */ // Java source line #488 -> byte code offset #56
/* */ // Java source line #492 -> byte code offset #66
/* */ // Java source line #493 -> byte code offset #70
/* */ // Java source line #494 -> byte code offset #76
/* */ // Java source line #495 -> byte code offset #82
/* */ // Java source line #496 -> byte code offset #86
/* */ // Java source line #497 -> byte code offset #92
/* */ // Java source line #488 -> byte code offset #98
/* */ // Java source line #498 -> byte code offset #103
/* */ // Java source line #499 -> byte code offset #111
/* */ // Java source line #500 -> byte code offset #122
/* */ // Java source line #501 -> byte code offset #131
/* */ // Java source line #502 -> byte code offset #140
/* */ // Java source line #503 -> byte code offset #149
/* */ // Java source line #504 -> byte code offset #158
/* */ // Java source line #505 -> byte code offset #161
/* */ // Java source line #506 -> byte code offset #176
/* */ // Java source line #507 -> byte code offset #191
/* */ // Java source line #508 -> byte code offset #206
/* */ // Java source line #509 -> byte code offset #221
/* */ // Java source line #510 -> byte code offset #246
/* */ // Java source line #511 -> byte code offset #258
/* */ // Java source line #504 -> byte code offset #281
/* */ // Java source line #513 -> byte code offset #291
/* */ // Java source line #514 -> byte code offset #302
/* */ // Java source line #515 -> byte code offset #313
/* */ // Java source line #516 -> byte code offset #318
/* */ // Java source line #518 -> byte code offset #323
/* */ // Java source line #519 -> byte code offset #328
/* */ // Java source line #520 -> byte code offset #335
/* */ // Java source line #521 -> byte code offset #340
/* */ // Java source line #522 -> byte code offset #347
/* */ // Java source line #523 -> byte code offset #352
/* */ // Java source line #517 -> byte code offset #362
/* */ // Java source line #518 -> byte code offset #364
/* */ // Java source line #519 -> byte code offset #369
/* */ // Java source line #520 -> byte code offset #376
/* */ // Java source line #521 -> byte code offset #381
/* */ // Java source line #522 -> byte code offset #388
/* */ // Java source line #523 -> byte code offset #393
/* */ // Java source line #524 -> byte code offset #400
/* */ // Java source line #518 -> byte code offset #403
/* */ // Java source line #519 -> byte code offset #408
/* */ // Java source line #520 -> byte code offset #415
/* */ // Java source line #521 -> byte code offset #420
/* */ // Java source line #522 -> byte code offset #427
/* */ // Java source line #523 -> byte code offset #432
/* */ // Java source line #525 -> byte code offset #439
/* */ // Local variable table:
/* */ // start length slot name signature
/* */ // 0 442 0 this QuizDAOImpl
/* */ // 0 442 1 subject String
/* */ // 0 442 2 user_id int
/* */ // 0 442 3 topic_id int
/* */ // 8 425 4 connection Connection
/* */ // 11 410 5 preparedStatement PreparedStatement
/* */ // 14 395 6 resultSet ResultSet
/* */ // 23 417 7 userRankBean com.groom.bean.UserRankBean
/* */ // 32 14 8 statement java.sql.Statement
/* */ // 316 3 8 exception SQLException
/* */ // 101 13 9 query String
/* */ // 244 22 10 subjectRank double
/* */ // 256 5 12 noOfDecimals java.text.DecimalFormat
/* */ // 362 39 13 localObject Object
/* */ // Exception table:
/* */ // from to target type
/* */ // 25 313 316 java/sql/SQLException
/* */ // 25 323 362 finally
/* */ }
/* */
/* */ /* Error */
/* */ public com.groom.bean.UserRankBean getUserRankInSubjectTopicbyLocation(String subject, int user_id, int topic_id, String locationType, String location)
/* */ throws SQLException
/* */ {
/* */ // Byte code:
/* */ // 0: getstatic 23 com/groom/dao/impl/QuizDAOImpl:ds Ljavax/sql/DataSource;
/* */ // 3: invokeinterface 27 1 0
/* */ // 8: astore 6
/* */ // 10: aconst_null
/* */ // 11: astore 7
/* */ // 13: aconst_null
/* */ // 14: astore 8
/* */ // 16: new 513 com/groom/bean/UserRankBean
/* */ // 19: dup
/* */ // 20: invokespecial 515 com/groom/bean/UserRankBean:<init> ()V
/* */ // 23: astore 9
/* */ // 25: aload 6
/* */ // 27: invokeinterface 516 1 0
/* */ // 32: astore 10
/* */ // 34: aload 10
/* */ // 36: ldc_w 520
/* */ // 39: invokeinterface 522 2 0
/* */ // 44: pop
/* */ // 45: aload 10
/* */ // 47: ldc_w 528
/* */ // 50: invokeinterface 522 2 0
/* */ // 55: pop
/* */ // 56: new 36 java/lang/StringBuilder
/* */ // 59: dup
/* */ // 60: ldc_w 595
/* */ // 63: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 66: aload_1
/* */ // 67: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 70: ldc_w 597
/* */ // 73: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 76: ldc_w 599
/* */ // 79: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 82: aload 4
/* */ // 84: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 87: ldc_w 601
/* */ // 90: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 93: ldc_w 603
/* */ // 96: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 99: aload_1
/* */ // 100: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 103: ldc_w 605
/* */ // 106: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 109: ldc_w 599
/* */ // 112: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 115: aload 4
/* */ // 117: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 120: ldc_w 607
/* */ // 123: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 126: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 129: astore 11
/* */ // 131: getstatic 397 java/lang/System:out Ljava/io/PrintStream;
/* */ // 134: aload 11
/* */ // 136: invokevirtual 403 java/io/PrintStream:println (Ljava/lang/String;)V
/* */ // 139: aload 6
/* */ // 141: aload 11
/* */ // 143: invokeinterface 57 2 0
/* */ // 148: astore 7
/* */ // 150: aload 7
/* */ // 152: iconst_1
/* */ // 153: aload 5
/* */ // 155: invokeinterface 244 3 0
/* */ // 160: aload 7
/* */ // 162: iconst_2
/* */ // 163: iload_3
/* */ // 164: invokeinterface 63 3 0
/* */ // 169: aload 7
/* */ // 171: iconst_3
/* */ // 172: iload_3
/* */ // 173: invokeinterface 63 3 0
/* */ // 178: aload 7
/* */ // 180: iconst_4
/* */ // 181: aload 5
/* */ // 183: invokeinterface 244 3 0
/* */ // 188: aload 7
/* */ // 190: iconst_5
/* */ // 191: iload_2
/* */ // 192: invokeinterface 63 3 0
/* */ // 197: aload 7
/* */ // 199: invokeinterface 69 1 0
/* */ // 204: astore 8
/* */ // 206: goto +93 -> 299
/* */ // 209: aload 9
/* */ // 211: aload 8
/* */ // 213: ldc_w 544
/* */ // 216: invokeinterface 78 2 0
/* */ // 221: invokevirtual 546 com/groom/bean/UserRankBean:setRank (I)V
/* */ // 224: aload 9
/* */ // 226: aload 8
/* */ // 228: ldc_w 549
/* */ // 231: invokeinterface 78 2 0
/* */ // 236: invokevirtual 551 com/groom/bean/UserRankBean:setTotal_ranks (I)V
/* */ // 239: aload 8
/* */ // 241: ldc_w 544
/* */ // 244: invokeinterface 78 2 0
/* */ // 249: i2d
/* */ // 250: aload 8
/* */ // 252: ldc_w 549
/* */ // 255: invokeinterface 78 2 0
/* */ // 260: i2d
/* */ // 261: ddiv
/* */ // 262: dstore 12
/* */ // 264: new 554 java/text/DecimalFormat
/* */ // 267: dup
/* */ // 268: ldc_w 556
/* */ // 271: invokespecial 558 java/text/DecimalFormat:<init> (Ljava/lang/String;)V
/* */ // 274: astore 14
/* */ // 276: aload 9
/* */ // 278: aload 14
/* */ // 280: ldc2_w 559
/* */ // 283: dload 12
/* */ // 285: ldc2_w 559
/* */ // 288: dmul
/* */ // 289: dsub
/* */ // 290: invokevirtual 561 java/text/DecimalFormat:format (D)Ljava/lang/String;
/* */ // 293: invokestatic 564 java/lang/Double:parseDouble (Ljava/lang/String;)D
/* */ // 296: invokevirtual 570 com/groom/bean/UserRankBean:setSubject_percentile (D)V
/* */ // 299: aload 8
/* */ // 301: invokeinterface 158 1 0
/* */ // 306: ifne -97 -> 209
/* */ // 309: getstatic 397 java/lang/System:out Ljava/io/PrintStream;
/* */ // 312: new 36 java/lang/StringBuilder
/* */ // 315: dup
/* */ // 316: ldc_w 609
/* */ // 319: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 322: aload 9
/* */ // 324: invokevirtual 574 com/groom/bean/UserRankBean:getRank ()I
/* */ // 327: invokevirtual 611 java/lang/StringBuilder:append (I)Ljava/lang/StringBuilder;
/* */ // 330: ldc_w 614
/* */ // 333: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 336: aload 9
/* */ // 338: invokevirtual 579 com/groom/bean/UserRankBean:getTotal_ranks ()I
/* */ // 341: invokevirtual 611 java/lang/StringBuilder:append (I)Ljava/lang/StringBuilder;
/* */ // 344: ldc_w 616
/* */ // 347: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 350: aload 9
/* */ // 352: invokevirtual 618 com/groom/bean/UserRankBean:getSubject_percentile ()D
/* */ // 355: invokevirtual 622 java/lang/StringBuilder:append (D)Ljava/lang/StringBuilder;
/* */ // 358: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 361: invokevirtual 403 java/io/PrintStream:println (Ljava/lang/String;)V
/* */ // 364: goto +90 -> 454
/* */ // 367: astore 10
/* */ // 369: aload 10
/* */ // 371: invokevirtual 162 java/sql/SQLException:printStackTrace ()V
/* */ // 374: aload 8
/* */ // 376: ifnull +10 -> 386
/* */ // 379: aload 8
/* */ // 381: invokeinterface 165 1 0
/* */ // 386: aload 7
/* */ // 388: ifnull +10 -> 398
/* */ // 391: aload 7
/* */ // 393: invokeinterface 168 1 0
/* */ // 398: aload 6
/* */ // 400: ifnull +90 -> 490
/* */ // 403: aload 6
/* */ // 405: invokeinterface 169 1 0
/* */ // 410: goto +80 -> 490
/* */ // 413: astore 15
/* */ // 415: aload 8
/* */ // 417: ifnull +10 -> 427
/* */ // 420: aload 8
/* */ // 422: invokeinterface 165 1 0
/* */ // 427: aload 7
/* */ // 429: ifnull +10 -> 439
/* */ // 432: aload 7
/* */ // 434: invokeinterface 168 1 0
/* */ // 439: aload 6
/* */ // 441: ifnull +10 -> 451
/* */ // 444: aload 6
/* */ // 446: invokeinterface 169 1 0
/* */ // 451: aload 15
/* */ // 453: athrow
/* */ // 454: aload 8
/* */ // 456: ifnull +10 -> 466
/* */ // 459: aload 8
/* */ // 461: invokeinterface 165 1 0
/* */ // 466: aload 7
/* */ // 468: ifnull +10 -> 478
/* */ // 471: aload 7
/* */ // 473: invokeinterface 168 1 0
/* */ // 478: aload 6
/* */ // 480: ifnull +10 -> 490
/* */ // 483: aload 6
/* */ // 485: invokeinterface 169 1 0
/* */ // 490: aload 9
/* */ // 492: areturn
/* */ // Line number table:
/* */ // Java source line #532 -> byte code offset #0
/* */ // Java source line #533 -> byte code offset #10
/* */ // Java source line #534 -> byte code offset #13
/* */ // Java source line #535 -> byte code offset #16
/* */ // Java source line #537 -> byte code offset #25
/* */ // Java source line #538 -> byte code offset #34
/* */ // Java source line #539 -> byte code offset #45
/* */ // Java source line #540 -> byte code offset #56
/* */ // Java source line #543 -> byte code offset #66
/* */ // Java source line #544 -> byte code offset #76
/* */ // Java source line #545 -> byte code offset #93
/* */ // Java source line #546 -> byte code offset #109
/* */ // Java source line #540 -> byte code offset #126
/* */ // Java source line #548 -> byte code offset #131
/* */ // Java source line #549 -> byte code offset #139
/* */ // Java source line #550 -> byte code offset #150
/* */ // Java source line #551 -> byte code offset #160
/* */ // Java source line #552 -> byte code offset #169
/* */ // Java source line #553 -> byte code offset #178
/* */ // Java source line #554 -> byte code offset #188
/* */ // Java source line #555 -> byte code offset #197
/* */ // Java source line #556 -> byte code offset #206
/* */ // Java source line #557 -> byte code offset #209
/* */ // Java source line #558 -> byte code offset #224
/* */ // Java source line #559 -> byte code offset #239
/* */ // Java source line #560 -> byte code offset #264
/* */ // Java source line #561 -> byte code offset #276
/* */ // Java source line #556 -> byte code offset #299
/* */ // Java source line #563 -> byte code offset #309
/* */ // Java source line #565 -> byte code offset #364
/* */ // Java source line #566 -> byte code offset #369
/* */ // Java source line #568 -> byte code offset #374
/* */ // Java source line #569 -> byte code offset #379
/* */ // Java source line #570 -> byte code offset #386
/* */ // Java source line #571 -> byte code offset #391
/* */ // Java source line #572 -> byte code offset #398
/* */ // Java source line #573 -> byte code offset #403
/* */ // Java source line #567 -> byte code offset #413
/* */ // Java source line #568 -> byte code offset #415
/* */ // Java source line #569 -> byte code offset #420
/* */ // Java source line #570 -> byte code offset #427
/* */ // Java source line #571 -> byte code offset #432
/* */ // Java source line #572 -> byte code offset #439
/* */ // Java source line #573 -> byte code offset #444
/* */ // Java source line #574 -> byte code offset #451
/* */ // Java source line #568 -> byte code offset #454
/* */ // Java source line #569 -> byte code offset #459
/* */ // Java source line #570 -> byte code offset #466
/* */ // Java source line #571 -> byte code offset #471
/* */ // Java source line #572 -> byte code offset #478
/* */ // Java source line #573 -> byte code offset #483
/* */ // Java source line #575 -> byte code offset #490
/* */ // Local variable table:
/* */ // start length slot name signature
/* */ // 0 493 0 this QuizDAOImpl
/* */ // 0 493 1 subject String
/* */ // 0 493 2 user_id int
/* */ // 0 493 3 topic_id int
/* */ // 0 493 4 locationType String
/* */ // 0 493 5 location String
/* */ // 8 476 6 connection Connection
/* */ // 11 461 7 preparedStatement PreparedStatement
/* */ // 14 446 8 resultSet ResultSet
/* */ // 23 468 9 userRank com.groom.bean.UserRankBean
/* */ // 32 14 10 statement java.sql.Statement
/* */ // 367 3 10 exception SQLException
/* */ // 129 13 11 query String
/* */ // 262 22 12 subjectRank double
/* */ // 274 5 14 noOfDecimals java.text.DecimalFormat
/* */ // 413 39 15 localObject Object
/* */ // Exception table:
/* */ // from to target type
/* */ // 25 364 367 java/sql/SQLException
/* */ // 25 374 413 finally
/* */ }
/* */
/* */ /* Error */
/* */ public com.groom.bean.SubjectAnalysisBean getUserSubjectWiseAnalysis(int user_id, int standard)
/* */ throws SQLException
/* */ {
/* */ // Byte code:
/* */ // 0: getstatic 23 com/groom/dao/impl/QuizDAOImpl:ds Ljavax/sql/DataSource;
/* */ // 3: invokeinterface 27 1 0
/* */ // 8: astore_3
/* */ // 9: aconst_null
/* */ // 10: astore 4
/* */ // 12: aconst_null
/* */ // 13: astore 5
/* */ // 15: new 630 com/groom/bean/SubjectAnalysisBean
/* */ // 18: dup
/* */ // 19: invokespecial 632 com/groom/bean/SubjectAnalysisBean:<init> ()V
/* */ // 22: astore 6
/* */ // 24: ldc_w 633
/* */ // 27: astore 7
/* */ // 29: getstatic 397 java/lang/System:out Ljava/io/PrintStream;
/* */ // 32: aload 7
/* */ // 34: invokevirtual 403 java/io/PrintStream:println (Ljava/lang/String;)V
/* */ // 37: aload_3
/* */ // 38: aload 7
/* */ // 40: invokeinterface 57 2 0
/* */ // 45: astore 4
/* */ // 47: aload 4
/* */ // 49: iconst_1
/* */ // 50: iload_2
/* */ // 51: invokeinterface 63 3 0
/* */ // 56: aload 4
/* */ // 58: iconst_2
/* */ // 59: iload_2
/* */ // 60: invokeinterface 63 3 0
/* */ // 65: aload 4
/* */ // 67: iconst_3
/* */ // 68: iload_2
/* */ // 69: invokeinterface 63 3 0
/* */ // 74: aload 4
/* */ // 76: iconst_4
/* */ // 77: iload_2
/* */ // 78: invokeinterface 63 3 0
/* */ // 83: aload 4
/* */ // 85: iconst_5
/* */ // 86: iload_2
/* */ // 87: invokeinterface 63 3 0
/* */ // 92: aload 4
/* */ // 94: bipush 6
/* */ // 96: iload_1
/* */ // 97: invokeinterface 63 3 0
/* */ // 102: aload 4
/* */ // 104: invokeinterface 69 1 0
/* */ // 109: astore 5
/* */ // 111: goto +309 -> 420
/* */ // 114: aload 6
/* */ // 116: aload 5
/* */ // 118: ldc_w 468
/* */ // 121: invokeinterface 78 2 0
/* */ // 126: invokevirtual 635 com/groom/bean/SubjectAnalysisBean:setUser_id (I)V
/* */ // 129: aload 6
/* */ // 131: aload 5
/* */ // 133: ldc_w 636
/* */ // 136: invokeinterface 90 2 0
/* */ // 141: invokevirtual 638 com/groom/bean/SubjectAnalysisBean:setFirst_name (Ljava/lang/String;)V
/* */ // 144: aload 6
/* */ // 146: aload 5
/* */ // 148: ldc_w 641
/* */ // 151: invokeinterface 90 2 0
/* */ // 156: invokevirtual 643 com/groom/bean/SubjectAnalysisBean:setLast_name (Ljava/lang/String;)V
/* */ // 159: aload 6
/* */ // 161: aload 5
/* */ // 163: ldc_w 646
/* */ // 166: invokeinterface 78 2 0
/* */ // 171: invokevirtual 648 com/groom/bean/SubjectAnalysisBean:setMaths_points (I)V
/* */ // 174: aload 6
/* */ // 176: aload 5
/* */ // 178: ldc_w 651
/* */ // 181: invokeinterface 78 2 0
/* */ // 186: invokevirtual 653 com/groom/bean/SubjectAnalysisBean:setPhysics_points (I)V
/* */ // 189: aload 6
/* */ // 191: aload 5
/* */ // 193: ldc_w 656
/* */ // 196: invokeinterface 78 2 0
/* */ // 201: invokevirtual 658 com/groom/bean/SubjectAnalysisBean:setChemistry_points (I)V
/* */ // 204: aload 6
/* */ // 206: aload 5
/* */ // 208: ldc_w 661
/* */ // 211: invokeinterface 78 2 0
/* */ // 216: invokevirtual 663 com/groom/bean/SubjectAnalysisBean:setMaths_rank (I)V
/* */ // 219: aload 6
/* */ // 221: aload 5
/* */ // 223: ldc_w 666
/* */ // 226: invokeinterface 78 2 0
/* */ // 231: invokevirtual 668 com/groom/bean/SubjectAnalysisBean:setPhysics_rank (I)V
/* */ // 234: aload 6
/* */ // 236: aload 5
/* */ // 238: ldc_w 671
/* */ // 241: invokeinterface 78 2 0
/* */ // 246: invokevirtual 673 com/groom/bean/SubjectAnalysisBean:setChemistry_rank (I)V
/* */ // 249: aload 6
/* */ // 251: aload 5
/* */ // 253: ldc_w 549
/* */ // 256: invokeinterface 78 2 0
/* */ // 261: invokevirtual 676 com/groom/bean/SubjectAnalysisBean:setTotal_ranks (I)V
/* */ // 264: aload 5
/* */ // 266: ldc_w 661
/* */ // 269: invokeinterface 78 2 0
/* */ // 274: i2d
/* */ // 275: aload 5
/* */ // 277: ldc_w 549
/* */ // 280: invokeinterface 78 2 0
/* */ // 285: i2d
/* */ // 286: ddiv
/* */ // 287: dstore 8
/* */ // 289: aload 5
/* */ // 291: ldc_w 666
/* */ // 294: invokeinterface 78 2 0
/* */ // 299: i2d
/* */ // 300: aload 5
/* */ // 302: ldc_w 549
/* */ // 305: invokeinterface 78 2 0
/* */ // 310: i2d
/* */ // 311: ddiv
/* */ // 312: dstore 10
/* */ // 314: aload 5
/* */ // 316: ldc_w 671
/* */ // 319: invokeinterface 78 2 0
/* */ // 324: i2d
/* */ // 325: aload 5
/* */ // 327: ldc_w 549
/* */ // 330: invokeinterface 78 2 0
/* */ // 335: i2d
/* */ // 336: ddiv
/* */ // 337: dstore 12
/* */ // 339: new 554 java/text/DecimalFormat
/* */ // 342: dup
/* */ // 343: ldc_w 556
/* */ // 346: invokespecial 558 java/text/DecimalFormat:<init> (Ljava/lang/String;)V
/* */ // 349: astore 14
/* */ // 351: aload 6
/* */ // 353: aload 14
/* */ // 355: ldc2_w 559
/* */ // 358: dload 8
/* */ // 360: ldc2_w 559
/* */ // 363: dmul
/* */ // 364: dsub
/* */ // 365: invokevirtual 561 java/text/DecimalFormat:format (D)Ljava/lang/String;
/* */ // 368: invokestatic 564 java/lang/Double:parseDouble (Ljava/lang/String;)D
/* */ // 371: invokevirtual 677 com/groom/bean/SubjectAnalysisBean:setMaths_percentile (D)V
/* */ // 374: aload 6
/* */ // 376: aload 14
/* */ // 378: ldc2_w 559
/* */ // 381: dload 10
/* */ // 383: ldc2_w 559
/* */ // 386: dmul
/* */ // 387: dsub
/* */ // 388: invokevirtual 561 java/text/DecimalFormat:format (D)Ljava/lang/String;
/* */ // 391: invokestatic 564 java/lang/Double:parseDouble (Ljava/lang/String;)D
/* */ // 394: invokevirtual 680 com/groom/bean/SubjectAnalysisBean:setPhysics_percentile (D)V
/* */ // 397: aload 6
/* */ // 399: aload 14
/* */ // 401: ldc2_w 559
/* */ // 404: dload 12
/* */ // 406: ldc2_w 559
/* */ // 409: dmul
/* */ // 410: dsub
/* */ // 411: invokevirtual 561 java/text/DecimalFormat:format (D)Ljava/lang/String;
/* */ // 414: invokestatic 564 java/lang/Double:parseDouble (Ljava/lang/String;)D
/* */ // 417: invokevirtual 683 com/groom/bean/SubjectAnalysisBean:setChemistry_percentile (D)V
/* */ // 420: aload 5
/* */ // 422: invokeinterface 158 1 0
/* */ // 427: ifne -313 -> 114
/* */ // 430: goto +86 -> 516
/* */ // 433: astore 7
/* */ // 435: aload 7
/* */ // 437: invokevirtual 162 java/sql/SQLException:printStackTrace ()V
/* */ // 440: aload 5
/* */ // 442: ifnull +10 -> 452
/* */ // 445: aload 5
/* */ // 447: invokeinterface 165 1 0
/* */ // 452: aload 4
/* */ // 454: ifnull +10 -> 464
/* */ // 457: aload 4
/* */ // 459: invokeinterface 168 1 0
/* */ // 464: aload_3
/* */ // 465: ifnull +85 -> 550
/* */ // 468: aload_3
/* */ // 469: invokeinterface 169 1 0
/* */ // 474: goto +76 -> 550
/* */ // 477: astore 15
/* */ // 479: aload 5
/* */ // 481: ifnull +10 -> 491
/* */ // 484: aload 5
/* */ // 486: invokeinterface 165 1 0
/* */ // 491: aload 4
/* */ // 493: ifnull +10 -> 503
/* */ // 496: aload 4
/* */ // 498: invokeinterface 168 1 0
/* */ // 503: aload_3
/* */ // 504: ifnull +9 -> 513
/* */ // 507: aload_3
/* */ // 508: invokeinterface 169 1 0
/* */ // 513: aload 15
/* */ // 515: athrow
/* */ // 516: aload 5
/* */ // 518: ifnull +10 -> 528
/* */ // 521: aload 5
/* */ // 523: invokeinterface 165 1 0
/* */ // 528: aload 4
/* */ // 530: ifnull +10 -> 540
/* */ // 533: aload 4
/* */ // 535: invokeinterface 168 1 0
/* */ // 540: aload_3
/* */ // 541: ifnull +9 -> 550
/* */ // 544: aload_3
/* */ // 545: invokeinterface 169 1 0
/* */ // 550: aload 6
/* */ // 552: areturn
/* */ // Line number table:
/* */ // Java source line #581 -> byte code offset #0
/* */ // Java source line #582 -> byte code offset #9
/* */ // Java source line #583 -> byte code offset #12
/* */ // Java source line #584 -> byte code offset #15
/* */ // Java source line #587 -> byte code offset #24
/* */ // Java source line #593 -> byte code offset #29
/* */ // Java source line #594 -> byte code offset #37
/* */ // Java source line #595 -> byte code offset #47
/* */ // Java source line #596 -> byte code offset #56
/* */ // Java source line #597 -> byte code offset #65
/* */ // Java source line #598 -> byte code offset #74
/* */ // Java source line #599 -> byte code offset #83
/* */ // Java source line #600 -> byte code offset #92
/* */ // Java source line #601 -> byte code offset #102
/* */ // Java source line #602 -> byte code offset #111
/* */ // Java source line #603 -> byte code offset #114
/* */ // Java source line #604 -> byte code offset #129
/* */ // Java source line #605 -> byte code offset #144
/* */ // Java source line #606 -> byte code offset #159
/* */ // Java source line #607 -> byte code offset #174
/* */ // Java source line #608 -> byte code offset #189
/* */ // Java source line #609 -> byte code offset #204
/* */ // Java source line #610 -> byte code offset #219
/* */ // Java source line #611 -> byte code offset #234
/* */ // Java source line #612 -> byte code offset #249
/* */ // Java source line #613 -> byte code offset #264
/* */ // Java source line #614 -> byte code offset #289
/* */ // Java source line #615 -> byte code offset #314
/* */ // Java source line #616 -> byte code offset #339
/* */ // Java source line #617 -> byte code offset #351
/* */ // Java source line #618 -> byte code offset #374
/* */ // Java source line #619 -> byte code offset #397
/* */ // Java source line #602 -> byte code offset #420
/* */ // Java source line #623 -> byte code offset #430
/* */ // Java source line #624 -> byte code offset #435
/* */ // Java source line #626 -> byte code offset #440
/* */ // Java source line #627 -> byte code offset #445
/* */ // Java source line #628 -> byte code offset #452
/* */ // Java source line #629 -> byte code offset #457
/* */ // Java source line #630 -> byte code offset #464
/* */ // Java source line #631 -> byte code offset #468
/* */ // Java source line #625 -> byte code offset #477
/* */ // Java source line #626 -> byte code offset #479
/* */ // Java source line #627 -> byte code offset #484
/* */ // Java source line #628 -> byte code offset #491
/* */ // Java source line #629 -> byte code offset #496
/* */ // Java source line #630 -> byte code offset #503
/* */ // Java source line #631 -> byte code offset #507
/* */ // Java source line #632 -> byte code offset #513
/* */ // Java source line #626 -> byte code offset #516
/* */ // Java source line #627 -> byte code offset #521
/* */ // Java source line #628 -> byte code offset #528
/* */ // Java source line #629 -> byte code offset #533
/* */ // Java source line #630 -> byte code offset #540
/* */ // Java source line #631 -> byte code offset #544
/* */ // Java source line #633 -> byte code offset #550
/* */ // Local variable table:
/* */ // start length slot name signature
/* */ // 0 553 0 this QuizDAOImpl
/* */ // 0 553 1 user_id int
/* */ // 0 553 2 standard int
/* */ // 8 537 3 connection Connection
/* */ // 10 524 4 preparedStatement PreparedStatement
/* */ // 13 509 5 resultSet ResultSet
/* */ // 22 529 6 analysisBean com.groom.bean.SubjectAnalysisBean
/* */ // 27 12 7 query String
/* */ // 433 3 7 exception SQLException
/* */ // 287 72 8 mathsRank double
/* */ // 312 70 10 physicsRank double
/* */ // 337 68 12 chemistryRank double
/* */ // 349 51 14 noOfDecimals java.text.DecimalFormat
/* */ // 477 37 15 localObject Object
/* */ // Exception table:
/* */ // from to target type
/* */ // 24 430 433 java/sql/SQLException
/* */ // 24 440 477 finally
/* */ }
/* */
/* */ /* Error */
/* */ public com.groom.bean.SubjectAnalysisBean getUserSubjectWiseAnalysisByLocation(int user_id, int standard, String locationType, String location)
/* */ throws SQLException
/* */ {
/* */ // Byte code:
/* */ // 0: getstatic 23 com/groom/dao/impl/QuizDAOImpl:ds Ljavax/sql/DataSource;
/* */ // 3: invokeinterface 27 1 0
/* */ // 8: astore 5
/* */ // 10: aconst_null
/* */ // 11: astore 6
/* */ // 13: aconst_null
/* */ // 14: astore 7
/* */ // 16: new 630 com/groom/bean/SubjectAnalysisBean
/* */ // 19: dup
/* */ // 20: invokespecial 632 com/groom/bean/SubjectAnalysisBean:<init> ()V
/* */ // 23: astore 8
/* */ // 25: new 36 java/lang/StringBuilder
/* */ // 28: dup
/* */ // 29: ldc_w 693
/* */ // 32: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 35: aload_3
/* */ // 36: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 39: ldc_w 695
/* */ // 42: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 45: ldc_w 697
/* */ // 48: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 51: aload_3
/* */ // 52: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 55: ldc_w 699
/* */ // 58: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 61: ldc_w 701
/* */ // 64: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 67: aload_3
/* */ // 68: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 71: ldc_w 703
/* */ // 74: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 77: ldc_w 705
/* */ // 80: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 83: aload_3
/* */ // 84: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 87: ldc_w 707
/* */ // 90: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 93: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 96: astore 9
/* */ // 98: getstatic 397 java/lang/System:out Ljava/io/PrintStream;
/* */ // 101: aload 9
/* */ // 103: invokevirtual 403 java/io/PrintStream:println (Ljava/lang/String;)V
/* */ // 106: aload 5
/* */ // 108: aload 9
/* */ // 110: invokeinterface 57 2 0
/* */ // 115: astore 6
/* */ // 117: aload 6
/* */ // 119: iconst_1
/* */ // 120: aload 4
/* */ // 122: invokeinterface 244 3 0
/* */ // 127: aload 6
/* */ // 129: iconst_2
/* */ // 130: iload_2
/* */ // 131: invokeinterface 63 3 0
/* */ // 136: aload 6
/* */ // 138: iconst_3
/* */ // 139: aload 4
/* */ // 141: invokeinterface 244 3 0
/* */ // 146: aload 6
/* */ // 148: iconst_4
/* */ // 149: iload_2
/* */ // 150: invokeinterface 63 3 0
/* */ // 155: aload 6
/* */ // 157: iconst_5
/* */ // 158: aload 4
/* */ // 160: invokeinterface 244 3 0
/* */ // 165: aload 6
/* */ // 167: bipush 6
/* */ // 169: iload_2
/* */ // 170: invokeinterface 63 3 0
/* */ // 175: aload 6
/* */ // 177: bipush 7
/* */ // 179: aload 4
/* */ // 181: invokeinterface 244 3 0
/* */ // 186: aload 6
/* */ // 188: bipush 8
/* */ // 190: iload_2
/* */ // 191: invokeinterface 63 3 0
/* */ // 196: aload 6
/* */ // 198: bipush 9
/* */ // 200: iload_2
/* */ // 201: invokeinterface 63 3 0
/* */ // 206: aload 6
/* */ // 208: bipush 10
/* */ // 210: iload_1
/* */ // 211: invokeinterface 63 3 0
/* */ // 216: aload 6
/* */ // 218: invokeinterface 69 1 0
/* */ // 223: astore 7
/* */ // 225: goto +309 -> 534
/* */ // 228: aload 8
/* */ // 230: aload 7
/* */ // 232: ldc_w 468
/* */ // 235: invokeinterface 78 2 0
/* */ // 240: invokevirtual 635 com/groom/bean/SubjectAnalysisBean:setUser_id (I)V
/* */ // 243: aload 8
/* */ // 245: aload 7
/* */ // 247: ldc_w 636
/* */ // 250: invokeinterface 90 2 0
/* */ // 255: invokevirtual 638 com/groom/bean/SubjectAnalysisBean:setFirst_name (Ljava/lang/String;)V
/* */ // 258: aload 8
/* */ // 260: aload 7
/* */ // 262: ldc_w 641
/* */ // 265: invokeinterface 90 2 0
/* */ // 270: invokevirtual 643 com/groom/bean/SubjectAnalysisBean:setLast_name (Ljava/lang/String;)V
/* */ // 273: aload 8
/* */ // 275: aload 7
/* */ // 277: ldc_w 646
/* */ // 280: invokeinterface 78 2 0
/* */ // 285: invokevirtual 648 com/groom/bean/SubjectAnalysisBean:setMaths_points (I)V
/* */ // 288: aload 8
/* */ // 290: aload 7
/* */ // 292: ldc_w 651
/* */ // 295: invokeinterface 78 2 0
/* */ // 300: invokevirtual 653 com/groom/bean/SubjectAnalysisBean:setPhysics_points (I)V
/* */ // 303: aload 8
/* */ // 305: aload 7
/* */ // 307: ldc_w 656
/* */ // 310: invokeinterface 78 2 0
/* */ // 315: invokevirtual 658 com/groom/bean/SubjectAnalysisBean:setChemistry_points (I)V
/* */ // 318: aload 8
/* */ // 320: aload 7
/* */ // 322: ldc_w 661
/* */ // 325: invokeinterface 78 2 0
/* */ // 330: invokevirtual 663 com/groom/bean/SubjectAnalysisBean:setMaths_rank (I)V
/* */ // 333: aload 8
/* */ // 335: aload 7
/* */ // 337: ldc_w 666
/* */ // 340: invokeinterface 78 2 0
/* */ // 345: invokevirtual 668 com/groom/bean/SubjectAnalysisBean:setPhysics_rank (I)V
/* */ // 348: aload 8
/* */ // 350: aload 7
/* */ // 352: ldc_w 671
/* */ // 355: invokeinterface 78 2 0
/* */ // 360: invokevirtual 673 com/groom/bean/SubjectAnalysisBean:setChemistry_rank (I)V
/* */ // 363: aload 8
/* */ // 365: aload 7
/* */ // 367: ldc_w 549
/* */ // 370: invokeinterface 78 2 0
/* */ // 375: invokevirtual 676 com/groom/bean/SubjectAnalysisBean:setTotal_ranks (I)V
/* */ // 378: aload 7
/* */ // 380: ldc_w 661
/* */ // 383: invokeinterface 78 2 0
/* */ // 388: i2d
/* */ // 389: aload 7
/* */ // 391: ldc_w 549
/* */ // 394: invokeinterface 78 2 0
/* */ // 399: i2d
/* */ // 400: ddiv
/* */ // 401: dstore 10
/* */ // 403: aload 7
/* */ // 405: ldc_w 666
/* */ // 408: invokeinterface 78 2 0
/* */ // 413: i2d
/* */ // 414: aload 7
/* */ // 416: ldc_w 549
/* */ // 419: invokeinterface 78 2 0
/* */ // 424: i2d
/* */ // 425: ddiv
/* */ // 426: dstore 12
/* */ // 428: aload 7
/* */ // 430: ldc_w 671
/* */ // 433: invokeinterface 78 2 0
/* */ // 438: i2d
/* */ // 439: aload 7
/* */ // 441: ldc_w 549
/* */ // 444: invokeinterface 78 2 0
/* */ // 449: i2d
/* */ // 450: ddiv
/* */ // 451: dstore 14
/* */ // 453: new 554 java/text/DecimalFormat
/* */ // 456: dup
/* */ // 457: ldc_w 556
/* */ // 460: invokespecial 558 java/text/DecimalFormat:<init> (Ljava/lang/String;)V
/* */ // 463: astore 16
/* */ // 465: aload 8
/* */ // 467: aload 16
/* */ // 469: ldc2_w 559
/* */ // 472: dload 10
/* */ // 474: ldc2_w 559
/* */ // 477: dmul
/* */ // 478: dsub
/* */ // 479: invokevirtual 561 java/text/DecimalFormat:format (D)Ljava/lang/String;
/* */ // 482: invokestatic 564 java/lang/Double:parseDouble (Ljava/lang/String;)D
/* */ // 485: invokevirtual 677 com/groom/bean/SubjectAnalysisBean:setMaths_percentile (D)V
/* */ // 488: aload 8
/* */ // 490: aload 16
/* */ // 492: ldc2_w 559
/* */ // 495: dload 12
/* */ // 497: ldc2_w 559
/* */ // 500: dmul
/* */ // 501: dsub
/* */ // 502: invokevirtual 561 java/text/DecimalFormat:format (D)Ljava/lang/String;
/* */ // 505: invokestatic 564 java/lang/Double:parseDouble (Ljava/lang/String;)D
/* */ // 508: invokevirtual 680 com/groom/bean/SubjectAnalysisBean:setPhysics_percentile (D)V
/* */ // 511: aload 8
/* */ // 513: aload 16
/* */ // 515: ldc2_w 559
/* */ // 518: dload 14
/* */ // 520: ldc2_w 559
/* */ // 523: dmul
/* */ // 524: dsub
/* */ // 525: invokevirtual 561 java/text/DecimalFormat:format (D)Ljava/lang/String;
/* */ // 528: invokestatic 564 java/lang/Double:parseDouble (Ljava/lang/String;)D
/* */ // 531: invokevirtual 683 com/groom/bean/SubjectAnalysisBean:setChemistry_percentile (D)V
/* */ // 534: aload 7
/* */ // 536: invokeinterface 158 1 0
/* */ // 541: ifne -313 -> 228
/* */ // 544: goto +90 -> 634
/* */ // 547: astore 9
/* */ // 549: aload 9
/* */ // 551: invokevirtual 162 java/sql/SQLException:printStackTrace ()V
/* */ // 554: aload 7
/* */ // 556: ifnull +10 -> 566
/* */ // 559: aload 7
/* */ // 561: invokeinterface 165 1 0
/* */ // 566: aload 6
/* */ // 568: ifnull +10 -> 578
/* */ // 571: aload 6
/* */ // 573: invokeinterface 168 1 0
/* */ // 578: aload 5
/* */ // 580: ifnull +90 -> 670
/* */ // 583: aload 5
/* */ // 585: invokeinterface 169 1 0
/* */ // 590: goto +80 -> 670
/* */ // 593: astore 17
/* */ // 595: aload 7
/* */ // 597: ifnull +10 -> 607
/* */ // 600: aload 7
/* */ // 602: invokeinterface 165 1 0
/* */ // 607: aload 6
/* */ // 609: ifnull +10 -> 619
/* */ // 612: aload 6
/* */ // 614: invokeinterface 168 1 0
/* */ // 619: aload 5
/* */ // 621: ifnull +10 -> 631
/* */ // 624: aload 5
/* */ // 626: invokeinterface 169 1 0
/* */ // 631: aload 17
/* */ // 633: athrow
/* */ // 634: aload 7
/* */ // 636: ifnull +10 -> 646
/* */ // 639: aload 7
/* */ // 641: invokeinterface 165 1 0
/* */ // 646: aload 6
/* */ // 648: ifnull +10 -> 658
/* */ // 651: aload 6
/* */ // 653: invokeinterface 168 1 0
/* */ // 658: aload 5
/* */ // 660: ifnull +10 -> 670
/* */ // 663: aload 5
/* */ // 665: invokeinterface 169 1 0
/* */ // 670: aload 8
/* */ // 672: areturn
/* */ // Line number table:
/* */ // Java source line #640 -> byte code offset #0
/* */ // Java source line #641 -> byte code offset #10
/* */ // Java source line #642 -> byte code offset #13
/* */ // Java source line #643 -> byte code offset #16
/* */ // Java source line #646 -> byte code offset #25
/* */ // Java source line #647 -> byte code offset #35
/* */ // Java source line #648 -> byte code offset #45
/* */ // Java source line #649 -> byte code offset #61
/* */ // Java source line #650 -> byte code offset #77
/* */ // Java source line #646 -> byte code offset #93
/* */ // Java source line #652 -> byte code offset #98
/* */ // Java source line #653 -> byte code offset #106
/* */ // Java source line #654 -> byte code offset #117
/* */ // Java source line #655 -> byte code offset #127
/* */ // Java source line #656 -> byte code offset #136
/* */ // Java source line #657 -> byte code offset #146
/* */ // Java source line #658 -> byte code offset #155
/* */ // Java source line #659 -> byte code offset #165
/* */ // Java source line #660 -> byte code offset #175
/* */ // Java source line #661 -> byte code offset #186
/* */ // Java source line #662 -> byte code offset #196
/* */ // Java source line #663 -> byte code offset #206
/* */ // Java source line #664 -> byte code offset #216
/* */ // Java source line #665 -> byte code offset #225
/* */ // Java source line #666 -> byte code offset #228
/* */ // Java source line #667 -> byte code offset #243
/* */ // Java source line #668 -> byte code offset #258
/* */ // Java source line #669 -> byte code offset #273
/* */ // Java source line #670 -> byte code offset #288
/* */ // Java source line #671 -> byte code offset #303
/* */ // Java source line #672 -> byte code offset #318
/* */ // Java source line #673 -> byte code offset #333
/* */ // Java source line #674 -> byte code offset #348
/* */ // Java source line #675 -> byte code offset #363
/* */ // Java source line #676 -> byte code offset #378
/* */ // Java source line #677 -> byte code offset #403
/* */ // Java source line #678 -> byte code offset #428
/* */ // Java source line #679 -> byte code offset #453
/* */ // Java source line #680 -> byte code offset #465
/* */ // Java source line #681 -> byte code offset #488
/* */ // Java source line #682 -> byte code offset #511
/* */ // Java source line #665 -> byte code offset #534
/* */ // Java source line #688 -> byte code offset #544
/* */ // Java source line #689 -> byte code offset #549
/* */ // Java source line #691 -> byte code offset #554
/* */ // Java source line #692 -> byte code offset #559
/* */ // Java source line #693 -> byte code offset #566
/* */ // Java source line #694 -> byte code offset #571
/* */ // Java source line #695 -> byte code offset #578
/* */ // Java source line #696 -> byte code offset #583
/* */ // Java source line #690 -> byte code offset #593
/* */ // Java source line #691 -> byte code offset #595
/* */ // Java source line #692 -> byte code offset #600
/* */ // Java source line #693 -> byte code offset #607
/* */ // Java source line #694 -> byte code offset #612
/* */ // Java source line #695 -> byte code offset #619
/* */ // Java source line #696 -> byte code offset #624
/* */ // Java source line #697 -> byte code offset #631
/* */ // Java source line #691 -> byte code offset #634
/* */ // Java source line #692 -> byte code offset #639
/* */ // Java source line #693 -> byte code offset #646
/* */ // Java source line #694 -> byte code offset #651
/* */ // Java source line #695 -> byte code offset #658
/* */ // Java source line #696 -> byte code offset #663
/* */ // Java source line #698 -> byte code offset #670
/* */ // Local variable table:
/* */ // start length slot name signature
/* */ // 0 673 0 this QuizDAOImpl
/* */ // 0 673 1 user_id int
/* */ // 0 673 2 standard int
/* */ // 0 673 3 locationType String
/* */ // 0 673 4 location String
/* */ // 8 656 5 connection Connection
/* */ // 11 641 6 preparedStatement PreparedStatement
/* */ // 14 626 7 resultSet ResultSet
/* */ // 23 648 8 analysisBean com.groom.bean.SubjectAnalysisBean
/* */ // 96 13 9 query String
/* */ // 547 3 9 exception SQLException
/* */ // 401 72 10 mathsRank double
/* */ // 426 70 12 physicsRank double
/* */ // 451 68 14 chemistryRank double
/* */ // 463 51 16 noOfDecimals java.text.DecimalFormat
/* */ // 593 39 17 localObject Object
/* */ // Exception table:
/* */ // from to target type
/* */ // 25 544 547 java/sql/SQLException
/* */ // 25 554 593 finally
/* */ }
/* */
/* */ /* Error */
/* */ public List<com.groom.bean.TestsTopicList> getTestTopicsByCategory(int userid, String category, int division, int test_category_id)
/* */ throws SQLException
/* */ {
/* */ // Byte code:
/* */ // 0: getstatic 23 com/groom/dao/impl/QuizDAOImpl:ds Ljavax/sql/DataSource;
/* */ // 3: invokeinterface 27 1 0
/* */ // 8: astore 5
/* */ // 10: aconst_null
/* */ // 11: astore 6
/* */ // 13: aconst_null
/* */ // 14: astore 7
/* */ // 16: new 33 java/util/ArrayList
/* */ // 19: dup
/* */ // 20: invokespecial 35 java/util/ArrayList:<init> ()V
/* */ // 23: astore 8
/* */ // 25: new 36 java/lang/StringBuilder
/* */ // 28: dup
/* */ // 29: ldc_w 710
/* */ // 32: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 35: invokestatic 279 com/groom/util/GroomUtil:getCurrentDate ()Ljava/sql/Date;
/* */ // 38: invokevirtual 290 java/lang/StringBuilder:append (Ljava/lang/Object;)Ljava/lang/StringBuilder;
/* */ // 41: ldc_w 712
/* */ // 44: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 47: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 50: astore 9
/* */ // 52: aload 5
/* */ // 54: aload 9
/* */ // 56: invokeinterface 57 2 0
/* */ // 61: astore 6
/* */ // 63: aload 6
/* */ // 65: iconst_1
/* */ // 66: iload_3
/* */ // 67: invokeinterface 63 3 0
/* */ // 72: aload 6
/* */ // 74: iconst_2
/* */ // 75: iload 4
/* */ // 77: invokeinterface 63 3 0
/* */ // 82: aload 6
/* */ // 84: invokeinterface 69 1 0
/* */ // 89: astore 7
/* */ // 91: new 295 java/util/Date
/* */ // 94: dup
/* */ // 95: invokestatic 279 com/groom/util/GroomUtil:getCurrentDate ()Ljava/sql/Date;
/* */ // 98: invokevirtual 297 java/sql/Date:getTime ()J
/* */ // 101: invokespecial 302 java/util/Date:<init> (J)V
/* */ // 104: astore 10
/* */ // 106: new 305 java/text/SimpleDateFormat
/* */ // 109: dup
/* */ // 110: ldc_w 307
/* */ // 113: invokespecial 309 java/text/SimpleDateFormat:<init> (Ljava/lang/String;)V
/* */ // 116: astore 11
/* */ // 118: aload 11
/* */ // 120: aload 11
/* */ // 122: aload 10
/* */ // 124: invokevirtual 310 java/text/SimpleDateFormat:format (Ljava/util/Date;)Ljava/lang/String;
/* */ // 127: invokevirtual 314 java/text/SimpleDateFormat:parse (Ljava/lang/String;)Ljava/util/Date;
/* */ // 130: astore 10
/* */ // 132: goto +274 -> 406
/* */ // 135: new 318 com/groom/bean/TestsTopicList
/* */ // 138: dup
/* */ // 139: invokespecial 320 com/groom/bean/TestsTopicList:<init> ()V
/* */ // 142: astore 12
/* */ // 144: aload 12
/* */ // 146: aload 7
/* */ // 148: ldc 122
/* */ // 150: invokeinterface 78 2 0
/* */ // 155: invokevirtual 321 com/groom/bean/TestsTopicList:setTopicId (I)V
/* */ // 158: aload 12
/* */ // 160: aload 7
/* */ // 162: ldc_w 324
/* */ // 165: invokeinterface 90 2 0
/* */ // 170: invokevirtual 326 com/groom/bean/TestsTopicList:setTopicName (Ljava/lang/String;)V
/* */ // 173: aload 12
/* */ // 175: aload 7
/* */ // 177: ldc_w 329
/* */ // 180: invokeinterface 78 2 0
/* */ // 185: invokevirtual 331 com/groom/bean/TestsTopicList:setTopicClass (I)V
/* */ // 188: aload 12
/* */ // 190: aload 7
/* */ // 192: ldc_w 334
/* */ // 195: invokeinterface 336 2 0
/* */ // 200: invokevirtual 340 java/sql/Date:toString ()Ljava/lang/String;
/* */ // 203: invokevirtual 341 com/groom/bean/TestsTopicList:setTestDate (Ljava/lang/String;)V
/* */ // 206: new 295 java/util/Date
/* */ // 209: dup
/* */ // 210: aload 7
/* */ // 212: ldc_w 334
/* */ // 215: invokeinterface 336 2 0
/* */ // 220: invokevirtual 297 java/sql/Date:getTime ()J
/* */ // 223: invokespecial 302 java/util/Date:<init> (J)V
/* */ // 226: astore 13
/* */ // 228: aload 11
/* */ // 230: aload 11
/* */ // 232: aload 13
/* */ // 234: invokevirtual 310 java/text/SimpleDateFormat:format (Ljava/util/Date;)Ljava/lang/String;
/* */ // 237: invokevirtual 314 java/text/SimpleDateFormat:parse (Ljava/lang/String;)Ljava/util/Date;
/* */ // 240: astore 13
/* */ // 242: aload 13
/* */ // 244: aload 10
/* */ // 246: invokevirtual 344 java/util/Date:compareTo (Ljava/util/Date;)I
/* */ // 249: ifgt +13 -> 262
/* */ // 252: aload 13
/* */ // 254: aload 10
/* */ // 256: invokevirtual 344 java/util/Date:compareTo (Ljava/util/Date;)I
/* */ // 259: ifne +14 -> 273
/* */ // 262: aload 12
/* */ // 264: ldc_w 348
/* */ // 267: invokevirtual 350 com/groom/bean/TestsTopicList:setIsKeyAndResultAvailable (Ljava/lang/String;)V
/* */ // 270: goto +11 -> 281
/* */ // 273: aload 12
/* */ // 275: ldc_w 353
/* */ // 278: invokevirtual 350 com/groom/bean/TestsTopicList:setIsKeyAndResultAvailable (Ljava/lang/String;)V
/* */ // 281: new 36 java/lang/StringBuilder
/* */ // 284: dup
/* */ // 285: ldc_w 275
/* */ // 288: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 291: aload_2
/* */ // 292: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 295: ldc_w 355
/* */ // 298: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 301: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 304: astore 14
/* */ // 306: aload 5
/* */ // 308: aload 14
/* */ // 310: invokeinterface 57 2 0
/* */ // 315: astore 6
/* */ // 317: aload 6
/* */ // 319: iconst_1
/* */ // 320: iload_1
/* */ // 321: invokeinterface 63 3 0
/* */ // 326: aload 6
/* */ // 328: iconst_2
/* */ // 329: aload 7
/* */ // 331: ldc 122
/* */ // 333: invokeinterface 78 2 0
/* */ // 338: invokeinterface 63 3 0
/* */ // 343: aload 6
/* */ // 345: invokeinterface 69 1 0
/* */ // 350: astore 15
/* */ // 352: aload 15
/* */ // 354: invokeinterface 158 1 0
/* */ // 359: ifeq +29 -> 388
/* */ // 362: aload 12
/* */ // 364: ldc_w 353
/* */ // 367: invokevirtual 357 com/groom/bean/TestsTopicList:setIsStudentAttempted (Ljava/lang/String;)V
/* */ // 370: aload 12
/* */ // 372: aload 15
/* */ // 374: ldc_w 360
/* */ // 377: invokeinterface 90 2 0
/* */ // 382: invokevirtual 362 com/groom/bean/TestsTopicList:setQuestionIdsList (Ljava/lang/String;)V
/* */ // 385: goto +11 -> 396
/* */ // 388: aload 12
/* */ // 390: ldc_w 348
/* */ // 393: invokevirtual 357 com/groom/bean/TestsTopicList:setIsStudentAttempted (Ljava/lang/String;)V
/* */ // 396: aload 8
/* */ // 398: aload 12
/* */ // 400: invokeinterface 152 2 0
/* */ // 405: pop
/* */ // 406: aload 7
/* */ // 408: invokeinterface 158 1 0
/* */ // 413: ifne -278 -> 135
/* */ // 416: goto +136 -> 552
/* */ // 419: astore 9
/* */ // 421: aload 9
/* */ // 423: invokevirtual 162 java/sql/SQLException:printStackTrace ()V
/* */ // 426: aload 7
/* */ // 428: ifnull +10 -> 438
/* */ // 431: aload 7
/* */ // 433: invokeinterface 165 1 0
/* */ // 438: aload 6
/* */ // 440: ifnull +10 -> 450
/* */ // 443: aload 6
/* */ // 445: invokeinterface 168 1 0
/* */ // 450: aload 5
/* */ // 452: ifnull +136 -> 588
/* */ // 455: aload 5
/* */ // 457: invokeinterface 169 1 0
/* */ // 462: goto +126 -> 588
/* */ // 465: astore 9
/* */ // 467: aload 9
/* */ // 469: invokevirtual 365 java/text/ParseException:printStackTrace ()V
/* */ // 472: aload 7
/* */ // 474: ifnull +10 -> 484
/* */ // 477: aload 7
/* */ // 479: invokeinterface 165 1 0
/* */ // 484: aload 6
/* */ // 486: ifnull +10 -> 496
/* */ // 489: aload 6
/* */ // 491: invokeinterface 168 1 0
/* */ // 496: aload 5
/* */ // 498: ifnull +90 -> 588
/* */ // 501: aload 5
/* */ // 503: invokeinterface 169 1 0
/* */ // 508: goto +80 -> 588
/* */ // 511: astore 16
/* */ // 513: aload 7
/* */ // 515: ifnull +10 -> 525
/* */ // 518: aload 7
/* */ // 520: invokeinterface 165 1 0
/* */ // 525: aload 6
/* */ // 527: ifnull +10 -> 537
/* */ // 530: aload 6
/* */ // 532: invokeinterface 168 1 0
/* */ // 537: aload 5
/* */ // 539: ifnull +10 -> 549
/* */ // 542: aload 5
/* */ // 544: invokeinterface 169 1 0
/* */ // 549: aload 16
/* */ // 551: athrow
/* */ // 552: aload 7
/* */ // 554: ifnull +10 -> 564
/* */ // 557: aload 7
/* */ // 559: invokeinterface 165 1 0
/* */ // 564: aload 6
/* */ // 566: ifnull +10 -> 576
/* */ // 569: aload 6
/* */ // 571: invokeinterface 168 1 0
/* */ // 576: aload 5
/* */ // 578: ifnull +10 -> 588
/* */ // 581: aload 5
/* */ // 583: invokeinterface 169 1 0
/* */ // 588: aload 8
/* */ // 590: areturn
/* */ // Line number table:
/* */ // Java source line #704 -> byte code offset #0
/* */ // Java source line #705 -> byte code offset #10
/* */ // Java source line #706 -> byte code offset #13
/* */ // Java source line #707 -> byte code offset #16
/* */ // Java source line #710 -> byte code offset #25
/* */ // Java source line #711 -> byte code offset #35
/* */ // Java source line #710 -> byte code offset #47
/* */ // Java source line #713 -> byte code offset #52
/* */ // Java source line #714 -> byte code offset #63
/* */ // Java source line #715 -> byte code offset #72
/* */ // Java source line #716 -> byte code offset #82
/* */ // Java source line #718 -> byte code offset #91
/* */ // Java source line #719 -> byte code offset #95
/* */ // Java source line #718 -> byte code offset #101
/* */ // Java source line #720 -> byte code offset #106
/* */ // Java source line #721 -> byte code offset #118
/* */ // Java source line #722 -> byte code offset #132
/* */ // Java source line #724 -> byte code offset #135
/* */ // Java source line #725 -> byte code offset #144
/* */ // Java source line #726 -> byte code offset #158
/* */ // Java source line #727 -> byte code offset #173
/* */ // Java source line #728 -> byte code offset #188
/* */ // Java source line #730 -> byte code offset #206
/* */ // Java source line #731 -> byte code offset #212
/* */ // Java source line #730 -> byte code offset #215
/* */ // Java source line #731 -> byte code offset #220
/* */ // Java source line #730 -> byte code offset #223
/* */ // Java source line #732 -> byte code offset #228
/* */ // Java source line #738 -> byte code offset #242
/* */ // Java source line #739 -> byte code offset #252
/* */ // Java source line #740 -> byte code offset #262
/* */ // Java source line #741 -> byte code offset #270
/* */ // Java source line #742 -> byte code offset #273
/* */ // Java source line #743 -> byte code offset #281
/* */ // Java source line #744 -> byte code offset #295
/* */ // Java source line #743 -> byte code offset #301
/* */ // Java source line #745 -> byte code offset #306
/* */ // Java source line #746 -> byte code offset #317
/* */ // Java source line #747 -> byte code offset #326
/* */ // Java source line #748 -> byte code offset #343
/* */ // Java source line #749 -> byte code offset #345
/* */ // Java source line #748 -> byte code offset #350
/* */ // Java source line #750 -> byte code offset #352
/* */ // Java source line #751 -> byte code offset #362
/* */ // Java source line #752 -> byte code offset #370
/* */ // Java source line #753 -> byte code offset #374
/* */ // Java source line #752 -> byte code offset #382
/* */ // Java source line #754 -> byte code offset #385
/* */ // Java source line #755 -> byte code offset #388
/* */ // Java source line #757 -> byte code offset #396
/* */ // Java source line #722 -> byte code offset #406
/* */ // Java source line #760 -> byte code offset #416
/* */ // Java source line #761 -> byte code offset #421
/* */ // Java source line #767 -> byte code offset #426
/* */ // Java source line #768 -> byte code offset #431
/* */ // Java source line #769 -> byte code offset #438
/* */ // Java source line #770 -> byte code offset #443
/* */ // Java source line #771 -> byte code offset #450
/* */ // Java source line #772 -> byte code offset #455
/* */ // Java source line #762 -> byte code offset #465
/* */ // Java source line #763 -> byte code offset #467
/* */ // Java source line #767 -> byte code offset #472
/* */ // Java source line #768 -> byte code offset #477
/* */ // Java source line #769 -> byte code offset #484
/* */ // Java source line #770 -> byte code offset #489
/* */ // Java source line #771 -> byte code offset #496
/* */ // Java source line #772 -> byte code offset #501
/* */ // Java source line #766 -> byte code offset #511
/* */ // Java source line #767 -> byte code offset #513
/* */ // Java source line #768 -> byte code offset #518
/* */ // Java source line #769 -> byte code offset #525
/* */ // Java source line #770 -> byte code offset #530
/* */ // Java source line #771 -> byte code offset #537
/* */ // Java source line #772 -> byte code offset #542
/* */ // Java source line #773 -> byte code offset #549
/* */ // Java source line #767 -> byte code offset #552
/* */ // Java source line #768 -> byte code offset #557
/* */ // Java source line #769 -> byte code offset #564
/* */ // Java source line #770 -> byte code offset #569
/* */ // Java source line #771 -> byte code offset #576
/* */ // Java source line #772 -> byte code offset #581
/* */ // Java source line #775 -> byte code offset #588
/* */ // Local variable table:
/* */ // start length slot name signature
/* */ // 0 591 0 this QuizDAOImpl
/* */ // 0 591 1 userid int
/* */ // 0 591 2 category String
/* */ // 0 591 3 division int
/* */ // 0 591 4 test_category_id int
/* */ // 8 574 5 connection Connection
/* */ // 11 559 6 preparedStatement PreparedStatement
/* */ // 14 544 7 resultSet ResultSet
/* */ // 23 566 8 topicLists List<com.groom.bean.TestsTopicList>
/* */ // 50 5 9 query String
/* */ // 419 3 9 exception SQLException
/* */ // 465 3 9 exception java.text.ParseException
/* */ // 104 151 10 currentDate java.util.Date
/* */ // 116 115 11 dateFormat java.text.SimpleDateFormat
/* */ // 142 257 12 topic com.groom.bean.TestsTopicList
/* */ // 226 27 13 testDate java.util.Date
/* */ // 304 5 14 pointsQuery String
/* */ // 350 23 15 userPointsResultSet ResultSet
/* */ // 511 39 16 localObject Object
/* */ // Exception table:
/* */ // from to target type
/* */ // 25 416 419 java/sql/SQLException
/* */ // 25 416 465 java/text/ParseException
/* */ // 25 426 511 finally
/* */ // 465 472 511 finally
/* */ }
/* */
/* */ /* Error */
/* */ public List<com.groom.bean.TestsTopicList> getTestTopicsByBoard(int userid, String category, int standard, int division)
/* */ throws SQLException
/* */ {
/* */ // Byte code:
/* */ // 0: getstatic 23 com/groom/dao/impl/QuizDAOImpl:ds Ljavax/sql/DataSource;
/* */ // 3: invokeinterface 27 1 0
/* */ // 8: astore 5
/* */ // 10: aconst_null
/* */ // 11: astore 6
/* */ // 13: aconst_null
/* */ // 14: astore 7
/* */ // 16: aload_2
/* */ // 17: astore 8
/* */ // 19: new 33 java/util/ArrayList
/* */ // 22: dup
/* */ // 23: invokespecial 35 java/util/ArrayList:<init> ()V
/* */ // 26: astore 9
/* */ // 28: new 36 java/lang/StringBuilder
/* */ // 31: dup
/* */ // 32: ldc_w 275
/* */ // 35: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 38: aload_2
/* */ // 39: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 42: ldc_w 288
/* */ // 45: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 48: invokestatic 279 com/groom/util/GroomUtil:getCurrentDate ()Ljava/sql/Date;
/* */ // 51: invokevirtual 290 java/lang/StringBuilder:append (Ljava/lang/Object;)Ljava/lang/StringBuilder;
/* */ // 54: ldc_w 712
/* */ // 57: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 60: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 63: astore 10
/* */ // 65: aload 5
/* */ // 67: aload 10
/* */ // 69: invokeinterface 57 2 0
/* */ // 74: astore 6
/* */ // 76: aload 6
/* */ // 78: iconst_1
/* */ // 79: iload_3
/* */ // 80: invokeinterface 63 3 0
/* */ // 85: aload 6
/* */ // 87: iconst_2
/* */ // 88: iload 4
/* */ // 90: invokeinterface 63 3 0
/* */ // 95: aload 8
/* */ // 97: ldc_w 716
/* */ // 100: invokevirtual 718 java/lang/String:equalsIgnoreCase (Ljava/lang/String;)Z
/* */ // 103: ifeq +12 -> 115
/* */ // 106: aload 6
/* */ // 108: iconst_3
/* */ // 109: iconst_4
/* */ // 110: invokeinterface 63 3 0
/* */ // 115: aload 8
/* */ // 117: ldc_w 721
/* */ // 120: invokevirtual 718 java/lang/String:equalsIgnoreCase (Ljava/lang/String;)Z
/* */ // 123: ifeq +13 -> 136
/* */ // 126: aload 6
/* */ // 128: iconst_3
/* */ // 129: bipush 8
/* */ // 131: invokeinterface 63 3 0
/* */ // 136: aload 8
/* */ // 138: ldc_w 723
/* */ // 141: invokevirtual 718 java/lang/String:equalsIgnoreCase (Ljava/lang/String;)Z
/* */ // 144: ifeq +13 -> 157
/* */ // 147: aload 6
/* */ // 149: iconst_3
/* */ // 150: bipush 9
/* */ // 152: invokeinterface 63 3 0
/* */ // 157: aload 6
/* */ // 159: invokeinterface 69 1 0
/* */ // 164: astore 7
/* */ // 166: new 295 java/util/Date
/* */ // 169: dup
/* */ // 170: invokestatic 279 com/groom/util/GroomUtil:getCurrentDate ()Ljava/sql/Date;
/* */ // 173: invokevirtual 297 java/sql/Date:getTime ()J
/* */ // 176: invokespecial 302 java/util/Date:<init> (J)V
/* */ // 179: astore 11
/* */ // 181: new 305 java/text/SimpleDateFormat
/* */ // 184: dup
/* */ // 185: ldc_w 307
/* */ // 188: invokespecial 309 java/text/SimpleDateFormat:<init> (Ljava/lang/String;)V
/* */ // 191: astore 12
/* */ // 193: aload 12
/* */ // 195: aload 12
/* */ // 197: aload 11
/* */ // 199: invokevirtual 310 java/text/SimpleDateFormat:format (Ljava/util/Date;)Ljava/lang/String;
/* */ // 202: invokevirtual 314 java/text/SimpleDateFormat:parse (Ljava/lang/String;)Ljava/util/Date;
/* */ // 205: astore 11
/* */ // 207: goto +274 -> 481
/* */ // 210: new 318 com/groom/bean/TestsTopicList
/* */ // 213: dup
/* */ // 214: invokespecial 320 com/groom/bean/TestsTopicList:<init> ()V
/* */ // 217: astore 13
/* */ // 219: aload 13
/* */ // 221: aload 7
/* */ // 223: ldc 122
/* */ // 225: invokeinterface 78 2 0
/* */ // 230: invokevirtual 321 com/groom/bean/TestsTopicList:setTopicId (I)V
/* */ // 233: aload 13
/* */ // 235: aload 7
/* */ // 237: ldc_w 324
/* */ // 240: invokeinterface 90 2 0
/* */ // 245: invokevirtual 326 com/groom/bean/TestsTopicList:setTopicName (Ljava/lang/String;)V
/* */ // 248: aload 13
/* */ // 250: aload 7
/* */ // 252: ldc_w 329
/* */ // 255: invokeinterface 78 2 0
/* */ // 260: invokevirtual 331 com/groom/bean/TestsTopicList:setTopicClass (I)V
/* */ // 263: aload 13
/* */ // 265: aload 7
/* */ // 267: ldc_w 334
/* */ // 270: invokeinterface 336 2 0
/* */ // 275: invokevirtual 340 java/sql/Date:toString ()Ljava/lang/String;
/* */ // 278: invokevirtual 341 com/groom/bean/TestsTopicList:setTestDate (Ljava/lang/String;)V
/* */ // 281: new 295 java/util/Date
/* */ // 284: dup
/* */ // 285: aload 7
/* */ // 287: ldc_w 334
/* */ // 290: invokeinterface 336 2 0
/* */ // 295: invokevirtual 297 java/sql/Date:getTime ()J
/* */ // 298: invokespecial 302 java/util/Date:<init> (J)V
/* */ // 301: astore 14
/* */ // 303: aload 12
/* */ // 305: aload 12
/* */ // 307: aload 14
/* */ // 309: invokevirtual 310 java/text/SimpleDateFormat:format (Ljava/util/Date;)Ljava/lang/String;
/* */ // 312: invokevirtual 314 java/text/SimpleDateFormat:parse (Ljava/lang/String;)Ljava/util/Date;
/* */ // 315: astore 14
/* */ // 317: aload 14
/* */ // 319: aload 11
/* */ // 321: invokevirtual 344 java/util/Date:compareTo (Ljava/util/Date;)I
/* */ // 324: ifgt +13 -> 337
/* */ // 327: aload 14
/* */ // 329: aload 11
/* */ // 331: invokevirtual 344 java/util/Date:compareTo (Ljava/util/Date;)I
/* */ // 334: ifne +14 -> 348
/* */ // 337: aload 13
/* */ // 339: ldc_w 348
/* */ // 342: invokevirtual 350 com/groom/bean/TestsTopicList:setIsKeyAndResultAvailable (Ljava/lang/String;)V
/* */ // 345: goto +11 -> 356
/* */ // 348: aload 13
/* */ // 350: ldc_w 353
/* */ // 353: invokevirtual 350 com/groom/bean/TestsTopicList:setIsKeyAndResultAvailable (Ljava/lang/String;)V
/* */ // 356: new 36 java/lang/StringBuilder
/* */ // 359: dup
/* */ // 360: ldc_w 275
/* */ // 363: invokespecial 40 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
/* */ // 366: aload_2
/* */ // 367: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 370: ldc_w 355
/* */ // 373: invokevirtual 43 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 376: invokevirtual 53 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 379: astore 15
/* */ // 381: aload 5
/* */ // 383: aload 15
/* */ // 385: invokeinterface 57 2 0
/* */ // 390: astore 6
/* */ // 392: aload 6
/* */ // 394: iconst_1
/* */ // 395: iload_1
/* */ // 396: invokeinterface 63 3 0
/* */ // 401: aload 6
/* */ // 403: iconst_2
/* */ // 404: aload 7
/* */ // 406: ldc 122
/* */ // 408: invokeinterface 78 2 0
/* */ // 413: invokeinterface 63 3 0
/* */ // 418: aload 6
/* */ // 420: invokeinterface 69 1 0
/* */ // 425: astore 16
/* */ // 427: aload 16
/* */ // 429: invokeinterface 158 1 0
/* */ // 434: ifeq +29 -> 463
/* */ // 437: aload 13
/* */ // 439: ldc_w 353
/* */ // 442: invokevirtual 357 com/groom/bean/TestsTopicList:setIsStudentAttempted (Ljava/lang/String;)V
/* */ // 445: aload 13
/* */ // 447: aload 16
/* */ // 449: ldc_w 360
/* */ // 452: invokeinterface 90 2 0
/* */ // 457: invokevirtual 362 com/groom/bean/TestsTopicList:setQuestionIdsList (Ljava/lang/String;)V
/* */ // 460: goto +11 -> 471
/* */ // 463: aload 13
/* */ // 465: ldc_w 348
/* */ // 468: invokevirtual 357 com/groom/bean/TestsTopicList:setIsStudentAttempted (Ljava/lang/String;)V
/* */ // 471: aload 9
/* */ // 473: aload 13
/* */ // 475: invokeinterface 152 2 0
/* */ // 480: pop
/* */ // 481: aload 7
/* */ // 483: invokeinterface 158 1 0
/* */ // 488: ifne -278 -> 210
/* */ // 491: goto +136 -> 627
/* */ // 494: astore 10
/* */ // 496: aload 10
/* */ // 498: invokevirtual 162 java/sql/SQLException:printStackTrace ()V
/* */ // 501: aload 7
/* */ // 503: ifnull +10 -> 513
/* */ // 506: aload 7
/* */ // 508: invokeinterface 165 1 0
/* */ // 513: aload 6
/* */ // 515: ifnull +10 -> 525
/* */ // 518: aload 6
/* */ // 520: invokeinterface 168 1 0
/* */ // 525: aload 5
/* */ // 527: ifnull +136 -> 663
/* */ // 530: aload 5
/* */ // 532: invokeinterface 169 1 0
/* */ // 537: goto +126 -> 663
/* */ // 540: astore 10
/* */ // 542: aload 10
/* */ // 544: invokevirtual 365 java/text/ParseException:printStackTrace ()V
/* */ // 547: aload 7
/* */ // 549: ifnull +10 -> 559
/* */ // 552: aload 7
/* */ // 554: invokeinterface 165 1 0
/* */ // 559: aload 6
/* */ // 561: ifnull +10 -> 571
/* */ // 564: aload 6
/* */ // 566: invokeinterface 168 1 0
/* */ // 571: aload 5
/* */ // 573: ifnull +90 -> 663
/* */ // 576: aload 5
/* */ // 578: invokeinterface 169 1 0
/* */ // 583: goto +80 -> 663
/* */ // 586: astore 17
/* */ // 588: aload 7
/* */ // 590: ifnull +10 -> 600
/* */ // 593: aload 7
/* */ // 595: invokeinterface 165 1 0
/* */ // 600: aload 6
/* */ // 602: ifnull +10 -> 612
/* */ // 605: aload 6
/* */ // 607: invokeinterface 168 1 0
/* */ // 612: aload 5
/* */ // 614: ifnull +10 -> 624
/* */ // 617: aload 5
/* */ // 619: invokeinterface 169 1 0
/* */ // 624: aload 17
/* */ // 626: athrow
/* */ // 627: aload 7
/* */ // 629: ifnull +10 -> 639
/* */ // 632: aload 7
/* */ // 634: invokeinterface 165 1 0
/* */ // 639: aload 6
/* */ // 641: ifnull +10 -> 651
/* */ // 644: aload 6
/* */ // 646: invokeinterface 168 1 0
/* */ // 651: aload 5
/* */ // 653: ifnull +10 -> 663
/* */ // 656: aload 5
/* */ // 658: invokeinterface 169 1 0
/* */ // 663: aload 9
/* */ // 665: areturn
/* */ // Line number table:
/* */ // Java source line #781 -> byte code offset #0
/* */ // Java source line #782 -> byte code offset #10
/* */ // Java source line #783 -> byte code offset #13
/* */ // Java source line #784 -> byte code offset #16
/* */ // Java source line #785 -> byte code offset #19
/* */ // Java source line #788 -> byte code offset #28
/* */ // Java source line #789 -> byte code offset #42
/* */ // Java source line #790 -> byte code offset #48
/* */ // Java source line #788 -> byte code offset #60
/* */ // Java source line #792 -> byte code offset #65
/* */ // Java source line #793 -> byte code offset #76
/* */ // Java source line #794 -> byte code offset #85
/* */ // Java source line #796 -> byte code offset #95
/* */ // Java source line #797 -> byte code offset #106
/* */ // Java source line #799 -> byte code offset #115
/* */ // Java source line #800 -> byte code offset #126
/* */ // Java source line #802 -> byte code offset #136
/* */ // Java source line #803 -> byte code offset #147
/* */ // Java source line #806 -> byte code offset #157
/* */ // Java source line #808 -> byte code offset #166
/* */ // Java source line #809 -> byte code offset #170
/* */ // Java source line #808 -> byte code offset #176
/* */ // Java source line #810 -> byte code offset #181
/* */ // Java source line #811 -> byte code offset #193
/* */ // Java source line #812 -> byte code offset #207
/* */ // Java source line #814 -> byte code offset #210
/* */ // Java source line #815 -> byte code offset #219
/* */ // Java source line #816 -> byte code offset #233
/* */ // Java source line #817 -> byte code offset #248
/* */ // Java source line #818 -> byte code offset #263
/* */ // Java source line #820 -> byte code offset #281
/* */ // Java source line #821 -> byte code offset #287
/* */ // Java source line #820 -> byte code offset #290
/* */ // Java source line #821 -> byte code offset #295
/* */ // Java source line #820 -> byte code offset #298
/* */ // Java source line #822 -> byte code offset #303
/* */ // Java source line #828 -> byte code offset #317
/* */ // Java source line #829 -> byte code offset #327
/* */ // Java source line #830 -> byte code offset #337
/* */ // Java source line #831 -> byte code offset #345
/* */ // Java source line #832 -> byte code offset #348
/* */ // Java source line #833 -> byte code offset #356
/* */ // Java source line #834 -> byte code offset #370
/* */ // Java source line #833 -> byte code offset #376
/* */ // Java source line #835 -> byte code offset #381
/* */ // Java source line #836 -> byte code offset #392
/* */ // Java source line #837 -> byte code offset #401
/* */ // Java source line #838 -> byte code offset #418
/* */ // Java source line #839 -> byte code offset #420
/* */ // Java source line #838 -> byte code offset #425
/* */ // Java source line #840 -> byte code offset #427
/* */ // Java source line #841 -> byte code offset #437
/* */ // Java source line #842 -> byte code offset #445
/* */ // Java source line #843 -> byte code offset #449
/* */ // Java source line #842 -> byte code offset #457
/* */ // Java source line #844 -> byte code offset #460
/* */ // Java source line #845 -> byte code offset #463
/* */ // Java source line #847 -> byte code offset #471
/* */ // Java source line #812 -> byte code offset #481
/* */ // Java source line #850 -> byte code offset #491
/* */ // Java source line #851 -> byte code offset #496
/* */ // Java source line #857 -> byte code offset #501
/* */ // Java source line #858 -> byte code offset #506
/* */ // Java source line #859 -> byte code offset #513
/* */ // Java source line #860 -> byte code offset #518
/* */ // Java source line #861 -> byte code offset #525
/* */ // Java source line #862 -> byte code offset #530
/* */ // Java source line #852 -> byte code offset #540
/* */ // Java source line #853 -> byte code offset #542
/* */ // Java source line #857 -> byte code offset #547
/* */ // Java source line #858 -> byte code offset #552
/* */ // Java source line #859 -> byte code offset #559
/* */ // Java source line #860 -> byte code offset #564
/* */ // Java source line #861 -> byte code offset #571
/* */ // Java source line #862 -> byte code offset #576
/* */ // Java source line #856 -> byte code offset #586
/* */ // Java source line #857 -> byte code offset #588
/* */ // Java source line #858 -> byte code offset #593
/* */ // Java source line #859 -> byte code offset #600
/* */ // Java source line #860 -> byte code offset #605
/* */ // Java source line #861 -> byte code offset #612
/* */ // Java source line #862 -> byte code offset #617
/* */ // Java source line #863 -> byte code offset #624
/* */ // Java source line #857 -> byte code offset #627
/* */ // Java source line #858 -> byte code offset #632
/* */ // Java source line #859 -> byte code offset #639
/* */ // Java source line #860 -> byte code offset #644
/* */ // Java source line #861 -> byte code offset #651
/* */ // Java source line #862 -> byte code offset #656
/* */ // Java source line #865 -> byte code offset #663
/* */ // Local variable table:
/* */ // start length slot name signature
/* */ // 0 666 0 this QuizDAOImpl
/* */ // 0 666 1 userid int
/* */ // 0 666 2 category String
/* */ // 0 666 3 standard int
/* */ // 0 666 4 division int
/* */ // 8 649 5 connection Connection
/* */ // 11 634 6 preparedStatement PreparedStatement
/* */ // 14 619 7 resultSet ResultSet
/* */ // 17 120 8 subjectName String
/* */ // 26 638 9 topicLists List<com.groom.bean.TestsTopicList>
/* */ // 63 5 10 query String
/* */ // 494 3 10 exception SQLException
/* */ // 540 3 10 exception java.text.ParseException
/* */ // 179 151 11 currentDate java.util.Date
/* */ // 191 115 12 dateFormat java.text.SimpleDateFormat
/* */ // 217 257 13 topic com.groom.bean.TestsTopicList
/* */ // 301 27 14 testDate java.util.Date
/* */ // 379 5 15 pointsQuery String
/* */ // 425 23 16 userPointsResultSet ResultSet
/* */ // 586 39 17 localObject Object
/* */ // Exception table:
/* */ // from to target type
/* */ // 28 491 494 java/sql/SQLException
/* */ // 28 491 540 java/text/ParseException
/* */ // 28 501 586 finally
/* */ // 540 547 586 finally
/* */ }
/* */ }
/* Location: D:\New folder\WEB-INF\classes\com\groom.zip!\groom\dao\impl\QuizDAOImpl1.class
* Java compiler version: 7 (51.0)
* JD-Core Version: 0.7.1
*/ | [
"srikanthkoyyada@gmail.com"
] | srikanthkoyyada@gmail.com |
d17cce7baf5be22c76f588250f61d54d8b43136f | 333f031638b9357162730551f5fece29de26f58e | /app/src/main/java/com/kinth/football/bean/message/MatchKickOffNotificationPM.java | d3a296e16d3107a5d115b3c85db2930167b639cd | [] | no_license | Solaning/cloud-football | 19a21f0585989c639846f44bd30cdff8aff84f22 | 7e310daceb2694851c6a52c3a956a8bc4a7a3d2f | refs/heads/master | 2021-01-10T15:43:08.658612 | 2015-10-24T08:52:55 | 2015-10-24T08:52:55 | 44,853,394 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,180 | java | package com.kinth.football.bean.message;
import android.os.Parcel;
import android.os.Parcelable;
/**
* 比赛创建--消息体 pushMessage messageContent
* @author Sola
*
*/
public class MatchKickOffNotificationPM extends PushMessageAbstract<MatchCreatedMC>{
public static final Parcelable.Creator<MatchKickOffNotificationPM> CREATOR = new Parcelable.Creator<MatchKickOffNotificationPM>() {
@Override
public MatchKickOffNotificationPM createFromParcel(Parcel parcel) {
MatchKickOffNotificationPM matchCreatedPM = new MatchKickOffNotificationPM();
matchCreatedPM.type = parcel.readString();
matchCreatedPM.date = parcel.readLong();
matchCreatedPM.content = parcel.readParcelable(MatchCreatedMC.class.getClassLoader());
return matchCreatedPM;
}
@Override
public MatchKickOffNotificationPM[] newArray(int size) {
return new MatchKickOffNotificationPM[size];
}
};
@Override
public int describeContents() {
// TODO Auto-generated method stub
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.type);
dest.writeLong(this.date);
dest.writeParcelable(this.content, flags);
}
}
| [
"384276310@qq.com"
] | 384276310@qq.com |
45296690e22439e783f1f6183958f98da55c5049 | d52b66afb07047e9532155a888624aa05221e230 | /src/gui/DepartmentListController.java | 34567484057de4a9bcfc4176580b65d43e1e3dfc | [] | no_license | JNFernandes/workshop-javafx-jdbc | 474dc59bd7dc098a0cb5aeff886e9185015aac8c | 014a05067da8ebeddd08256e940c25143507945d | refs/heads/main | 2023-08-25T00:13:43.365655 | 2021-10-07T15:53:56 | 2021-10-07T15:53:56 | 414,218,294 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,208 | java | package gui;
import java.io.IOException;
import java.net.URL;
import java.util.List;
import java.util.Optional;
import java.util.ResourceBundle;
import application.Main;
import db.DbIntegrityException;
import gui.listeners.DataChangeListener;
import gui.util.Alerts;
import gui.util.Utils;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Scene;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.control.Button;
import javafx.scene.control.ButtonType;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.layout.Pane;
import javafx.stage.Modality;
import javafx.stage.Stage;
import model.entities.Department;
import model.services.DepartmentService;
public class DepartmentListController implements Initializable, DataChangeListener {
private DepartmentService service;
@FXML
private TableView<Department> tableViewDepartments;
@FXML
private TableColumn<Department, Integer> tableColumnId;
@FXML
private TableColumn<Department, String> tableColumnName;
@FXML
private TableColumn<Department, Department> tableColumnEDIT;
@FXML
private TableColumn<Department, Department> tableColumnREMOVE;
@FXML
private Button btNew;
private ObservableList<Department> obsList;
@FXML
public void onBtNewAction(ActionEvent event) {
Stage parentStage = Utils.currentStage(event);
Department obj = new Department();
createDialogForm(obj, "/gui/DepartmentForm.fxml", parentStage);
}
public void setDepartmentService(DepartmentService service) {
this.service = service;
}
@Override
public void initialize(URL url, ResourceBundle rb) {
initializeNodes();
}
private void initializeNodes() {
tableColumnId.setCellValueFactory(new PropertyValueFactory<>("id"));
tableColumnName.setCellValueFactory(new PropertyValueFactory<>("name"));
Stage stage = (Stage) Main.getMainScene().getWindow();
tableViewDepartments.prefHeightProperty().bind(stage.heightProperty()); // to get the full view on the window
}
public void updateTableView() {
if (service == null) {
throw new IllegalStateException("Service was null");
}
List<Department> list = service.findAll();
obsList = FXCollections.observableArrayList(list);
tableViewDepartments.setItems(obsList);
initEditButtons();
initRemoveButtons();
}
private void createDialogForm(Department obj, String absoluteName, Stage parentStage) {
try {
FXMLLoader loader = new FXMLLoader(getClass().getResource(absoluteName));
Pane pane = loader.load();
DepartmentFormController controller = loader.getController();
controller.setDepartment(obj);
controller.setDepartmentService(new DepartmentService());
controller.subscribeDataChangeListener(this);
controller.updateFormData();
Stage dialogStage = new Stage();
dialogStage.setTitle("Enter Department data");
dialogStage.setScene(new Scene(pane));
dialogStage.setResizable(false);
dialogStage.initOwner(parentStage);
dialogStage.initModality(Modality.WINDOW_MODAL);
dialogStage.showAndWait();
} catch (IOException e) {
e.printStackTrace();
Alerts.showAlert("IO Exception", "Error loading view", e.getMessage(), AlertType.ERROR);
}
}
@Override
public void onDataChanged() {
updateTableView();
}
private void initEditButtons() {
tableColumnEDIT.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(param.getValue()));
tableColumnEDIT.setCellFactory(param -> new TableCell<Department, Department>() {
private final Button button = new Button("edit");
@Override
protected void updateItem(Department obj, boolean empty) {
super.updateItem(obj, empty);
if (obj == null) {
setGraphic(null);
return;
}
setGraphic(button);
button.setOnAction(
event -> createDialogForm(obj, "/gui/DepartmentForm.fxml", Utils.currentStage(event)));
}
});
}
private void initRemoveButtons() {
tableColumnREMOVE.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(param.getValue()));
tableColumnREMOVE.setCellFactory(param -> new TableCell<Department, Department>() {
private final Button button = new Button("remove");
@Override
protected void updateItem(Department obj, boolean empty) {
super.updateItem(obj, empty);
if (obj == null) {
setGraphic(null);
return;
}
setGraphic(button);
button.setOnAction(event -> removeEntity(obj));
}
});
}
private void removeEntity(Department obj) {
Optional<ButtonType> result = Alerts.showConfirmation("Confirmation", "Are you sure you want to delete? ");
if (result.get() == ButtonType.OK) {
if (service == null) {
throw new IllegalStateException("Service was null");
}
try {
service.remove(obj);
updateTableView();
}
catch (DbIntegrityException e) {
Alerts.showAlert("Error removing object", null, e.getMessage(), AlertType.ERROR);
}
}
}
}
| [
"joaofernandes2080@gmail.com"
] | joaofernandes2080@gmail.com |
4de66e15990bd51f0e708eb4411c563380207e22 | 65ff0d6a0ac9eafc6ffbcf9975ac56cf4846512d | /PhotograhpU/src/main/java/com/example/y/photographu/view/fragment/school/FragmentSchoolShow.java | f0ed340d1d6115baf507f53ee74324dd8444dd23 | [] | no_license | yforyoung/PhotographU | 98f5922333472ea01d4c3842683e7d97f1f219fe | e4c2ae997d4f79799403adb638be75991a3a48c5 | refs/heads/master | 2020-03-17T20:32:06.600201 | 2018-07-20T09:25:25 | 2018-07-20T09:25:25 | 133,915,019 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,027 | java | package com.example.y.photographu.view.fragment.school;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import com.example.y.photographu.App;
import com.example.y.photographu.Constant;
import com.example.y.photographu.view.activity.BaseActivity;
import com.example.y.photographu.R;
import com.example.y.photographu.beans.ResponseData;
import com.example.y.photographu.util.FileUtil;
import com.example.y.photographu.util.OkHttpUtils;
import com.example.y.photographu.util.SpfUtil;
import com.google.gson.Gson;
import com.google.gson.internal.LinkedTreeMap;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import okhttp3.Response;
public class FragmentSchoolShow extends Fragment {
private List<String> schoolList;
ArrayAdapter adapter;
@SuppressLint("HandlerLeak")
private Handler handler=new Handler(){
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
adapter.notifyDataSetChanged();
}
};
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_school,container,false);
}
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
schoolList=new ArrayList<>();
final Map<String ,String> param=new HashMap<>();
param.put("name",App.getInstance().school.getCity());
OkHttpUtils.doPost("http://119.29.166.254:9090/api/university/getUniversityByCityName",
param,null,null, new OkHttpUtils.MyCallback() {
@Override
public void onResponse(Response response) throws IOException {
String s=response.body().string();
List<LinkedTreeMap> list=new Gson().fromJson(s,new TypeToken<List<LinkedTreeMap>>(){}.getType());
for (int i=0;i<list.size();i++){
schoolList.add((String) list.get(i).get("name"));
}
handler.sendMessage(Message.obtain());
}
@Override
public void onFailure(IOException e) {
}
});
adapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_list_item_1, schoolList);
ListView listView = getActivity().findViewById(R.id.school_list);
listView.setAdapter(adapter);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
App.getInstance().school.setName(schoolList.get(position));
Map<String ,String > params=new HashMap<>();
params.put("school",schoolList.get(position));
params.put("nickname", App.getInstance().user.getNickname());
OkHttpUtils.doPost("http://www.xhban.com:8080/photograph_u/user/updateInfo",
params, "cookie", SpfUtil.getString(Constant.USER_COOKIE, ""),
new OkHttpUtils.MyCallback() {
@Override
public void onResponse(Response response) throws IOException {
String s=response.body().string();
ResponseData responseData=new Gson().fromJson(s,ResponseData.class);
if (responseData.getCode()==0){
((BaseActivity)getActivity()).showToast("修改成功");
App.getInstance().user.setSchool(App.getInstance().school.getName());
String m=new Gson().toJson(App.getInstance().user);
FileUtil.save(Constant.USER_DATA_FILE,m);
}
else{
((BaseActivity)getActivity()).showToast(responseData.getMessage());
}
getActivity().finish();
}
@Override
public void onFailure(IOException e) {
}
});
}
});
}
}
| [
"yforyoung@163.com"
] | yforyoung@163.com |
39d3ad8e97bef96ac82cd6edbed83a8c9e319259 | b8ddec7865e2e5a4881f09f554c7b3eb91e086ee | /taotao-sso-web/target/tomcat/work/Tomcat/localhost/_/org/apache/jsp/WEB_002dINF/jsp/register_jsp.java | c62bc6f686aadb43a5f1814bc113833999f8d19e | [] | no_license | liu0022446688/taotao | 5b7239c00e538cecfdd6000567f9ef878c50f3d3 | b9c41509feb2e038601667fe98e6524eb864c843 | refs/heads/master | 2020-04-02T05:28:35.531073 | 2018-10-25T03:45:10 | 2018-10-25T03:45:10 | 154,079,932 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 16,104 | java | /*
* Generated by the Jasper component of Apache Tomcat
* Version: Apache Tomcat/7.0.47
* Generated at: 2018-10-25 02:05:11 UTC
* Note: The last modified time of this file was set to
* the last modified time of the source file after
* generation to assist with modification tracking.
*/
package org.apache.jsp.WEB_002dINF.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
public final class register_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static final javax.servlet.jsp.JspFactory _jspxFactory =
javax.servlet.jsp.JspFactory.getDefaultFactory();
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
private javax.el.ExpressionFactory _el_expressionfactory;
private org.apache.tomcat.InstanceManager _jsp_instancemanager;
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
return _jspx_dependants;
}
public void _jspInit() {
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
}
public void _jspDestroy() {
}
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
throws java.io.IOException, javax.servlet.ServletException {
final javax.servlet.jsp.PageContext pageContext;
javax.servlet.http.HttpSession session = null;
final javax.servlet.ServletContext application;
final javax.servlet.ServletConfig config;
javax.servlet.jsp.JspWriter out = null;
final java.lang.Object page = this;
javax.servlet.jsp.JspWriter _jspx_out = null;
javax.servlet.jsp.PageContext _jspx_page_context = null;
try {
response.setContentType("text/html; charset=UTF-8");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n");
out.write(" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n");
out.write("<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n");
out.write("<head>\r\n");
out.write(" <meta http-equiv=\"pragma\" content=\"no-cache\">\r\n");
out.write(" <meta http-equiv=\"Cache-Control\" content=\"no-cache,must-revalidate\">\r\n");
out.write(" <title>注册-个人用户</title>\r\n");
out.write(" <link type=\"text/css\" rel=\"stylesheet\" href=\"/css/regist.personal.css\"/>\r\n");
out.write(" <link type=\"text/css\" rel=\"stylesheet\" href=\"/css/passport.base.css\"/>\r\n");
out.write(" <script type=\"text/javascript\" src=\"/js/jquery-1.6.4.js\"></script>\r\n");
out.write("</head>\r\n");
out.write("<body>\r\n");
out.write("<div class=\"w\" id=\"logo\">\r\n");
out.write(" <div>\r\n");
out.write(" \t<a href=\"http://localhost:8082\">\r\n");
out.write(" \t\t<img src=\"/images/taotao-logo.gif\" alt=\"淘淘商城\" width=\"170\" height=\"60\"/>\r\n");
out.write(" \t</a> <b></b>\r\n");
out.write(" </div>\r\n");
out.write("</div>\r\n");
out.write("\r\n");
out.write("<div class=\"w\" id=\"regist\">\r\n");
out.write(" <div class=\"mt\">\r\n");
out.write(" <ul class=\"tab\">\r\n");
out.write(" <li class=\"curr\">个人用户</li>\r\n");
out.write(" </ul>\r\n");
out.write(" <div class=\"extra\">\r\n");
out.write(" <span>我已经注册,现在就 \r\n");
out.write(" \t<a href=\"/page/login\" class=\"flk13\">登录</a>\r\n");
out.write(" </span>\r\n");
out.write(" </div>\r\n");
out.write(" </div>\r\n");
out.write(" <div class=\"mc\">\r\n");
out.write(" <form id=\"personRegForm\" method=\"post\" onsubmit=\"return false;\">\r\n");
out.write(" <div class=\"form\" onselectstart=\"return false;\">\r\n");
out.write(" <div class=\"item\" id=\"select-regName\">\r\n");
out.write(" <span class=\"label\"><b class=\"ftx04\">*</b>用户名:</span>\r\n");
out.write("\r\n");
out.write(" <div class=\"fl item-ifo\">\r\n");
out.write(" <div class=\"o-intelligent-regName\">\r\n");
out.write(" <input type=\"text\" id=\"regName\" name=\"username\" class=\"text\" tabindex=\"1\" autoComplete=\"off\"\r\n");
out.write(" onpaste=\"return false;\"\r\n");
out.write(" value=\"\"\r\n");
out.write(" onfocus=\"if(this.value=='') this.value='';this.style.color='#333'\"\r\n");
out.write(" onblur=\"if(this.value=='') {this.value='';this.style.color='#999999'}\"/>\r\n");
out.write(" <i class=\"i-name\"></i>\r\n");
out.write(" <ul id=\"intelligent-regName\" class=\"hide\"></ul>\r\n");
out.write(" <label id=\"regName_succeed\" class=\"blank\"></label>\r\n");
out.write(" <label id=\"regName_error\" class=\"hide\"></label>\r\n");
out.write(" </div>\r\n");
out.write(" </div>\r\n");
out.write(" </div>\r\n");
out.write(" <div id=\"o-password\">\r\n");
out.write(" <div class=\"item\">\r\n");
out.write(" <span class=\"label\"><b class=\"ftx04\">*</b>请设置密码:</span>\r\n");
out.write("\r\n");
out.write(" <div class=\"fl item-ifo\">\r\n");
out.write(" <input type=\"password\" id=\"pwd\" name=\"password\" class=\"text\" tabindex=\"2\"\r\n");
out.write(" style=\"ime-mode:disabled;\"\r\n");
out.write(" onpaste=\"return false\" autocomplete=\"off\"/>\r\n");
out.write(" <i class=\"i-pass\"></i>\r\n");
out.write(" <label id=\"pwd_succeed\" class=\"blank\"></label>\r\n");
out.write(" <label id=\"pwd_error\"></label>\r\n");
out.write(" <span class=\"clr\"></span>\r\n");
out.write(" </div>\r\n");
out.write(" </div>\r\n");
out.write("\r\n");
out.write(" <div class=\"item\">\r\n");
out.write(" <span class=\"label\"><b class=\"ftx04\">*</b>请确认密码:</span>\r\n");
out.write("\r\n");
out.write(" <div class=\"fl item-ifo\">\r\n");
out.write(" <input type=\"password\" id=\"pwdRepeat\" name=\"pwdRepeat\" class=\"text\" tabindex=\"3\"\r\n");
out.write(" onpaste=\"return false\" autocomplete=\"off\"/>\r\n");
out.write(" <i class=\"i-pass\"></i>\r\n");
out.write(" <label id=\"pwdRepeat_succeed\" class=\"blank\"></label>\r\n");
out.write(" <label id=\"pwdRepeat_error\"></label>\r\n");
out.write(" </div>\r\n");
out.write(" </div>\r\n");
out.write("\t\t\t\t\t<div class=\"item\" id=\"dphone\">\r\n");
out.write("\t\t\t\t\t\t<span class=\"label\"><b class=\"ftx04\">*</b>验证手机:</span>\r\n");
out.write("\r\n");
out.write("\t\t\t\t\t\t<div class=\"fl item-ifo\">\r\n");
out.write("\t\t\t\t\t\t\t<input type=\"text\" id=\"phone\" maxlength=\"11\" name=\"phone\"\r\n");
out.write("\t\t\t\t\t\t\t\tclass=\"text\" tabindex=\"4\"\r\n");
out.write("\t\t\t\t\t\t\t\tautocomplete=\"off\" /> <i class=\"i-phone\"></i> <label\r\n");
out.write("\t\t\t\t\t\t\t\tid=\"phone_succeed\" class=\"blank\"></label> <label\r\n");
out.write("\t\t\t\t\t\t\t\tid=\"phone_error\"></label>\r\n");
out.write("\t\t\t\t\t\t</div>\r\n");
out.write("\t\t\t\t\t</div>\r\n");
out.write("\t\t\t\t\t</div>\r\n");
out.write(" <div class=\"item item-new\">\r\n");
out.write(" <span class=\"label\"> </span>\r\n");
out.write("\r\n");
out.write(" <div class=\"fl item-ifo\">\r\n");
out.write(" <input type=\"checkbox\" class=\"checkbox\" checked=\"checked\" id=\"readme\"\r\n");
out.write(" onclick=\"agreeonProtocol();\">\r\n");
out.write(" <label for=\"protocol\">我已阅读并同意<a href=\"#\" class=\"blue\" id=\"protocol\">《淘淘用户注册协议》</a></label>\r\n");
out.write(" <span class=\"clr\"></span>\r\n");
out.write(" <label id=\"protocol_error\" class=\"error hide\">请接受服务条款</label>\r\n");
out.write(" </div>\r\n");
out.write(" </div>\r\n");
out.write(" <div class=\"item\">\r\n");
out.write(" <span class=\"label\"> </span>\r\n");
out.write(" <input type=\"button\" class=\"btn-img btn-regist\" id=\"registsubmit\" value=\"立即注册\" tabindex=\"8\"\r\n");
out.write(" clstag=\"regist|keycount|personalreg|07\"\r\n");
out.write(" onclick=\"REGISTER.reg();\"/>\r\n");
out.write(" </div>\r\n");
out.write(" </div>\r\n");
out.write(" <div class=\"phone\">\r\n");
out.write(" <img width=\"180\" height=\"180\" src=\"/images/phone-bg.jpg\">\r\n");
out.write(" </div>\r\n");
out.write(" <span class=\"clr\"></span>\r\n");
out.write(" </form>\r\n");
out.write(" </div>\r\n");
out.write("<script type=\"text/javascript\">\r\n");
out.write("\tvar REGISTER={\r\n");
out.write("\t\tparam:{\r\n");
out.write("\t\t\t//单点登录系统的url\r\n");
out.write("\t\t\tsurl:\"\"\r\n");
out.write("\t\t},\r\n");
out.write("\t\tinputcheck:function(){\r\n");
out.write("\t\t\t\t//不能为空检查\r\n");
out.write("\t\t\t\tif ($(\"#regName\").val() == \"\") {\r\n");
out.write("\t\t\t\t\talert(\"用户名不能为空\");\r\n");
out.write("\t\t\t\t\t$(\"#regName\").focus();\r\n");
out.write("\t\t\t\t\treturn false;\r\n");
out.write("\t\t\t\t}\r\n");
out.write("\t\t\t\tif ($(\"#pwd\").val() == \"\") {\r\n");
out.write("\t\t\t\t\talert(\"密码不能为空\");\r\n");
out.write("\t\t\t\t\t$(\"#pwd\").focus();\r\n");
out.write("\t\t\t\t\treturn false;\r\n");
out.write("\t\t\t\t}\r\n");
out.write("\t\t\t\tif ($(\"#phone\").val() == \"\") {\r\n");
out.write("\t\t\t\t\talert(\"手机号不能为空\");\r\n");
out.write("\t\t\t\t\t$(\"#phone\").focus();\r\n");
out.write("\t\t\t\t\treturn false;\r\n");
out.write("\t\t\t\t}\r\n");
out.write("\t\t\t\t//密码检查\r\n");
out.write("\t\t\t\tif ($(\"#pwd\").val() != $(\"#pwdRepeat\").val()) {\r\n");
out.write("\t\t\t\t\talert(\"确认密码和密码不一致,请重新输入!\");\r\n");
out.write("\t\t\t\t\t$(\"#pwdRepeat\").select();\r\n");
out.write("\t\t\t\t\t$(\"#pwdRepeat\").focus();\r\n");
out.write("\t\t\t\t\treturn false;\r\n");
out.write("\t\t\t\t}\r\n");
out.write("\t\t\t\treturn true;\r\n");
out.write("\t\t},\r\n");
out.write("\t\tbeforeSubmit:function() {\r\n");
out.write("\t\t\t\t//检查用户是否已经被占用\r\n");
out.write("\t\t\t\t$.ajax({\r\n");
out.write("\t \turl : REGISTER.param.surl + \"/user/check/\"+escape($(\"#regName\").val())+\"/1?r=\" + Math.random(),\r\n");
out.write("\t \tsuccess : function(data) {\r\n");
out.write("\t \t\tif (data.data) {//taotaoresult.data :true |false\r\n");
out.write("\t \t\t\t//检查手机号是否存在\r\n");
out.write("\t \t\t\t$.ajax({\r\n");
out.write("\t \t\t\t\turl : REGISTER.param.surl + \"/user/check/\"+$(\"#phone\").val()+\"/2?r=\" + Math.random(),\r\n");
out.write("\t\t\t\t \tsuccess : function(data) {//手机号没有被注册,现在可以用\r\n");
out.write("\t\t\t\t \t\tif (data.data) {\r\n");
out.write("\t\t\t\t\t \t\tREGISTER.doSubmit();\r\n");
out.write("\t\t\t\t \t\t} else {\r\n");
out.write("\t\t\t\t \t\t\talert(\"此手机号已经被注册!\");\r\n");
out.write("\t\t\t\t \t\t\t$(\"#phone\").select();\r\n");
out.write("\t\t\t\t \t\t}\r\n");
out.write("\t\t\t\t \t}\r\n");
out.write("\t \t\t\t});\r\n");
out.write("\t \t\t} else {\r\n");
out.write("\t \t\t\talert(\"此用户名已经被占用,请选择其他用户名\");\r\n");
out.write("\t \t\t\t$(\"#regName\").select();\r\n");
out.write("\t \t\t}\t\r\n");
out.write("\t \t}\r\n");
out.write("\t\t\t\t});\r\n");
out.write("\t \t\r\n");
out.write("\t\t},\r\n");
out.write("\t\tdoSubmit:function() {\r\n");
out.write("\t\t\t//$(\"#personRegForm\").serialize()\r\n");
out.write("\t\t\t$.post(\"/user/register\",$(\"#personRegForm\").serialize(), function(data){\r\n");
out.write("\t\t\t\tif(data.status == 200){\r\n");
out.write("\t\t\t\t\talert('用户注册成功,请登录!');\r\n");
out.write("\t\t\t\t\tREGISTER.login();//跳转到登录的页面\r\n");
out.write("\t\t\t\t} else {\r\n");
out.write("\t\t\t\t\talert(\"注册失败!\");\r\n");
out.write("\t\t\t\t}\r\n");
out.write("\t\t\t});\r\n");
out.write("\t\t},\r\n");
out.write("\t\tlogin:function() {\r\n");
out.write("\t\t\t location.href = \"/page/login\";\r\n");
out.write("\t\t\t return false;\r\n");
out.write("\t\t},\r\n");
out.write("\t\treg:function() {\r\n");
out.write("\t\t\tif (this.inputcheck()) {\r\n");
out.write("\t\t\t\tthis.beforeSubmit();\r\n");
out.write("\t\t\t}\r\n");
out.write("\t\t}\r\n");
out.write("\t};\r\n");
out.write("</script>\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
} catch (java.lang.Throwable t) {
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
try { out.clearBuffer(); } catch (java.io.IOException e) {}
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
else throw new ServletException(t);
}
} finally {
_jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
| [
"liu0022446688@126.com"
] | liu0022446688@126.com |
f299e60a6ee652435616dc574592848ad83f771e | a8a272b2c1e1a2ec8160b52065ef6d16e1dbb7c8 | /app/build/generated/source/buildConfig/debug/com/example/inventorychecker/activity/BuildConfig.java | 0899bb107e33d3a0daeb846630869a67a8580d5f | [] | no_license | vatanubay/InventoryChecker | 709e22f0ea87bd71967cd16baa3304c7af5d6975 | 9b2e4a86b8a5c562d883d05d998bb62e8ff76fa7 | refs/heads/master | 2021-01-17T13:32:58.099390 | 2016-07-28T16:15:56 | 2016-07-28T16:15:56 | 53,718,759 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 472 | java | /**
* Automatically generated file. DO NOT MODIFY
*/
package com.example.inventorychecker.activity;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "com.example.inventorychecker";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0";
}
| [
"satan_meenzaa@hotmail.com"
] | satan_meenzaa@hotmail.com |
3589f93cf1cd56ce8a371638a86683efbba0263e | 178123cb2cdd13860e895f851c0f00e94e224226 | /AsyncHttpClient/src/com/loopj/android/http/JsonStreamerEntity.java | a8bd74f15df9eb81761b0ac124eb3568a11f89df | [
"Apache-2.0"
] | permissive | lijian17/AsyncHttpClient | 375f02824c00d3702a04cb9b38ee16578c0ee292 | 24bfa0402fbd60877732840ee7304099d438a6ce | refs/heads/master | 2021-01-01T17:55:35.942828 | 2017-08-05T01:17:07 | 2017-08-05T01:17:07 | 98,203,299 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 14,054 | java | /*
Android Asynchronous Http Client
Copyright (c) 2011 James Smith <james@loopj.com>
https://loopj.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://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.loopj.android.http;
import android.text.TextUtils;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.message.BasicHeader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.zip.GZIPOutputStream;
/**
* HTTP实体使用流上传JSON数据。 这具有非常低的内存占用; 适合使用base64编码上传大文件。
*/
public class JsonStreamerEntity implements HttpEntity {
private static final String LOG_TAG = "JsonStreamerEntity";
/** 不支持的操作异常 */
private static final UnsupportedOperationException ERR_UNSUPPORTED =
new UnsupportedOperationException("Unsupported operation in this implementation.");
/** I/O流中使用的字节数组缓冲区的大小。 */
private static final int BUFFER_SIZE = 4096;
/** 用于从输入流读取的缓冲区 */
private final byte[] buffer = new byte[BUFFER_SIZE];
private static final byte[] JSON_TRUE = "true".getBytes();
private static final byte[] JSON_FALSE = "false".getBytes();
private static final byte[] JSON_NULL = "null".getBytes();
private static final byte[] STREAM_NAME = escape("name");
private static final byte[] STREAM_TYPE = escape("type");
private static final byte[] STREAM_CONTENTS = escape("contents");
private static final Header HEADER_JSON_CONTENT =
new BasicHeader(
AsyncHttpClient.HEADER_CONTENT_TYPE,
RequestParams.APPLICATION_JSON);
private static final Header HEADER_GZIP_ENCODING =
new BasicHeader(
AsyncHttpClient.HEADER_CONTENT_ENCODING,
AsyncHttpClient.ENCODING_GZIP);
/** 要上传的JSON数据和关联的元数据 */
private final Map<String, Object> jsonParams = new HashMap<String, Object>();
/** 是否在上传时使用gzip压缩 */
private final Header contentEncoding;
/** 已过场 */
private final byte[] elapsedField;
/** 进度处理器 */
private final ResponseHandlerInterface progressHandler;
public JsonStreamerEntity(ResponseHandlerInterface progressHandler, boolean useGZipCompression, String elapsedField) {
this.progressHandler = progressHandler;
this.contentEncoding = useGZipCompression ? HEADER_GZIP_ENCODING : null;
this.elapsedField = TextUtils.isEmpty(elapsedField)
? null
: escape(elapsedField);
}
/**
* 将由给定键标识的内容参数添加到请求中。
*
* @param key 实体名称
* @param value 实体的值(Scalar,FileWrapper,StreamWrapper)
*/
public void addPart(String key, Object value) {
jsonParams.put(key, value);
}
/**
* 是可重复的
*/
@Override
public boolean isRepeatable() {
return false;
}
/**
* 是分块
*/
@Override
public boolean isChunked() {
return false;
}
/**
* 是流式传输
*/
@Override
public boolean isStreaming() {
return false;
}
@Override
public long getContentLength() {
return -1;
}
@Override
public Header getContentEncoding() {
return contentEncoding;
}
@Override
public Header getContentType() {
return HEADER_JSON_CONTENT;
}
/**
* 消费内容
*/
@Override
public void consumeContent() throws IOException, UnsupportedOperationException {
}
@Override
public InputStream getContent() throws IOException, UnsupportedOperationException {
throw ERR_UNSUPPORTED;
}
@Override
public void writeTo(final OutputStream out) throws IOException {
if (out == null) {
throw new IllegalStateException("Output stream cannot be null.");
}
// 记录上传开始的时间。
long now = System.currentTimeMillis();
// 发送流时使用GZIP压缩,否则只需使用缓冲输出流即可加快速度。
OutputStream os = contentEncoding != null
? new GZIPOutputStream(out, BUFFER_SIZE)
: out;
// 始终发送一个JSON对象。
os.write('{');
// Keys used by the HashMaps.
Set<String> keys = jsonParams.keySet();
int keysCount = keys.size();
if (0 < keysCount) {
int keysProcessed = 0;
boolean isFileWrapper;
// 转过所有的键并处理每个值。
for (String key : keys) {
// 表示该key已被处理。
keysProcessed++;
try {
// 评估值(不能为null)。
Object value = jsonParams.get(key);
// 编写JSON对象key。
os.write(escape(key));
os.write(':');
// 如果值为null,则提前处理。
if (value == null) {
os.write(JSON_NULL);
} else {
// 检查这是否是FileWrapper。
isFileWrapper = value instanceof RequestParams.FileWrapper;
// 如果一个文件应该被上传。
if (isFileWrapper || value instanceof RequestParams.StreamWrapper) {
// 所有上传都作为包含文件详细信息的对象发送。
os.write('{');
// 确定如何处理此条目。
if (isFileWrapper) {
writeToFromFile(os, (RequestParams.FileWrapper) value);
} else {
writeToFromStream(os, (RequestParams.StreamWrapper) value);
}
// 结束文件的对象并准备下一个。
os.write('}');
} else if (value instanceof JsonValueInterface) {
os.write(((JsonValueInterface) value).getEscapedJsonValue());
} else if (value instanceof org.json.JSONObject) {
os.write(value.toString().getBytes());
} else if (value instanceof org.json.JSONArray) {
os.write(value.toString().getBytes());
} else if (value instanceof Boolean) {
os.write((Boolean) value ? JSON_TRUE : JSON_FALSE);
} else if (value instanceof Long) {
os.write((((Number) value).longValue() + "").getBytes());
} else if (value instanceof Double) {
os.write((((Number) value).doubleValue() + "").getBytes());
} else if (value instanceof Float) {
os.write((((Number) value).floatValue() + "").getBytes());
} else if (value instanceof Integer) {
os.write((((Number) value).intValue() + "").getBytes());
} else {
os.write(escape(value.toString()));
}
}
} finally {
// 用逗号分隔每个K:V,除了最后一个。
if (elapsedField != null || keysProcessed < keysCount) {
os.write(',');
}
}
}
// 计算上传内容所需的毫秒数。
long elapsedTime = System.currentTimeMillis() - now;
// 包括上传所有时间所花费的时间。这可能对某人有用,但它为我们服务,因为几乎总是作为最后一个发送的角色。
if (elapsedField != null) {
os.write(elapsedField);
os.write(':');
os.write((elapsedTime + "").getBytes());
}
AsyncHttpClient.log.i(LOG_TAG, "Uploaded JSON in " + Math.floor(elapsedTime / 1000) + " seconds");
}
// 关闭JSON对象。
os.write('}');
// 将内容刷新流。
os.flush();
AsyncHttpClient.silentCloseOutputStream(os);
}
private void writeToFromStream(OutputStream os, RequestParams.StreamWrapper entry)
throws IOException {
// 发送元数据。
writeMetaData(os, entry.name, entry.contentType);
int bytesRead;
// 上传文件的内容在Base64。
Base64OutputStream bos =
new Base64OutputStream(os, Base64.NO_CLOSE | Base64.NO_WRAP);
// 从输入流中读取数据,直到不再读取数据为止。
while ((bytesRead = entry.inputStream.read(buffer)) != -1) {
bos.write(buffer, 0, bytesRead);
}
// 关闭Base64 output stream.
AsyncHttpClient.silentCloseOutputStream(bos);
// 结束元数据。
endMetaData(os);
// Close input stream.
if (entry.autoClose) {
// Safely close the input stream.
AsyncHttpClient.silentCloseInputStream(entry.inputStream);
}
}
private void writeToFromFile(OutputStream os, RequestParams.FileWrapper wrapper)
throws IOException {
// Send the meta data.
writeMetaData(os, wrapper.file.getName(), wrapper.contentType);
int bytesRead;
long bytesWritten = 0, totalSize = wrapper.file.length();
// Open the file for reading.
FileInputStream in = new FileInputStream(wrapper.file);
// Upload the file's contents in Base64.
Base64OutputStream bos =
new Base64OutputStream(os, Base64.NO_CLOSE | Base64.NO_WRAP);
// Read from file until no more data's left to read.
while ((bytesRead = in.read(buffer)) != -1) {
bos.write(buffer, 0, bytesRead);
bytesWritten += bytesRead;
progressHandler.sendProgressMessage(bytesWritten, totalSize);
}
// Close the Base64 output stream.
AsyncHttpClient.silentCloseOutputStream(bos);
// End the meta data.
endMetaData(os);
// Safely close the input stream.
AsyncHttpClient.silentCloseInputStream(in);
}
private void writeMetaData(OutputStream os, String name, String contentType) throws IOException {
// Send the streams's name.
os.write(STREAM_NAME);
os.write(':');
os.write(escape(name));
os.write(',');
// Send the streams's content type.
os.write(STREAM_TYPE);
os.write(':');
os.write(escape(contentType));
os.write(',');
// Prepare the file content's key.
os.write(STREAM_CONTENTS);
os.write(':');
os.write('"');
}
private void endMetaData(OutputStream os) throws IOException {
os.write('"');
}
// 感谢 Simple-JSON: https://goo.gl/XoW8RF
// 改变了一点,以适应我们在这个class的需要。
static byte[] escape(String string) {
// 如果它为null,提前返回。
if (string == null) {
return JSON_NULL;
}
// 创建一个字符串构建器来生成转义的字符串。
StringBuilder sb = new StringBuilder(128);
// Surround with quotations.
sb.append('"');
int length = string.length(), pos = -1;
while (++pos < length) {
char ch = string.charAt(pos);
switch (ch) {
case '"':
sb.append("\\\"");
break;
case '\\':
sb.append("\\\\");
break;
case '\b':
sb.append("\\b");
break;
case '\f':
sb.append("\\f");
break;
case '\n':
sb.append("\\n");
break;
case '\r':
sb.append("\\r");
break;
case '\t':
sb.append("\\t");
break;
default:
// 参考: https://www.unicode.org/versions/Unicode5.1.0/
if ((ch <= '\u001F') || (ch >= '\u007F' && ch <= '\u009F') || (ch >= '\u2000' && ch <= '\u20FF')) {
String intString = Integer.toHexString(ch);
sb.append("\\u");
// 不足4位,前面补零
int intLength = 4 - intString.length();
for (int zero = 0; zero < intLength; zero++) {
sb.append('0');
}
sb.append(intString.toUpperCase(Locale.US));
} else {
sb.append(ch);
}
break;
}
}
// Surround with quotations.
sb.append('"');
return sb.toString().getBytes();
}
}
| [
"374452668@qq.com"
] | 374452668@qq.com |
2c1dcf62da26c1d9043541234ecc20d71aefabdd | 380d2b69354bcb16ae67bec08d5d3664d7af973c | /src/main/java/com/shades/views/StagedOrdersExcel.java | 6507678e640bf3c3b2439049a0aefb280a5654fa | [] | no_license | alexflorez4/Avenger | 69a663409295b918e7b62c6ccb79b575c33cb676 | 48544c328548361645b72b03ff608231194a5a92 | refs/heads/master | 2020-03-18T06:27:20.588157 | 2019-03-12T23:52:06 | 2019-03-12T23:52:06 | 134,396,676 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,608 | java | package com.shades.views;
import Entities.OrderEntity;
import com.shades.utilities.Enumerations;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.servlet.view.document.AbstractXlsxView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
public class StagedOrdersExcel extends AbstractXlsxView {
@Override
protected void buildExcelDocument(Map<String, Object> map, Workbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception {
// change the file name
response.setHeader("Content-Disposition", "attachment; filename=\"staged_orders.xlsx\"");
List<OrderEntity> orders = (List) map.get("orders");
// create excel xls sheet
Sheet sheet = workbook.createSheet("Orders");
// create header row
Row header = sheet.createRow(0);
header.createCell(0).setCellValue("Order No");
header.createCell(1).setCellValue("SKU");
header.createCell(2).setCellValue("Quantity");
header.createCell(3).setCellValue("First Name");
header.createCell(4).setCellValue("Last Name");
header.createCell(5).setCellValue("Street");
header.createCell(6).setCellValue("Street 2");
header.createCell(7).setCellValue("City");
header.createCell(8).setCellValue("State");
header.createCell(9).setCellValue("Zip");
header.createCell(10).setCellValue("Country");
header.createCell(11).setCellValue("Supplier");
header.createCell(12).setCellValue("Observations");
header.createCell(13).setCellValue("Supplier Order No");
header.createCell(14).setCellValue("Tracking No");
header.createCell(15).setCellValue("Shipping Cost");
header.createCell(16).setCellValue("Supplier Price");
header.createCell(17).setCellValue("Seller");
// Create data cells
int rowCount = 1;
for(OrderEntity next : orders){
Row orderRow = sheet.createRow(rowCount++);
orderRow.createCell(0).setCellValue(next.getOrderId());
orderRow.createCell(1).setCellValue(next.getSku());
orderRow.createCell(2).setCellValue(next.getQuantity());
String name = next.getBuyerName().trim();
int index = StringUtils.lastIndexOfAny(name, " ");
String first = StringUtils.substring(name, 0, index);
String last = StringUtils.substring(name, index, name.length());
orderRow.createCell(3).setCellValue(first);
orderRow.createCell(4).setCellValue(last);
orderRow.createCell(5).setCellValue(next.getStreet());
orderRow.createCell(6).setCellValue(StringUtils.isBlank(next.getStreet2()) ? "" : next.getStreet2());
orderRow.createCell(7).setCellValue(next.getCity());
orderRow.createCell(8).setCellValue(next.getState());
orderRow.createCell(9).setCellValue(next.getZipCode());
orderRow.createCell(10).setCellValue(next.getCountry());
orderRow.createCell(11).setCellValue(Enumerations.Suppliers.getSupplierName(next.getSupplierId()));
orderRow.createCell(12).setCellValue(StringUtils.isBlank(next.getObservations()) ? "" : next.getObservations());
orderRow.createCell(17).setCellValue(Enumerations.Sellers.getSellerName(next.getSellerId()));
}
}
}
| [
"alexflorez4@hotmail.com"
] | alexflorez4@hotmail.com |
79203437f816497efb53ea1faf7c37db8d0a72b4 | ab6a2ff861d77f571d7d059fb55118ec129d031e | /lucense/src/test/unit/com/adichad/lucense/analysis/component/AnalyzerComponentFactoryTest.java | 7bb374851a130759f868c0c5008d8177b6daa583 | [] | no_license | adichad/lucense | 6d84092d887cd97521d96e446b7200f918f0909a | 2355cf00b5dfff002c9acd90d71d5a58851d4c79 | refs/heads/master | 2021-02-15T06:13:31.396527 | 2020-03-04T14:23:44 | 2020-03-04T14:23:44 | 244,870,609 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 7,489 | java | /*
* @(#)com.adichad.lucense.expression.ExpressionParsingTest.java
* ===========================================================================
* Licensed Materials - Property of InfoEdge
* "Restricted Materials of Adichad.Com"
* (C) Copyright <TBD> All rights reserved.
* ===========================================================================
*/
package com.adichad.lucense.analysis.component;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.util.ArrayList;
import org.apache.lucene.util.Version;
import org.junit.Before;
import org.junit.Test;
import com.adichad.lucense.analysis.component.filter.ControlledPluralsInvertingStemFilterSource;
import com.adichad.lucense.analysis.component.filter.ControlledPluralsStemFilterSource;
import com.adichad.lucense.analysis.component.filter.ControlledPresentParticipleInvertingStemFilterSource;
import com.adichad.lucense.analysis.component.filter.ControlledPresentParticipleStemFilterSource;
import com.adichad.lucense.analysis.component.filter.LowerCaseFilterSource;
import com.adichad.lucense.analysis.component.filter.PhoneticFilterSource;
import com.adichad.lucense.analysis.component.filter.PorterStemFilterSource;
import com.adichad.lucense.analysis.component.filter.ShingleFilterSource;
import com.adichad.lucense.analysis.component.filter.StopFilterSource;
import com.adichad.lucense.analysis.component.filter.SynonymFilterSource;
import com.adichad.lucense.analysis.component.filter.TokenFilterSource;
import com.adichad.lucense.analysis.component.tokenizer.CharTokenizerSource;
import com.adichad.lucense.analysis.component.tokenizer.PatternTokenizerSource;
import com.adichad.lucense.analysis.component.tokenizer.StandardTokenizerSource;
import com.adichad.lucense.analysis.component.tokenizer.TokenStreamSource;
import com.adichad.lucense.analysis.component.tokenizer.TokenizingCharsetTokenizerSource;
import com.adichad.lucense.analysis.component.tokenizer.WhitespaceTokenizerSource;
public class AnalyzerComponentFactoryTest {
public ArrayList<String> exprs;
@Before
public void setup() {
}
@Test
public void testGetTokenStreamSource() {
// Just to cover the class definition
new AnalyzerComponentFactory();
TokenStreamSource tss = AnalyzerComponentFactory.getTokenStreamSource(
Version.LUCENE_33, "", "");
assertNull(tss);
tss = AnalyzerComponentFactory.getTokenStreamSource(Version.LUCENE_33,
"whitespace", null);
assertTrue(tss instanceof WhitespaceTokenizerSource);
tss = AnalyzerComponentFactory.getTokenStreamSource(Version.LUCENE_33,
"charset", null);
assertTrue(tss instanceof CharTokenizerSource);
tss = AnalyzerComponentFactory.getTokenStreamSource(Version.LUCENE_33,
"standard", null);
assertTrue(tss instanceof StandardTokenizerSource);
/*
* tss =
* AnalyzerComponentFactory.getTokenStreamSource(Version.LUCENE_33,
* "tokenizing-charset", null); assertTrue(tss instanceof
* TokenizingCharsetTokenizerSource);
*/
/*
* tss =
* AnalyzerComponentFactory.getTokenStreamSource(Version.LUCENE_33,
* "pattern", null); assertTrue(tss instanceof PatternTokenizerSource);
*/
tss = AnalyzerComponentFactory.getTokenStreamSource(Version.LUCENE_33,
"whitespace", "somecharshere");
assertTrue(tss instanceof WhitespaceTokenizerSource);
tss = AnalyzerComponentFactory.getTokenStreamSource(Version.LUCENE_33,
"charset", "somecharshere");
assertTrue(tss instanceof CharTokenizerSource);
tss = AnalyzerComponentFactory.getTokenStreamSource(Version.LUCENE_33,
"standard", "somecharshere");
assertTrue(tss instanceof StandardTokenizerSource);
tss = AnalyzerComponentFactory.getTokenStreamSource(Version.LUCENE_33,
"tokenizing-charset", "somecharshere");
assertTrue(tss instanceof TokenizingCharsetTokenizerSource);
tss = AnalyzerComponentFactory.getTokenStreamSource(Version.LUCENE_33,
"pattern", "somecharshere");
assertTrue(tss instanceof PatternTokenizerSource);
tss = AnalyzerComponentFactory.getTokenStreamSource(Version.LUCENE_33,
"other", "somecharshere");
assertNull(tss);
}
@Test
public void testTokenFilterSource() {
TokenFilterSource tfs;
tfs = AnalyzerComponentFactory.getTokenFilterSource(Version.LUCENE_33,
"stopword", "", true, "/tmp/data/a.txt", 0, 0, 0, 0.5, 0.1, 5,
true);
assertTrue(tfs instanceof StopFilterSource);
tfs = AnalyzerComponentFactory.getTokenFilterSource(Version.LUCENE_33,
"synonym", "", true, "/tmp/data/a.txt", 0, 0, 0, 0.5, 0.1, 5,
true);
assertTrue(tfs instanceof SynonymFilterSource);
tfs = AnalyzerComponentFactory.getTokenFilterSource(Version.LUCENE_33,
"lowercase", "", true, "/tmp/data/a.txt", 0, 0, 0, 0.5, 0.1, 5,
true);
assertTrue(tfs instanceof LowerCaseFilterSource);
tfs = AnalyzerComponentFactory.getTokenFilterSource(Version.LUCENE_33,
"phonetic", "", true, "/tmp/data/a.txt", 0, 0, 0, 0.5, 0.1, 5,
true);
assertTrue(tfs instanceof PhoneticFilterSource);
tfs = AnalyzerComponentFactory.getTokenFilterSource(Version.LUCENE_33,
"stemporter", "", true, "/tmp/data/a.txt", 0, 0, 0, 0.5, 0.1,
5, true);
assertTrue(tfs instanceof PorterStemFilterSource);
tfs = AnalyzerComponentFactory.getTokenFilterSource(Version.LUCENE_33,
"stemplurals", "", true, "/tmp/data/a.txt", 0, 0, 0, 0.5, 0.1,
5, true);
assertTrue(tfs instanceof ControlledPluralsStemFilterSource);
tfs = AnalyzerComponentFactory.getTokenFilterSource(Version.LUCENE_33,
"stemplurals-inversions", "", true, "/tmp/data/a.txt", 0, 0, 0,
0.5, 0.1, 5, true);
assertTrue(tfs instanceof ControlledPluralsInvertingStemFilterSource);
tfs = AnalyzerComponentFactory.getTokenFilterSource(Version.LUCENE_33,
"stempresentparticiples", "", true, "/tmp/data/a.txt", 0, 0, 0,
0.5, 0.1, 5, true);
assertTrue(tfs instanceof ControlledPresentParticipleStemFilterSource);
tfs = AnalyzerComponentFactory.getTokenFilterSource(Version.LUCENE_33,
"stempresentparticiples-inversions", "", true,
"/tmp/data/a.txt", 0, 0, 0, 0.5, 0.1, 5, true);
assertTrue(tfs instanceof ControlledPresentParticipleInvertingStemFilterSource);
tfs = AnalyzerComponentFactory.getTokenFilterSource(Version.LUCENE_33,
"shingle", "", true, "/tmp/data/a.txt", 2, 0, 0, 0.5, 0.1, 5,
true);
assertTrue(tfs instanceof ShingleFilterSource);
/*
* tfs =
* AnalyzerComponentFactory.getTokenFilterSource(Version.LUCENE_33,
* "spellcorrect", "", true, "/tmp/data/a.txt", 0, 0, 0, 0.5, 0.1, 5,
* true); assertTrue(tfs instanceof
* ContextualSpellingCorrectingFilterSource);
*/
tfs = AnalyzerComponentFactory.getTokenFilterSource(Version.LUCENE_33,
"", "", true, "/tmp/data/a.txt", 0, 0, 0, 0.5, 0.1, 5, true);
assertNull(tfs);
// Testing the catch blocks
tfs = AnalyzerComponentFactory.getTokenFilterSource(Version.LUCENE_33,
"stopword", "", true, "/tmp/data/c.txt", 0, 0, 0, 0.5, 0.1, 5,
true);
assertTrue(true);
tfs = AnalyzerComponentFactory.getTokenFilterSource(null, "stopword",
"", true, "/tmp/data/a.txt", 0, 0, 0, 0.5, 0.1, 5, true);
assertTrue(true);
tfs = AnalyzerComponentFactory.getTokenFilterSource(Version.LUCENE_33,
"synonym", "", true, "/tmp/data/c.txt", 0, 0, 0, 0.5, 0.1, 5,
true);
assertTrue(true);
tfs = AnalyzerComponentFactory.getTokenFilterSource(Version.LUCENE_33,
"synonym", "", true, "/tmp/data/b.txt", 0, 0, 0, 0.5, 0.1, 5,
true);
assertTrue(true);
}
}
| [
"aditya.chadha@here.com"
] | aditya.chadha@here.com |
9499f4276d343d15e94b6f45e93a1d5e6383013a | 9827ad8d669f8421c3f16f203a6839bad8682229 | /app/src/main/java/com/example/wentianlin/myweather/util/NetUtil.java | 27a22ddeed4d8ce8a005229e71842fad4c7a99d7 | [] | no_license | w7989363/weather-android | 422d77a6a94546488bd8921feed7fe5758c28956 | fb069d88490c575062a53e0d53cf8433d0388e4c | refs/heads/master | 2021-09-01T13:48:12.913028 | 2017-12-27T09:00:39 | 2017-12-27T09:00:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 963 | java | package com.example.wentianlin.myweather.util;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
/**
* Created by wentianlin on 2017/10/11.
*/
public class NetUtil {
public static final int NETWORN_NONE = 0;
public static final int NETWORN_WIFI = 1;
public static final int NETWORN_MOBILE = 2;
public static int getNetworkState(Context context) {
ConnectivityManager connManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connManager.getActiveNetworkInfo();
if (networkInfo == null) {
return NETWORN_NONE;
}
int nType = networkInfo.getType();
if (nType == ConnectivityManager.TYPE_MOBILE) {
return NETWORN_MOBILE;
} else if (nType == ConnectivityManager.TYPE_WIFI) {
return NETWORN_WIFI;
}
return NETWORN_NONE;
}
}
| [
"7989363@qq.com"
] | 7989363@qq.com |
de0e59059e8abbed9e468a2fde2d1425a6c94df2 | b377c48997209a073a23b4e7079596a251c4052d | /Android App Samples Completely Learning/第02章/LCCXXT/src/com/bn/lccx/GGViewFj.java | 55a1f1685408415e7e2c117c588dec8df316360e | [] | no_license | bopopescu/Example-Codes-and-Learning-Tools | da14c567edb7a685dcde4b3473ca729217fe0f83 | d5b2af4dc3fdcf63ba7dd8f9a5d394060b660d81 | refs/heads/master | 2021-05-28T03:24:24.776476 | 2014-09-11T15:10:11 | 2014-09-11T15:10:11 | null | 0 | 0 | null | null | null | null | BIG5 | Java | false | false | 2,699 | java | package com.bn.lccx;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;
public class GGViewFj extends View
{
int COMPONENT_WIDTH; //該控件寬度
int COMPONENT_HEIGHT; //該控件高度
boolean initflag=false; //是否要獲取控件的高度和寬度標誌
static Bitmap[] bma; //需要播放的圖片的數組
Paint paint; //畫筆
int[] drawablesId; //圖片ID數組
int currIndex=0; //圖片ID數組下標,根據此變量畫圖片
boolean workFlag=true; //播放圖片線程標誌位
public GGViewFj(Context father,AttributeSet as) { //構造器
super(father,as);
this.drawablesId=new int[]{ //初始化圖片ID數組
R.drawable.adv6,
R.drawable.adv4,
R.drawable.adv5
};
bma=new Bitmap[drawablesId.length]; //創建存放圖片的數組
initBitmaps(); //調用初始化圖片函數,初始化圖片數組
paint=new Paint(); //創建畫筆
paint.setFlags(Paint.ANTI_ALIAS_FLAG); //消除鋸齒
new Thread(){ //創建播放圖片線程
public void run(){
while(workFlag){
currIndex=(currIndex+1)%drawablesId.length;//改變ID數組下標值
GGViewFj.this.postInvalidate(); //繪製
try {
Thread.sleep(3000); //休息三秒
} catch (InterruptedException e) {
e.printStackTrace();
}}}}.start(); //啟動線程
}
public void initBitmaps(){ //初始化圖片函數
Resources res=this.getResources(); //獲取Resources對像
for(int i=0;i<drawablesId.length;i++){
bma[i]=BitmapFactory.decodeResource(res, drawablesId[i]);
}}
public void onDraw(Canvas canvas){ //繪製函數
if(!initflag) { //第一次繪製時需要獲取寬度和高度
COMPONENT_WIDTH=this.getWidth(); //獲取view的寬度
COMPONENT_HEIGHT=this.getHeight(); //獲取view的高度
initflag=true;
}
int picWidth=bma[currIndex].getWidth(); //獲取當前繪製圖片的寬度
int picHeight=bma[currIndex].getHeight(); //獲取當前繪製圖片的高度
int startX=(COMPONENT_WIDTH-picWidth)/2; //得到繪製圖片的左上角X坐標
int startY=(COMPONENT_HEIGHT-picHeight)/2; //得到繪製圖片的左上角Y坐標
canvas.drawARGB(255, 200, 128, 128); //設置背景色
canvas.drawBitmap(bma[currIndex], startX,startY, paint); //繪製圖片
}}
| [
"robin_lan2003@yahoo.com.tw"
] | robin_lan2003@yahoo.com.tw |
e79b83a0f5d6809db8ec107fd5edfdc07172db90 | 77e80aaf6c9e2cb4a961a9bb186e7262a435be9b | /shard-transfer-pcgen/src/main/java/com/codecrate/shard/transfer/pcgen/PcgenDatasetImporter.java | 6d51ea5d51cc69260348ef3ddbfa7ca4edebd1aa | [] | no_license | wireframe/shard | 748051103a1a29d4d53b73b09e77f185d897e9ab | 7d915fe7edc44b5d6ff68aff1d24e5f6b1cb063d | refs/heads/master | 2021-07-03T14:46:45.490147 | 2008-08-19T19:50:26 | 2008-08-19T19:50:26 | 25,412 | 1 | 1 | null | 2020-10-13T10:00:19 | 2008-06-15T04:10:17 | Java | UTF-8 | Java | false | false | 4,669 | java | /*
* Copyright 2004 codecrate consulting
*
* 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.codecrate.shard.transfer.pcgen;
import java.io.File;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.Map;
import java.util.TreeSet;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.codecrate.shard.transfer.ObjectImporter;
import com.codecrate.shard.transfer.progress.ProgressMonitor;
/**
* import a complete pcgen dataset.
*
* @author <a href="mailto:wireframe@dev.java.net">Ryan Sonnek</a>
*/
public class PcgenDatasetImporter implements ObjectImporter {
private static final Log LOG = LogFactory.getLog(PcgenDatasetImporter.class);
private final Map importers;
public PcgenDatasetImporter(Map importers) {
this.importers = importers;
}
public Collection getSupportedFileExtensions() {
return Collections.EMPTY_LIST;
}
public boolean isDirectoryImportSupported() {
return true;
}
public Collection importObjects(File dataset, ProgressMonitor progress) {
if (!isDataset(dataset)) {
LOG.warn(dataset + " is not a dataset.");
return Collections.EMPTY_LIST;
}
File[] files = dataset.listFiles();
progress.startTask("Importing dataset " + dataset, countTotalNumberOfFilesToImport(files));
for (Iterator supportedFileExpressions = importers.keySet().iterator(); supportedFileExpressions.hasNext();) {
String supportedFileExpression = (String) supportedFileExpressions.next();
ObjectImporter importer = (ObjectImporter) importers.get(supportedFileExpression);
for (int x = 0; x < files.length; x++) {
File file = files[x];
if (doesFileMatchExpression(supportedFileExpression, file) && !progress.isCancelled()) {
importer.importObjects(file, progress);
progress.completeUnitOfWork();
}
}
}
progress.finish();
return Collections.EMPTY_LIST;
}
private int countTotalNumberOfFilesToImport(File[] files) {
int numberOfFiles = 0;
for (Iterator supportedFileExpressions = importers.keySet().iterator(); supportedFileExpressions.hasNext();) {
String supportedFileExpression = (String) supportedFileExpressions.next();
for (int x = 0; x < files.length; x++) {
File file = files[x];
if (doesFileMatchExpression(supportedFileExpression, file)) {
numberOfFiles ++;
}
}
}
return numberOfFiles;
}
private boolean doesFileMatchExpression(String supportedFileExpression, File file) {
if (!isPcgenLstFile(file)) {
return false;
}
return -1 != file.getName().indexOf(supportedFileExpression);
}
public boolean isDataset(File dataset) {
if (null == dataset) {
return false;
}
File[] files = dataset.listFiles();
if (null == files) {
return false;
}
for (int x = 0; x < files.length; x++) {
File file = files[x];
if (isPcgenLstFile(file)) {
return true;
}
}
return false;
}
private boolean isPcgenLstFile(File file) {
return -1 != file.getName().indexOf(".lst");
}
/**
* get all availble datasets from a given directory
*/
public Collection<File> getAvailableDatasets(File rootDirectory) {
return findDatasets(rootDirectory);
}
private Collection<File> findDatasets(File root) {
if (isDataset(root)) {
return Collections.singleton(root);
}
Collection<File> results = new TreeSet<File>();
File[] files = root.listFiles();
if (null != files) {
for (int i = 0; i < files.length; i++) {
File child = files[i];
if (child.isDirectory()) {
results.addAll(findDatasets(child));
}
}
}
return results;
}
}
| [
"wireframe"
] | wireframe |
282b312c805dd13cccbb3393a3a19d4b122d612d | 8d30ddd3cc823490725dd60feaa426162c25bc98 | /src/com/campusrecruit/activity/MajorActivity.java | 893fdd3a4850f767cc7b021d645f2c644fcf5b4f | [] | no_license | senarukana/campus | 1e669eed86ffe8efc3b5e9377b49498a6e7c0069 | 0a973728737dde95f8d78bb98714918be35b2caf | refs/heads/master | 2016-09-05T23:50:26.394633 | 2013-10-18T15:10:00 | 2013-10-18T15:10:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 208 | java | package com.campusrecruit.activity;
import java.util.List;
public class MajorActivity extends RadioListActivity {
@Override
protected List<String> getData() {
return appContext.getMajorList();
}
}
| [
"lizhe.ted@gmail.com"
] | lizhe.ted@gmail.com |
5ce6b5aeb1e47408b17e40d99551ad94277843aa | 68f3c6a2dc991ea7c214a023c220311c1a57e446 | /app/src/test/java/com/example/practicforhroh/ExampleUnitTest.java | 0dc49f96dbcd1ad0f00ac1a68e760643c0015f27 | [] | no_license | Liapo/PracticForHroh | c6ed97fa42bb785bc23377c14aefbb93ffceee52 | 0f4064abdea417622095d48ad62f010dfc551e03 | refs/heads/master | 2021-01-09T18:29:46.821361 | 2020-02-22T20:36:31 | 2020-02-22T20:36:31 | 242,408,122 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 387 | java | package com.example.practicforhroh;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"liapoltavets@gmail.com"
] | liapoltavets@gmail.com |
02f30fc0a3feae1a5400363b20604b53249334fd | 010581a8a3c4911bb5ad87ffbccdb7000181f6e6 | /src/ch/makery/painters/aaa.java | ca64a00558c3dc9424b5302da582917f02eb53fe | [] | no_license | LuksorDev/PaintersApp | 622d06b28f1739df6bc3b3e451234cd18b75d3d5 | dac21f1790cfeeacd88fe0a1f9a6573062430a63 | refs/heads/master | 2023-02-26T22:00:04.828280 | 2021-02-04T08:18:19 | 2021-02-04T08:18:19 | 335,885,732 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,022 | java | package ch.makery.painters;
import java.io.File;
import java.io.FileInputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Scanner;
public class aaa {
public static void main(String[] args) throws IOException{
Reader r = new InputStreamReader(new FileInputStream("src\\ch\\makery\\painters\\model\\malarze\\ Aleksander Gierymski.txt"), "ISO8859-2");
Scanner sc = new Scanner(r);
while(sc.hasNextLine()){
String line = sc.nextLine();
String cols[] = line.split("\t");
for (String s:cols)
System.out.print(s + "***");
System.out.println("\n-----------");
}
sc.close();
File f = new File("C:\\Users\\Luksor\\eclipse-workspace\\PaintersApp\\src\\ch\\makery\\painters\\model\\malarze");
File[] matchingFiles = f.listFiles(new FilenameFilter() {
public boolean accept(File dir,String name) {
return name.endsWith("txt");
}
});
for(File ff: matchingFiles)
System.out.println(ff.getName());
}
}
| [
"kacper.kiedo@gmail.com"
] | kacper.kiedo@gmail.com |
f5d970eddcf039828bd56628bcba744a20d6a930 | 43e5464c028a83deef5aa7b35c790db186e0893a | /shared/src/test/java/ascelion/kalah/shared/validation/ValidationTest.java | fae1033bd2c8d2e956fd2b0a3a0dd8970dc93177 | [] | no_license | ascelion/microprofile-demo | 486961cec36192dd58f3155d54daff0a53f99b0c | 7818a826eeceffc30388892d53dcc5bd912e424a | refs/heads/master | 2020-08-28T07:23:58.157133 | 2020-02-02T21:12:15 | 2020-02-02T21:12:15 | 217,635,810 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,658 | java | //package ascelion.kalah.shared.validation;
//
//import static org.hamcrest.Matchers.hasSize;
//import static org.junit.Assert.assertThat;
//
//import com.backbase.dbs.product.persistence.Arrangement;
//import com.backbase.dbs.product.test.UnicodeRandomizer;
//import java.nio.charset.Charset;
//import java.util.Set;
//import javax.persistence.Column;
//import javax.validation.ConstraintViolation;
//import javax.validation.Validator;
//import lombok.Builder;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
//import org.springframework.context.annotation.Import;
//import org.springframework.test.context.ActiveProfiles;
//import org.springframework.test.context.junit4.SpringRunner;
//import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
//
//@RunWith(SpringRunner.class)
//@ActiveProfiles("test")
//@Import({
// LocalValidatorFactoryBean.class,
//})
//@DataJpaTest(showSql = false)
//public class ValidationTest {
//
// @Builder
// @ColumnConstraint
// static class Bean {
// @AttributeConstraint(Arrangement.class)
// private final String attribute1;
// @AttributeConstraint(Arrangement.class)
// private final String attribute2;
// @AttributeConstraint(Arrangement.class)
// private final String attribute3;
//
// @Column(length = 20)
// private final String value1;
// @Column(length = 20)
// private final String value2;
// @Column(length = 20)
// private final String value3;
// }
//
// @Autowired
// private Validator val;
//
// @Test
// public void attributeContraint() {
// final Set<ConstraintViolation<Bean>> vio =
// this.val.validate(Bean.builder()
// .attribute1("unknown1")
// .attribute2("unknown2")
// .attribute3("state")
// .build());
//
// vio.forEach(System.out::println);
//
// assertThat(vio, hasSize(2));
// }
//
// @Test
// public void columnConstraint() {
// final UnicodeRandomizer gen = new UnicodeRandomizer(Charset.forName("UTF-8"), 80, 80);
// final Bean ent = Bean.builder()
// .value1(gen.getRandomValue())
// .value2(gen.getRandomValue())
// .value3(gen.getRandomValue())
// .build();
//
// final Set<ConstraintViolation<Bean>> vio = this.val.validate(ent);
//
// vio.forEach(System.out::println);
//
// assertThat(vio, hasSize(3));
// }
//}
//
//
| [
"pappy@ascelion.com"
] | pappy@ascelion.com |
8d40195956bb02acadea8eb47338bbe61c38965d | 9fd5136f9628b9d41397a9c27179b083304a8c37 | /src/testChat/DBControl.java | 0a97416d61fcc06cbc56383ab442929614407f4d | [] | no_license | woodtea/ChatSystem | 98d157c290aaad196cf5500ee8c811b3dedaada0 | f9f48574bfe88e9d424916a78e8980218fc11d65 | refs/heads/master | 2020-03-18T19:55:31.700765 | 2018-06-10T12:36:40 | 2018-06-10T12:36:40 | 135,185,629 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,112 | java | package testChat;
import java.beans.PropertyVetoException;
import java.sql.*;
import com.mchange.v2.c3p0.ComboPooledDataSource;
public class DBControl {
private static final String JDBC_DRIVER = Parameter.JDBC_DRIVER;
private static final String URL = Parameter.DB_URL;
private static final String USER = Parameter.DB_USER;
private static final String PASSWORD = Parameter.DB_PASSWD;
private static ComboPooledDataSource cpds;
private Connection conn;
private PreparedStatement stmt;
private String sql;
public DBControl() {
conn = null;
stmt = null;
}
public DBControl(boolean a) {
conn = null;
stmt = null;
if (a)
prepare();
}
public static void initialize() {
cpds = new ComboPooledDataSource();
try {
cpds.setDriverClass(JDBC_DRIVER);
cpds.setJdbcUrl(URL);
cpds.setUser(USER);
cpds.setPassword(PASSWORD);
cpds.setMaxPoolSize(100);
} catch (PropertyVetoException e) {
e.printStackTrace();
if (cpds != null)
cpds.close();
}
}
public void getConnection() {
try {
conn = cpds.getConnection();
} catch (SQLException e) {
System.out.println(">>SQL connection Exception<<");
e.printStackTrace();
}
}
public PreparedStatement getStatement(String sql) {
this.sql = sql;
try {
stmt = conn.prepareStatement(sql);
} catch (SQLException e) {
System.out.println(">>SQL statement Exception<<");
e.printStackTrace();
}
return stmt;
}
public void prepare() {
getConnection();
}
public static void closeResultSet(ResultSet rs) {
try {
if (rs != null)
rs.close();
} catch (SQLException e) {
System.out.println(">>SQL close resultset Exception<<");
e.printStackTrace();
}
}
public void closeStatement() {
try {
if (stmt != null)
stmt.close();
} catch (SQLException e) {
System.out.println(">>SQL close statement Exception<<");
e.printStackTrace();
}
}
public void closeConnection() {
try {
if (conn != null)
conn.close();
} catch (SQLException e) {
System.out.println(">>SQL close connection Exception<<");
e.printStackTrace();
}
}
public void clean() {
closeStatement();
closeConnection();
}
public ResultSet query() {
try {
return stmt.executeQuery();
} catch (SQLException e) {
System.out.println(">>SQL query Exception<<");
System.out.println("use SQL: " + sql);
e.printStackTrace();
}
return null;
}
public void update() {
try {
stmt.executeUpdate();
} catch (SQLException e) {
System.out.println(">>SQL update Exception<<");
System.out.println("use SQL: " + sql);
e.printStackTrace();
}
}
public static void close() {
synchronized (cpds) {
if (cpds != null)
cpds.close();
}
}
public void start_transaction(){
try {
conn.setAutoCommit(false);
} catch (SQLException e) {
e.printStackTrace();
}
}
}
/*
* 相关DB定义如下:
*
* 1)账户,id,密码数据库表: create table account( id int not null unique, name
* varchar(45) not null unique, password varchar(100) not null);
*
* 2) 朋友数据库表 create table friend( id int not null, friend_id int no FOREIGN KEY
* (id) REFERENCES account(id), FOREIGN KEY (friend_id) REFERENCES account(id));
*
* 3)群 create table groups(group_id INT PRIMARY KEY,group_name varchar(300) NOT NULL,
* owner_id INT NOT NULL,FOREIGN KEY(owner_id) REFERENCES account(id));
*
* 4) 群成员 create table group_member(group_id INT, member_id INT,
* FOREIGN KEY(group_id) REFERENCES groups(group_id),
* FOREIGN KEY(member_id) REFERENCES account(id));
*
* 5) 消息列表 create table message( msg_id varchar(200) PRIMARY KEY, msg_type int NOT NULL,
* msg_from varchar(300), msg_to varchar(300), is_group varchar(10), msg varchar(500));
*
* 6) 消息发送表 create table message_send( msg_id varchar(200),
* send_to varchar(200), have_send varchar(10), FOREIGN KEY(msg_id) REFERENCES message(msg_id));
*/
| [
"noreply@github.com"
] | noreply@github.com |
7e2e3af98fa5519abad5b10294fc22c0fa2af9bf | 9835eba1066e435f206429eda6ce2ae9db2e417f | /app/src/main/java/com/example/memorial_app/RouteMapActivity.java | 446d866593c0185651889ab785857319a7082de0 | [] | no_license | KU-AR/AR_R02 | dd3fbda3e01031c3cbae1e3cc6e9816e47c7e109 | de839e26f75803669da7063f2850f4e85c96efbe | refs/heads/master | 2021-06-03T11:18:00.325249 | 2020-12-16T09:21:28 | 2020-12-16T09:21:28 | 254,334,584 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,916 | java | package com.example.memorial_app;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.google.android.gms.maps.MapFragment;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class RouteMapActivity extends AppCompatActivity {
/* @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_route_map);
}*/
// *************************************************
// RecyclerView
// *************************************************
private static final String[] names = {
"日和山", "蒲生干潟", "仙台市立荒浜小学校",
"中野小学校校舎跡", "荒浜祈りの塔", "井土の一本松",
"南蒲生浄化センター", "農業園芸センター", "浪分神社", "浪分桜"
};
// それぞれの画像ファイルをdarawableに入れます
// ArrayListにコピーするためintからInteger型にしました
private static final Integer[] photos = {
R.drawable.img00, R.drawable.img01,
R.drawable.img02, R.drawable.img03,
R.drawable.img04, R.drawable.img05,
R.drawable.img06, R.drawable.img07,
R.drawable.img08, R.drawable.img09
};
private static final String[] captions = {
"震災以前は標高6mの元祖日本一低い山だったが,現在では標高3mの山となっている",
"仙台海浜鳥獣保護区の特別保護地区に指定されており,干潟でシジミなどが採れた",
"海から約700mの所に位置しており,震災では校舎2階まで津波が押し寄せた震災遺構",
"震災時に校舎2階まで津波が押し寄せた。2016年3月には142年の歴史に幕を下ろした",
"3.11の犠牲者への慰霊と鎮魂のため,荒浜自治会と七郷連合町内会により建てられた",
"海から1.5kmの距離にあり震災時は大きく津波をかぶったが,現在もそびえ立っている",
"震災により主要な土木・建築物が破壊され,機械・電気設備が壊滅的な被害を受けた",
"1989年に開園した農業園芸センターは,震災では津波冠水などの被害にあった",
"創建当時は今の場所から500mほど南東に位置したとされている",
"浪分神社にあやかり名づけられ,3.11の津波到達地周辺に目安木として植えられた桜"
};
MapFragment mf;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_route_map);
// activity_route_map の id と 合ってるか確認すること
RecyclerView recyclerView = findViewById(R.id.my_recycler_view);
// use this setting to improve performance if you know that changes
// in content do not change the layout size of the RecyclerView
recyclerView.setHasFixedSize(true);
// use a linear layout manager
RecyclerView.LayoutManager rLayoutManager = new LinearLayoutManager(this);
recyclerView.setLayoutManager(rLayoutManager);
// 配列をArrayListにコピー
List<String> itemNames = new ArrayList<String>(Arrays.asList(names));
List<Integer> itemImages = new ArrayList<Integer>(Arrays.asList(photos));
List<String> itemCaptions = new ArrayList<String>(Arrays.asList(captions));
// 多分無駄処理だけど未解読(emailの名残)
// 下のコードにしようとしたけど無理だった
/*
List<String> itemCaptions = new ArrayList<String>();
for(int i=0; i<itemNames.size() ;i++ ){
String str = String.format(Locale.ENGLISH, "%s", itemNames.get(i));
itemCaptions.add(str);
}*/
// specify an adapter (see also next example)
RecyclerView.Adapter rAdapter = new MyAdapter2(itemImages, itemNames, itemCaptions);
recyclerView.setAdapter(rAdapter);
/*
// *************************************************
// * Google Map *
// *************************************************
super.onCreate(savedInstanceState);
mf = MapFragment.newInstance();
FragmentManager fm = getFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
ft.add(android.R.id.content, mf);
ft.commit();*/
}
}
| [
"a1911503@sendai-nct.jp"
] | a1911503@sendai-nct.jp |
0fc21ba93abbcea3585e3bc40de0f615d87c7f17 | e4ab64b5f8e0d767661efdee845b45658269f845 | /BeispielSammlung/3.Semester/2004/Blatt07/Bsp07/Kreis.java | 9182f293c85da18530743101fe3a88f729515f0a | [] | no_license | cozowicz/BFI-Java-Lecture | 3e25b094aafd2911df97f28ea9da3ed236e6dd34 | 0f6cf6900b93058f970645a7dd1d79fbc3f234f2 | refs/heads/master | 2022-11-10T19:31:56.067012 | 2020-06-21T16:15:13 | 2020-06-21T16:16:55 | 273,939,221 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 638 | java | public class Kreis extends GrafischesObjekt {
private Punkt mittelpunkt;
private double radius;
public Kreis() {
}
public Kreis(Punkt mittelpunkt, double radius) {
set(mittelpunkt, radius);
}
public void set(Punkt mittelpunkt, double radius) {
this.mittelpunkt = mittelpunkt.copy();
this.radius = radius;
}
public Punkt getMittelpunkt() {
return mittelpunkt.copy();
}
public double getRadius() {
return radius;
}
public double berechneFlaeche() {
return radius*radius*Math.PI;
}
public void translate(double dx, double dy) {
mittelpunkt.translate(dx, dy);
}
}
| [
"eisber@eisber.net"
] | eisber@eisber.net |
2ba9454c845a988137fc62d2030dda1707d5cf54 | 9359744b8ed40499e983479d0c9c2b4975991979 | /src/main/java/Encrypt/DecryptInterface.java | 18727f7e5a719aa97803ac44e46703a39e5798cc | [] | no_license | Vastyjoy/org.sbtlession.lession7 | 3d67f9baf3b6d58a1d59ec9d9ba93e143e8abe1a | e19e5fe8dc64c64e2f22d530ed0c4831d4af436d | refs/heads/master | 2020-04-30T03:29:50.997783 | 2019-03-20T07:31:11 | 2019-03-20T07:31:11 | 176,587,572 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 102 | java | package Encrypt;
public interface DecryptInterface {
byte[] decrypt(String key, byte[] crypt);
}
| [
"llex.tihonov@gmail.com"
] | llex.tihonov@gmail.com |
f3ed9982f713e11bccd551ae3559d958546910ca | 4f536466f18f3ee5767a48254c80000cc2c1b64b | /app/src/main/java/com/bengbeng/denemeson/Iletisim.java | d52d978912fbcab0f7bc9237f92bf67eba36a13e | [] | no_license | c1211018/new-project-code | fd658e33fbf726286b4505124224e5b6693ca907 | 08e55a3f3e07b45b2efe101aaf7c347fdaaa3b30 | refs/heads/master | 2021-09-04T09:23:03.233281 | 2018-01-17T17:40:11 | 2018-01-17T17:40:11 | 117,870,104 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 528 | java | package com.bengbeng.denemeson;
import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class Iletisim extends Fragment {
View rootview;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState){
rootview=inflater.inflate(R.layout.iletisim,container,false);
return rootview;
}
} | [
"c1211018@student.cankaya.edu.tr"
] | c1211018@student.cankaya.edu.tr |
a995be3be4aa50cd848fddca59cdd8bf2e4208ad | bbded27072f01cb48fcd6c3e824aaeae38b0e6a0 | /app/src/main/java/com/example/vamashikrishna/passiton/MainActivity.java | b4362f994310bcccbfcff27c778319620499ebeb | [] | no_license | vamsinole/pass_it_on_android | 4deb70df9e9d76995a369245508fcaa6ebbd701e | 1553fa058b09f68fcd188cf85203f130c8c63d36 | refs/heads/master | 2021-01-10T02:09:32.422123 | 2016-02-27T03:45:42 | 2016-02-27T03:45:42 | 52,608,976 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,190 | java | package com.example.vamashikrishna.passiton;
import android.app.ActivityOptions;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.ActionBarActivity;
import android.view.Window;
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
int SPLASH_DISPLAY_LENGTH = 3 * 1000;
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
/* Create an Intent that will start the Menu-Activity. */
Intent mainIntent = new Intent(MainActivity.this, LaunchingActivity.class);
Bundle bndlanimation =
ActivityOptions.makeCustomAnimation(getApplicationContext(), R.anim.left_go2, R.anim.enter_right2).toBundle();
MainActivity.this.startActivity(mainIntent,bndlanimation);
MainActivity.this.finish();
}
}, SPLASH_DISPLAY_LENGTH);
}
}
| [
"vamsikrishnaenjapuri@gmail.com"
] | vamsikrishnaenjapuri@gmail.com |
2740d6184c8fabefc3fba30ff5ee3397e3f921ae | e8f09ef272c36d11511992f9e8db8151d2cc24cb | /src/main/java/com/byspace/portal/article/service/impl/ArticleServiceImpl.java | 45ea49e5f333d1883451c1214885ccfe46c4dc87 | [] | no_license | byspace/idm | d4c59f4977eb113b652a6071c4944f181173fafa | dd81a41fddaeb237c8b7e653e0b6f3e053388aa9 | refs/heads/master | 2020-03-30T13:10:52.196341 | 2013-07-23T02:52:06 | 2013-07-23T02:52:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,344 | java | package com.byspace.portal.article.service.impl;
import com.byspace.portal.article.entity.Article;
import com.byspace.portal.article.po.ArticleListPaginator;
import com.byspace.portal.article.service.ArticleService;
import com.byspace.portal.topic.service.TopicService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import java.util.List;
/**
* Created with IntelliJ IDEA.
* User: Yangxu
* Date: 13-6-6
* Time: 下午3:07
*/
@Service("articleService")
@Transactional
public class ArticleServiceImpl implements ArticleService {
@PersistenceContext
private EntityManager em;
@Override
public void saveArticle(Article article) {
if (article.getId() == 0) {
em.persist(article);
} else {
em.merge(article);
}
}
@Override
@Transactional(readOnly = true)
public Article read(int articleId) {
return em.find(Article.class, articleId);
}
@Override
public void batchDelete(List<Integer> idList) {
for (int id : idList) {
Article article = em.find(Article.class, id);
em.remove(article);
}
}
@Override
@Transactional(readOnly = true)
public List<Article> listArticleByTopic(int topicId, ArticleListPaginator paginator) {
String countHql = "select count(a.id) as cnt from Article a where a.topic.id=:topicId";
Query countQuery = em.createQuery(countHql);
countQuery.setParameter("topicId", topicId);
long total = (Long)countQuery.getSingleResult();
paginator.setTotal(total);
paginator.calculateTotalPage();
int startFrom = (paginator.getPageNum() - 1) * paginator.getLimit();
String hql = "from Article a where a.topic.id=:topicId order by a.publishDate desc";
Query query = em.createQuery(hql);
query.setParameter("topicId", topicId);
query.setMaxResults(paginator.getLimit());
query.setFirstResult(startFrom);
return query.getResultList();
}
@Override
@Transactional(readOnly = true)
public List<Article> listArticleByTopic(int topicId, int size) {
String hql = "from Article a where a.topic.id=:topicId order by a.publishDate desc";
Query query = em.createQuery(hql);
query.setParameter("topicId", topicId);
query.setMaxResults(size);
return query.getResultList();
}
}
| [
"hityangxu@yahoo.com"
] | hityangxu@yahoo.com |
55a48fb1f802c0730cc81916a59103857d7f9edd | fb3f91fb6c18bb93c5d51b58d13e201203833994 | /Trabajos/Sernanp/sources/SernanpApp/SernanpAppDao/src/main/java/sernanp/app/dao/query/mapper/RptPlameDetalleMapper.java | 2ce3fac798cd26180eb89759f3368cfb6039fc9a | [] | no_license | cgb-extjs-gwt/avgust-extjs-generator | d24241e594078eb8af8e33e99be64e56113a1c0c | 30677d1fef4da73e2c72b6c6dfca85d492e1a385 | refs/heads/master | 2023-07-20T04:39:13.928605 | 2018-01-16T18:17:23 | 2018-01-16T18:17:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 797 | java | package sernanp.app.dao.query.mapper;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import sernanp.app.dao.query.domain.RptPlameDetalle;
import sernanp.app.dao.query.domain.RptPlameDetalleCriteria;
public interface RptPlameDetalleMapper {
List<RptPlameDetalle> getListQueryByCriteria(RptPlameDetalleCriteria criteria);
List<RptPlameDetalle> getListQueryByMap(Map<String, Object> paramMap);
List<RptPlameDetalle> getListQueryPaginationByCriteria(RptPlameDetalleCriteria criteria, RowBounds rowBounds);
List<RptPlameDetalle> getListQueryPaginationByMap(Map<String, Object> paramMap, RowBounds rowBounds);
int getCountRowsByCriteria(RptPlameDetalleCriteria criteria);
int getCountRowsByMap(Map<String, Object> paramMap);
}
| [
"raffo8924@gmail.com"
] | raffo8924@gmail.com |
a12d2a8bcb3447e9c49af9c77195516cc9e95901 | fb5eaa510681134ecce750957e3d61ae56378002 | /src/com/example/subastaya/OfferFormFragment.java | 7afcbe8e936e0d1a7c3531a4470d5141c5769500 | [
"MIT"
] | permissive | farolfo/subasta-ya | 4c1f471f13b9e9478b04f8c362c4ec4bce4fe819 | 1b096a5a08668cef9045a17d86fd75118deadeed | refs/heads/master | 2021-01-17T13:08:16.767784 | 2014-07-10T22:24:32 | 2014-07-10T22:24:32 | 19,843,089 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,226 | java | package com.example.subastaya;
import retrofit.Callback;
import retrofit.RestAdapter;
import retrofit.RetrofitError;
import retrofit.client.Response;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class OfferFormFragment extends Fragment {
public static final String EXTRA_MELI_URL = "MELI_URL";
public static final String EXTRA_USER_TOKEN = "USER_TOKEN";
public static final String SELECTED_PRODUCT = "SELECTED_PRODUCT";
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.offerform_view, container, false);
}
public void login() {
RestAdapter restAdapterOAuth = new RestAdapter.Builder().setEndpoint("http://auth.mercadolibre.com").build();
MeliOAuth meliOAuthService = restAdapterOAuth.create(MeliOAuth.class);
meliOAuthService.authorize("code", "6684097356045737", "http://subastaya.com", new Callback<String>() {
public void processResponse(Response response) {
if ( response.getStatus() == 200 ) {
Intent intent = new Intent(getActivity(), MeliOAuthWebActivity.class);
intent.putExtra(EXTRA_MELI_URL, response.getUrl());
startActivity(intent);
} else {
//TODO Handle oauth service not working
}
}
@Override
public void failure(RetrofitError arg0) {
processResponse(arg0.getResponse());
}
@Override
public void success(String arg0, Response arg1) {
processResponse(arg1);
}
});
}
public void offer(View view, AuthUser user, Product product) {
if ( user == null ) {
login();
return;
}
DialogFragment paymentDialog = new PaymentDialogFragment();
Bundle args = new Bundle();
args.putString(EXTRA_USER_TOKEN, user.getToken());
args.putSerializable(SELECTED_PRODUCT, product);
paymentDialog.setArguments(args);
paymentDialog.show(getActivity().getSupportFragmentManager(), "payments");
}
} | [
"francoarolfo@hotmail.com"
] | francoarolfo@hotmail.com |
73eb56e616a8f9365c75920abc8300feb9a0f29a | ea3f6c7309e39ee2e8378131de652ddf3c695a05 | /src/listener/IFloatingTextListener.java | 1403edf693adcad5b731acf2cdbddf464314ebff | [] | no_license | ogrady/gtd | 47efb02e87e8e3fe2d755748f5ec53a721f6a736 | e885c25fa46bfd6e153bd4bb092ccbd4c70394f2 | refs/heads/master | 2021-01-19T06:20:19.925410 | 2014-07-16T21:16:45 | 2014-07-16T21:16:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 355 | java | package listener;
import frontend.gui.FloatingText;
public interface IFloatingTextListener extends IListener {
/**
* Called when the floating text reaches 0-alpha-component (= is not
* rendered anymore)
*
* @param text
* the {@link FloatingText} that just faded out
*/
public void onFadeOut(FloatingText text);
}
| [
"danielogrady@gmx.de"
] | danielogrady@gmx.de |
76f9d97f3a2d0cdb82accc9d230695b6d17921a2 | 5d5dc0db9ab2122ce19d7f8c090cb95a64b48de1 | /lg-rpc/lg-rpc-api/src/main/java/com/chygo/rpc/api/UserService.java | 8944ba18f25e785f6e879b90a213dc5336052187 | [] | no_license | CHYGO1985/RPC_Framework | 6710f9f98e04f320eb1d061002ef3319f327ce1f | 06a09c0548dcf5a1a6826a88e6713aaded3eea1f | refs/heads/main | 2023-07-19T01:32:50.013545 | 2021-09-06T13:48:12 | 2021-09-06T13:48:12 | 401,592,553 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 448 | java | package com.chygo.rpc.api;
import com.chygo.rpc.pojo.User;
/**
* The interface of User Service
*
* @author jingjiejiang
* @history Aug 18, 2021
*
*/
public interface UserService {
/**
* Get user by ID.
*
* @param id
* @return
*/
User getById(int id);
/**
*
* Search user by ID and return status as string
*
* @param id
* @return
*/
String getByIdReturnStr(int id);
}
| [
"jingjiejiang85@gmail.com"
] | jingjiejiang85@gmail.com |
3bb2b0b5bd1f2f36b109963da65a4c4c504f1aba | 312bd505a1723ffdc6fe61668b687b9fdbcd9421 | /src/main/java/org/libra/types/WriteSetMut.java | 00f807ab82927b81224bb2429203b4bdd353028f | [
"Apache-2.0"
] | permissive | judeebene/libra-client-sdk-java | 7ba283e8c3a3179f9030480473e083da174c5a73 | c419503f7389903fa6a2ae51afc482cf882e530c | refs/heads/master | 2023-01-13T02:53:56.512318 | 2020-10-21T19:11:00 | 2020-10-21T19:11:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,679 | java | package org.libra.types;
import java.math.BigInteger;
public final class WriteSetMut {
public final java.util.List<com.novi.serde.Tuple2<AccessPath, WriteOp>> write_set;
public WriteSetMut(java.util.List<com.novi.serde.Tuple2<AccessPath, WriteOp>> write_set) {
java.util.Objects.requireNonNull(write_set, "write_set must not be null");
this.write_set = write_set;
}
public void serialize(com.novi.serde.Serializer serializer) throws com.novi.serde.SerializationError {
serializer.increase_container_depth();
TraitHelpers.serialize_vector_tuple2_AccessPath_WriteOp(write_set, serializer);
serializer.decrease_container_depth();
}
public byte[] lcsSerialize() throws com.novi.serde.SerializationError {
com.novi.serde.Serializer serializer = new com.novi.lcs.LcsSerializer();
serialize(serializer);
return serializer.get_bytes();
}
public static WriteSetMut deserialize(com.novi.serde.Deserializer deserializer) throws com.novi.serde.DeserializationError {
deserializer.increase_container_depth();
Builder builder = new Builder();
builder.write_set = TraitHelpers.deserialize_vector_tuple2_AccessPath_WriteOp(deserializer);
deserializer.decrease_container_depth();
return builder.build();
}
public static WriteSetMut lcsDeserialize(byte[] input) throws com.novi.serde.DeserializationError {
if (input == null) {
throw new com.novi.serde.DeserializationError("Cannot deserialize null array");
}
com.novi.serde.Deserializer deserializer = new com.novi.lcs.LcsDeserializer(input);
WriteSetMut value = deserialize(deserializer);
if (deserializer.get_buffer_offset() < input.length) {
throw new com.novi.serde.DeserializationError("Some input bytes were not read");
}
return value;
}
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
WriteSetMut other = (WriteSetMut) obj;
if (!java.util.Objects.equals(this.write_set, other.write_set)) { return false; }
return true;
}
public int hashCode() {
int value = 7;
value = 31 * value + (this.write_set != null ? this.write_set.hashCode() : 0);
return value;
}
public static final class Builder {
public java.util.List<com.novi.serde.Tuple2<AccessPath, WriteOp>> write_set;
public WriteSetMut build() {
return new WriteSetMut(
write_set
);
}
}
}
| [
"ilx@fb.com"
] | ilx@fb.com |
f50b2e796a183fed9e38a38b94eec2752e176780 | 99c542c651f2458764fd2e4c117d18fe73d97031 | /src/com/example/dbmanager/client/ManagerProjectWindow.java | eafdb90be5a756ea6573abd8402ec4d60c274533 | [] | no_license | Deyis/isla-de-kvalik | d2d5294b2030a8c547dc41dd9870cff6ad48b520 | 65cacf63772b51fdd94d2cf01dfc3e22c3da1409 | refs/heads/master | 2021-01-19T18:56:05.364384 | 2012-05-24T23:56:16 | 2012-05-24T23:56:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,326 | java | package com.example.dbmanager.client;
import com.example.dbmanager.domain.AppContext;
import com.example.dbmanager.domain.Person;
import com.example.dbmanager.domain.Project;
import com.extjs.gxt.ui.client.data.*;
import com.extjs.gxt.ui.client.event.BaseEvent;
import com.extjs.gxt.ui.client.event.Events;
import com.extjs.gxt.ui.client.event.GridEvent;
import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.store.GroupingStore;
import com.extjs.gxt.ui.client.store.ListStore;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.Window;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.grid.*;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import java.util.ArrayList;
import java.util.List;
public class ManagerProjectWindow extends Window{
private final DBManagerServiceAsync dbmanagerService = GWT.create(DBManagerService.class);
private ManagerProjectWindow projectWindow;
private AppContext context;
private GroupingView view = null;
private Grid<BeanModel> grid;
public void reloadProjects(AppContext appContext){
context = appContext;
projectWindow = new ManagerProjectWindow();
RpcProxy<List<Project>> proxy = new RpcProxy<List<Project>>() {
@Override
protected void load(Object loadConfig, AsyncCallback<List<Project>> callback) {
dbmanagerService.getProjectsByPersonId(context.getCurrentPerson().getId(), callback);
}
};
RpcProxy<List<Person>> peopleProxy = new RpcProxy<List<Person>>() {
@Override
protected void load(Object loadConfig, AsyncCallback<List<Person>> callback) {
dbmanagerService.getPersonsByPprojectId(context.getCurrentProject().getId(), callback);
}
};
BeanModelReader reader = new BeanModelReader();
ListLoader<ListLoadResult<ModelData>> loader = new BaseListLoader<ListLoadResult<ModelData>>(proxy, reader);
final GroupingStore<BeanModel> store = new GroupingStore<BeanModel>(loader);
loader.load();
view = new GroupingView();
view.setShowGroupedColumn(false);
view.setForceFit(true);
List<ColumnConfig> columnConfigs = getColumnConfig();
final ColumnModel cm = new ColumnModel(columnConfigs);
grid = new Grid<BeanModel>(store, cm);
final ColumnModel columnModel = new ColumnModel(columnConfigs);
view.setGroupRenderer(new GridGroupRenderer() {
public String render(GroupColumnData data) {
String f = cm.getColumnById(data.field).getHeader();
String l = data.models.size() == 1 ? "Item" : "Items";
return f + ": " + data.group + " (" + data.models.size() + " " + l + ")";
}
});
grid.setView(view);
ContentPanel panel = new ContentPanel();
panel.setHeading("testTitle");
panel.setFrame(true);
panel.setSize("500", "300");
panel.setLayout(new FitLayout());
//grid.setAutoExpandColumn("Name");
grid.addListener(Events.CellDoubleClick, new Listener<GridEvent<ModelData>>() {
@Override
public void handleEvent(GridEvent<ModelData> be) {
// final EditProjectWindow editProjectWindow = new EditProjectWindow(be.getModel());
Long id = (Long) be.getModel().get("id");
final String name = (String) be.getModel().get("name");
final List<Project> pList = new ArrayList<Project>();
dbmanagerService.findProjectById(id, new AsyncCallback<Project>() {
@Override
public void onFailure(Throwable caught) {
}
@Override
public void onSuccess(Project result) {
pList.add(result);
context.setCurrentProject(pList.get(0));
PersonWindow personWindow = new PersonWindow();
personWindow.reloadPersons();
personWindow.setHeading("People assigned for project " + name);
personWindow.close();
}
});
// Button saveButton = new Button("Save");
// saveButton.addListener(Events.OnClick, new Listener<BaseEvent>() {
// @Override
// public void handleEvent(BaseEvent be) {
// if (pList.size() > 0) {
// final Project updateProject = pList.get(0);
// updateProject.setName(editProjectWindow.getName());
// dbmanagerService.updateProject(updateProject, new AsyncCallback() {
// @Override
// public void onFailure(Throwable caught) {
// }
//
// @Override
// public void onSuccess(Object result) {
// editProjectWindow.close();
// projectWindow.close();
// reloadProjects(context);
// }
// });
// }
// }
// });
// Button cancelButton = new Button("Cancel");
// cancelButton.addListener(Events.OnClick, new Listener<BaseEvent>() {
// @Override
// public void handleEvent(BaseEvent be) {
// editProjectWindow.close();
// }
// });
// editProjectWindow.addButton(saveButton);
// editProjectWindow.addButton(cancelButton);
// editProjectWindow.show();
}
});
panel.add(grid);
projectWindow.setPlain(true);
projectWindow.setSize(600, 400);
projectWindow.setHeading("Project");
projectWindow.setLayout(new FitLayout());
projectWindow.add(panel);
projectWindow.show();
}
private List<ColumnConfig> getColumnConfig () {
final List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
ColumnConfig column = new ColumnConfig("id", "ID", 50);
columns.add(column);
final ColumnConfig name = new ColumnConfig("name", "Name", 200);
TextField<String> text = new TextField<String>();
// text.setAllowBlank(false);
name.setEditor(new CellEditor(text));
columns.add(name);
column = new ColumnConfig("delete", "Delete", 70);
column.setRenderer(new GridCellRenderer() {
@Override
public Object render(ModelData model, String property, ColumnData config, int rowIndex, int colIndex, ListStore listStore, Grid grid) {
final Long id = model.get("id");
Button button = new Button("Delete");
button.addListener(Events.OnClick, new Listener<BaseEvent>() {
@Override
public void handleEvent(BaseEvent be) {
dbmanagerService.removeProject(id, new AsyncCallback<Integer>() {
@Override
public void onFailure(Throwable caught) {
}
@Override
public void onSuccess(Integer result) {
projectWindow.close();
projectWindow.reloadProjects(context);
}
});
}
});
return button;
}
});
columns.add(column);
return columns;
}
} | [
"denisivanchenko1991@gmail.com"
] | denisivanchenko1991@gmail.com |
5df45fd9986a7f5c789123a78526739ef3f688e9 | 1b01f1beca62f2bc90b561f5d06864eef8fcfe62 | /code/src/main/java/org/apache/deltaspike/example/json/EnrollmentSerializer.java | 7e9e51fcb190ddfc9d2123ad1e6edbbdeb2d0bab | [
"Apache-2.0"
] | permissive | AdoucheAli/restful-and-beyond-tut2184 | 578751307584f7c2caaeab293d7461d8eff292c2 | b50b36b56a259cdc333294badd6339360180b13b | refs/heads/master | 2021-05-27T23:36:58.717732 | 2014-09-29T21:51:30 | 2014-09-29T21:51:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 952 | java | /*
* Copyright (c) 2013 - 2014 Sparta Systems, Inc.
*/
package org.apache.deltaspike.example.json;
import org.apache.deltaspike.example.jpa.Enrollment;
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.SerializerProvider;
import java.io.IOException;
public class EnrollmentSerializer extends JsonSerializer<Enrollment> {
@Override
public void serialize(Enrollment enrollment, JsonGenerator jsonGenerator, SerializerProvider serializerProvider)
throws IOException, JsonProcessingException {
jsonGenerator.writeStartObject();
if(enrollment.getEnrollmentId() != null) {
jsonGenerator.writeNumberField("enrollmentId", enrollment.getEnrollmentId());
}
jsonGenerator.writeStringField("name",enrollment.getName());
jsonGenerator.writeEndObject();
}
}
| [
"johndament@apache.org"
] | johndament@apache.org |
d8400acd6789524f115ae3694798a66b848dd311 | 9d6d5c0c3eed4c805c4647df5cd18124ef75bba1 | /ThinkingInJava/src/be/geertvanderpijpen/thinkinginjava/exercises/interfaces/threemethods/ThreeMethods.java | 36024dca15f0db3b11ead5a380ccaa70f8a202a6 | [] | no_license | gvanderpijpen/thinking-in-java | f8bbed91cbb6ae926e3983d347227de6fe79a8d6 | cef8af8277f478f007663c63518e5255a3fecd91 | refs/heads/master | 2021-01-13T12:46:54.712042 | 2017-01-06T09:23:46 | 2017-01-06T09:23:46 | 72,341,157 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 159 | java | package be.geertvanderpijpen.thinkinginjava.exercises.interfaces.threemethods;
public interface ThreeMethods {
void a();
void b();
void c();
}
| [
"geert.vanderpijpen@gmail.com"
] | geert.vanderpijpen@gmail.com |
76258d632701a43576a9495e418ee6bf3ce39f2d | 8aeed28c5b4bb96fbb926e8469e4e7bf2b8ed915 | /services/evented-proto-service/client/src/main/java/org/totalgrid/reef/examples/service/event/client/KeyValueDescriptor.java | d34be39f90cc39cd45283ed9e758cf456bf88cec | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | gec/reef-example-apps | 35d88fafa6cd2ca00f6942435704b1686b7f4bf7 | 080a556cbedf505bd6658c720bf403125c4ed6d2 | refs/heads/master | 2020-12-30T09:26:08.212066 | 2013-01-17T16:23:37 | 2013-01-17T16:23:37 | 1,614,505 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,251 | java | /**
* Copyright 2011 Green Energy Corp.
*
* Licensed to Green Energy Corp (www.greenenergycorp.com) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. Green Energy
* Corp 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.totalgrid.reef.examples.service.event.client;
import org.totalgrid.reef.client.types.TypeDescriptor;
import org.totalgrid.reef.examples.service.event.client.proto.RestEvented;
import org.totalgrid.reef.examples.service.event.client.proto.RestEvented.KeyValue;
import java.io.IOException;
/**
* KeyValue type descriptor, tells clients/services how to serialize, deserialize and route
* KeyValue messages
*/
public class KeyValueDescriptor implements TypeDescriptor<KeyValue> {
/**
* Serialize the proto object to a byte array
*
* @param value
* @return
*/
@Override
public byte[] serialize(KeyValue value) {
return value.toByteArray();
}
/**
* Deserialize a byte array into a proto object
*
* @param bytes
* @return
* @throws IOException
*/
@Override
public KeyValue deserialize(byte[] bytes) throws IOException {
return KeyValue.parseFrom(bytes);
}
/**
* Class of the KeyValue proto message
*
* @return
*/
@Override
public Class<KeyValue> getKlass() {
return KeyValue.class;
}
/**
* Used to declare the AMQP exchange for request/responses
*
* @return
*/
@Override
public String id() {
return "key_value";
}
}
| [
"devans@greenenergycorp.com"
] | devans@greenenergycorp.com |
79e64bdbf85af98ec1694953e1020d3b49c2b2d9 | dedda57311ec2febface084914ce4f527c1edcc2 | /aubga-java/src/main/java/com/aubga/java/concurrent/java_concurrent_pratice/atomicvariable/CasNumberRange.java | 09a1e65f54b64529964396ec7ac0c9b66c5a587b | [] | no_license | AuBGa/aubga | 07f5aafdf17dc2bd6f2af8585032f2a7e86721b5 | e9f5e3044d962566a127d059674a0d094f41e6b0 | refs/heads/master | 2022-12-25T14:32:34.755917 | 2020-08-18T11:08:04 | 2020-08-18T11:08:04 | 30,595,249 | 1 | 0 | null | 2022-12-16T05:06:48 | 2015-02-10T14:15:32 | Java | UTF-8 | Java | false | false | 1,702 | java | package com.aubga.java.concurrent.java_concurrent_pratice.atomicvariable;
import com.aubga.java.concurrent.java_concurrent_pratice.annotations.Immutable;
import com.aubga.java.concurrent.java_concurrent_pratice.annotations.ThreadSafe;
import java.util.concurrent.atomic.AtomicReference;
/**
* CasNumberRange
* <p/>
* Preserving multivariable invariants using CAS
*
* @author Brian Goetz and Tim Peierls
*/
@ThreadSafe
public class CasNumberRange {
@Immutable
private static class IntPair {
// INVARIANT: lower <= upper
final int lower;
final int upper;
public IntPair(int lower, int upper) {
this.lower = lower;
this.upper = upper;
}
}
private final AtomicReference<IntPair> values = new AtomicReference<IntPair>(new IntPair(0, 0));
public int getLower() {
return values.get().lower;
}
public int getUpper() {
return values.get().upper;
}
public void setLower(int i) {
while (true) {
IntPair oldv = values.get();
if (i > oldv.upper)
throw new IllegalArgumentException("Can't set lower to " + i + " > upper");
IntPair newv = new IntPair(i, oldv.upper);
if (values.compareAndSet(oldv, newv))
return;
}
}
public void setUpper(int i) {
while (true) {
IntPair oldv = values.get();
if (i < oldv.lower)
throw new IllegalArgumentException("Can't set upper to " + i + " < lower");
IntPair newv = new IntPair(oldv.lower, i);
if (values.compareAndSet(oldv, newv))
return;
}
}
}
| [
"jinpengjia@forgame.com"
] | jinpengjia@forgame.com |
7cac9fded82326f114b87ec36eac04dc4679e5b0 | 5d503a7d209cdb793ec629accc848b7039768b63 | /src/main/java/leetcode_146/LeetCode146.java | f1ae613699599b5d6169a24995a2c73b15cc8cb7 | [] | no_license | zhouyu04/interview | 7ec2b9e948f8188960af052528ef65f3e400e623 | fd0c7e63fde6360e296d7fb6787c6d19db1beae6 | refs/heads/master | 2022-11-27T10:57:12.878557 | 2020-08-03T14:40:39 | 2020-08-03T14:40:39 | 279,623,764 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 692 | java | package leetcode_146;
public class LeetCode146 {
public static void main(String[] args) {
LRUCache cache = new LRUCache(2);
cache.put(1, 1);
cache.put(2, 2);
System.out.println(cache.get(1)); // 返回 1
cache.put(3, 3); // 该操作会使得关键字 2 作废
System.out.println(cache.get(2)); // 返回 -1 (未找到)
cache.put(4, 4); // 该操作会使得关键字 1 作废
System.out.println(cache.get(1)); // 返回 -1 (未找到)
System.out.println(cache.get(3)); // 返回 3
System.out.println(cache.get(4)); // 返回 4
// cache.put(3,3);
}
}
| [
"zzyy0320@163.com"
] | zzyy0320@163.com |
74bd04362c167e5008d6a17cefafd32658401cdd | 2e20ba6c5fd0d437881433211a17bfbf04dc3bac | /app/src/androidTest/java/com/example/hackathon/ExampleInstrumentedTest.java | 720ab4822e3ac767ada8699667ee2c7ff90a57cd | [] | no_license | spartanGhost17/Hackathon_server_app | 94333616c05132bd6040ba93af8f088b359483b0 | 4fcf75ccc5e8aa89b6199f797a176a0aea2e4994 | refs/heads/master | 2023-01-05T12:21:56.759872 | 2020-11-08T18:08:00 | 2020-11-08T18:08:00 | 310,397,111 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 758 | java | package com.example.hackathon;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.hackathon", appContext.getPackageName());
}
}
| [
"adambaku5216@gmail.com"
] | adambaku5216@gmail.com |
26a94d3c993fa00b523a4c5d13cfb2fe07cee114 | e4de0cf52ee800bab56bd7ba787e86e73c1d3738 | /src/ejemplo/cajero/control/ComandoListarOperaciones.java | c9a2d3ffd3784c7776c005c3aa47ca5c6a4cbc5b | [] | no_license | njhurtado/VariabilidadConAspectos | 158bc36770268223c9147c58a066418075ce0de5 | fac090f65ee56ce788e6689b66c46319cd51a5a8 | refs/heads/master | 2020-08-06T16:54:41.317803 | 2019-10-05T23:15:07 | 2019-10-05T23:15:07 | 213,082,986 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 551 | java | package ejemplo.cajero.control;
import ejemplo.cajero.modelo.Banco;
/**
* Comando usado para consignar dinero
*/
public class ComandoListarOperaciones implements Comando {
@Override
public String getNombre() {
return "Listar operaciones";
}
@Override
public void ejecutar(Banco contexto) throws Exception {
System.out.println("Listado de operaciones");
System.out.println();
// la clase Console no funciona bien en Eclipse
for(String operacion : contexto.getLstOperaciones()) {
System.out.println(operacion);
}
}
}
| [
"njhurtado@gmail.com"
] | njhurtado@gmail.com |
4063a798fa2193d3f15269210f5a3c8bbc389b1b | 47d68facc35f76cc7eb2c43e29522d56f96558d0 | /app/src/main/java/com/example/indrianinatalia/database/AdapterQ.java | 4590decc1da08101d7301a9f733533da35f833c7 | [] | no_license | eltawakkal/SQLite-with-actionSearchable | f207763f4a2dffc6df0dafc03ef40ec9ccd3a6d6 | 8020106cf2f57dcbdb8bb99024b88494dda70ec9 | refs/heads/master | 2021-01-21T21:54:35.333858 | 2017-02-13T08:46:50 | 2017-02-13T08:46:50 | 81,803,580 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,079 | java | package com.example.indrianinatalia.database;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import java.util.List;
/**
* Created by indrianinatalia on 2/9/17.
*/
public class AdapterQ extends RecyclerView.Adapter<AdapterQ.ViewHolder> {
Context context;
List<String> id, name, gen, numb;
View view;
ViewHolder holder;
int[] image = {R.drawable.boy, R.drawable.girl};
String []menu = {"Call", "Edit", "Delete"};
public AdapterQ(Context context, List<String> id, List<String> name, List<String> gen, List<String> numb) {
this.context = context;
this.id = id;
this.name = name;
this.gen = gen;
this.numb = numb;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
view = LayoutInflater.from(parent.getContext()).inflate(
R.layout.custom_view, parent, false);
holder = new ViewHolder(view);
return holder;
}
@Override
public void onBindViewHolder(final ViewHolder holder, final int position) {
holder.txtName.setText(name.get(position));
holder.txtGen.setText(gen.get(position));
holder.txtNumb.setText(numb.get(position));
if(holder.txtGen.getText().toString().equalsIgnoreCase("boy")){
holder.imageView.setImageResource(image[0]);
}else{
holder.imageView.setImageResource(image[1]);
}
holder.linearLayout.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
ListView lisview = new ListView(context);
lisview.setAdapter(new ArrayAdapter(context, android.R.layout.simple_list_item_1, menu));
final AlertDialog.Builder pesan = new AlertDialog.Builder(context);
pesan
.setTitle("Opton")
.setView(lisview)
.setNegativeButton("Close", null).create().show();
lisview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int positionQ, long idQ) {
if(positionQ==0){
Intent intent = new Intent (Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:"+numb.get(position)));
context.startActivity(intent);
}else if(positionQ==1){
Intent intent = new Intent(context, AddActivity.class);
intent.putExtra("id", id.get(position));
context.startActivity(intent);
}
}
});
return true;
}
});
}
@Override
public int getItemCount() {
return name.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
ImageView imageView;
TextView txtName, txtNumb, txtGen;
LinearLayout linearLayout;
public ViewHolder(View itemView) {
super(itemView);
imageView = (ImageView) itemView.findViewById(R.id.imgCon);
txtName = (TextView) itemView.findViewById(R.id.txtName);
txtGen = (TextView) itemView.findViewById(R.id.txtGen);
txtNumb = (TextView) itemView.findViewById(R.id.txtNumb);
linearLayout = (LinearLayout) itemView.findViewById(R.id.linearUtama);
}
}
}
| [
"indrianinatalia@Indrianis-MacBook-Pro.local"
] | indrianinatalia@Indrianis-MacBook-Pro.local |
a1143b8270794447536eb39a9c38764739931336 | 32413800a1aec6eb93dce743c3f2638383609619 | /src/main/java/space/yangshuai/ojsolutions/leetcode/lessons/array/ExistsDuplication.java | b52d2aa9e0d94a90d538cbbb85c10f0d3d44117f | [] | no_license | ysrotciv/ojsolutions | 8136b61172e3b15c2274bac5b7bca384e948e5e4 | f58f2d9f9307fa265e5762c73c01b91a7a8f659f | refs/heads/master | 2021-11-02T16:57:47.873619 | 2021-10-24T02:35:55 | 2021-10-24T02:35:55 | 89,989,890 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 419 | java | package space.yangshuai.ojsolutions.leetcode.lessons.array;
import java.util.Arrays;
/**
* @author yangshuai on 2019-04-03.
*/
public class ExistsDuplication {
public boolean containsDuplicate(int[] nums) {
Arrays.sort(nums);
for (int i = 1; i < nums.length; ++i) {
if (nums[i] == nums[i - 1]) {
return true;
}
}
return false;
}
}
| [
"yangshuai1@yixia.com"
] | yangshuai1@yixia.com |
d342cca412658cadbe688716be53d3a8ffc4a121 | aeba9edaed133ecbfbad19facab91e74e563e0b8 | /src/main/java/com/diviso/graeshoppe/order/client/bpmn/model/MembershipResponse.java | a0b6a0a4a54c5b509fa67e21c0badecec3b5b05b | [] | no_license | DivisoSofttech/order-service | 84812c7bab9e7db939104a997d02d1cbb0d2105e | c2f76836090c56033e492c8257763d8709340910 | refs/heads/master | 2022-12-26T17:57:16.867009 | 2020-07-04T04:48:50 | 2020-07-04T04:48:50 | 202,398,373 | 0 | 3 | null | 2022-12-16T04:43:11 | 2019-08-14T17:42:57 | Java | UTF-8 | Java | false | false | 2,774 | java | package com.diviso.graeshoppe.order.client.bpmn.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.validation.annotation.Validated;
/**
* MembershipResponse
*/
@Validated
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2019-08-01T11:49:01.976907+05:30[Asia/Kolkata]")
public class MembershipResponse {
@JsonProperty("userId")
private String userId = null;
@JsonProperty("url")
private String url = null;
@JsonProperty("groupId")
private String groupId = null;
public MembershipResponse userId(String userId) {
this.userId = userId;
return this;
}
/**
* Get userId
* @return userId
**/
@ApiModelProperty(value = "")
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public MembershipResponse url(String url) {
this.url = url;
return this;
}
/**
* Get url
* @return url
**/
@ApiModelProperty(value = "")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public MembershipResponse groupId(String groupId) {
this.groupId = groupId;
return this;
}
/**
* Get groupId
* @return groupId
**/
@ApiModelProperty(value = "")
public String getGroupId() {
return groupId;
}
public void setGroupId(String groupId) {
this.groupId = groupId;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MembershipResponse membershipResponse = (MembershipResponse) o;
return Objects.equals(this.userId, membershipResponse.userId) &&
Objects.equals(this.url, membershipResponse.url) &&
Objects.equals(this.groupId, membershipResponse.groupId);
}
@Override
public int hashCode() {
return Objects.hash(userId, url, groupId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MembershipResponse {\n");
sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).append("\n");
sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"abilash.s@lxisoft.com"
] | abilash.s@lxisoft.com |
8096e68fcd1c989bd892aab98f5848e6cd85254b | 5f959fa3f84bf7a9818aa0316b470d49f8d1ae85 | /common/src/main/java/com/wintersportcoaches/common/service/Protocol.java | 4284c76c65943820b85573430f957baa2b163b84 | [] | no_license | artemrudoj/si_android | e7d84ed3f2bca37d289997645c2d38ac8ab799cd | d000ee0152e99536ed628b99998a1a400eb555b9 | refs/heads/master | 2021-01-17T12:43:59.564034 | 2016-06-22T23:39:13 | 2016-06-22T23:39:13 | 56,785,131 | 0 | 0 | null | 2016-05-26T11:57:37 | 2016-04-21T15:28:03 | Java | UTF-8 | Java | false | false | 1,049 | java | package com.wintersportcoaches.common.service;
import com.google.gson.Gson;
import com.google.gson.JsonStreamParser;
import com.wintersportcoaches.common.model.Message;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
/**
* Created by artem on 25.05.16.
*/
public class Protocol {
public static List<Message> decode(InputStreamReader inputStreamReader) {
List<Message> messages = new ArrayList<>();
JsonStreamParser parser = new JsonStreamParser(inputStreamReader);
Gson gson = new Gson();
while(parser.hasNext())
{
Message message = gson.fromJson(parser.next(), Message.class);
messages.add(message);
}
return messages;
}
public static String encodeInitString(String hash) {
if( hash == null || hash.equals("")) {
throw new IllegalStateException("hash can not be empty");
} else {
return "{\"message_type\":2,\"message_data\":{\"hash\":\"" + hash + "\"}}";
}
}
}
| [
"artem.rudoj@frtk.ru"
] | artem.rudoj@frtk.ru |
d1d6a0a1e0a2b463857430e63b317e0716de3d64 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/33/33_0187d4569cedfb94ac8bc6d90f859afd0c7500ec/PlacesServer/33_0187d4569cedfb94ac8bc6d90f859afd0c7500ec_PlacesServer_t.java | bcecb3615c7cbc9914c21096778164c06e0de0bf | [] | 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 | 993 | java | import java.rmi.*;
import java.rmi.server.*;
/*
* Server for the Places search. This just sets up the RMI server.
*/
public class PlacesServer{
public static void main(String args[]) {
System.setProperty("java.security.policy","policy");
int port = 1099;
if (args.length == 1 ) {
port = Integer.parseInt(args[0]);
} else if (args.length > 1) {
System.err.println("usage: java PlacesServer <rmi_port>");
System.exit(1);
}
// Create and install a security manager
if (System.getSecurityManager() == null)
System.setSecurityManager(new RMISecurityManager());
try {
String url = "//localhost:" + port + "/PlacesSearch";
Naming.rebind(url, new PlacesSearch());
System.out.println("server " + url + " is running...");
}
catch (Exception e) {
System.err.println("PlacesSearch server failed:" + e.getMessage());
e.printStackTrace();
System.exit(1);
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
529ab8dcf8105891885c6f15f3836cd31235fa1b | 2cb6c66b07c927b109a0b6299bb1df20d491376d | /src/main/java/com/veegee/polls/business/model/enumeration/StatusType.java | 8a26b746c902c8f1f71b8b902a68518fb7c3eb59 | [] | no_license | vanghoul/polls | 8d8ad29180e25e724373856e8dd4b31ef8374236 | 2b227b976a2fa9fd93593ccd77c76a73b71529f7 | refs/heads/main | 2023-02-28T17:27:00.863652 | 2021-02-11T13:23:07 | 2021-02-11T13:23:07 | 334,453,500 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 463 | java | package com.veegee.polls.business.model.enumeration;
import com.veegee.polls.business.exception.InvalidNextStatusException;
public enum StatusType {
NEW,
OPEN,
CLOSED;
public StatusType next() {
switch (this) {
case NEW:
return OPEN;
case OPEN:
case CLOSED:
return CLOSED;
default:
throw new InvalidNextStatusException();
}
}
}
| [
"vanghoul@live.com"
] | vanghoul@live.com |
b08b5b4d28abbc530cff4aafa021587f8ef31c9e | 69647657311f3db5350fe760c5574f345119f48f | /branches/r0/helper/cdtparser/src/org/eclipse/cdt/core/model/ILanguage.java | db66cc91f38a4edad586708a50372b7be2d7887b | [] | no_license | beefeather/clear-sources-cpp-roger | f6405f30d1f44e891f0c89ff6c8f76eec8e20942 | 1746ca79d20ae586f5f0bfc5e71f9ebda381f5d9 | refs/heads/master | 2021-01-10T13:22:42.245703 | 2016-01-24T05:40:42 | 2016-01-24T05:40:42 | 50,273,574 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,602 | java | /*******************************************************************************
* Copyright (c) 2005, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Doug Schaefer (QNX) - Initial API and implementation
* Markus Schorn (Wind River Systems)
* IBM Corporation
*******************************************************************************/
package org.eclipse.cdt.core.model;
import org.eclipse.cdt.core.dom.ILinkage;
import org.eclipse.cdt.core.dom.ast.ASTVisitor;
import org.eclipse.cdt.core.dom.ast.IASTCompletionNode;
import org.eclipse.cdt.core.dom.ast.IASTDeclarationListOwner;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
import org.eclipse.cdt.core.index.IIndex;
import org.eclipse.cdt.core.parser.FileContent;
import org.eclipse.cdt.core.parser.IParserLogService;
import org.eclipse.cdt.core.parser.IScannerInfo;
import org.eclipse.cdt.core.parser.IncludeFileContentProvider;
import ru.spb.rybin.eclipsereplacement.CoreException;
/**
* Models differences between languages. The interface is not supposed to be implemented directly.
* Rather than that clients may subclass {@link AbstractLanguage}.
*
* @noimplement This interface is not intended to be implemented by clients.
* @noextend This interface is not intended to be extended by clients.
*/
public interface ILanguage {
/**
* Option for {@link #getASTTranslationUnit(FileContent, IScannerInfo, IncludeFileContentProvider, IIndex, int, IParserLogService)}
* Instructs the parser to skip function and method bodies.
*/
public final static int OPTION_SKIP_FUNCTION_BODIES= 0x1;
/**
* @deprecated, has no effect.
*/
@Deprecated
public final static int OPTION_ADD_COMMENTS= 0x2;
/**
* Option for {@link #getASTTranslationUnit(FileContent, IScannerInfo, IncludeFileContentProvider, IIndex, int, IParserLogService)}
* Performance optimization, allows the parser not to create image-locations.
* When using this option {@link IASTName#getImageLocation()} will always return <code>null</code>.
*/
public final static int OPTION_NO_IMAGE_LOCATIONS= 0x4;
/**
* Option for {@link #getASTTranslationUnit(FileContent, IScannerInfo, IncludeFileContentProvider, IIndex, int, IParserLogService)}
* Marks the ast as being based on a source-file rather than a header-file. This makes a difference
* when bindings from the AST are used for searching the index, e.g. for static variables.
*/
public final static int OPTION_IS_SOURCE_UNIT= 0x8;
/**
* Option for {@link #getASTTranslationUnit(FileContent, IScannerInfo, IncludeFileContentProvider, IIndex, int, IParserLogService)}
* Allows the parser not to create ast nodes for expressions within aggregate initializers
* when they do not contain names.
* @since 5.1
*/
public final static int OPTION_SKIP_TRIVIAL_EXPRESSIONS_IN_AGGREGATE_INITIALIZERS= 0x10;
/**
* Option for {@link #getASTTranslationUnit(FileContent, IScannerInfo, IncludeFileContentProvider, IIndex, int, IParserLogService)}
* Instructs the parser to create ast nodes for inactive code branches, if possible. The parser
* makes its best effort to create ast for the inactive code branches but may decide to skip parts
* of the inactive code (e.g. function bodies, entire code branches, etc.).
* <p>
* The inactive nodes can be accessed via {@link IASTDeclarationListOwner#getDeclarations(boolean)} or
* by using a visitor with {@link ASTVisitor#includeInactiveNodes} set to <code>true</code>.
*
* @since 5.1
*/
public final static int OPTION_PARSE_INACTIVE_CODE= 0x20;
/**
* Return the language id for this language.
* This is to differentiate languages from each other.
*/
public String getId();
/**
* Return the id of the linkage this language contributes to. This is especially important
* for languages that write to the index.
* @see ILinkage
* @since 5.0
*/
public int getLinkageID();
/**
* @return the human readable name corresponding to this language, suitable for display.
* @since 4.0
*/
public String getName();
/**
* Construct an AST for the source code provided by <code>reader</code>.
* As an option you can supply
* @param content source code to be parsed.
* @param scanInfo provides include paths and defined symbols.
* @param fileCreator factory that provides file content for files included
* @param index (optional) index to use to lookup symbols external to the tu.
* @param options A combination of
* {@link #OPTION_SKIP_FUNCTION_BODIES},
* {@link #OPTION_NO_IMAGE_LOCATIONS}, {@link #OPTION_IS_SOURCE_UNIT},
* or <code>0</code>.
* @param log logger
* @return an AST for the source code provided by reader.
* @throws CoreException
* @since 5.2
*/
public IASTTranslationUnit getASTTranslationUnit(FileContent content, IScannerInfo scanInfo,
IncludeFileContentProvider fileCreator, IIndex index, int options, IParserLogService log)
throws CoreException;
public IASTTranslationUnit getASTTranslationUnit(ILexedContent lexedContent,
IIndex index, int options, IParserLogService log)
throws CoreException;
/**
* Return the AST completion node for the given offset.
* @since 5.2
*/
public IASTCompletionNode getCompletionNode(FileContent reader, IScannerInfo scanInfo,
IncludeFileContentProvider fileCreator, IIndex index, IParserLogService log, int offset)
throws CoreException;
/**
* Used to override the default model building behavior for a translation unit.
*
* @param tu the <code>ITranslationUnit</code> to be parsed (non-<code>null</code>)
* @return an <code>IModelBuilder</code>, which parses the given translation unit and
* returns the <code>ICElement</code>s of its model, or <code>null</code>
* to parse using the default CDT model builder
*/
public IContributedModelBuilder createModelBuilder(ITranslationUnit tu);
/**
* @deprecated replaced by {@link IASTTranslationUnit#getNodeSelector(String)}.
*/
@Deprecated
IASTName[] getSelectedNames(IASTTranslationUnit ast, int start, int length);
/**
* @deprecated replaced by {@link #getASTTranslationUnit(FileContent, IScannerInfo,
* IncludeFileContentProvider, IIndex, int, IParserLogService)}
*/
@Deprecated
IASTTranslationUnit getASTTranslationUnit(org.eclipse.cdt.core.parser.CodeReader reader,
IScannerInfo scanInfo, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator, IIndex index,
IParserLogService log) throws CoreException;
/**
* @deprecated replaced by {@link #getASTTranslationUnit(FileContent, IScannerInfo,
* IncludeFileContentProvider, IIndex, int, IParserLogService)}
*/
@Deprecated
IASTTranslationUnit getASTTranslationUnit(org.eclipse.cdt.core.parser.CodeReader reader,
IScannerInfo scanInfo, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator, IIndex index,
int options, IParserLogService log) throws CoreException;
/**
* @deprecated replaced by {@link #getCompletionNode(FileContent, IScannerInfo,
* IncludeFileContentProvider, IIndex, IParserLogService, int)}.
*/
@Deprecated
IASTCompletionNode getCompletionNode(org.eclipse.cdt.core.parser.CodeReader reader,
IScannerInfo scanInfo, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator, IIndex index,
IParserLogService log, int offset) throws CoreException;
}
| [
"beefeather@yandex-team.ru"
] | beefeather@yandex-team.ru |
69c5af8dc5f96bf4008037415aae417c1d552ae9 | 7419e5b188bbd72505a0ebee3f93181dd6b79d87 | /hotelreservationsystem/src/main/java/edu/depaul/cdm/se452/teamnosleep/hotelreservationsystem/security/SecurityConfiguration.java | e60df1200e37faa4162e36fb26f98afaf8d4b250 | [
"MIT"
] | permissive | teamnosleep2021/SE452_Hotel_Reservation_Systems | af616010558e204f26f0d23f4611d8bc8fcde9ad | e198c92e6931f5df42cd40735ae2ba4abfd39880 | refs/heads/main | 2023-05-06T22:42:49.941506 | 2021-05-31T16:48:54 | 2021-05-31T16:48:54 | 356,607,818 | 0 | 1 | MIT | 2021-05-31T16:48:55 | 2021-04-10T14:35:24 | Java | UTF-8 | Java | false | false | 3,961 | java | package edu.depaul.cdm.se452.teamnosleep.hotelreservationsystem.security;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.web.authentication.rememberme.JdbcTokenRepositoryImpl;
import org.springframework.security.web.authentication.rememberme.PersistentTokenRepository;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
@Configuration
@EnableWebSecurity
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Autowired
private DataSource dataSource;
@Bean
public UserDetailsService userDetailsService() {
return new UserDetailsServiceImpl();
}
@Bean
public BCryptPasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}
@Bean
public DaoAuthenticationProvider authenticationProvider() {
DaoAuthenticationProvider authProvider = new DaoAuthenticationProvider();
authProvider.setUserDetailsService(userDetailsService());
authProvider.setPasswordEncoder(passwordEncoder());
return authProvider;
}
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.authenticationProvider(authenticationProvider());
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.antMatchers("/").permitAll()
.antMatchers("/register").permitAll()
.antMatchers("/process-register").permitAll()
.antMatchers("/hotel-details**").permitAll()
.antMatchers("/book-room**").permitAll()
.antMatchers("/cancellation.html").hasAuthority("ADMIN")
.antMatchers("/updated.html").hasAnyAuthority("ADMIN", "USER")
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/login")
.usernameParameter("username")
.passwordParameter("passwordHash")
.loginProcessingUrl("/login")
.permitAll()
.and()
.logout()
.invalidateHttpSession(true)
.clearAuthentication(true)
.logoutRequestMatcher(new AntPathRequestMatcher("/logout"))
.logoutSuccessUrl("/login?logout")
.permitAll()
.and()
.rememberMe().tokenRepository(persistentTokenRepository())
.and()
.exceptionHandling().accessDeniedPage("/access-denied");
// disabling csrf attack
http.csrf().disable();
}
// Storing Persistent Cookie
@Bean
public PersistentTokenRepository persistentTokenRepository() {
JdbcTokenRepositoryImpl tokenRepository = new JdbcTokenRepositoryImpl();
tokenRepository.setDataSource(dataSource);
return tokenRepository;
}
@Override
public void configure(WebSecurity web) throws Exception {
web.ignoring().antMatchers("/css/**");
web.ignoring().antMatchers("/images/**");
web.ignoring().antMatchers("/js/**");
}
}
| [
"riddhidamani90@gmail.com"
] | riddhidamani90@gmail.com |
bceab772d32d79442a80f488edb73a7bae284052 | 4f4deb09caeebdd779c0d9c3e1bce7a4f48dc304 | /src/main/java/cn/kgc/mybatis/mapper/UserMapper.java | 060adb87a568c7cc2c3dd3b1f3f68ee2123d2cc9 | [] | no_license | bdqn2018Test02/jgstest | b6e0d40012e06880edbd8b2baa1cb7f58a4a9b5f | 84cc58b23944d53375a588f852e08f596dcd7cd3 | refs/heads/master | 2022-07-10T04:13:29.422260 | 2019-09-12T06:32:59 | 2019-09-12T06:32:59 | 207,973,142 | 0 | 0 | null | 2022-06-21T01:51:39 | 2019-09-12T05:40:47 | Java | UTF-8 | Java | false | false | 439 | java | package cn.kgc.mybatis.mapper;
import cn.kgc.mybatis.bean.User;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* Created with IDEA
* author:bdqn kgc zhou qi chao
* Date:2019/8/28
* Time:15:50
*/
public interface UserMapper {
/**
* 查询记录数
* @return
*/
public Integer getUserCount();
/**
* 查询所有
* @return
*/
public List<User> getUserList();
}
| [
"ljn17610159790"
] | ljn17610159790 |
fc6fc7b7868eb0965cbc6cf45bc8c2e9fba10634 | 1d40f4245cb3825da6edb4c05dc8e4e10c81d119 | /TesteFatorial.java | fc433a2b74d0a6ef3605f404c6caed46f70aee98 | [] | no_license | elvisestevan/projetoFatorial | 7c36565d134dd3421409ac2fd4276bff74d53d32 | 62e718cfb3761949bf23a70f6af65676b293a809 | refs/heads/master | 2016-09-06T19:11:53.043370 | 2013-11-13T23:06:51 | 2013-11-13T23:06:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 201 | java | public class TesteFatorial {
//Comentario inserido em TesteFatorial.java
public static void main (String[] args) {
Fatorial f = new Fatorial();
System.out.println(f.calcularFatorial(10));
}
} | [
"elvis.estevan65@gmail.com"
] | elvis.estevan65@gmail.com |
48dc3e402313a17ec1ce7f9a108d4583151891b2 | 4f9ac9f2240f92081b708c34bad38fe5dc038bc4 | /example-service/src/main/java/com/king/example/service/StudentService.java | 466b3721f981221deb774aaaeeca7061baefb34c | [] | no_license | wxiaoxin/example | 8246915249a24f3db379c24b85af9174062740e5 | c980d02bfd395cdf954bd8c7ad99707ad1a6e9a5 | refs/heads/master | 2021-01-20T13:04:30.033218 | 2017-05-06T09:34:41 | 2017-05-06T09:34:41 | 90,445,280 | 0 | 0 | null | 2017-05-16T10:02:29 | 2017-05-06T07:26:14 | Java | UTF-8 | Java | false | false | 205 | java | package com.king.example.service;
import com.king.example.service.dto.StudentDTO;
/**
* Created by jianxin.wang on 2017/5/5.
*/
public interface StudentService {
int save(StudentDTO student);
}
| [
"King@192.168.0.103"
] | King@192.168.0.103 |
70e2a31abf14d9d82cba04d06d69e370d6bef0b2 | 62ee21b044866321442f2c60ccf11d4f5d54149f | /src/test.java | 6bf9868b12062f8a9d4cb40150532e2c47054e8c | [] | no_license | jinlong123/HelloWorld | ec3212dd9196a7b4c0e2159297d0cfdb8e68e260 | dc21ef08f025ee6f42f671634d5a4be0d6e20804 | refs/heads/master | 2021-01-19T07:29:55.904494 | 2017-04-07T13:03:21 | 2017-04-07T13:03:21 | 87,544,625 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,333 | java | import java.io.Console;
import java.util.Arrays;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Scanner;
/**
* Created by JinLong on 2017/3/5.
*/
public class test {
public static void main(String[] args){
// Console cons=System.console();
// if (cons!=null){
// String username=new String(cons.readLine("User name:"));
// String password=new String(cons.readLine("User password:"));
// cons.printf("User name is: " + username + "\n");
// cons.printf("User password is: " + password + "\n");
// }else{
// System.out.println("Console is unavailable!");
// }
// Scanner in=new Scanner(System.in);
// int sum=0;
// int goal=10;
// while(sum<goal){
// System.out.println("Enter a number:");
// int n=in.nextInt();
// if (n<0) continue;
// sum+=n;
// }
// System.out.println("The sum is:"+sum);
// int[] a={1,2,3,4,5};
// System.out.println(Arrays.toString(a));
GregorianCalendar d=new GregorianCalendar();
// int today= d.get(Calendar.DAY_OF_MONTH);
// int month= d.get(Calendar.MONTH);
// d.set(Calendar.DAY_OF_MONTH,1);
System.out.println(d.getClass().getName());
}
}
| [
"1034189315@qq.com"
] | 1034189315@qq.com |
361b6f771de117e68712a8c651dadbeeecb79874 | 781206d89432fcfd4b6ee9677df4ea25e5afff79 | /src/main/java/com/updg/sclobby/utils/Redis.java | f006333479e11bea3380a0ecc3dcda279145906e | [] | no_license | CrystReal/lobby | 911078c4be3cf59f987f7274477665321ed80ed7 | b5ec88d9870923b724298ded748dbaa200adc7e1 | refs/heads/master | 2021-01-10T17:38:48.459239 | 2015-12-28T10:07:49 | 2015-12-28T10:07:49 | 48,686,468 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,612 | java | package com.updg.sclobby.utils;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.exceptions.JedisConnectionException;
/**
* Created by Alex
* Date: 28.01.14 14:47
*/
public class Redis {
private static JedisPool pool;
public Redis(String server, int port) {
pool = new JedisPool(server, port);
}
private static Jedis getJedis() {
Jedis j = pool.getResource();
j.select(10);
return j;
}
public static String get(String s) {
Jedis j = getJedis();
String o = null;
try {
o = j.get(s);
} catch (JedisConnectionException e) {
if (null != j) {
pool.returnBrokenResource(j);
j = null;
}
} finally {
if (null != j)
pool.returnResource(j);
}
return o;
}
public static String set(String s, String val) {
Jedis j = getJedis();
String o = null;
try {
o = j.set(s, val);
} catch (JedisConnectionException e) {
if (null != j) {
pool.returnBrokenResource(j);
j = null;
}
} finally {
if (null != j)
pool.returnResource(j);
}
return o;
}
public static long incr(String s) {
Jedis j = getJedis();
long o = 0;
try {
o = j.incr(s);
} catch (JedisConnectionException e) {
if (null != j) {
pool.returnBrokenResource(j);
j = null;
}
} finally {
if (null != j)
pool.returnResource(j);
}
return o;
}
public static boolean exists(String s) {
Jedis j = getJedis();
boolean o = false;
try {
o = j.exists(s);
} catch (JedisConnectionException e) {
if (null != j) {
pool.returnBrokenResource(j);
j = null;
}
} finally {
if (null != j)
pool.returnResource(j);
}
return o;
}
public static long del(String s) {
Jedis j = getJedis();
long o = 0;
try {
o = j.del(s);
} catch (JedisConnectionException e) {
if (null != j) {
pool.returnBrokenResource(j);
j = null;
}
} finally {
if (null != j)
pool.returnResource(j);
}
return o;
}
}
| [
"alex.bondarevskiy@gmail.com"
] | alex.bondarevskiy@gmail.com |
9dc49a404b17bef743837fe13817b765e6d2443a | c343a0ef45405fb447d6a8735509efe2c1d6febf | /Pucho/app/src/main/java/com/indiainnovates/pucho/listeners/OnCheckPostAnswerContent.java | 5ec6710ed77f843616230a0366df6f2089b8cb82 | [] | no_license | MouleshS/SamplesAndroid | 89fcc15efb707e63fcf01adf5b02a33f9a5f39c4 | 8342cc4a5d596a4ac33db12a3c2aa4ef3aaea83e | refs/heads/master | 2020-03-18T21:02:51.889155 | 2018-05-26T16:50:58 | 2018-05-26T16:50:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 191 | java | package com.indiainnovates.pucho.listeners;
/**
* Created by Raghunandan on 29-01-2016.
*/
public interface OnCheckPostAnswerContent {
void onSuccess();
void onEmptyContent();
}
| [
"raghunandankavi2010@gmail.com"
] | raghunandankavi2010@gmail.com |
c7bbbaca9e3f39371d3439ad30d3ecbc9630b072 | 1a3af94de9c50c8a0c2a7f75fbeaea7b13ce0299 | /Java8Lessons/src/main/java/defaultMethods/DefaultMethods.java | 5a0f3384a47b841c30e7acf25389a72f2fa2c9ec | [] | no_license | MehnazTariq/SpringBoot | e4d8261b1d8d1ceaa3ec237a8bd4c1ed37acc251 | bcc59c321c93198f5332cb47d737c7a3e4c99a24 | refs/heads/master | 2022-11-28T04:47:36.783749 | 2020-07-13T10:27:21 | 2020-07-13T10:27:21 | 123,537,286 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 429 | java | package defaultMethods;
public class DefaultMethods implements Sayable{
public void sayMore(String msg){ // implementing abstract method
System.out.println(msg);
}
public static void main(String[] args) {
DefaultMethods dm = new DefaultMethods();
dm.say(); // calling default method
dm.sayMore("Work is worship"); // calling abstract method
}
}
| [
"36980243+MehnazTariq@users.noreply.github.com"
] | 36980243+MehnazTariq@users.noreply.github.com |
4f4afb7e3e3cf4a367b27a548636b05d47a506b4 | fecd3a16b108287539211aef2e1825fbc4c957a1 | /src/main/java/core/commands/stats/WhoFirstCommand.java | ce9d97b0f59761eee55fe57c10fc20a1d032fcc5 | [
"MIT"
] | permissive | Viperszn/Chuu | 1f1d93355c2ceeeb201eb87125a8f425530e7d69 | 902307ba54c7865014c61498ed7ccdd868dae9e4 | refs/heads/master | 2023-06-24T15:10:27.537383 | 2021-07-07T22:53:52 | 2021-07-07T22:55:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,972 | java | package core.commands.stats;
import core.commands.Context;
import core.commands.abstracts.ConcurrentCommand;
import core.commands.utils.CommandCategory;
import core.exceptions.LastFmException;
import core.parsers.ArtistParser;
import core.parsers.Parser;
import core.parsers.params.ArtistParameters;
import core.services.validators.ArtistValidator;
import dao.ServiceView;
import dao.entities.ScrobbledArtist;
import dao.entities.UserListened;
import javax.validation.constraints.NotNull;
import java.util.List;
import static core.commands.stats.WhoLastCommand.handleUserListened;
public class WhoFirstCommand extends ConcurrentCommand<ArtistParameters> {
public WhoFirstCommand(ServiceView dao) {
super(dao, true);
this.respondInPrivate = false;
}
@Override
protected CommandCategory initCategory() {
return CommandCategory.SERVER_LEADERBOARDS;
}
@Override
public Parser<ArtistParameters> initParser() {
return new ArtistParser(db, lastFM);
}
@Override
public String getDescription() {
return "Who listened first to an artist on a server";
}
@Override
public List<String> getAliases() {
return List.of("whofirst", "wf", "wfirst", "whof");
}
@Override
public String getName() {
return "Who listened first";
}
@Override
protected void onCommand(Context e, @NotNull ArtistParameters params) throws LastFmException {
ScrobbledArtist sA = new ArtistValidator(db, lastFM, e).validate(params.getArtist(), !params.isNoredirect());
params.setScrobbledArtist(sA);
List<UserListened> firsts = db.getServerFirstScrobbledArtist(sA.getArtistId(), e.getGuild().getIdLong());
if (firsts.isEmpty()) {
sendMessageQueue(e, "Couldn't get the first time this server scrobbled **" + sA.getArtist() + "**");
return;
}
handleUserListened(e, params, firsts, true);
}
}
| [
"ishwi6@gmail.com"
] | ishwi6@gmail.com |
956ba6d691d9cf998adb39281e7e1786917f8338 | e36854471de359fbf6adb0b42a7725779d3d310d | /src/com/jd/dao/KindsDao.java | 9de366462080b26181bf1a210ec1638e2294b02d | [] | no_license | 948734374/jd | 2e386d8b0e67159cba1b8341d340a963b3640304 | dddfda7d0cd8f86a3eb90e4c20a519b0f99635e1 | refs/heads/master | 2021-04-18T19:55:57.246344 | 2018-03-25T11:02:50 | 2018-03-25T12:08:21 | 126,688,829 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 348 | java | package com.jd.dao;
import com.jd.entity.Kinds;
public interface KindsDao {
int deleteByPrimaryKey(Long KINDSID);
int insert(Kinds record);
int insertSelective(Kinds record);
Kinds selectByPrimaryKey(Long KINDSID);
int updateByPrimaryKeySelective(Kinds record);
int updateByPrimaryKey(Kinds record);
} | [
"948734374@qq.com"
] | 948734374@qq.com |
d1317c0c05d6773e582031a2f89458f3f9235f46 | 4be7eebe8c7ae29c6fa216bbe6821db4bf16390b | /httprequestlib/src/main/java/com/weizhan/httprequestlib/IJsonDataListener.java | f3b9d466c46384b8220ac71e602b4e2d39300bfd | [] | no_license | cherry-cheng/AndroidBasicStudy | b6bff0dd95949c282f64e88099d232b7f85d8e62 | f4c4bb587f6a261c0ad8a2ab361b443a5df6f011 | refs/heads/master | 2020-04-27T08:20:29.352193 | 2019-05-07T15:58:53 | 2019-05-07T15:58:53 | 174,167,392 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 177 | java | package com.weizhan.httprequestlib;
/**
* Created by Administrator on 2019/3/14.
*/
public interface IJsonDataListener<T> {
void onSuccess(T m);
void onFailure();
}
| [
"chengyonghui@yizhanit.com"
] | chengyonghui@yizhanit.com |
f055846b22bd876ee26200151a3f346ca4bf1f75 | 656ce78b903ef3426f8f1ecdaee57217f9fbc40e | /src/o/aod.java | 51a4875a25691dcba52745aab1f77935f90ce265 | [] | no_license | zhuharev/periscope-android-source | 51bce2c1b0b356718be207789c0b84acf1e7e201 | 637ab941ed6352845900b9d465b8e302146b3f8f | refs/heads/master | 2021-01-10T01:47:19.177515 | 2015-12-25T16:51:27 | 2015-12-25T16:51:27 | 48,586,306 | 8 | 10 | null | null | null | null | UTF-8 | Java | false | false | 1,833 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package o;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
// Referenced classes of package o:
// aop
public abstract class aod
implements aop
{
private final HashSet buR = new HashSet();
public aod()
{
}
public final void dj()
{
buR.clear();
}
public final boolean dk()
{
boolean flag = false;
int i1 = getItemCount();
int i = 0;
int j = 0;
int k;
int l;
do
{
k = ((flag) ? 1 : 0);
l = i;
if (j >= i1)
{
break;
}
k = i;
if (FB61(j))
{
i++;
k = i;
if (!buR.contains(FB64(j)))
{
k = 1;
l = i;
break;
}
}
j++;
i = k;
} while (true);
return l > 0 && k == 0;
}
public final Collection dl()
{
return buR;
}
public abstract int getItemCount();
public final void selectAll()
{
int j = getItemCount();
for (int i = 0; i < j; i++)
{
if (FB61(i))
{
buR.add(FB64(i));
}
}
}
public final void _mth1646(String s)
{
if (buR.contains(s))
{
buR.remove(s);
return;
} else
{
buR.add(s);
return;
}
}
public abstract boolean FB61(int i);
public abstract String FB64(int i);
}
| [
"hostmaster@zhuharev.ru"
] | hostmaster@zhuharev.ru |
aa5b218ebcc63ae4b0c4059c7ea094c10abc516e | 3651634521600111276b9516a60a79ca22665df0 | /src/com/backendless/servercode/annotation/Async.java | b9975cddd782a18e22a24d38ba1a13a95a8cbcea | [
"MIT"
] | permissive | Backendless/Android-SDK | e5685e8e0889b9b583c301875a493cad4471ca38 | 2512fa8cced66c880ed86581ce8c1f4f91ced73d | refs/heads/master | 2023-03-10T22:00:42.626791 | 2023-03-03T11:56:23 | 2023-03-03T11:56:23 | 15,827,300 | 70 | 66 | MIT | 2023-01-26T13:00:52 | 2014-01-11T17:47:15 | Java | UTF-8 | Java | false | false | 197 | java | package com.backendless.servercode.annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
public @interface Async
{
}
| [
"eugene.chipachenko@themidnightcoders.com"
] | eugene.chipachenko@themidnightcoders.com |
6e654b2b811ecf2de217c60ae49e4dc67be34eec | 4e1d87269914bb69fb7cd2d3e99b91df64a9a30f | /src/com/Showalbel.java | b3c981e35a8927d1a91030bf42f38bf00f1480a3 | [] | no_license | VolodyaChvey/Homework | 2e2abd6dd70d5d0e85fe23ec26227f3c8aa67e2c | af8f8eccb00e6c256ed70dd6e6af64e1073a6da1 | refs/heads/main | 2023-02-18T05:21:12.024825 | 2021-01-22T19:24:51 | 2021-01-22T19:24:51 | 308,818,666 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 93 | java | package com;
public interface Showalbel {
void print();
void print(String info);
}
| [
"volodya76@tut.by"
] | volodya76@tut.by |
017deb6866a0cb8e797eb20038b5087b740a3430 | 0e6ba83eb0997fb6a754fae9f18e1885cced932e | /Selenium/src/FunctionalTesting.java | dfd258affb2e63d54cb5e2ffcf5a693a5102638d | [] | no_license | JAVERIA3042/Selenium2020 | 240f957ff671f3ab45fe494bcdd16400ce342b4d | 8d51f3b673696dfc0b77cd43127e968b12e0f1ee | refs/heads/master | 2023-08-11T13:45:37.704513 | 2023-07-24T21:09:40 | 2023-07-24T21:09:40 | 257,126,981 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 121 | java |
public class FunctionalTesting {
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}
| [
"javeria.khaliq3042@gmail.com"
] | javeria.khaliq3042@gmail.com |
5a40c4f51990c7b9ab411163f9045474cdf83ce1 | 64053470213ffa18e91a023c9d831e2a83ee3f72 | /chart_module/src/main/java/com/cstec/administrator/chart_module/Activity/pickImage/BaseFragment.java | dd1271c044f2d792be4b0a846e80d48e75806375 | [] | no_license | a18608407391/Android | e7ac15376df94168ab05df1d79422b1a380da227 | 6d64ca82213e269ada50b00afe342d6597178f29 | refs/heads/master | 2020-07-19T19:41:32.231386 | 2020-05-07T01:45:49 | 2020-05-07T01:45:49 | 206,502,674 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,429 | java | package com.cstec.administrator.chart_module.Activity.pickImage;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.Fragment;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
public abstract class BaseFragment extends Fragment {
private static final Handler handler = new Handler();
private int containerId;
private boolean destroyed;
protected final boolean isDestroyed() {
return destroyed;
}
public int getContainerId() {
return containerId;
}
public void setContainerId(int containerId) {
this.containerId = containerId;
}
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
destroyed = false;
}
public void onDestroy() {
super.onDestroy();
destroyed = true;
}
protected final Handler getHandler() {
return handler;
}
protected final void postRunnable(final Runnable runnable) {
handler.post(new Runnable() {
@Override
public void run() {
// validate
// TODO use getActivity ?
if (!isAdded()) {
return;
}
// run
runnable.run();
}
});
}
protected final void postDelayed(final Runnable runnable, long delay) {
handler.postDelayed(new Runnable() {
@Override
public void run() {
// validate
// TODO use getActivity ?
if (!isAdded()) {
return;
}
// run
runnable.run();
}
}, delay);
}
protected void showKeyboard(boolean isShow) {
Activity activity = getActivity();
if (activity == null) {
return;
}
InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm == null) {
return;
}
if (isShow) {
if (activity.getCurrentFocus() == null) {
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
} else {
imm.showSoftInput(activity.getCurrentFocus(), 0);
}
} else {
if (activity.getCurrentFocus() != null) {
imm.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);
}
}
}
protected void hideKeyboard(View view) {
Activity activity = getActivity();
if (activity == null) {
return;
}
InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm == null) {
return;
}
imm.hideSoftInputFromWindow(
view.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);
}
protected <T extends View> T findView(int resId) {
return (T) (getView().findViewById(resId));
}
protected void setTitle(int titleId) {
if (getActivity() != null && getActivity() instanceof UIView) {
getActivity().setTitle(titleId);
}
}
}
| [
"a282445598@126.com"
] | a282445598@126.com |
8460e142e8f9483c3120545976a324d5e1d56f14 | 68a94ac28cbac8cb6a36fa2d8de4df5b5a9ab8ea | /src/pobocka/Adresa.java | 3633c9aff80e2ca0a1ac59db36e206db1f4b4595 | [] | no_license | Duckyta/semestralkaJava | 434d9d55d75fdc7e6479141388b7272f265877d1 | 64500d3a9df0e445cc4dd42382de6dce0ee49a11 | refs/heads/master | 2021-01-24T16:20:43.172725 | 2018-02-27T22:12:41 | 2018-02-27T22:12:41 | 123,189,023 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 482 | java | package pobocka;
import java.io.Serializable;
/**
*
* @author Karel
*/
public class Adresa implements Serializable{
private final String ulice;
private final int cislo;
private final String obec;
public Adresa(String ulice, int cislo, String obec) {
this.ulice = ulice;
this.cislo = cislo;
this.obec = obec;
}
@Override
public String toString() {
return " ulice=" + ulice + ", cislo=" + cislo + ", obec=" + obec ;
}
}
| [
"lebedova.katerina@email.cz"
] | lebedova.katerina@email.cz |
968185d0bb3942e73ea65e9f482ba46459c5f7a0 | 74cfe03426f96bc769f2ff8f50839e8398c8a2cc | /zxinglib/src/main/java/com/skjr/zxinglib/EncodingUtils.java | 68917222d0b6f73d30726aa2488fb1b7ebcb76c1 | [] | no_license | KqSMea8/ShouDuFu | c39b3cf59a8f86a0aee1182de73762ed363a6e5a | 2ae031cbb90e946935334f14dd5f03414afcdb18 | refs/heads/master | 2020-05-30T10:42:26.086711 | 2019-06-01T01:42:56 | 2019-06-01T01:42:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,526 | java | package com.skjr.zxinglib;
import android.graphics.Bitmap;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.EncodeHintType;
import com.google.zxing.MultiFormatWriter;
import com.google.zxing.WriterException;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import java.util.Hashtable;
public class EncodingUtils {
private static final int BLACK = 0xff000000;
private static final int BLUE = 0xFFFFFFFF;
public static Bitmap createQRCode(String str, int widthAndHeight)
throws WriterException {
Hashtable hints = new Hashtable();
hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.Q);
BitMatrix matrix = new MultiFormatWriter().encode(str,
BarcodeFormat.QR_CODE, widthAndHeight, widthAndHeight);
int width = matrix.getWidth();
int height = matrix.getHeight();
int[] pixels = new int[width * height];
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
if (matrix.get(x, y)) {
pixels[y * width + x] = BLACK;
} else {
pixels[y * width + x] = BLUE;
}
}
}
Bitmap bitmap = Bitmap.createBitmap(width, height,
Bitmap.Config.ARGB_8888);
bitmap.setPixels(pixels, 0, width, 0, 0, width, height);
return bitmap;
}
}
| [
"you@example.com"
] | you@example.com |
9c5b4ee29db6c03c17dce0182d704b6217ab210a | d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb | /PROMISE/archives/ant/1.7/org/apache/tools/ant/taskdefs/optional/depend/ClassFileIterator.java | 5c1d227a44fba96fb4f2056092466c9e0680a1d9 | [] | no_license | hvdthong/DEFECT_PREDICTION | 78b8e98c0be3db86ffaed432722b0b8c61523ab2 | 76a61c69be0e2082faa3f19efd76a99f56a32858 | refs/heads/master | 2021-01-20T05:19:00.927723 | 2018-07-10T03:38:14 | 2018-07-10T03:38:14 | 89,766,606 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 327 | java | package org.apache.tools.ant.taskdefs.optional.depend;
/**
* Iterator interface for iterating over a set of class files
*
*/
public interface ClassFileIterator {
/**
* Get the next class file in the iteration
*
* @return the next class file in the iteration
*/
ClassFile getNextClassFile();
}
| [
"hvdthong@github.com"
] | hvdthong@github.com |
4bd07b06912209a8236ed92d43524902b3c3be1b | 7966c3391f6f0519a7e98a753da161cae794ca0f | /server/src/test/java/agh/queueFreeShop/controller/ShoppingCartControllerTest.java | 885a6b4a92e82a5a57cd856d9c4df097c9c83edf | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | Chylb/queue-free-shop | db43f69447302f18b25d0a45a247e08cbe4cb439 | 8375541896bef877edd51cc3d32655cd1be58a4e | refs/heads/main | 2023-02-15T14:09:33.914181 | 2021-01-10T13:36:20 | 2021-01-10T13:36:20 | 317,001,213 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,770 | java | package agh.queueFreeShop.controller;
import agh.queueFreeShop.exception.NotFoundException;
import agh.queueFreeShop.model.CartItem;
import agh.queueFreeShop.model.Product;
import agh.queueFreeShop.model.ShoppingCart;
import agh.queueFreeShop.model.User;
import agh.queueFreeShop.repository.ShoppingCartRepository;
import agh.queueFreeShop.service.ProductService;
import agh.queueFreeShop.service.ShopService;
import agh.queueFreeShop.service.UserService;
import com.google.common.collect.Sets;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.web.servlet.MockMvc;
import java.util.LinkedHashSet;
import java.util.Set;
import static org.hamcrest.Matchers.hasSize;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.BDDMockito.given;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
/**
* Unit test of ShoppingCartController.
*
* users:
* 1 - shopping customer
* 2 - user outside the shop
* 3 - customer that already finalized shopping
*/
@WebMvcTest(value = ShoppingCartController.class)
@AutoConfigureMockMvc
@WithMockUser(username = "1")
public class ShoppingCartControllerTest {
@Autowired
private MockMvc mockMvc;
@MockBean
private UserService userService;
@MockBean
private ProductService productService;
@MockBean
private ShoppingCartRepository shoppingCartRepository;
@MockBean
private ShopService shopService;
private ShoppingCart cart;
private User user = new User();
@BeforeEach
void setup() {
user.setId(1L);
cart = new ShoppingCart();
Product product1 = new Product();
product1.setPrice(1);
product1.setName("product1");
CartItem item1 = new CartItem();
item1.setQuantity(1);
item1.setProduct(product1);
Set<CartItem> items = Sets.newHashSet(item1);
cart.setItems(items);
ShoppingCart finalizedCart = new ShoppingCart();
finalizedCart.setFinalized(true);
ShoppingCart emptyCart = new ShoppingCart();
emptyCart.setItems(new LinkedHashSet<>());
given(this.productService.getProduct("0123456789012")).willReturn(new Product());
given(this.productService.getProduct("000")).willThrow(new NotFoundException("msg"));
given(this.shoppingCartRepository.getByUserId(1L)).willReturn(cart);
given(this.shoppingCartRepository.getByUserId(2L)).willReturn(null);
given(this.shoppingCartRepository.getByUserId(3L)).willReturn(finalizedCart);
given(this.shopService.finalizeShopping(cart)).willReturn(cart.generateReceipt());
given(this.shopService.onCustomerConfirmedEntry(any())).willReturn(emptyCart);
}
//getCart()
@Test
void should_get_cart() throws Exception {
mockMvc.perform(get("/shoppingCart"))
.andExpect(status().isOk())
.andExpect(jsonPath("items", hasSize(1)));
}
@Test
@WithMockUser(username = "2")
void should_receive_403_when_getCart_while_not_in_shop() throws Exception {
mockMvc.perform(get("/shoppingCart"))
.andExpect(status().isForbidden());
}
@Test
@WithMockUser(username = "3")
void should_receive_403_when_getCart_and_cart_is_finalized() throws Exception {
mockMvc.perform(get("/shoppingCart"))
.andExpect(status().isForbidden());
}
//addProduct()
@Test
void should_add_product() throws Exception {
mockMvc.perform(post("/shoppingCart?barcode=0123456789012"))
.andExpect(status().isOk())
.andExpect(jsonPath("items", hasSize(1)));
}
@Test
void should_receive_404_when_adding_nonexistent_product() throws Exception {
mockMvc.perform(post("/shoppingCart?barcode=000"))
.andExpect(status().isNotFound());
}
@Test
@WithMockUser(username = "2")
void should_receive_403_when_addProduct_while_not_in_shop() throws Exception {
mockMvc.perform(post("/shoppingCart?barcode=0123456789012"))
.andExpect(status().isForbidden());
}
@Test
@WithMockUser(username = "3")
void should_receive_403_when_addProduct_and_cart_is_finalized() throws Exception {
mockMvc.perform(post("/shoppingCart?barcode=0123456789012"))
.andExpect(status().isForbidden());
}
//removeProduct()
@Test
void should_remove_product() throws Exception {
mockMvc.perform(delete("/shoppingCart?barcode=0123456789012"))
.andExpect(status().isOk())
.andExpect(jsonPath("items", hasSize(1)));
}
@Test
void should_receive_404_when_removing_nonexistent_product() throws Exception {
mockMvc.perform(delete("/shoppingCart?barcode=000"))
.andExpect(status().isNotFound());
}
@Test
@WithMockUser(username = "2")
void should_receive_403_when_removeProduct_while_not_in_shop() throws Exception {
mockMvc.perform(delete("/shoppingCart?barcode=0123456789012"))
.andExpect(status().isForbidden());
}
@Test
@WithMockUser(username = "3")
void should_receive_403_when_removeProduct_and_cart_is_finalized() throws Exception {
mockMvc.perform(delete("/shoppingCart?barcode=0123456789012"))
.andExpect(status().isForbidden());
}
//finalizeShopping()
@Test
void should_finalize_shopping() throws Exception {
mockMvc.perform(post("/shoppingCart/finalize"))
.andExpect(status().isOk())
.andExpect(jsonPath("total").value(1));
}
@Test
@WithMockUser(username = "2")
void should_receive_403_when_finalizeShopping_while_not_in_shop() throws Exception {
mockMvc.perform(post("/shoppingCart/finalize"))
.andExpect(status().isForbidden());
}
@Test
@WithMockUser(username = "3")
void should_receive_403_when_finalizeShopping_and_cart_is_finalized() throws Exception {
mockMvc.perform(post("/shoppingCart/finalize"))
.andExpect(status().isForbidden());
}
//confirmEntry()
@Test
void should_confirm_entry() throws Exception {
mockMvc.perform(post("/shoppingCart/confirmEntry"))
.andExpect(status().isOk())
.andExpect(jsonPath("items", hasSize(0)));
}
//confirmExit()
@Test
void should_confirm_exit() throws Exception {
mockMvc.perform(post("/shoppingCart/confirmExit"))
.andExpect(status().isOk())
.andExpect(content().string(""));
}
//pay()
@Test
void should_pay() throws Exception {
mockMvc.perform(post("/shoppingCart/pay"))
.andExpect(status().isOk())
.andExpect(content().string(""));
}
//JSON
@Test
void cart_json_should_contain_items() throws Exception {
mockMvc.perform(get("/shoppingCart"))
.andExpect(status().isOk())
.andExpect(jsonPath("items", hasSize(1)));
}
@Test
void cart_json_shouldnt_contain_user() throws Exception {
mockMvc.perform(get("/shoppingCart"))
.andExpect(status().isOk())
.andExpect(jsonPath("user").doesNotHaveJsonPath());
}
@Test
void cart_json_shouldnt_contain_initialWeight() throws Exception {
mockMvc.perform(get("/shoppingCart"))
.andExpect(status().isOk())
.andExpect(jsonPath("initialWeight").doesNotHaveJsonPath());
}
@Test
void cart_json_shouldnt_contain_finalized() throws Exception {
mockMvc.perform(get("/shoppingCart"))
.andExpect(status().isOk())
.andExpect(jsonPath("finalized").doesNotHaveJsonPath());
}
@Test
void cart_json_shouldnt_contain_paid() throws Exception {
mockMvc.perform(get("/shoppingCart"))
.andExpect(status().isOk())
.andExpect(jsonPath("paid").doesNotHaveJsonPath());
}
@Test
void cart_json_should_contain_2_fields() throws Exception {
mockMvc.perform(get("/shoppingCart"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.*", hasSize(2)));
}
@Test
void cartItem_json_should_contain_quantity() throws Exception {
mockMvc.perform(get("/shoppingCart"))
.andExpect(status().isOk())
.andExpect(jsonPath("items[0].quantity").value(1));
}
@Test
void cartItem_json_should_contain_product() throws Exception {
mockMvc.perform(get("/shoppingCart"))
.andExpect(status().isOk())
.andExpect(jsonPath("items[0].product").isNotEmpty());
}
@Test
void cartItem_json_shouldnt_contain_cart() throws Exception {
mockMvc.perform(get("/shoppingCart"))
.andExpect(status().isOk())
.andExpect(jsonPath("items[0].cart").doesNotHaveJsonPath());
}
@Test
void cartItem_json_should_contain_2_fields() throws Exception {
mockMvc.perform(get("/shoppingCart"))
.andExpect(status().isOk())
.andExpect(jsonPath("items[0].*", hasSize(2)));
}
}
| [
"tomipwl3@gmail.com"
] | tomipwl3@gmail.com |
da87a742584d7e84e0cc693bd3b12572af595645 | 5dd2090efd29d8403c24a3f1b1b194b9d195ffae | /src/main/java/BasicPackage/BaseMain.java | 3d5029d5204c47b49ad19226be069165208f4a91 | [] | no_license | Harshiniiyli/QTRecognition_Assignment_Automation | 8fe778f9b0394c7eb4d96939124f36785560316d | 7c864017dd067c88d336fc1e086fda0beb6d41b7 | refs/heads/master | 2023-09-04T06:53:52.309883 | 2021-10-25T10:50:07 | 2021-10-25T10:50:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,180 | java | package BasicPackage;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
//import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
//import org.openqa.selenium.chrome.ChromeOptions;
public class BaseMain {
public static WebDriver driver;
public Properties prop;
public WebDriver initializingDRiver() throws IOException {
prop= new Properties();
//System.getProperty("user.dir") will giver path till current project
FileInputStream fis=new FileInputStream(System.getProperty("user.dir")+"\\src\\main\\java\\BasicPackage\\data.properties");
prop.load(fis);
//String browserName=System.getProperty("browser");
String browserName=prop.getProperty("browser");
System.out.println(browserName);
if(browserName.contains("chrome"))
{
System.setProperty("webdriver.chrome.driver",
"F:\\QUALITEST TRAINING COURSE 1\\selenium course\\chromedriver_win32\\chromedriver.exe");
driver= new ChromeDriver();
//execute in chrome driver
}
//driver.manage().timeouts().implicitlyWait(7, TimeUnit.SECONDS);
return driver;
}
}
| [
"iyliharsh@gmail.com"
] | iyliharsh@gmail.com |
6f88dea2d133390a90f658cdf6d2beed3a71a286 | 1c5e8605c1a4821bc2a759da670add762d0a94a2 | /easrc/equipment/special/app/OverhaulNoticeController.java | 058af6b3c985460c05b7c986016f574a5ff29df6 | [] | no_license | shxr/NJG | 8195cfebfbda1e000c30081399c5fbafc61bb7be | 1b60a4a7458da48991de4c2d04407c26ccf2f277 | refs/heads/master | 2020-12-24T06:51:18.392426 | 2016-04-25T03:09:27 | 2016-04-25T03:09:27 | 19,804,797 | 0 | 3 | null | null | null | null | UTF-8 | Java | false | false | 4,541 | java | package com.kingdee.eas.port.equipment.special.app;
import com.kingdee.bos.BOSException;
//import com.kingdee.bos.metadata.*;
import com.kingdee.bos.framework.*;
import com.kingdee.bos.util.*;
import com.kingdee.bos.Context;
import java.lang.String;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.metadata.entity.SelectorItemCollection;
import com.kingdee.eas.framework.CoreBaseCollection;
import com.kingdee.eas.port.equipment.special.OverhaulNoticeCollection;
import com.kingdee.bos.metadata.entity.SorterItemCollection;
import com.kingdee.eas.xr.app.XRBillBaseController;
import com.kingdee.bos.util.*;
import com.kingdee.bos.metadata.entity.FilterInfo;
import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.eas.framework.CoreBaseInfo;
import com.kingdee.bos.framework.*;
import com.kingdee.eas.port.equipment.special.OverhaulNoticeInfo;
import java.rmi.RemoteException;
import com.kingdee.bos.framework.ejb.BizController;
public interface OverhaulNoticeController extends XRBillBaseController
{
public void addnew(Context ctx, IObjectPK pk, OverhaulNoticeInfo model) throws BOSException, EASBizException, RemoteException;
public IObjectPK addnew(Context ctx, OverhaulNoticeInfo model) throws BOSException, EASBizException, RemoteException;
public void audit(Context ctx, IObjectPK pk) throws BOSException, EASBizException, RemoteException;
public void delete(Context ctx, IObjectPK pk) throws BOSException, EASBizException, RemoteException;
public void delete(Context ctx, IObjectPK[] arrayPK) throws BOSException, EASBizException, RemoteException;
public IObjectPK[] delete(Context ctx, FilterInfo filter) throws BOSException, EASBizException, RemoteException;
public IObjectPK[] delete(Context ctx, String oql) throws BOSException, EASBizException, RemoteException;
public boolean exists(Context ctx, IObjectPK pk) throws BOSException, EASBizException, RemoteException;
public boolean exists(Context ctx, FilterInfo filter) throws BOSException, EASBizException, RemoteException;
public boolean exists(Context ctx, String oql) throws BOSException, EASBizException, RemoteException;
public OverhaulNoticeCollection getOverhaulNoticeCollection(Context ctx) throws BOSException, RemoteException;
public OverhaulNoticeCollection getOverhaulNoticeCollection(Context ctx, EntityViewInfo view) throws BOSException, RemoteException;
public OverhaulNoticeCollection getOverhaulNoticeCollection(Context ctx, String oql) throws BOSException, RemoteException;
public IObjectPK[] getPKList(Context ctx) throws BOSException, EASBizException, RemoteException;
public IObjectPK[] getPKList(Context ctx, FilterInfo filter, SorterItemCollection sorter) throws BOSException, EASBizException, RemoteException;
public IObjectPK[] getPKList(Context ctx, String oql) throws BOSException, EASBizException, RemoteException;
public OverhaulNoticeInfo getOverhaulNoticeInfo(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException, RemoteException;
public OverhaulNoticeInfo getOverhaulNoticeInfo(Context ctx, IObjectPK pk) throws BOSException, EASBizException, RemoteException;
public OverhaulNoticeInfo getOverhaulNoticeInfo(Context ctx, String oql) throws BOSException, EASBizException, RemoteException;
public void unAudit(Context ctx, IObjectPK pk) throws BOSException, EASBizException, RemoteException;
public void unAudit(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException, RemoteException;
public void update(Context ctx, IObjectPK pk, OverhaulNoticeInfo model) throws BOSException, EASBizException, RemoteException;
public void updateBigObject(Context ctx, IObjectPK pk, OverhaulNoticeInfo model) throws BOSException, RemoteException;
public void updatePartial(Context ctx, OverhaulNoticeInfo model, SelectorItemCollection selector) throws BOSException, EASBizException, RemoteException;
public String getBindingProperty(Context ctx) throws BOSException, RemoteException;
public void actitonConRect(Context ctx, OverhaulNoticeInfo model) throws BOSException, RemoteException;
public void unConRet(Context ctx, OverhaulNoticeInfo model) throws BOSException, RemoteException;
public void feedInfor(Context ctx, OverhaulNoticeInfo model) throws BOSException, RemoteException;
} | [
"shxr_code@126.com"
] | shxr_code@126.com |
f7d8f8fe19827d71f020b534330f5de7add4cb63 | 6dbae30c806f661bcdcbc5f5f6a366ad702b1eea | /Corpus/eclipse.jdt.ui/8031.java | ad34a8ceecd6fa70b4701c6bcdc7f089c0c346dc | [
"MIT"
] | permissive | SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018 | d3fd21745dfddb2979e8ac262588cfdfe471899f | 0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0 | refs/heads/master | 2020-03-31T15:52:01.005505 | 2018-10-01T23:38:50 | 2018-10-01T23:38:50 | 152,354,327 | 1 | 0 | MIT | 2018-10-10T02:57:02 | 2018-10-10T02:57:02 | null | UTF-8 | Java | false | false | 8,145 | java | /*******************************************************************************
* Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.ui.text.correction.proposals;
import java.util.List;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.Block;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.Expression;
import org.eclipse.jdt.core.dom.ExpressionStatement;
import org.eclipse.jdt.core.dom.IBinding;
import org.eclipse.jdt.core.dom.IMethodBinding;
import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.IVariableBinding;
import org.eclipse.jdt.core.dom.MethodDeclaration;
import org.eclipse.jdt.core.dom.Modifier;
import org.eclipse.jdt.core.dom.ReturnStatement;
import org.eclipse.jdt.core.dom.Statement;
import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
import org.eclipse.jdt.internal.corext.dom.ASTNodes;
import org.eclipse.jdt.internal.corext.dom.ScopeAnalyzer;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.text.correction.CorrectionMessages;
public class MissingReturnTypeCorrectionProposal extends LinkedCorrectionProposal {
//$NON-NLS-1$
protected static final String RETURN_EXPRESSION_KEY = "value";
private MethodDeclaration fMethodDecl;
protected ReturnStatement fExistingReturn;
public MissingReturnTypeCorrectionProposal(ICompilationUnit cu, MethodDeclaration decl, ReturnStatement existingReturn, int relevance) {
//$NON-NLS-1$
super("", cu, null, relevance, JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE));
fMethodDecl = decl;
fExistingReturn = existingReturn;
}
@Override
public String getName() {
if (fExistingReturn != null) {
return CorrectionMessages.MissingReturnTypeCorrectionProposal_changereturnstatement_description;
} else {
return CorrectionMessages.MissingReturnTypeCorrectionProposal_addreturnstatement_description;
}
}
@Override
protected ASTRewrite getRewrite() {
AST ast = getAST();
ITypeBinding returnBinding = getReturnTypeBinding();
if (fExistingReturn != null) {
ASTRewrite rewrite = ASTRewrite.create(ast);
Expression expression = evaluateReturnExpressions(ast, returnBinding, fExistingReturn.getStartPosition());
if (expression != null) {
rewrite.set(fExistingReturn, ReturnStatement.EXPRESSION_PROPERTY, expression, null);
addLinkedPosition(rewrite.track(expression), true, RETURN_EXPRESSION_KEY);
}
return rewrite;
} else {
ASTRewrite rewrite = ASTRewrite.create(ast);
ASTNode body = getBody();
// For lambda the body can be a block or an expression.
if (body instanceof Block) {
Block block = (Block) body;
List<Statement> statements = block.statements();
int nStatements = statements.size();
ASTNode lastStatement = null;
if (nStatements > 0) {
lastStatement = statements.get(nStatements - 1);
}
if (returnBinding != null && lastStatement instanceof ExpressionStatement && lastStatement.getNodeType() != ASTNode.ASSIGNMENT) {
Expression expression = ((ExpressionStatement) lastStatement).getExpression();
ITypeBinding binding = expression.resolveTypeBinding();
if (binding != null && binding.isAssignmentCompatible(returnBinding)) {
Expression placeHolder = (Expression) rewrite.createMoveTarget(expression);
ReturnStatement returnStatement = ast.newReturnStatement();
returnStatement.setExpression(placeHolder);
rewrite.replace(lastStatement, returnStatement, null);
return rewrite;
}
}
int offset;
if (lastStatement == null) {
offset = block.getStartPosition() + 1;
} else {
offset = lastStatement.getStartPosition() + lastStatement.getLength();
}
ReturnStatement returnStatement = ast.newReturnStatement();
Expression expression = evaluateReturnExpressions(ast, returnBinding, offset);
returnStatement.setExpression(expression);
rewrite.getListRewrite(block, Block.STATEMENTS_PROPERTY).insertLast(returnStatement, null);
addLinkedPosition(rewrite.track(returnStatement.getExpression()), true, RETURN_EXPRESSION_KEY);
}
return rewrite;
}
}
/*
* Evaluates possible return expressions. The favourite expression is returned.
*/
private Expression evaluateReturnExpressions(AST ast, ITypeBinding returnBinding, int returnOffset) {
CompilationUnit root = getCU();
Expression result = null;
if (returnBinding != null) {
result = computeProposals(ast, returnBinding, returnOffset, root, result);
}
Expression defaultExpression = createDefaultExpression(ast);
addLinkedPositionProposal(RETURN_EXPRESSION_KEY, ASTNodes.asString(defaultExpression), null);
if (result == null) {
return defaultExpression;
}
return result;
}
protected Expression computeProposals(AST ast, ITypeBinding returnBinding, int returnOffset, CompilationUnit root, Expression result) {
ScopeAnalyzer analyzer = new ScopeAnalyzer(root);
IBinding[] bindings = analyzer.getDeclarationsInScope(returnOffset, ScopeAnalyzer.VARIABLES | ScopeAnalyzer.CHECK_VISIBILITY);
for (int i = 0; i < bindings.length; i++) {
IVariableBinding curr = (IVariableBinding) bindings[i];
ITypeBinding type = curr.getType();
if (type != null && type.isAssignmentCompatible(returnBinding) && testModifier(curr)) {
if (result == null) {
result = ast.newSimpleName(curr.getName());
}
addLinkedPositionProposal(RETURN_EXPRESSION_KEY, curr.getName(), null);
}
}
return result;
}
protected boolean testModifier(IVariableBinding curr) {
int modifiers = curr.getModifiers();
int staticFinal = Modifier.STATIC | Modifier.FINAL;
if ((modifiers & staticFinal) == staticFinal) {
return false;
}
if (Modifier.isStatic(modifiers) && !Modifier.isStatic(getModifiers())) {
return false;
}
return true;
}
protected Expression createDefaultExpression(AST ast) {
return ASTNodeFactory.newDefaultExpression(ast, fMethodDecl.getReturnType2(), fMethodDecl.getExtraDimensions());
}
protected CompilationUnit getCU() {
return (CompilationUnit) fMethodDecl.getRoot();
}
protected ASTNode getBody() {
return fMethodDecl.getBody();
}
protected AST getAST() {
return fMethodDecl.getAST();
}
protected ITypeBinding getReturnTypeBinding() {
IMethodBinding methodBinding = fMethodDecl.resolveBinding();
if (methodBinding != null && methodBinding.getReturnType() != null) {
return methodBinding.getReturnType();
}
return null;
}
protected int getModifiers() {
return fMethodDecl.getModifiers();
}
}
| [
"masudcseku@gmail.com"
] | masudcseku@gmail.com |
3033ff6afa5f0dea7b0795f6c0faefffae1461e1 | d63a81d6b7452957b2e71ea29e62870f34460bba | /KutuphaneSistemiWS/src/com/mesutemre/kitap/rowmapper/KitapPuanModelRowMapper.java | dcd3fe11309fa7e041e7dfae101c5e718e8cf125 | [] | no_license | mesudemre/KutuphaneSistemiWS | 7701e20961c5013fb867cd4456d02fe0f6649ead | 10f65cdf5b85995baf247f2af5e6a7817ce7c0f7 | refs/heads/master | 2023-04-04T03:06:03.356148 | 2021-04-10T15:32:52 | 2021-04-10T15:32:52 | 330,137,755 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 496 | java | package com.mesutemre.kitap.rowmapper;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;
import com.mesutemre.kitap.resultgenerator.KitapPuanModelResultGenerator;
public class KitapPuanModelRowMapper implements RowMapper {
@Override
public Object mapRow(ResultSet rs, int line) throws SQLException {
KitapPuanModelResultGenerator resultGenerator = new KitapPuanModelResultGenerator();
return resultGenerator.extractData(rs);
}
}
| [
"1991erzurum25"
] | 1991erzurum25 |
353100e731af4b1ef69102fffabae8bd6b4eff12 | 44b45db76a2ee7e049099a2f3b6d11c86e5b9557 | /src/main/java/dynamicprogramming/MinimumJumps.java | 1ad2217db4fbc3691d15222773ddc9b681471190 | [] | no_license | gopalbala/bytebyteproblems | 830dde5ce1919a12b280aa308fc1a98a4d91cac8 | 352494217903d3ed735eb16fc9b52f4ce5b82b54 | refs/heads/master | 2021-07-22T03:53:09.320607 | 2020-03-27T07:08:07 | 2020-03-27T07:08:07 | 102,019,459 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,675 | java | package dynamicprogramming;
/**
* Created by gbalasubramanian on 21/03/18.
*/
public class MinimumJumps {
public static void main(String[] args) {
int arr[] = {1, 3, 6, 1, 0, 9};//{1, 3, 6, 3, 2, 3, 6, 8, 9, 5};
int n = arr.length;
System.out.println("Minimum number of jumps to reach end is " + minJumps(arr, 0, n));
}
private static int minJumps(int[] arr, int start, int length) {
if (start == length)
return 0;
if (arr[start] == 0)
return Integer.MAX_VALUE;
int min = Integer.MAX_VALUE;
for (int i = start + 1; i <= length && i <= start + arr[start]; i++) {
int jumps = minJumps(arr, i, length);
if (jumps != Integer.MAX_VALUE && jumps + 1 < min) {
min = jumps + 1;
}
}
return min;
}
static int minJumps1(int arr[], int l, int h)
{
// Base case: when source
// and destination are same
if (h == l)
return 0;
// When nothing is reachable
// from the given source
if (arr[l] == 0)
return Integer.MAX_VALUE;
// Traverse through all the points
// reachable from arr[l]. Recursively
// search the minimum number of jumps
// needed to reach arr[h] from these
// reachable points.
int min = Integer.MAX_VALUE;
for (int i = l+1; i <= h && i <= l + arr[l]; i++)
{
int jumps = minJumps1(arr, i, h);
if(jumps != Integer.MAX_VALUE &&
jumps + 1 < min)
min = jumps + 1;
}
return min;
}
}
| [
"balasubramaniangopalakrishnan@gmail.com"
] | balasubramaniangopalakrishnan@gmail.com |
7bd63bda76952afb3b89fce7a4377e99615d30bc | 05c55491bf7b04cbc2c6f845430c4a5492d09ee6 | /spring-cloud-contract-verifier/spring-cloud-contract-verifier-messaging/spring-cloud-contract-verifier-messaging-core/src/main/java/org/springframework/cloud/contract/verifier/messaging/ContractVerifierMessage.java | c8510cd526f134cf0a4f82f724488cda40b23d1f | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | dstepanov/accurest | 2c98419f80c5ec57a0a32055cd20e9f17c28fd73 | c9c637ed95c252e76ed6876ab879cee2fec96e52 | refs/heads/master | 2018-01-14T23:38:17.271911 | 2016-07-06T14:08:19 | 2016-07-06T14:08:19 | 36,869,621 | 0 | 0 | null | 2015-06-04T12:44:10 | 2015-06-04T12:44:09 | Groovy | UTF-8 | Java | false | false | 1,308 | java | /*
* Copyright 2013-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.contract.verifier.messaging;
import java.util.Map;
/**
* Describes a message. Contains payload and headers. A message can be converted
* to another type (e.g. Spring Messaging Message)
*
* @author Marcin Grzejszczak
*/
public interface ContractVerifierMessage<PAYLOAD, TYPE_TO_CONVERT_INTO> {
/**
* Returns a payload of type {@code PAYLOAD}
*/
PAYLOAD getPayload();
/**
* Returns a map of headers
*/
Map<String, Object> getHeaders();
/**
* Returns a header for a given key
*/
Object getHeader(String key);
/**
* Converts the message to {@code TYPE_TO_CONVERT_INTO} type
*/
TYPE_TO_CONVERT_INTO convert();
}
| [
"noreply@github.com"
] | noreply@github.com |
820a2356377d1e1e870995e491628d51a3a999d0 | 0a60dbb276e926fd507b6b8a44268f9b403259d8 | /spring-cloud-base/rabbit-spring-consumer-service/src/main/java/com/xiaolyuh/mq/CorrelationData.java | 03aa49992f0527698577942a71a3b1871babe7cb | [] | no_license | 312012733/spring-cloud | 1c341251255cafb2609cc10a8cff750cfe422e08 | d2c0ea01b55d149c1538b176871f26622d1ca889 | refs/heads/master | 2022-10-22T10:33:33.610526 | 2019-12-04T09:27:02 | 2019-12-04T09:27:02 | 155,216,758 | 0 | 0 | null | 2022-10-12T20:21:50 | 2018-10-29T13:29:42 | Java | UTF-8 | Java | false | false | 1,130 | java | package com.xiaolyuh.mq;
/**
* 发送消息的相关数据
* @author yuhao.wang
*/
public class CorrelationData extends org.springframework.amqp.rabbit.connection.CorrelationData {
/**
* 消息体
*/
private volatile Object message;
/**
* 交换机名称
*/
private String exchange;
/**
* 路由key
*/
private String routingKey;
/**
* 重试次数
*/
private int retryCount = 0;
public CorrelationData() {
super();
}
public CorrelationData(String id) {
super(id);
}
public CorrelationData(String id, Object data) {
this(id);
this.message = data;
}
public Object getMessage() {
return message;
}
public void setMessage(Object message) {
this.message = message;
}
public int getRetryCount() {
return retryCount;
}
public void setRetryCount(int retryCount) {
this.retryCount = retryCount;
}
public String getExchange() {
return exchange;
}
public void setExchange(String exchange) {
this.exchange = exchange;
}
public String getRoutingKey() {
return routingKey;
}
public void setRoutingKey(String routingKey) {
this.routingKey = routingKey;
}
}
| [
"312012733@qq.com"
] | 312012733@qq.com |
ede08c60dcaf7cf6aad2af66c13f6d7d38725531 | 99855bdfdda5c1790c9b2ae3125eb5d4adfca572 | /src/main/java/com/example/demo/security/s4/JwtAuthenticationFilter.java | fbd7a19e5f4dc2762db8ce353b0c89e2f71bd978 | [
"MIT"
] | permissive | Green-Pea-Ai/WD_Video_React | a82320e0835743e15a8bc04a71b089f40aec5070 | 7a8f6068f03f2513415999384215981aeef57a62 | refs/heads/master | 2023-01-03T22:54:52.580997 | 2020-10-14T13:14:28 | 2020-10-14T13:14:28 | 299,153,378 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,033 | java | package com.example.demo.security.s4;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import javax.servlet.FilterChain;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.example.demo.security.s4.CustomUser;
import com.example.demo.security.s4.SecurityConstants;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import io.jsonwebtoken.security.Keys;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
public class JwtAuthenticationFilter extends UsernamePasswordAuthenticationFilter {
private final AuthenticationManager authenticationManager;
public JwtAuthenticationFilter(AuthenticationManager authenticationManager) {
this.authenticationManager = authenticationManager;
// 인자로 들어온 URL에서 정보를 보겠다!
setFilterProcessesUrl(SecurityConstants.AUTH_LOGIN_URL);
}
@Override
public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException {
// 1차각성, 2차각성 워리어 예제의 스프링 확장판
String username = request.getParameter("username");
String password = request.getParameter("password");
Authentication authenticationToken = new UsernamePasswordAuthenticationToken(username, password);
return authenticationManager.authenticate(authenticationToken);
}
@Override
protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain, Authentication authentication) {
CustomUser user = ((CustomUser) authentication.getPrincipal());
List<String> roles = user.getAuthorities()
.stream()
.map(GrantedAuthority::getAuthority)
.collect(Collectors.toList());
byte[] signingKey = SecurityConstants.JWT_SECRET.getBytes();
// 60 * 60 이후 0을 3개 붙여줌
String token = Jwts.builder()
.signWith(Keys.hmacShaKeyFor(signingKey), SignatureAlgorithm.HS512)
.setHeaderParam("typ", SecurityConstants.TOKEN_TYPE)
.setIssuer(SecurityConstants.TOKEN_ISSUER)
.setAudience(SecurityConstants.TOKEN_AUDIENCE)
.setSubject("" + user.getMember().getUserNo())
.setExpiration(new Date(System.currentTimeMillis() + 3600000))
.claim("rol", roles)
.compact();
response.addHeader(SecurityConstants.TOKEN_HEADER, SecurityConstants.TOKEN_PREFIX + token);
}
}
| [
"yachtboatfor@gmail.com"
] | yachtboatfor@gmail.com |
f08446e49af7721235d273897d82be3bdc35153f | 4e31f634e0822a14f08d26ee065ac6b5fc268d49 | /Geometric_Modeling_Lab1/src/MainClass.java | e4552b7f8f9b54feb11786be382ba846278c0fd6 | [] | no_license | costyneuf/GM | 15ab5105a486d304272b151752f4f453acab914a | 7cb5fc04e670d90e92fef9d5144260b0be1d3c58 | refs/heads/master | 2021-09-15T02:00:30.600215 | 2018-05-24T00:26:19 | 2018-05-24T00:26:19 | 120,382,454 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,602 | java |
import java.awt.Canvas;
import java.awt.EventQueue;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JRadioButton;
import javax.swing.JTextField;
import javax.swing.JTextPane;
import javax.swing.UIManager;
import org.eclipse.swt.graphics.Point;
import curve.Curve;
import curve.CurveType;
import curve.PointType;
import curve.PointsOperation;
public class MainClass {
private Curve curve = new Curve();
private JFrame frame;
private JTextField textField;
private ButtonGroup curveChoice = new ButtonGroup();
private ButtonGroup pointChoice = new ButtonGroup();
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
try {
MainClass window = new MainClass();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the application.
*/
public MainClass() {
this.initialize();
}
/**
* Initialize the contents of the frame.
*/
private void initialize() {
this.frame = new JFrame("CSE 5543 Geometric Modeling - LAB 1");
this.frame.setBounds(100, 100, 1264, 847);
this.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.frame.getContentPane().setLayout(null);
JTextPane Text1 = new JTextPane();
Text1.setBackground(UIManager.getColor("Button.background"));
Text1.setText("Subdivision Iterations:");
Text1.setBounds(34, 345, 144, 21);
this.frame.getContentPane().add(Text1);
this.textField = new JTextField();
this.textField.setText("4");
this.textField.setToolTipText("");
this.textField.setBounds(180, 345, 40, 25);
this.frame.getContentPane().add(this.textField);
this.textField.setColumns(10);
/*
* Set up a canvas where the points will be input and the curve will be
* displayed.
*/
Canvas canvas = new Canvas();
canvas.addMouseMotionListener(new MouseMotionAdapter() {
@Override
public void mouseDragged(MouseEvent arg0) {
if (MainClass.this.curve.pointType() == PointType.EDIT) {
MainClass.this.curve
.editUpdate(new Point(arg0.getX(), arg0.getY()));
PointsOperation.updatePoints(canvas.getGraphics(),
MainClass.this.curve.controlPoints(),
MainClass.this.curve.currentIndex(),
canvas.getWidth(), canvas.getHeight());
}
if (MainClass.this.curve.controlPoints().size() > 1) {
MainClass.this.curve.curveType().updateCurve(
MainClass.this.curve, canvas.getGraphics());
}
}
});
canvas.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent arg0) {
MainClass.this.curve.updateIndexAndList(
new Point(arg0.getX(), arg0.getY()));
PointsOperation.updatePoints(canvas.getGraphics(),
MainClass.this.curve.controlPoints(),
MainClass.this.curve.currentIndex(), canvas.getWidth(),
canvas.getHeight());
if (MainClass.this.curve.controlPoints().size() > 1) {
MainClass.this.curve.curveType().updateCurve(
MainClass.this.curve, canvas.getGraphics());
}
}
});
canvas.setBackground(
UIManager.getColor("ComboBox.selectionForeground"));
canvas.setBounds(364, 57, 869, 715);
this.frame.getContentPane().add(canvas);
JRadioButton add_point = new JRadioButton("Add points");
add_point.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
PointType.setPointStatus(MainClass.this.curve, PointType.ADD);
}
});
add_point.setSelected(true);
add_point.setBounds(34, 380, 149, 23);
this.frame.getContentPane().add(add_point);
this.pointChoice.add(add_point);
JRadioButton insert_point = new JRadioButton("Insert before selected");
insert_point.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
PointType.setPointStatus(MainClass.this.curve,
PointType.INSERT);
}
});
insert_point.setBounds(34, 410, 224, 23);
this.frame.getContentPane().add(insert_point);
this.pointChoice.add(insert_point);
JRadioButton edit_point = new JRadioButton("Edit points");
edit_point.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
PointType.setPointStatus(MainClass.this.curve, PointType.EDIT);
}
});
edit_point.setBounds(34, 440, 149, 23);
this.frame.getContentPane().add(edit_point);
this.pointChoice.add(edit_point);
JButton duplicate = new JButton("Duplicate at selected");
duplicate.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
MainClass.this.curve.duplicate();
PointsOperation.updatePoints(canvas.getGraphics(),
MainClass.this.curve.controlPoints(),
MainClass.this.curve.currentIndex(), canvas.getWidth(),
canvas.getHeight());
if (MainClass.this.curve.controlPoints().size() > 1) {
MainClass.this.curve.curveType().updateCurve(
MainClass.this.curve, canvas.getGraphics());
}
}
});
duplicate.setBounds(34, 480, 277, 25);
this.frame.getContentPane().add(duplicate);
JButton delete = new JButton("Delete selected");
delete.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
MainClass.this.curve.delete();
PointsOperation.updatePoints(canvas.getGraphics(),
MainClass.this.curve.controlPoints(),
MainClass.this.curve.currentIndex(), canvas.getWidth(),
canvas.getHeight());
if (MainClass.this.curve.controlPoints().size() > 1) {
MainClass.this.curve.curveType().updateCurve(
MainClass.this.curve, canvas.getGraphics());
}
}
});
delete.setBounds(34, 520, 277, 25);
this.frame.getContentPane().add(delete);
JRadioButton uniform_sub_quadric_bSpline = new JRadioButton(
"Uniform Subdivision Quadric B-Spline");
uniform_sub_quadric_bSpline.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
MainClass.this.curve
.changeCurveStatus(CurveType.QUADRICBSPLINE);
PointsOperation.updatePoints(canvas.getGraphics(),
MainClass.this.curve.controlPoints(),
MainClass.this.curve.currentIndex(), canvas.getWidth(),
canvas.getHeight());
if (MainClass.this.curve.controlPoints().size() > 1) {
MainClass.this.curve.curveType().updateCurve(
MainClass.this.curve, canvas.getGraphics());
}
}
});
uniform_sub_quadric_bSpline.setBounds(34, 270, 324, 23);
this.frame.getContentPane().add(uniform_sub_quadric_bSpline);
this.curveChoice.add(uniform_sub_quadric_bSpline);
JRadioButton deCasteljau_sub_curve = new JRadioButton(
"de Casteljau Subdivision Curve");
deCasteljau_sub_curve.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
MainClass.this.curve.changeCurveStatus(CurveType.DECASTELJAU);
PointsOperation.updatePoints(canvas.getGraphics(),
MainClass.this.curve.controlPoints(),
MainClass.this.curve.currentIndex(), canvas.getWidth(),
canvas.getHeight());
if (MainClass.this.curve.controlPoints().size() > 1) {
MainClass.this.curve.curveType().updateCurve(
MainClass.this.curve, canvas.getGraphics());
}
}
});
deCasteljau_sub_curve.setBounds(34, 210, 324, 23);
this.frame.getContentPane().add(deCasteljau_sub_curve);
this.curveChoice.add(deCasteljau_sub_curve);
JRadioButton uniform_cubic_bSpline = new JRadioButton(
"Uniform Cubic B-Spline");
uniform_cubic_bSpline.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
MainClass.this.curve.changeCurveStatus(CurveType.CUBICBSPLINE);
PointsOperation.updatePoints(canvas.getGraphics(),
MainClass.this.curve.controlPoints(),
MainClass.this.curve.currentIndex(), canvas.getWidth(),
canvas.getHeight());
if (MainClass.this.curve.controlPoints().size() > 1) {
MainClass.this.curve.curveType().updateCurve(
MainClass.this.curve, canvas.getGraphics());
}
}
});
uniform_cubic_bSpline.setBounds(34, 150, 324, 23);
this.frame.getContentPane().add(uniform_cubic_bSpline);
this.curveChoice.add(uniform_cubic_bSpline);
JRadioButton bezier_curve = new JRadioButton("Bezier Curve");
bezier_curve.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
MainClass.this.curve.changeCurveStatus(CurveType.BEZIER);
PointsOperation.updatePoints(canvas.getGraphics(),
MainClass.this.curve.controlPoints(),
MainClass.this.curve.currentIndex(), canvas.getWidth(),
canvas.getHeight());
if (MainClass.this.curve.controlPoints().size() > 1) {
MainClass.this.curve.curveType().updateCurve(
MainClass.this.curve, canvas.getGraphics());
}
}
});
bezier_curve.setSelected(true);
bezier_curve.setBounds(34, 90, 324, 23);
this.frame.getContentPane().add(bezier_curve);
this.curveChoice.add(bezier_curve);
JButton clear = new JButton("Clear");
clear.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent arg0) {
/*
* Clear linked list.
*/
MainClass.this.curve.clear();
/*
* Clear canvas.
*/
PointsOperation.updatePoints(canvas.getGraphics(),
MainClass.this.curve.controlPoints(), -1,
canvas.getWidth(), canvas.getHeight());
/*
* Reset buttons.
*/
add_point.setSelected(true);
bezier_curve.setSelected(true);
}
});
clear.setBounds(34, 560, 277, 25);
this.frame.getContentPane().add(clear);
/*
* Set up a refresh button. The button will parse the input in the
* message box to the curve.
*/
JButton refreshButton = new JButton("Refresh");
refreshButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
try {
MainClass.this.curve.changeSubdivision(Integer
.parseInt(MainClass.this.textField.getText()));
if (MainClass.this.curve
.curveType() == CurveType.DECASTELJAU) {
PointsOperation.updatePoints(canvas.getGraphics(),
MainClass.this.curve.controlPoints(),
MainClass.this.curve.currentIndex(),
canvas.getWidth(), canvas.getHeight());
MainClass.this.curve.curveType().updateCurve(
MainClass.this.curve, canvas.getGraphics());
}
} catch (NumberFormatException e1) {
} catch (NullPointerException e2) {
}
}
});
refreshButton.setBounds(225, 345, 95, 25);
this.frame.getContentPane().add(refreshButton);
}
}
| [
"youzi_g@163.com"
] | youzi_g@163.com |
b01402f03c1e3fe8c0cbafc8d9ba07b220a3e891 | 602e8b3abc40cd7ace13d1baf069b7b12637c7d9 | /app/src/main/java/com/lyondry/lyondry/Activity/Schduail2Activity.java | 9671e6e4c3e4fcc4dea64e4ed1e8ddd1f95152af | [] | no_license | Akhileshpraza/LyondryAppAndroid | 30497180e396aed67bcffbef1fd18ea9b39cff44 | ee5dd6685bdfe83bc8383dc785af8d99fcecb560 | refs/heads/master | 2023-07-14T13:25:28.709280 | 2021-08-28T05:53:39 | 2021-08-28T05:53:39 | 400,713,588 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,232 | java | package com.lyondry.lyondry.Activity;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.lyondry.lyondry.R;
public class Schduail2Activity extends AppCompatActivity {
Button submit;
TextView cancle;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_schduail2);
cancle = findViewById(R.id.btn_cancle);
submit = findViewById(R.id.btn_submit);
cancle.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getApplication(),MainActivity.class);
startActivity(intent);
}
});
Next();
}
public void Next(){
submit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getApplication(),MainActivity.class);
startActivity(intent);
}
});
}
} | [
"prazapatiakhilesh2@gmail.com"
] | prazapatiakhilesh2@gmail.com |
4d01a47d57c7c8928474f90ddb472af3c4c6b6a7 | f3848ca1f7b4807c2e0e1880f8e55cb0cfe5ccce | /FleaMarketEJB/src/bg/tusofia/fksu/pe/fleamarket/buslogic/impl/CommisionRateBean.java | 6e921ce3468f8093e7adc49604b41cc9a46b89e8 | [] | no_license | fksucode/fleamarket | a9b752419e0f969eded896af74f98c70a3cbfc66 | add6d420370a7fa58cb4445fcb81a982ee6dc833 | refs/heads/master | 2016-08-11T05:36:22.053240 | 2013-04-01T18:19:07 | 2013-04-01T18:19:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,063 | java | package bg.tusofia.fksu.pe.fleamarket.buslogic.impl;
import javax.annotation.PostConstruct;
import javax.ejb.ConcurrencyManagement;
import javax.ejb.ConcurrencyManagementType;
import javax.ejb.LocalBean;
import javax.ejb.Lock;
import javax.ejb.LockType;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.ejb.TransactionManagement;
import javax.ejb.TransactionManagementType;
/**
* Session Bean implementation class CommisionRateBean
*/
// NOTE: ejb/beanTypes - singleton
// NOTE: ejb/other - init bean at startup
// NOTE: ejb/other - concurrency management (container)
// NOTE: ejb/transaction - bean managed (on transaction)
@Singleton
@Startup
@LocalBean
@ConcurrencyManagement(ConcurrencyManagementType.CONTAINER)
@TransactionManagement(TransactionManagementType.BEAN)
public class CommisionRateBean {
private Double commisionRate;
@PostConstruct
private void initialize() {
// call web service to get the daily rate
commisionRate = 0.8;
}
@Lock(LockType.READ)
public Double getCommisionRate() {
return commisionRate;
}
}
| [
"petyo.dimitrov@gmail.com"
] | petyo.dimitrov@gmail.com |
f87581cf5748ce53ec1a82a1ec2aeb328f2747d0 | ff0322d1fcb338ee287bcbb91282b8083a2d9bb5 | /owner/src/test/java/org/aeonbits/owner/typeconversion/editor/UserPropertyEditor.java | 23ae7b2e2e6c2f26f214d5a32190b09283195e20 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | admizh/owner | e61c5e0de881eaa64fbebfe34f8b8235948d2f2b | d1243ccf4f5e442e0c36e6a281869c3bdd53153c | refs/heads/master | 2021-01-12T20:56:10.537070 | 2014-12-03T04:14:11 | 2014-12-03T04:14:11 | 29,939,885 | 0 | 0 | BSD-3-Clause | 2020-12-25T07:52:34 | 2015-01-27T23:12:38 | Java | UTF-8 | Java | false | false | 601 | java | /*
* Copyright (c) 2012-2014, Luigi R. Viggiano
* All rights reserved.
*
* This software is distributable under the BSD license.
* See the terms of the BSD license in the documentation provided with this software.
*/
package org.aeonbits.owner.typeconversion.editor;
import java.beans.PropertyEditorSupport;
/**
* @author Luigi R. Viggiano
*/
public class UserPropertyEditor extends PropertyEditorSupport {
@Override
public void setAsText(String text) throws IllegalArgumentException {
User user = new User();
user.setUsername(text);
setValue(user);
}
}
| [
"luigi.viggiano@newinstance.it"
] | luigi.viggiano@newinstance.it |
eb43d01f697916917ebc4765d6288c1b2a9e404f | b5e571448f4d118d8e366047d8a1148c7324dc19 | /src/main/java/com/davidk/rest/webservices/todo/TodoJpaController.java | 26a141ce573a59b392fbb2f64302f816ebb57622 | [] | no_license | davidkecskemeti/todo-spring-boot-backend | 963861262c51e6dce9c2f69833d44a5dea616ab3 | ffa6fdf9d3b0dcb4d93b3f70acdb02b6425a0a3c | refs/heads/master | 2022-12-26T21:52:50.685349 | 2020-09-30T09:25:15 | 2020-09-30T09:25:15 | 299,860,489 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,923 | java | package com.davidk.rest.webservices.todo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
import java.net.URI;
import java.util.List;
@RestController
@CrossOrigin(origins = "http://localhost:4200")
public class TodoJpaController {
@Autowired
private TodoJpaRepository todoJpaRepository;
@GetMapping("/jpa/users/{username}/todos")
public List<Todo> getAllTodos(@PathVariable String username) {
return todoJpaRepository.findByUsername(username);
}
@GetMapping("/jpa/users/{username}/todos/{id}")
public Todo getTodo(@PathVariable String username, @PathVariable long id) {
return todoJpaRepository.findById(id).get();
}
@DeleteMapping("/jpa/users/{username}/todos/{id}")
public ResponseEntity<Void> deleteTodo(@PathVariable String username, @PathVariable long id) {
todoJpaRepository.deleteById(id);
return ResponseEntity.noContent().build();
}
@PutMapping("/jpa/users/{username}/todos/{id}")
public ResponseEntity<Todo> updateTodo(@PathVariable String username, @PathVariable long id, @RequestBody Todo todo) {
todo.setUsername(username);
Todo todoUpdated = todoJpaRepository.save(todo);
return new ResponseEntity<Todo>(todo, HttpStatus.OK);
}
@PostMapping("/jpa/users/{username}/todos")
public ResponseEntity<Void> updateTodo(@PathVariable String username, @RequestBody Todo todo) {
todo.setUsername(username);
Todo createdTodo = todoJpaRepository.save(todo);
URI uri = ServletUriComponentsBuilder.fromCurrentRequest().path("/{id}").buildAndExpand(createdTodo.getId()).toUri();
return ResponseEntity.created(uri).build();
}
}
| [
"dxdy421@gmail.com"
] | dxdy421@gmail.com |
be61dd52d265a1457d6b73bc46ab521f548dcc6e | 0ac60532d320022b36931811ecf184dfaa7a2090 | /JavaWcp/src/extend/human/Employee.java | 6b474cb995d2c7b3ab9e870d3ea46aaa5c20dba3 | [] | no_license | Hitohito1023/JavaWCP | f85d5dfd1c0f8cdbce9f57183d8e4c5a64843ab1 | 8cf3888ecfed202441c56d7781d858e60bf17676 | refs/heads/master | 2023-03-21T07:24:04.018190 | 2021-03-17T10:12:08 | 2021-03-17T10:12:08 | 336,929,977 | 0 | 0 | null | 2021-03-17T10:12:09 | 2021-02-08T01:32:45 | Java | UTF-8 | Java | false | false | 407 | java | package extend.human;
public class Employee extends Human {
private String department;
public Employee(String name, int age, String department) {
super(name, age);
this.department = department;
}
public String getEmployeeProfile() {
String profile = "年齢は" + this.age + "です。";
profile += "サラリーマンで、部署は" + this.department + "です。";
return profile;
}
}
| [
"kinaseryota@192.168.1.3"
] | kinaseryota@192.168.1.3 |
8040d1e1ca9164297b1131bd786d681511f366c4 | 9f4785187b89539cbb5a68e084844e1a04c29c8c | /src/com/yeyoan/blackjack/model/Dealer.java | f60cdfd0e7784974f8ecbad7bb3be49ea111739a | [
"MIT"
] | permissive | josh-abad/blackjack-6102 | 3225736c99bba721b690fd6fa5d8e333c60ef2fe | cb98268db7d6bf86a476f0ecb7fc37548e50c725 | refs/heads/master | 2022-02-27T01:01:52.245055 | 2019-10-25T15:34:04 | 2019-10-25T15:34:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 566 | java | package com.yeyoan.blackjack.model;
/**
* A blackjack dealer.
* @author Joshua Abad
*/
public class Dealer extends Player {
public Dealer() {
super("Dealer");
}
/**
* Determines if this dealer has a soft 17.
*
* <p>A hand that contains an ace counted as 11 is a soft hand. If the hand
* is soft and has a value of 17, it is a soft 17.
*
* @return true if this dealer has a soft 17
*/
public boolean hasSoft17() {
return getHandValue() == 17 && hasSoftHand();
}
} | [
"yeyoan@gmail.com"
] | yeyoan@gmail.com |
e357c22ffd2c6387d6592a8c700483a400a743b6 | 4a0100a250831bdc3866fd9ce9b5da9c8615ff30 | /lib_cordova/test/org/apache/cordova/PreferenceNodeTest.java | e4f9b83bcf2e4244ce3ce9b772639bc12d7d3832 | [] | no_license | cwchingwei/MyApplicationJit | 0ede86c9cb437769219e5755eb20ce1afd42dfc0 | 9da165de7613d760910d20cfbd66f18e1df5bc1b | refs/heads/master | 2020-03-16T07:11:18.430193 | 2018-05-08T09:44:12 | 2018-05-08T09:44:17 | 132,570,737 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,046 | 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.
*/
import org.apache.cordova.PreferenceNode;
import org.junit.*;
import static org.junit.Assert.*;
public class PreferenceNodeTest {
@Test
public void testConstructor() {
PreferenceNode foo = new org.apache.cordova.PreferenceNode("fullscreen", "false", false);
assertEquals("fullscreen", foo.name);
assertEquals("false", foo.value);
assertEquals(false, foo.readonly);
}
@Test
public void testNameAssignment() {
PreferenceNode foo = new org.apache.cordova.PreferenceNode("fullscreen", "false", false);
foo.name = "widescreen";
assertEquals("widescreen", foo.name);
}
@Test
public void testValueAssignment() {
PreferenceNode foo = new org.apache.cordova.PreferenceNode("fullscreen", "false", false);
foo.value = "maybe";
assertEquals("maybe", foo.value);
}
@Test
public void testReadonlyAssignment() {
PreferenceNode foo = new org.apache.cordova.PreferenceNode("fullscreen", "false", false);
foo.readonly = true;
assertEquals(true, foo.readonly);
}
}
| [
"jason.yang.itstar@gmail.com"
] | jason.yang.itstar@gmail.com |
77bcc6d99dbac95d9825ef11db16d3d518c9f42e | 9472265e75644473395d9f9271985f3e5494535d | /osc/OSCPort.java | 1d46b78c1be0a168b2f188fc823c40e288c64156 | [] | no_license | notthetup/JOEv2 | 1a16e887cdaef21032a3cecc76721fcd8b7dedbc | dde1f41d4ccea570ed575530b30c5273adb4ab75 | refs/heads/master | 2016-09-06T20:13:59.151421 | 2012-10-29T09:11:07 | 2012-10-29T09:11:07 | 3,396,066 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 688 | java | package osc;
import java.net.DatagramSocket;
public abstract class OSCPort {
protected DatagramSocket socket;
public static final int defaultSCOSCPort = 57110;
public static final int defaultSCLangOSCPort = 57120;
public static final int defalutDatagramBufferSize = 1536;
/**
* Close the socket if this hasn't already happened.
* @see java.lang.Object#finalize()
*/
protected void finalize() throws Throwable {
super.finalize();
socket.close();
}
/**
* Close the socket and free-up resources. It's recommended that clients call
* this when they are done with the port.
*/
public void close() {
socket.close();
}
}
| [
"notthetup@gmail.com"
] | notthetup@gmail.com |
a63c2ed50e3450feec41be42728648cb539ff3a5 | 1f284cf47ff6da356268b744a016f23249c3aba6 | /app/src/test/java/com/sakchaisr/sqliteproductj/ExampleUnitTest.java | 6f248ec312ee02b5b25c37ba6ff286ad727710bf | [] | no_license | HaritFluk/SqliteProductJAVA | f479fc9bb9c9be9a63f4243095c66cbbf353d572 | b6ce22c9b07d2797075f7efe53f4c40e195092d8 | refs/heads/master | 2022-03-22T04:48:27.143568 | 2019-12-17T15:10:20 | 2019-12-17T15:10:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 389 | java | package com.sakchaisr.sqliteproductj;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"07ghostharitkumsan@gmail.com"
] | 07ghostharitkumsan@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.