blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
410
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 0
51
| license_type
stringclasses 2
values | repo_name
stringlengths 5
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
80
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 5.85k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 131
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 3
9.45M
| extension
stringclasses 32
values | content
stringlengths 3
9.45M
| authors
sequencelengths 1
1
| author_id
stringlengths 0
313
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0efea544c228ce21540b37568ede83fa69f53caf | de71ef7c399e2d7e91275101b28a61d3ebaac9b3 | /TMSUIAutomation/src/test/java/com/quinbay/automation/steps/EditConnectionSteps.java | 7f11abb4be9c390fe1ea430cf12e87b5d19a1bb1 | [] | no_license | TMSInternProject2021/Indhu | 91b21db6a1a367b30ebe9a873f96bab1db0f9c1a | 08f12bdee96024848346759d118323ae1172870b | refs/heads/master | 2023-02-21T14:40:47.509206 | 2021-01-22T06:55:01 | 2021-01-22T06:55:01 | 330,964,825 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,293 | java | package com.quinbay.automation.steps;
import com.quinbay.automation.Action.AddNewConnectionAction;
import com.quinbay.automation.Action.EditConnectionAction;
import io.cucumber.java.en.And;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
import org.openqa.selenium.WebDriver;
import static org.hamcrest.MatcherAssert.assertThat;
public class EditConnectionSteps {
EditConnectionAction editAction;
WebDriver driver;
@Given("user should be on linehauldetails page")
public void lineHaulPage(){
driver = LoginStep.driver;
editAction=new EditConnectionAction(driver);
}
@And("user creates a new connection")
public void createNewConnection() throws InterruptedException {
editAction.createConnection();
}
@When("user clicks edit icon for particular connection")
public void clickOnEdit() throws InterruptedException {
editAction.editConnection();
}
@And("user edit the fields and clicks on save")
public void editFieldsClickOnSave() throws InterruptedException {
editAction.editFieldsAndSave();
}
@Then("validate if the connection has been edited")
public void editSuccess() {
editAction.verifyConnectionEdited();
}
}
| [
"[email protected]"
] | |
cfa0295cfcf9d2428e3092979c29edbd42617960 | 8758e249633d0307320d7b0d7d4eb7e3c6a9a08b | /src/CodePage/MoveCodePage.java | 38253ac67c221261b250abe318d8f9ab4a8b00f5 | [] | no_license | all-and-proust/ActiveSyncWBXMLParser | adeb4122cf196d50f465e6cdde14fbdea80bed17 | 9b26fa8c785f20d473eac73aeb57c551956adfab | refs/heads/master | 2021-03-13T19:07:15.430193 | 2015-11-11T02:09:44 | 2015-11-11T02:09:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 891 | java | package CodePage;
/**
* Created by frankobe on 3/11/2015.
*/
public class MoveCodePage extends CodePage {
/**
* Constructor for MoveCodePage. Initializes all of the code page values.
*/
public MoveCodePage() {
/* Maps String to Token for the code page */
codepageTokens.put("MoveItems", 0x05);
codepageTokens.put("Move", 0x06);
codepageTokens.put("SrcMsgId", 0x07);
codepageTokens.put("SrcFldId", 0x08);
codepageTokens.put("DstFldId", 0x09);
codepageTokens.put("Response", 0x0a);
codepageTokens.put("Status", 0x0b);
codepageTokens.put("DstMsgId", 0x0c);
/* Maps token to string for the code page */
for (String s : codepageTokens.keySet()) {
codepageStrings.put(codepageTokens.get(s), s);
}
codePageIndex = 0x05;
codePageName = "Move";
}
}
| [
"[email protected]"
] | |
7fb04099ee94a94128c9ea38f820ac4b756ebecd | 06b2395018f579f01096519f784c086bc6ee8126 | /hflib/src/main/java/com/hfxief/view/banner/BannerViewPager.java | d4f869b6ef4928d5005ee3f05400fa4e91505188 | [] | no_license | XHiStone/SamepleDemos | 3bcabba087edc449fe9a3cbd0b9df594bae814a2 | c8152498246f15044e97a9454527094d055f3817 | refs/heads/master | 2020-03-16T21:25:31.355002 | 2019-01-23T07:47:48 | 2019-01-23T07:47:48 | 132,998,415 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,910 | java | package com.hfxief.view.banner;
import android.content.Context;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import com.hfxief.view.banner.adapter.UltraViewPagerAdapter;
import com.hfxief.view.banner.listener.UltraViewPagerCenterListener;
/**
* Created by xie on 2018/5/11.
*/
public class BannerViewPager extends ViewPager implements UltraViewPagerCenterListener {
private UltraViewPagerAdapter pagerAdapter;
private boolean enableLoop;
private float itemRatio = Float.NaN;//item宽度/高度的系数
private float ratio = Float.NaN;
private boolean autoMeasureHeight;
private int itemPaddingLeft;
private int itemPaddingTop;
private int itemPaddingRight;
private int itemPaddingBottom;
private void onMeasurePage(int widthMeasureSpec, int heightMeasureSpec) {
View child = pagerAdapter == null ? null : pagerAdapter.getViewAtPosition(getCurrentItem());
if (child == null) {
child = getChildAt(0);
}
if (child == null) {
return;
}
final int childCount = getChildCount();
for (int i = 0; i < childCount; i++) {
View view = getChildAt(i);
if ((view.getPaddingLeft() != itemPaddingLeft ||
view.getPaddingTop() != itemPaddingTop ||
view.getPaddingRight() != itemPaddingRight ||
view.getPaddingBottom() != itemPaddingBottom)) {
view.setPadding(itemPaddingLeft, itemPaddingTop, itemPaddingRight, itemPaddingBottom);
}
}
ViewGroup.LayoutParams lp = child.getLayoutParams();
final int childWidthSpec = getChildMeasureSpec(widthMeasureSpec, 0, lp.width);
final int childHeightSpec = getChildMeasureSpec(heightMeasureSpec, 0, lp.height);
int childWidth = (int) ((MeasureSpec.getSize(childWidthSpec) - getPaddingLeft() - getPaddingRight()) * pagerAdapter.getPageWidth(getCurrentItem()));
int childHeight = 0;
if (!Float.isNaN(itemRatio)) {
int itemHeight = (int) (childWidth * itemRatio);
for (int i = 0; i < childCount; i++) {
View view = getChildAt(i);
view.measure(MeasureSpec.makeMeasureSpec(childWidth, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(itemHeight, MeasureSpec.EXACTLY));
}
} else {
for (int i = 0; i < childCount; i++) {
View view = getChildAt(i);
view.measure(MeasureSpec.makeMeasureSpec(childWidth, MeasureSpec.EXACTLY), childHeightSpec);
}
}
// childWidth = itemPaddingLeft + child.getMeasuredWidth() + itemPaddingRight;
childHeight = itemPaddingTop + child.getMeasuredHeight() + itemPaddingBottom;
//
// if (!Float.isNaN(ratio)) {
// heightMeasureSpec = MeasureSpec.makeMeasureSpec((int) (getMeasuredWidth() * ratio), MeasureSpec.EXACTLY);
// setMeasuredDimension(widthMeasureSpec, heightMeasureSpec);
// for (int i = 0; i < childCount; i++) {
// View view = getChildAt(i);
// view.measure(MeasureSpec.makeMeasureSpec(childWidth, MeasureSpec.EXACTLY), heightMeasureSpec);
// }
// } else {
if (autoMeasureHeight) {
setMeasuredDimension(getMeasuredWidth(), childHeight);
}
// }
//如果子view宽度重构则继续
if (!pagerAdapter.isEnableMultiScr()) {
return;
}
int pageLength = getMeasuredWidth();
final int childLength = child.getMeasuredWidth();
// Check that the measurement was successful
if (childLength > 0) {
// int difference = pageLength - childLength;
int difference = 10;
if (getPageMargin() == 0) {
setPageMargin(-difference);
}
int offscreen = (int) Math.ceil((float) pageLength / (float) childLength) + 1;
setOffscreenPageLimit(offscreen);
requestLayout();
}
}
private void init(Context context, AttributeSet attrs) {
setClipChildren(false);
setOverScrollMode(OVER_SCROLL_NEVER);
}
public BannerViewPager(Context context) {
super(context);
init(context, null);
}
public BannerViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
init(context, attrs);
}
@Override
public void setAdapter(PagerAdapter adapter) {
if (adapter != null) {
if (pagerAdapter == null || pagerAdapter != adapter) {
pagerAdapter = (UltraViewPagerAdapter) adapter;
pagerAdapter.setCenterListener(this);
pagerAdapter.setEnableLoop(enableLoop);
super.setAdapter(pagerAdapter);
}
} else {
super.setAdapter(adapter);
}
}
public PagerAdapter getWrapperAdapter() {
return super.getAdapter() == null ? null : ((UltraViewPagerAdapter) super.getAdapter()).getAdapter();
}
@Override
public void setCurrentItem(int item) {
setCurrentItem(item, false);
}
@Override
public void setCurrentItem(int item, boolean smoothScroll) {
//设置item在count中间值方便循环滑动
if (pagerAdapter.getCount() != 0 && pagerAdapter.isEnableLoop()) {
item = pagerAdapter.getCount() / 2 + item % pagerAdapter.getRealCount();
}
super.setCurrentItem(item, smoothScroll);
}
@Override
public int getCurrentItem() {
if (pagerAdapter != null && pagerAdapter.getCount() != 0) {
int position = super.getCurrentItem();
return position % pagerAdapter.getRealCount();
}
return super.getCurrentItem();
}
public int getNextItem() {
if (pagerAdapter != null && pagerAdapter.getCount() != 0) {
int next = super.getCurrentItem() + 1;
return next % pagerAdapter.getRealCount();
}
return 0;
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
onMeasurePage(widthMeasureSpec, heightMeasureSpec);
}
@Override
public void center() {
setCurrentItem(0);
}
@Override
public void resetPosition() {
setCurrentItem(getCurrentItem());
}
public void setEnableLoop(boolean status) {
enableLoop = status;
if (pagerAdapter != null) {
pagerAdapter.setEnableLoop(enableLoop);
}
}
/**
* @param itemRatio 高度系数
* @return void
* @description 描述:宽度/高度的系数
* @date 2018/5/14
* @author xie
*/
public void setItemRatio(float itemRatio) {
this.itemRatio = itemRatio;
}
public void setRatio(float ratio) {
this.ratio = ratio;
}
public void setAutoMeasureHeight(boolean autoMeasureHeight) {
this.autoMeasureHeight = autoMeasureHeight;
}
public void setItemPadding(int left, int top, int right, int bottom) {
itemPaddingLeft = left;
itemPaddingTop = top;
itemPaddingRight = right;
itemPaddingBottom = bottom;
}
/**
* Set the currently selected page.
*
* @param item Item index to select
* @param smoothScroll True to smoothly scroll to the new item, false to transition immediately
*/
public void setCurrentItemFake(int item, boolean smoothScroll) {
super.setCurrentItem(item, smoothScroll);
}
/**
* Get the currently selected page.
*/
public int getCurrentItemFake() {
return super.getCurrentItem();
}
}
| [
"[email protected]"
] | |
4581f672f504e68c00e0c7a96a430741e18b398c | 3b0793b0ffa417b47dcee2c70870dcf5063fa569 | /CODI/EstadaAllotjament.java | 611292f5e4c3429ce5bac35d24c4cad7cb6c3ef8 | [] | no_license | roger21gm/ProActive-Travel | 0bcb49117fa6ba2f3c0ae3c1a5a8a2e8dbda7821 | fa72a33f5c6f6916314cee671f46a32342b06169 | refs/heads/master | 2020-04-25T14:58:28.422684 | 2019-02-27T07:08:40 | 2019-02-27T07:08:40 | 172,861,640 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,375 | java | import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;
/**
* @class EstadaAllotjament
* @brief És una estada a un Allotjament determinat.
* @details És una estada a un Allotjament determinat amb una data d'Inici i fi, un preu i un grau de satisfacció segons els clients que fan l'estada.
* @author Roger Generoso Masós
* @version 2017.4.5
*/
public class EstadaAllotjament extends ItemRuta
{
/**
* @pre cert
* @post Crea una estada a un Allotjament amb dades de paràmetres.
* @param lloc Ha de ser un Allotjament.
* @param inici És la data i hora d'entrada a l'Allotjament.
* @param fi És la data i hora de sortida de l'Allotjament.
* @param preu És el preu de l'estada.
* @param grSat És el grau de satisfacció de l'estada.
*/
EstadaAllotjament(PuntInteres lloc, LocalDateTime inici, LocalDateTime fi, float preu, float grSat) {
super(lloc, inici, fi, preu, grSat);
}
@Override
public String toString() {
PuntInteres puntInteres = this.obtenirPuntInteres();
ZoneId zonaHoraria = puntInteres.obtZonHoraria().toZoneId();
LocalTime horaIni = this.obtDataInici().atZone(zonaHoraria).toLocalTime();
LocalTime horaFi = this.obtDataFi().atZone(zonaHoraria).toLocalTime();
return (horaIni+"-"+horaFi+" "+puntInteres);
}
} | [
"[email protected]"
] | |
158553190ed142219898bdd504dd7766991360af | f4b6422703af7534867f90f2902aa3baa7b72416 | /2018/hackover/sources/android/support/v4/app/DialogFragment.java | b41d7bf8902f8287f55c54dd752d2c04078839e1 | [] | no_license | b04902036/ctf | d1eac85b915057e0961ad862d7bf2da106515321 | fac16cd79440a9c0fc870578d5c80b1491bb8eae | refs/heads/master | 2020-03-18T16:23:02.321424 | 2019-11-22T03:34:25 | 2019-11-22T03:34:25 | 134,962,628 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,845 | java | package android.support.v4.app;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
import android.content.DialogInterface.OnDismissListener;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.RestrictTo;
import android.support.annotation.RestrictTo.Scope;
import android.support.annotation.StyleRes;
import android.view.LayoutInflater;
import android.view.View;
public class DialogFragment extends Fragment implements OnCancelListener, OnDismissListener {
private static final String SAVED_BACK_STACK_ID = "android:backStackId";
private static final String SAVED_CANCELABLE = "android:cancelable";
private static final String SAVED_DIALOG_STATE_TAG = "android:savedDialogState";
private static final String SAVED_SHOWS_DIALOG = "android:showsDialog";
private static final String SAVED_STYLE = "android:style";
private static final String SAVED_THEME = "android:theme";
public static final int STYLE_NORMAL = 0;
public static final int STYLE_NO_FRAME = 2;
public static final int STYLE_NO_INPUT = 3;
public static final int STYLE_NO_TITLE = 1;
int mBackStackId = -1;
boolean mCancelable = true;
Dialog mDialog;
boolean mDismissed;
boolean mShownByMe;
boolean mShowsDialog = true;
int mStyle = 0;
int mTheme = 0;
boolean mViewDestroyed;
public void onCancel(DialogInterface dialogInterface) {
}
public void setStyle(int i, @StyleRes int i2) {
this.mStyle = i;
if (this.mStyle == 2 || this.mStyle == 3) {
this.mTheme = 16973913;
}
if (i2 != 0) {
this.mTheme = i2;
}
}
public void show(FragmentManager fragmentManager, String str) {
this.mDismissed = false;
this.mShownByMe = true;
FragmentTransaction beginTransaction = fragmentManager.beginTransaction();
beginTransaction.add((Fragment) this, str);
beginTransaction.commit();
}
public int show(FragmentTransaction fragmentTransaction, String str) {
this.mDismissed = false;
this.mShownByMe = true;
fragmentTransaction.add((Fragment) this, str);
this.mViewDestroyed = false;
this.mBackStackId = fragmentTransaction.commit();
return this.mBackStackId;
}
public void showNow(FragmentManager fragmentManager, String str) {
this.mDismissed = false;
this.mShownByMe = true;
FragmentTransaction beginTransaction = fragmentManager.beginTransaction();
beginTransaction.add((Fragment) this, str);
beginTransaction.commitNow();
}
public void dismiss() {
dismissInternal(false);
}
public void dismissAllowingStateLoss() {
dismissInternal(true);
}
void dismissInternal(boolean z) {
if (!this.mDismissed) {
this.mDismissed = true;
this.mShownByMe = false;
if (this.mDialog != null) {
this.mDialog.dismiss();
}
this.mViewDestroyed = true;
if (this.mBackStackId >= 0) {
getFragmentManager().popBackStack(this.mBackStackId, 1);
this.mBackStackId = -1;
} else {
FragmentTransaction beginTransaction = getFragmentManager().beginTransaction();
beginTransaction.remove(this);
if (z) {
beginTransaction.commitAllowingStateLoss();
} else {
beginTransaction.commit();
}
}
}
}
public Dialog getDialog() {
return this.mDialog;
}
@StyleRes
public int getTheme() {
return this.mTheme;
}
public void setCancelable(boolean z) {
this.mCancelable = z;
if (this.mDialog != null) {
this.mDialog.setCancelable(z);
}
}
public boolean isCancelable() {
return this.mCancelable;
}
public void setShowsDialog(boolean z) {
this.mShowsDialog = z;
}
public boolean getShowsDialog() {
return this.mShowsDialog;
}
public void onAttach(Context context) {
super.onAttach(context);
if (!this.mShownByMe) {
this.mDismissed = false;
}
}
public void onDetach() {
super.onDetach();
if (!this.mShownByMe && !this.mDismissed) {
this.mDismissed = true;
}
}
public void onCreate(@Nullable Bundle bundle) {
super.onCreate(bundle);
this.mShowsDialog = this.mContainerId == 0;
if (bundle != null) {
this.mStyle = bundle.getInt(SAVED_STYLE, 0);
this.mTheme = bundle.getInt(SAVED_THEME, 0);
this.mCancelable = bundle.getBoolean(SAVED_CANCELABLE, true);
this.mShowsDialog = bundle.getBoolean(SAVED_SHOWS_DIALOG, this.mShowsDialog);
this.mBackStackId = bundle.getInt(SAVED_BACK_STACK_ID, -1);
}
}
@NonNull
public LayoutInflater onGetLayoutInflater(@Nullable Bundle bundle) {
if (!this.mShowsDialog) {
return super.onGetLayoutInflater(bundle);
}
this.mDialog = onCreateDialog(bundle);
if (this.mDialog == null) {
return (LayoutInflater) this.mHost.getContext().getSystemService("layout_inflater");
}
setupDialog(this.mDialog, this.mStyle);
return (LayoutInflater) this.mDialog.getContext().getSystemService("layout_inflater");
}
@RestrictTo({Scope.LIBRARY_GROUP})
public void setupDialog(Dialog dialog, int i) {
switch (i) {
case 1:
case 2:
break;
case 3:
dialog.getWindow().addFlags(24);
break;
default:
return;
}
dialog.requestWindowFeature(1);
}
@NonNull
public Dialog onCreateDialog(@Nullable Bundle bundle) {
return new Dialog(getActivity(), getTheme());
}
public void onDismiss(DialogInterface dialogInterface) {
if (!this.mViewDestroyed) {
dismissInternal(true);
}
}
public void onActivityCreated(@Nullable Bundle bundle) {
super.onActivityCreated(bundle);
if (this.mShowsDialog) {
View view = getView();
if (view != null) {
if (view.getParent() == null) {
this.mDialog.setContentView(view);
} else {
throw new IllegalStateException("DialogFragment can not be attached to a container view");
}
}
Activity activity = getActivity();
if (activity != null) {
this.mDialog.setOwnerActivity(activity);
}
this.mDialog.setCancelable(this.mCancelable);
this.mDialog.setOnCancelListener(this);
this.mDialog.setOnDismissListener(this);
if (bundle != null) {
bundle = bundle.getBundle(SAVED_DIALOG_STATE_TAG);
if (bundle != null) {
this.mDialog.onRestoreInstanceState(bundle);
}
}
}
}
public void onStart() {
super.onStart();
if (this.mDialog != null) {
this.mViewDestroyed = false;
this.mDialog.show();
}
}
public void onSaveInstanceState(@NonNull Bundle bundle) {
super.onSaveInstanceState(bundle);
if (this.mDialog != null) {
Bundle onSaveInstanceState = this.mDialog.onSaveInstanceState();
if (onSaveInstanceState != null) {
bundle.putBundle(SAVED_DIALOG_STATE_TAG, onSaveInstanceState);
}
}
if (this.mStyle != 0) {
bundle.putInt(SAVED_STYLE, this.mStyle);
}
if (this.mTheme != 0) {
bundle.putInt(SAVED_THEME, this.mTheme);
}
if (!this.mCancelable) {
bundle.putBoolean(SAVED_CANCELABLE, this.mCancelable);
}
if (!this.mShowsDialog) {
bundle.putBoolean(SAVED_SHOWS_DIALOG, this.mShowsDialog);
}
if (this.mBackStackId != -1) {
bundle.putInt(SAVED_BACK_STACK_ID, this.mBackStackId);
}
}
public void onStop() {
super.onStop();
if (this.mDialog != null) {
this.mDialog.hide();
}
}
public void onDestroyView() {
super.onDestroyView();
if (this.mDialog != null) {
this.mViewDestroyed = true;
this.mDialog.dismiss();
this.mDialog = null;
}
}
}
| [
"[email protected]"
] | |
bf4af595d63516ebcce624b8b854de64bd88556e | 74fffce9cc4eec19f74cee33440f5bf129117c0a | /sed-builder/src/main/java/cfa/vo/sed/builder/photfilters/PassBand.java | 54207026d2da35d22a001b8a0725872163c50f82 | [] | no_license | ChandraCXC/iris | be7c97891db3f827f01254109fd7b94954c0f5f5 | 354f171ef253260677b93c35b5d2b105c28d2bc3 | refs/heads/master | 2021-04-15T19:16:53.830702 | 2017-03-06T14:11:13 | 2017-03-06T14:11:13 | 17,256,484 | 3 | 2 | null | 2021-03-26T17:54:07 | 2014-02-27T16:55:48 | Java | UTF-8 | Java | false | false | 229 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package cfa.vo.sed.builder.photfilters;
/**
*
* @author olaurino
*/
public interface PassBand {
public String getId();
}
| [
"laurino@1f3b12eb-0b44-1d3a-2961-b75907fe8195"
] | laurino@1f3b12eb-0b44-1d3a-2961-b75907fe8195 |
32bb7d8bd1500c3c8f7492ab77c95047b3d3c9fe | 97aa32741fc726cbe7168d70636d444af9c13266 | /src/main/java/site/ilemon/service/IUserService.java | f5fc29a981fddf007e1788c1cf4c9f4ada277579 | [] | no_license | yananlemon/sharding-jdbc-spring-mybatis | a64c1ff8f21835c416236816d3d5539002c9e558 | e1661b7342ab9bd609bb418258f10ec4e326a01e | refs/heads/master | 2020-04-18T06:24:39.883505 | 2019-01-24T07:04:12 | 2019-01-24T07:04:12 | 167,319,293 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 222 | java | package site.ilemon.service;
import java.util.List;
import site.ilemon.entity.User;
public interface IUserService {
public User getUserById(int id);
public List<User> listUsers();
public int insert(User user);
}
| [
"[email protected]"
] | |
2e6f042c0fffe5a78b47c8658b5c86784c7e9cc3 | 86ca2fe0dd85b816748aa291791b0913f420394d | /core/src/main/java/xdi2/core/impl/json/JSONStore.java | 3ccbedc80da2bf13f76d44be584a4701c941fa54 | [
"MIT"
] | permissive | animeshc/xdi2 | aa61f357c6ef2dfe4f1f0ec3eefa1d2c897cf843 | 0cf49dc265177d06deb6e5e8fe8d892f0661b9f4 | refs/heads/master | 2021-01-17T10:24:19.152724 | 2013-10-14T19:57:56 | 2013-10-14T19:57:56 | 4,828,538 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 976 | java | package xdi2.core.impl.json;
import java.io.IOException;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
/**
* The JSON based graph storage implementations needs a JSONStore to function.
* This defines basic operations on a JSON based datastore.
*
* @author markus
*/
public interface JSONStore {
public void init() throws IOException;
public void close();
public JsonObject load(String id) throws IOException;
public void save(String id, JsonObject jsonObject) throws IOException;
public void saveToArray(String id, String key, JsonPrimitive jsonPrimitive) throws IOException;
public void saveToObject(String id, String key, JsonElement jsonElement) throws IOException;
public void delete(String id) throws IOException;
public void deleteFromArray(String id, String key, JsonPrimitive jsonPrimitive) throws IOException;
public void deleteFromObject(String id, String key) throws IOException;
}
| [
"[email protected]"
] | |
1529d73803912a26388cc0901a92271e5810654b | 91254bae89f4b31becb01128ab132815c4b5ecfb | /src/lab2/Question2/MarketPlace/BuyItemServlet.java | 57ca33e9e812306312404ba2dc8e063f1b157d94 | [] | no_license | roopagopinath/SimpleMarketPlaceClient | bd57837ee34dc372ecdd10d7b4f77bf601556205 | d819f0243a2fd6662130402e55b7d83c76ea30e0 | refs/heads/master | 2020-04-01T16:33:39.051583 | 2014-04-03T06:13:36 | 2014-04-03T06:13:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,499 | java | package lab2.Question2.MarketPlace;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class BuyItemServlet
*/
public class BuyItemServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
Cookie loginCookie = null;
Cookie[] cookies = request.getCookies();
if(cookies != null){
for(Cookie cookie : cookies){
if(cookie.getName().equals("user")){
loginCookie = cookie;
break;
}
}
}
if(loginCookie != null){
out.println("<html> <body bgcolor=\"#E6E6FA\">");
out.println("<p align=\"right\" ><table><tr><td>Signed in User:</td><td>"+loginCookie.getValue() + "</td></tr></table></p>");
out.println("<h3>");
out.println("Dear " + loginCookie.getValue() + " : You are about to pay $"+request.getSession().getAttribute("priceFinal"));
out.println("</h3>");
out.println("<br/><form action=\"BuyItemsFinal\" method=\"post\"> Enter Credit Card number <br/><br/>");
out.println("<input type=\"text\" maxlength=16 pattern=\".{16,16}\" name=\"credit_card_num\"> (Need 16 digit CC Number)");
out.println("<br/><input type=\"submit\" value=\"Confirm Buying\">");
out.println("</form><br/><br/>");
//Back to Ads page
out.println("<form action=\"DisplayAdServlet\" method=\"post\">");
out.println("<input type=\"submit\" value=\"Back to Ads\">");
out.println("</form><br/><br/>");
//Option To sign out
out.println("<form action=\"SignOutServlet\" method=\"post\"><br/>");
out.println("<input type=\"submit\" name=\"Sign Out\" value=\"Sign Out\">");
out.println("</form><br/><br/>");
out.println("</body> </html>");
}
else{
RequestDispatcher rd = getServletContext().getRequestDispatcher("/SignUpIn.jsp");
out.println("<font color=red>Sorry, Not a valid session. Try logging in again!</font>");
rd.include(request, response);
}
}
}
| [
"[email protected]"
] | |
8fcc6b28f3dafe4f3528c45957446ab42c6033b1 | 9e77ab386f5d1fe7c37d512f0bf227d8a7837e0d | /Part-4/src/cs3500/animator/provider/controller/IAnimationController.java | b788fc6ec0227d0879640e2e28acf33ad167e9ca | [] | no_license | swastidadhich/The-Easy-Animator-gOOD | 97f4051152983f0893d75d31efa0835a572cfeac | b62598559ef973d52853f2b169753f71d2188263 | refs/heads/master | 2023-02-10T19:26:23.365643 | 2021-01-07T13:25:27 | 2021-01-07T13:25:27 | 327,618,029 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 535 | java | package cs3500.animator.provider.controller;
import java.io.IOException;
/**
* Represents a controller that handles the relationship between animation models and views. Can
* specify the speed of animation playback, as well as where the output of a view should be
* directed, if applicable. Concrete implementations define the defaults if no output or speed is
* specified.
*/
public interface IAnimationController {
/**
* Runs the controller to process and/or display animations.
*/
void run() throws IOException;
}
| [
"[email protected]"
] | |
0f9e9f33c3afc02d946d5d3d884de3bb51d7273a | 1326e2e23a37fb93bd06aad9aca944cc71b6aa2c | /java/Weed3Demo/src/weed3demo/demo_plus/table/UserInfoM.java | 73f556701cc800a6903ba279063e38fc5fa3030f | [
"Apache-2.0"
] | permissive | wcss2010/Weed3 | 65ecf200e59c496e5f432fcd976a8acaa2f9a72d | ed8cb0252e1108e11dda6405cc47683ca0e67597 | refs/heads/master | 2020-03-23T02:08:30.211263 | 2019-11-29T01:47:27 | 2019-11-29T01:47:27 | 140,958,212 | 0 | 0 | Apache-2.0 | 2018-07-14T15:47:50 | 2018-07-14T15:47:50 | null | UTF-8 | Java | false | false | 397 | java | package weed3demo.demo_plus.table;
import noear.weed.DbTable;
import weed3demo.config.DbConfig;
/**
* Created by yuety on 2017/7/22.
*/
public class UserInfoM extends DbTable {
public UserInfoM() {
super(DbConfig.test);
table("$.user_info u");
set("userID", () -> userID);
set("sex", () -> sex);
}
public Integer userID;
public Integer sex;
}
| [
"[email protected]"
] | |
ef5739c4218c31007b4cab14a09ec4b45369e831 | 064560bc02d262d1a79b970a14fd71c830b59c57 | /src/test/java/LoginTest/EditDealWithDealPageTest.java | 8f9ab4909af3b04ccf888d714f528356d5e9edb7 | [] | no_license | SviatoslavS-ui/shunko | c6dcb1019f73c47660ab9f44eb2be8c29f72f95b | 7679e31ccc10a5f7e2c7abf09170a33989732a0e | refs/heads/master | 2022-07-13T06:49:37.745512 | 2020-04-12T15:53:04 | 2020-04-12T15:53:04 | 249,151,912 | 0 | 0 | null | 2022-06-29T18:03:40 | 2020-03-22T09:36:30 | Java | UTF-8 | Java | false | false | 710 | java | package LoginTest;
import ParentTests.AbstractParentTest;
import libs.DealTimeAndDate;
import org.junit.Test;
public class EditDealWithDealPageTest extends AbstractParentTest {
DealTimeAndDate testTimeAndDate = new DealTimeAndDate("19","окт.","2015", "03", "10");
@Test
public void validEditDeal() {
loginPage.openPageLogin();
loginPage.loginToPage("Student", "909090");
dealPage.openPage();
int dealIndex = dealPage.dealsQuantity();
System.out.println("Now we are editing "+dealIndex+" deal");
dealPage.editDeal(dealIndex, testTimeAndDate, "обмен", "test", "2Вася");
checkExpectedResult("Add deal succesfull", false);
}
}
| [
"[email protected]"
] | |
a2346cf3bae9531c063674fa7d78df44d9f16497 | 331b7c3d97adc95962005693f00ffa0be02c2714 | /generator/test/unit/ajweb/parser/DatabasesHandlerTest.java | 57eabd3aa99a4d476dae8bcf519e0241e1b056c0 | [] | no_license | kumabook/ajweb | bd4ad064a8eac3d5587143a59292b03d2ae07561 | ee71dc06f6eccd6b2b396ff92bfb054544fa7b63 | refs/heads/master | 2020-12-04T12:13:30.858160 | 2011-06-12T13:12:31 | 2011-06-12T13:12:31 | 1,670,871 | 0 | 0 | null | null | null | null | SHIFT_JIS | Java | false | false | 2,668 | java | package ajweb.parser;
import static org.junit.Assert.*;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import org.junit.Test;
import org.xml.sax.SAXException;
import ajweb.model.Application;
import ajweb.model.Database;
import ajweb.model.Items;
import ajweb.model.Param;
import ajweb.generator.Compiler;
import ajweb.utils.FileUtils;
public class DatabasesHandlerTest {
@Test
public void testDatabasesHandler() throws SAXException, IOException{
Application app = Compiler.parse(new File("test" + FileUtils.fs + "ajml" + FileUtils.fs + "databases.ajml"));
//for(int i = 0; i < app.dbDatum.size(); i++){
Database room = app.databases.get(0);
assertEquals(room.id, "room_database");
assertEquals(room.tablename, "room");
assertEquals(room.type, "server");
assertEquals(room.persistence, "permanent");
assertEquals(room.properties.get("name"), "string");
ArrayList<HashMap<String, String>> room_ref = room.ref;
assertEquals(room_ref.size(), 1);
assertEquals(room_ref.get(0).get("table"), "message");
assertEquals(room_ref.get(0).get("multiplicity"), "*");
Database message = app.databases.get(1);
assertEquals(message.id, "message_database");
assertEquals(message.tablename, "message");
assertEquals(message.properties.get("message"), "string");
assertEquals(message.properties.get("posted"), "datetime");
assertEquals(message.properties.get("user"), "string");
assertEquals(message.properties.get("room"), "ref");
ArrayList<HashMap<String, String>> message_ref = message.ref;
assertEquals(message_ref.size(), 1);
assertEquals(message_ref.get(0).get("table"), "room");
assertEquals(message_ref.get(0).get("multiplicity"), "1");
assertEquals(5, room.initItems.size());
assertEquals(0, message.initItems.size());
//ArrayList<HashMap<String, Parameterable>> items = room.initItem;
Items items = room.initItems;
assertEquals(Param.paramToJavaSource(items.get(0)), "{\\\\\\\\\"name\\\\\\\\\": \\\\\\\\\"ルーム1\\\\\\\\\"}");
assertEquals(Param.paramToJavaSource(items.get(1)), "{\\\\\\\\\"name\\\\\\\\\": \\\\\\\\\"ルーム2\\\\\\\\\"}");
assertEquals(Param.paramToJavaSource(items.get(2)), "{\\\\\\\\\"name\\\\\\\\\": \\\\\\\\\"ルーム3\\\\\\\\\"}");
assertEquals(Param.paramToJavaSource(items.get(3)), "{\\\\\\\\\"name\\\\\\\\\": \\\\\\\\\"ルーム4\\\\\\\\\"}");
assertEquals(Param.paramToJavaSource(items.get(4)), "{\\\\\\\\\"name\\\\\\\\\": \\\\\\\\\"ルーム5\\\\\\\\\"}");
}
}
| [
"kumabook@3771cde0-e90d-4210-a911-b14204632cb3"
] | kumabook@3771cde0-e90d-4210-a911-b14204632cb3 |
0c4c9176da2950c50b9cc6d66b651a8bf310df18 | 77dcf8c31b7e2922034ca36b3fc6de2f9bedb4f1 | /src/main/java/org/peontopia/models/Road.java | 2eb73b45b5c911d74b018e35a77728bfc16321ad | [] | no_license | liljencrantz/peontopia | 8ffe3a7ef24544e85cbdbda8cd5c489576faff88 | 133e370ec08fc25b771aa5129ca30903cf85139b | refs/heads/master | 2021-01-11T08:27:54.395597 | 2016-11-10T21:04:40 | 2016-11-10T21:04:40 | 72,274,166 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 135 | java | package org.peontopia.models;
/**
* Created by axel on 15/10/16.
*/
public interface Road {
int maxSpeed();
int capacity();
}
| [
"[email protected]"
] | |
591439c0d383df64edcc2b2c6db857d2f16e434b | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XRENDERING-422-12-7-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/wikimodel/impl/WikiScannerContext_ESTest_scaffolding.java | 08a0cf216780fe9fd146f0305c2436b903530ed4 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 457 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Apr 03 17:24:13 UTC 2020
*/
package org.xwiki.rendering.wikimodel.impl;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class WikiScannerContext_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"[email protected]"
] | |
597bcd724fcaca680e2fdbb39449265797815c85 | 3c42b3c59eeeafc6f27847b8801c1edcf765587d | /src/test/java/ru/job4j/userstore/SimpleBlock1.java | 7641559eb6ef6a1293e123f567eb5a6da7388896 | [] | no_license | ListerioAxxe/job4j_threads | 9df510e6a5e982ac32a6963e37f7e5501e915077 | 6f78ca3f1e934c072d494aeb17acd8d929ffbb92 | refs/heads/master | 2023-07-05T01:44:56.578907 | 2021-08-25T12:53:43 | 2021-08-25T12:53:43 | 397,554,032 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,265 | java | package ru.job4j.userstore;
import org.junit.Test;
import ru.job4j.SimpleBlockingQueue;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.*;
public class SimpleBlock1 {
@Test
public void whenProducerAndConsumer() throws InterruptedException {
SimpleBlockingQueue<Integer> sq = new SimpleBlockingQueue<>(3);
CopyOnWriteArrayList<Integer> test = new CopyOnWriteArrayList<>();
Thread producer = new Thread(() -> {
try {
sq.offer(1);
sq.offer(2);
sq.offer(3);
} catch (InterruptedException e) {
e.printStackTrace();
}
});
Thread consumer = new Thread(() -> {
while (!sq.isEmpty() || !Thread.currentThread().isInterrupted()) {
try {
test.add(sq.poll());
} catch (InterruptedException e) {
e.printStackTrace();
}
}
});
producer.start();
consumer.start();
producer.join();
consumer.join();
consumer.interrupt();
assertThat(test, is(List.of(1,2,3)));
}
} | [
"[email protected]"
] | |
fdaa35b7e1f21afc35e2d9614d33cc5c554cf1f2 | 288e6c231cc03ffcc5e36715b72de9185ee3fa24 | /src/main/java/vn/tech/website/store/controller/admin/news/CategoryNewsController.java | eb481f89eacd3a3ebc2d6bb4fe8f64f37aec66c0 | [] | no_license | Niet-Pham/zeus | a7c0515aca52ccf1f0827240ccea9ef5bedf2bf7 | 85423e28d8c60f620aac7b76dc60f299c0cad46e | refs/heads/main | 2023-05-05T02:27:13.821153 | 2021-05-28T08:19:09 | 2021-05-28T08:19:09 | 371,628,251 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,741 | java | package vn.tech.website.store.controller.admin.news;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.StringUtils;
import org.primefaces.model.LazyDataModel;
import org.primefaces.model.SortOrder;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import vn.tech.website.store.controller.admin.BaseController;
import vn.tech.website.store.controller.admin.auth.AuthorizationController;
import vn.tech.website.store.dto.CategoryDto;
import vn.tech.website.store.dto.CategorySearchDto;
import vn.tech.website.store.entity.EScope;
import vn.tech.website.store.model.Category;
import vn.tech.website.store.repository.CategoryRepository;
import vn.tech.website.store.util.DbConstant;
import vn.tech.website.store.util.FacesUtil;
import javax.faces.context.FacesContext;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Named
@Scope(value = "session")
@Getter
@Setter
public class CategoryNewsController extends BaseController {
@Inject
private AuthorizationController authorizationController;
@Autowired
private CategoryRepository categoryRepository;
private LazyDataModel<CategoryDto> lazyDataModel;
private CategoryDto categoryDto;
private CategorySearchDto searchDto;
public void initData() {
if (!FacesContext.getCurrentInstance().isPostback()) {
//init();
resetAll();
}
}
public void resetAll() {
categoryDto = new CategoryDto();
searchDto = new CategorySearchDto();
onSearch();
}
public void onSearch() {
searchDto.setType(DbConstant.CATEGORY_TYPE_NEWS);
searchDto.setStatus(DbConstant.CATEGORY_STATUS_ACTIVE);
FacesUtil.resetDataTable("searchForm", "tblSearchResult");
lazyDataModel = new LazyDataModel<CategoryDto>() {
@Override
public List<CategoryDto> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, Object> filters) {
searchDto.setPageIndex(first);
searchDto.setPageSize(pageSize);
searchDto.setSortField(sortField);
String sort;
if (sortOrder.equals(sortOrder.ASCENDING)) {
sort = "ASC";
} else {
sort = "DESC";
}
searchDto.setSortOrder(sort);
return categoryRepository.search(searchDto);
}
@Override
public CategoryDto getRowData(String rowKey) {
List<CategoryDto> dtoList = getWrappedData();
String value = String.valueOf(rowKey);
for (CategoryDto obj : dtoList) {
if (obj.getCategoryId().equals(Long.valueOf(value)) || obj.getCategoryName().equals(value)) {
return obj;
}
}
return null;
}
};
int count = categoryRepository.countSearch(searchDto).intValue();
lazyDataModel.setRowCount(count);
}
public boolean validateData() {
if (StringUtils.isBlank(categoryDto.getCategoryName())) {
FacesUtil.addErrorMessage("Bạn vui lòng nhập tên loại tin tức");
return false;
}
List<Category> categoryList = new ArrayList<>();
if (categoryDto.getCategoryId() == null) {
categoryList = categoryRepository.findAllCategoryNews();
} else {
categoryList = categoryRepository.findAllCategoryNewsExpertId(categoryDto.getCategoryId());
}
categoryDto.setCategoryName(removeSpaceOfString(categoryDto.getCategoryName()));
for (Category category : categoryList) {
if (categoryDto.getCategoryName().equalsIgnoreCase(removeSpaceOfString(category.getCategoryName()))) {
FacesUtil.addErrorMessage("Tên loại sản phẩm này đã tồn tại");
return false;
}
}
return true;
}
public void onSave() {
if (!validateData()) {
return;
}
Category category = new Category();
BeanUtils.copyProperties(categoryDto, category);
category.setType(DbConstant.CATEGORY_TYPE_NEWS);
category.setStatus(DbConstant.CATEGORY_STATUS_ACTIVE);
category.setUpdateDate(new Date());
category.setUpdateBy(authorizationController.getAccountDto().getAccountId());
categoryRepository.save(category);
FacesUtil.addSuccessMessage("Lưu thành công.");
FacesUtil.closeDialog("dialogInsertUpdate");
onSearch();
}
public void showUpdatePopup(CategoryDto resultDto) {
BeanUtils.copyProperties(resultDto, categoryDto);
}
public void onDelete(CategoryDto resultDto) {
resultDto.setStatus(DbConstant.CATEGORY_STATUS_INACTIVE);
Category category = new Category();
BeanUtils.copyProperties(resultDto, category);
categoryRepository.save(category);
FacesUtil.addSuccessMessage("Xóa thành công.");
onSearch();
}
public void resetDialog() {
categoryDto = new CategoryDto();
}
public String removeSpaceOfString(String str) {
return str.trim().replaceAll("[\\s|\\u00A0]+", " ");
}
@Override
protected EScope getMenuId() {
return null;
}
}
| [
"[email protected]"
] | |
b79f63682394c1ab756e0127e1045e4c7ef6e7a9 | 357dd087c4c2efc743cbb2688a7e193ec07ce169 | /src/cognitive/Window.java | 40e2b5bc6d24769b0811411fc7e8b92769c8efaa | [] | no_license | flexd/Mosaic | c8685c251cc2f04a5826ad2d291cbda93f7b05e7 | 2fab113f2e2c98bad253f344a371c8b43d319995 | refs/heads/master | 2021-01-06T20:47:13.996781 | 2012-04-15T12:00:40 | 2012-04-15T12:00:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,575 | java | package cognitive;
import cognitive.graphics.Graphics;
import entities.AbstractEntity;
import entities.TexturedEntity;
import entities.Unit;
import java.awt.Rectangle;
import java.io.IOException;
import java.util.ArrayList;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.lwjgl.LWJGLException;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;
public class Window {
public static final int DISPLAY_HEIGHT = 600;
public static final int DISPLAY_WIDTH = 800;
public static final Logger LOGGER = Logger.getLogger(Window.class.getName());
public static Graphics graphics;
public GamePlay gameplay;
public static TextureManager tm = new TextureManager();
public static ArrayList<AbstractEntity> ground = new ArrayList<AbstractEntity>();
public static ArrayList<AbstractEntity> entities = new ArrayList<AbstractEntity>();
private int delta = 0;
private long lastFrame;
public static boolean leftButtonHeld = false;
public static int iMouseX = 0, iMouseY = 0;
public static int mouseX = 0, mouseY = 0;
private Rectangle selectionBox = new Rectangle();
private void loadTextures() {
//glScalef(1f/32f, 1f/32f, 1f);
tm.load("characters", "rpg", 32); // spritesheet name, filename, slotSize
tm.load("world", "default", 32); // spritesheet name, filename, slotSize
tm.load("hero", "generichero-blackblue", 32); // spritesheet name, filename, slotSize
tm.define("characters", "player",0,0); // Sheet named "world", "name of sprite", slot 0,0 in spritesheet.
tm.define("hero", "hero", 0, 0 ); // Sheet named "world", "name of sprite", slot 0,0 in spritesheet.
tm.define("world", "tile0", 2,3);
}
private int getDelta() {
long currentTime = Utilities.getTime();
int diff = (int) (currentTime - lastFrame);
lastFrame = currentTime;
return diff;
}
private void processMouse() {
mouseX = Mouse.getX() - graphics.camera.offsetX;
mouseY = (-Mouse.getY() + Window.DISPLAY_HEIGHT) - graphics.camera.offsetY;
unitSelection();
}
private void unitSelection() {
boolean leftButtonDown = Mouse.isButtonDown(0); // is left mouse button down
boolean rightButtonDown = Mouse.isButtonDown(1); // is right mouse button down.
if (Mouse.isInsideWindow()) {
if (leftButtonDown) {
// System.out.println("Left mouse button is down!");
if (leftButtonHeld) {
// System.out.println("Left mouse button is being held!");
// left mouse is pressed
selectionBox.setBounds(iMouseX, iMouseY, mouseX, mouseY);
//System.out.println("selectionBox x1: " + selectionBox.x + " y1: " + selectionBox.y + "x2: " + selectionBox.width + "y2: " + selectionBox.height);
// System.out.println("iMouseX: " + iMouseX + " iMouseY: " + iMouseY + " MouseX: " + mouseX + " MouseY: " + mouseY);
} else {
//System.out.println("Left mouse button was not being held, setting state to held.");
leftButtonHeld = true;
iMouseX = mouseX;
iMouseY = mouseY;
for (AbstractEntity entity : entities) {
if (entity instanceof Unit) { // Only units are selectable for now.
entity.setSelected(false);
}
}
selectionBox.setBounds(0,0,0,0);
}
}
else {
if (leftButtonHeld) {
//System.out.println("Left button was down but is not any more, setting held to false");
leftButtonHeld = false;
// Let's select some units, shall we?
for (AbstractEntity entity : entities) {
if (entity instanceof Unit) { // Only units are selectable for now.
if (entity.getHitbox().intersects(selectionBox)) {
// System.out.println("Something intersects the selectionBox, marking it selected!");
entity.setSelected(true);
}
}
}
}
}
if (rightButtonDown) {
for (AbstractEntity e : entities) {
if (e instanceof Unit) {
Unit u = (Unit)e;
if (u.isSelected()) {
u.addOrder(mouseX, mouseY);
}
}
}
}
}
}
private void generateGroundTiles() {
for (int i = 0; i < DISPLAY_WIDTH; i+=32) {
for (int j = 0; j < DISPLAY_HEIGHT; j+=32) {
ground.add(new TexturedEntity(i,j, "tile0"));
}
}
}
private void setupEntities() {
for (int i = 0; i < 1; i++) {
Unit unit = new Unit(100+(70*i), 100, "hero");
entities.add(unit);
}
generateGroundTiles();
}
public void processInput() {
processMouse();
while (Keyboard.next()) {
switch (gameplay.getState()) {
case INTRO:
if (Keyboard.getEventKey() == Keyboard.KEY_RETURN && Keyboard.getEventKeyState()) {
gameplay.setState(GamePlay.GameState.MAIN_MENU);
}
break;
case MAIN_MENU:
if (Keyboard.getEventKey() == Keyboard.KEY_RETURN && Keyboard.getEventKeyState()) {
gameplay.setState(GamePlay.GameState.GAME);
}
if (Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState()) {
Display.destroy();
System.exit(0);
}
case GAME:
if (Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState()) {
Display.destroy();
System.exit(0);
}
break;
}
}
}
// Logging
static {
try {
LOGGER.addHandler(new FileHandler("errors.log", true));
} catch (IOException ex) {
LOGGER.log(Level.WARNING, ex.toString(), ex);
}
}
public static void main(String[] args) {
Window main = null;
try {
main = new Window();
main.create();
main.run();
} catch (Exception ex) {
LOGGER.log(Level.SEVERE, ex.toString(), ex);
} finally {
if (main != null) {
main.destroy();
}
}
}
public void create() throws LWJGLException {
//Display
Display.setDisplayMode(new DisplayMode(DISPLAY_WIDTH, DISPLAY_HEIGHT));
Display.setFullscreen(false);
Display.setTitle("Generic generic game");
Display.create();
//Keyboard
Keyboard.create();
//Mouse
Mouse.setGrabbed(false);
Mouse.create();
//OpenGL
loadTextures(); // load and define textures
setupEntities(); // Add entities to lists
graphics = new Graphics();
gameplay = new GamePlay();
// set initial value for lastFrame
lastFrame = Utilities.getTime();
//resizeGL();
}
public void destroy() {
//Methods already check if created before destroying.
Mouse.destroy();
Keyboard.destroy();
Display.destroy();
}
public void run() {
while (!Display.isCloseRequested() || Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) { // && !Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)
if (Display.isVisible()) {
processInput();
delta = getDelta();
graphics.camera.update();
gameplay.update(delta);
graphics.render(delta);
} else {
if (Display.isDirty()) {
graphics.render(delta);
}
try {
Thread.sleep(100);
} catch (InterruptedException ex) {
}
}
Display.update();
Display.sync(60);
}
}
}
| [
"[email protected]"
] | |
7c244e5a97c2112b5d28b58ffdff8ddfb2fc6f10 | ca35446d01a02de3006c95546dcf1d3b385fcdad | /app/src/main/java/com/example/multiplechoicequestion/Question.java | 8d8de46d8e243e5a01b4677b705e72dcc3ac5c5b | [] | no_license | aaki-tee/multiple-choice-question-android-app | f8fdc83c462dfedafec9434f9fca9bb6c0be5bea | fbeffafaf21d583a169ae19e607fe3591c249f2f | refs/heads/master | 2022-04-18T15:39:44.246461 | 2020-04-19T14:46:10 | 2020-04-19T14:46:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,456 | java | package com.example.multiplechoicequestion;
public class Question {
private String question;
private String option1;
private String option2;
private String option3;
private String option4;
private int ansNum;
public Question(){}
public Question(String question, String option1, String option2, String option3, String option4, int ansNum) {
this.question = question;
this.option1 = option1;
this.option2 = option2;
this.option3 = option3;
this.option4 = option4;
this.ansNum = ansNum;
}
public String getQuestion() {
return question;
}
public void setQuestion(String question) {
this.question = question;
}
public String getOption1() {
return option1;
}
public void setOption1(String option1) {
this.option1 = option1;
}
public String getOption2() {
return option2;
}
public void setOption2(String option2) {
this.option2 = option2;
}
public String getOption3() {
return option3;
}
public void setOption3(String option3) {
this.option3 = option3;
}
public String getOption4() {
return option4;
}
public void setOption4(String option4) {
this.option4 = option4;
}
public int getAnsNum() {
return ansNum;
}
public void setAnsNum(int ansNum) {
this.ansNum = ansNum;
}
}
| [
"[email protected]"
] | |
73857cdc269e9a3bcbf98914663a3eab9da6a28e | 44e7adc9a1c5c0a1116097ac99c2a51692d4c986 | /aws-java-sdk-athena/src/main/java/com/amazonaws/services/athena/model/transform/ListTagsForResourceRequestProtocolMarshaller.java | 7132dafeb59a8bd8cfee6d4c21e6c605bee2e589 | [
"Apache-2.0"
] | permissive | QiAnXinCodeSafe/aws-sdk-java | f93bc97c289984e41527ae5bba97bebd6554ddbe | 8251e0a3d910da4f63f1b102b171a3abf212099e | refs/heads/master | 2023-01-28T14:28:05.239019 | 2020-12-03T22:09:01 | 2020-12-03T22:09:01 | 318,460,751 | 1 | 0 | Apache-2.0 | 2020-12-04T10:06:51 | 2020-12-04T09:05:03 | null | UTF-8 | Java | false | false | 2,745 | java | /*
* Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.athena.model.transform;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.Request;
import com.amazonaws.http.HttpMethodName;
import com.amazonaws.services.athena.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.protocol.*;
import com.amazonaws.protocol.Protocol;
import com.amazonaws.annotation.SdkInternalApi;
/**
* ListTagsForResourceRequest Marshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class ListTagsForResourceRequestProtocolMarshaller implements Marshaller<Request<ListTagsForResourceRequest>, ListTagsForResourceRequest> {
private static final OperationInfo SDK_OPERATION_BINDING = OperationInfo.builder().protocol(Protocol.AWS_JSON).requestUri("/")
.httpMethodName(HttpMethodName.POST).hasExplicitPayloadMember(false).hasPayloadMembers(true)
.operationIdentifier("AmazonAthena.ListTagsForResource").serviceName("AmazonAthena").build();
private final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory;
public ListTagsForResourceRequestProtocolMarshaller(com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory) {
this.protocolFactory = protocolFactory;
}
public Request<ListTagsForResourceRequest> marshall(ListTagsForResourceRequest listTagsForResourceRequest) {
if (listTagsForResourceRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
final ProtocolRequestMarshaller<ListTagsForResourceRequest> protocolMarshaller = protocolFactory.createProtocolMarshaller(SDK_OPERATION_BINDING,
listTagsForResourceRequest);
protocolMarshaller.startMarshalling();
ListTagsForResourceRequestMarshaller.getInstance().marshall(listTagsForResourceRequest, protocolMarshaller);
return protocolMarshaller.finishMarshalling();
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
| [
""
] | |
e8daed163a5e171c30042ea536bc43d07ace2574 | 4b5350a4167f78be8e6210d597413ba00e872212 | /init/FileReaderDemo.java | 252cab94ad8313e3121f09ab9310f925abe9df8e | [] | no_license | jullyjelly/JavaStudy | 7a51d803d459429c9428887fec952057e409e7b6 | 969cd1f0f5307e50b025dec5f714f6920413f1c9 | refs/heads/master | 2020-09-16T20:03:30.585379 | 2020-03-15T14:29:44 | 2020-03-15T14:29:44 | 223,876,012 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 302 | java | import java.io.*;
public class FileReaderDemo {
public static void main(String[] args) throws IOException
{
FileReader fr=new FileReader("que.java");
char[] buf =new char[1024];
int num=0;
while((num=fr.read(buf))!=-1)
{
System.out.println(new String(buf,0,num));
}
fr.close();
}
} | [
"[email protected]"
] | |
0b8660f670a88f9e6f269fa1ef801064bc83b5d2 | 5495935dbf3bb3d34b2fbc0270449ddca1999f66 | /ontologizer.gui/src/ontologizer/gui/swt/support/GraphCanvasExample.java | 7a0eecdb71393eafafd7734095ffa11340a1ff61 | [] | no_license | sba1/ontologizer | 783c2130e5830aa4e7ac3e73895bfe78c0e6d3cb | 82cee39d5ebccd8abd16858f07b2b8495b2dbd88 | refs/heads/master | 2022-05-30T04:58:45.438104 | 2019-12-02T13:33:02 | 2019-12-02T13:33:02 | 29,032,693 | 7 | 9 | null | 2022-05-20T20:49:13 | 2015-01-09T19:53:50 | Java | UTF-8 | Java | false | false | 1,158 | java | package ontologizer.gui.swt.support;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class GraphCanvasExample
{
private static String g = "digraph g {\n" +
"test [pos=\"37,90\", width=\"0.83333\", height=\"0.5\"];\n" +
"test2 [pos=\"37,18\", width=\"1.0278\", height=\"0.5\"];ņ" +
"test -> test2 [pos=\"e,37,36.413 37,71.831 37,64.131 37,54.974 37,46.417\"];\n" +
"}\n";
public static void main(String[] args) throws Exception
{
final Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
File f = File.createTempFile("onto","dot");
BufferedWriter br = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f)));
br.append(g);
br.close();
System.out.println(g);
GraphCanvas g = new GraphCanvas(shell, 0);
g.setLayoutedDotFile(f);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
}
| [
"[email protected]"
] | |
5fbfedaa7443279f908ac910bfc33e3167d41673 | c4219520f552b06377379ee44fe59ec253bfbdbf | /src/ru/isic/Y.java | 46b33285c776f3ca0a4ef4f9338de17ce0c9ae9a | [] | no_license | vlx1/qwyz | 83843e4300d3867da75fe82c7c68bfafbea8a0ae | 61d63b12effff566cb71891cf0c2ec608cfa85a2 | refs/heads/master | 2021-01-19T06:32:58.323266 | 2016-11-12T01:28:52 | 2016-11-12T01:28:52 | 73,524,438 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 146 | java | package ru.isic;
/**
* Created by Viktor on 12.11.2016.
*/
public class Y implements B{
public int calc2()
{
return 3;
}
}
| [
"[email protected]"
] | |
80946a8c61e69bef438c8c529fdac6df6d152e7c | 496dba0980000ec4f5ce8143f6f498cdd2e5f4dd | /ium-warehouse-android-client/app/src/main/java/studia/ium/warehouseandroidclient/application/infrastructure/product/entity/ServerUnreachableException.java | 424fc9ce9aa44dd6bf8a837946e227498e746b99 | [] | no_license | lukaszslazyk/warehouse | fdf383733b065219435ed27c8cb89aa746e22abb | e59a4eea1240ffa2ecb0354f6c4b33877256247a | refs/heads/master | 2023-03-23T20:45:20.905218 | 2021-03-23T18:10:39 | 2021-03-23T18:10:39 | 350,812,219 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 161 | java | package studia.ium.warehouseandroidclient.application.infrastructure.product.entity;
public class ServerUnreachableException extends APICallFailedException {
}
| [
"[email protected]"
] | |
f163ee2a123fbcda50b5af11386d67c5a4075948 | 76e61cb391f66f5ebced0b17efd67779b060532a | /src/org/yeastrc/proxl/xml/crux/reader/ResultsLoader.java | 7c4a0ce75d095e59723cf5223ed48a9239879659 | [
"Apache-2.0"
] | permissive | yeastrc/proxl-import-crux | a0b61ebe702b02ec4f3fdc267c86c60be5c96a65 | df20e80c68b35c72fb666ec1123335a0b1482384 | refs/heads/master | 2021-01-19T04:43:51.335532 | 2017-05-19T23:27:28 | 2017-05-19T23:27:28 | 54,796,291 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,354 | java | package org.yeastrc.proxl.xml.crux.reader;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import org.yeastrc.proxl.xml.crux.objects.CruxModification;
import org.yeastrc.proxl.xml.crux.objects.CruxParams;
import org.yeastrc.proxl.xml.crux.objects.CruxPeptide;
import org.yeastrc.proxl.xml.crux.objects.CruxReportedPeptide;
import org.yeastrc.proxl.xml.crux.objects.CruxResult;
import org.yeastrc.proxl.xml.crux.utils.CruxConstants;
public class ResultsLoader {
public static ResultsLoader getInstance() { return _INSTANCE; }
private static final ResultsLoader _INSTANCE = new ResultsLoader();
private ResultsLoader() { }
public Collection<CruxResult> loadResults( CruxParams params ) throws Exception {
Collection<CruxResult> results = new ArrayList<CruxResult>();
File resultsFile = new File( params.getAnalysisDirectory(), CruxConstants.CRUX_RESULTS_FILE );
if( !resultsFile.exists() )
resultsFile = new File( params.getAnalysisDirectory(), CruxConstants.CRUX_RESULTS_FILE2 );
if( !resultsFile.exists() )
throw new Exception( "Unable to find results file " + CruxConstants.CRUX_RESULTS_FILE + " in " + params.getAnalysisDirectory() );
try( BufferedReader br = new BufferedReader( new FileReader( resultsFile ) ) ) {
// Create an index of the column headers for easy lookup of values
String line = br.readLine();
String[] fields = line.split( "\t" );
Map<String, Integer> columnIndex = new HashMap<String, Integer>();
for( int i = 0; i < fields.length; i++ ) {
columnIndex.put( fields[ i ], i );
}
while( ( line = br.readLine() ) != null ) {
fields = line.split( "\t" );
CruxResult result = new CruxResult();
result.setScanNumber( Integer.parseInt( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_SCAN_NUMBER ) ] ) );
result.setCharge( Integer.parseInt( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_CHARGE ) ] ) );
result.setCalcMassAvg( Double.parseDouble( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_CALC_MASS_AVG ) ] ) );
result.setCalcMassMono( Double.parseDouble( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_CALC_MASS_MONO ) ] ) );
result.setFdrBH( Double.parseDouble( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_FDR_BH ) ] ) );
result.setFdrDecoy( Double.parseDouble( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_FDR_DECOY ) ] ) );
result.setIonCurrentTotal( Double.parseDouble( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_ION_CURRENT_TOTAL ) ] ) );
result.setMassErrorPPM( Double.parseDouble( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_MASS_ERROR_PPM ) ] ) );
result.setPrecursorMz( Double.parseDouble( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_PRECURSOR_MZ ) ] ) );
result.setPrecursorNeutralMass( Double.parseDouble( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_PRECURSOR_MASS ) ] ) );
result.setpValue( Double.parseDouble( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_P_VALUE ) ] ) );
result.setpValueBonf( Double.parseDouble( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_P_VALUE_BONF ) ] ) );
result.setqValueBH( Double.parseDouble( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_Q_VALUE_BH ) ] ) );
result.setqValueDecoy( Double.parseDouble( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_Q_VALUE_DECOY ) ] ) );
result.setxCorrRank( Integer.parseInt( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_XCORR_RANK ) ] ) );
result.setxCorrScore( Double.parseDouble( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_XCORR_SCORE ) ] ) );
// get the repoted peptide object and set it
result.setReportedPeptide( getReportedPeptide( fields[ columnIndex.get( CruxConstants.COLUMN_HEADER_PEPTIDE ) ], params ) );
results.add( result );
}
}
return results;
}
private CruxReportedPeptide getReportedPeptide( String sequence, CruxParams params ) throws Exception {
CruxReportedPeptide rp = new CruxReportedPeptide();
Matcher m = CruxConstants.PEPTIDE_UNLINKED_PATTERN.matcher( sequence );
if( m.matches() ) {
rp.setType( CruxConstants.LINK_TYPE_UNLINKED );
sequence = m.group( 1 );
CruxPeptide peptide = new CruxPeptide();
peptide.setSequence( sequence );
rp.setPeptide1( peptide );
return rp;
}
m = CruxConstants.PEPTIDE_MONOLINK_PATTERN.matcher( sequence );
if( m.matches() ) {
rp.setType( CruxConstants.LINK_TYPE_MONOLINK );
sequence = m.group( 1 );
int position = Integer.parseInt( m.group( 2 ) );
CruxPeptide peptide = new CruxPeptide();
peptide.setSequence( sequence );
CruxModification mod = new CruxModification();
mod.setMass( params.getLinkerMass() );
mod.setMonolink( true );
Map<Integer, Collection<CruxModification>> mods = new HashMap<Integer, Collection<CruxModification>>();
mods.put( position, new ArrayList<CruxModification>() );
mods.get( position ).add( mod );
peptide.setMods( mods );
rp.setPeptide1( peptide );
rp.setPosition1( position );
return rp;
}
m = CruxConstants.PEPTIDE_LOOPLINK_PATTERN.matcher( sequence );
if( m.matches() ) {
rp.setType( CruxConstants.LINK_TYPE_LOOPLINK );
sequence = m.group( 1 );
int position1 = Integer.parseInt( m.group( 2 ) );
int position2 = Integer.parseInt( m.group( 3 ) );
int tPos;
if( position1 > position2 ) {
tPos = position1;
position1 = position2;
position2 = tPos;
}
CruxPeptide peptide = new CruxPeptide();
peptide.setSequence( sequence );
rp.setPeptide1( peptide );
rp.setPosition1( position1 );
rp.setPosition2( position2 );
return rp;
}
m = CruxConstants.PEPTIDE_CROSSLINK_PATTERN.matcher( sequence );
if( m.matches() ) {
rp.setType( CruxConstants.LINK_TYPE_CROSSLINK );
String sequence1 = m.group( 1 );
String sequence2 = m.group( 2 );
int position1 = Integer.parseInt( m.group( 3 ) );
int position2 = Integer.parseInt( m.group( 4 ) );
// sort sequences in a consistent way
if( sequence1.compareTo( sequence2 ) > 0 ) {
String tmpSequence = sequence1;
int tmpPosition = position1;
sequence1 = sequence2;
sequence2 = tmpSequence;
position1 = position2;
position2 = tmpPosition;
} else if( sequence1.equals( sequence2 ) && position1 > position2 ) {
int tmpPosition = position1;
position1 = position2;
position2 = tmpPosition;
}
CruxPeptide peptide = new CruxPeptide();
peptide.setSequence( sequence1 );
rp.setPeptide1( peptide );
peptide = new CruxPeptide();
peptide.setSequence( sequence2 );
rp.setPeptide2( peptide );
rp.setPosition1( position1 );
rp.setPosition2( position2 );
return rp;
}
throw new Exception( "Error getting reported peptide, unknown syntax for peptide: " + sequence );
}
}
| [
"[email protected]"
] | |
61a41e3d785f419877594ecd60ee8e2d359a0ce8 | c7f9f390341d874580f8e8b6caf622ab642af96a | /src/main/java/ru/job4j/tracker/FindAllAction.java | 01a3ef7e0eaa820025084be665c268643bd71f69 | [] | no_license | c0dered273/job4j_tracker | dea0def9cf76ff72223dcb1556856322eca3b17c | 67377de4ad50aba9e2b8353dac4fe51e763e08c2 | refs/heads/master | 2023-04-03T08:33:13.324583 | 2021-04-15T08:39:24 | 2021-04-15T08:39:24 | 292,547,695 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 568 | java | package ru.job4j.tracker;
import java.util.List;
public class FindAllAction implements UserAction {
@Override
public String name() {
return "=== Show all items =======";
}
@Override
public boolean execute(Input input, Store memTracker) {
List<Item> items = memTracker.findAll();
for (Item item : items) {
System.out.println("ID: " + item.getId() + " "
+ "Name: " + item.getName() + " "
+ "Description: " + item.getDescription());
}
return true;
}
}
| [
"[email protected]"
] | |
7c792846e313350a1f633af38578ba38697374c5 | 4a926073a3cf088d9e21af6aede0af740ab58868 | /s20210704/src/main/java/com/oracle/s20210704/controller/SwController.java | 77491848e1671e02b2ccbb5dc6b4b410665e213e | [] | no_license | jungseonw00/s20210704 | 6ae0e912acbafe6e962f3b84d4e8fb62651efff6 | 32567a74ffa6d47a4390dbba51d58d6f8cc6d705 | refs/heads/main | 2023-07-14T18:17:41.878759 | 2021-08-24T05:28:13 | 2021-08-24T05:28:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,819 | java | package com.oracle.s20210704.controller;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.UUID;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.MultipartFile;
import com.oracle.s20210704.model.YjEmp;
import com.oracle.s20210704.model.SwMsg;
import com.oracle.s20210704.model.SwMsg_rcv;
import com.oracle.s20210704.model.SyMemberVO;
import com.oracle.s20210704.service.JhRrService;
import com.oracle.s20210704.service.SwMsgService;
import com.oracle.s20210704.service.SwPaging;
import com.oracle.s20210704.service.YsApvService;
@Controller
public class SwController {
@Autowired
private SwMsgService sms;
@Autowired
private JhRrService jrs;
@Autowired
private YsApvService yas;
private static final Logger logger = LoggerFactory.getLogger(SwController.class);
// 보낸 메시지
@GetMapping("message/sentMsg")
public String sentMsg(Model model, HttpSession session, SyMemberVO vo, SwMsg_rcv swmsg_rcv, String currentPage) {
System.out.println("SwController sentMsg Start...");
int emp_num = (int)session.getAttribute("member");
vo.setEmp_num(emp_num);
SyMemberVO svo = jrs.show(vo);
model.addAttribute("emp_num",emp_num);
model.addAttribute("svo",svo);
int total = sms.total(emp_num);
SwPaging sp = new SwPaging(total, currentPage);
swmsg_rcv.setStart(sp.getStart()); // 시작시 1
swmsg_rcv.setEnd(sp.getEnd());
swmsg_rcv.setEmp_num(emp_num);
List<SwMsg_rcv> msg_rcvList = sms.msg_rcvList(swmsg_rcv);
model.addAttribute("total", total);
model.addAttribute("msg_rcvList", msg_rcvList);
model.addAttribute("sp",sp);
int unreadMsg = sms.unreadMsg(emp_num);
model.addAttribute("unreadMsg", unreadMsg);
int unreadTotal = yas.unreadTotal(emp_num);
int apvNoTotal = yas.apvNoTotal(emp_num);
model.addAttribute("unreadTotal", unreadTotal);
model.addAttribute("apvNoTotal", apvNoTotal);
model.addAttribute("total", total);
return "message/sentMsg";
}
// 받은 메시지
@GetMapping("message/rcvMsg")
public String rcvMsg(Model model, HttpSession session, SyMemberVO vo, SwMsg swmsg, String currentPage) {
System.out.println("SwController rcvMsg start...");
int emp_num = (int)session.getAttribute("member");
vo.setEmp_num(emp_num);
SyMemberVO svo = jrs.show(vo);
model.addAttribute("emp_num",emp_num);
model.addAttribute("svo",svo);
int total = sms.total2(emp_num);
System.out.println("받은 메시지의 total은 --> " + total);
SwPaging sp = new SwPaging(total, currentPage);
swmsg.setStart(sp.getStart());
swmsg.setEnd(sp.getEnd());
swmsg.setEmp_num(emp_num);
List<SwMsg> msgList = sms.msgList(swmsg);
model.addAttribute("total", total);
model.addAttribute("msgList", msgList);
model.addAttribute("sp",sp);
int unreadTotal = yas.unreadTotal(emp_num);
int apvNoTotal = yas.apvNoTotal(emp_num);
model.addAttribute("unreadTotal", unreadTotal);
model.addAttribute("apvNoTotal", apvNoTotal);
//선우 사이드바 알람
int unreadMsg = sms.unreadMsg(emp_num);
model.addAttribute("unreadMsg", unreadMsg);
return "message/rcvMsg";
}
// 메시지 보내기 페이지
@GetMapping("message/sendMsg")
public String sendMsg(Model model, HttpSession session, SyMemberVO vo, SwMsg swmsg, SwMsg_rcv swmsg_rcv) {
System.out.println("SwController sendMsg Start...");
int emp_num = (int)session.getAttribute("member");
vo.setEmp_num(emp_num);
SyMemberVO svo = jrs.show(vo);
model.addAttribute("emp_num",emp_num);
model.addAttribute("svo",svo);
List<YjEmp> listEmp = sms.listEmp();
model.addAttribute("listEmp", listEmp);
int unreadMsg = sms.unreadMsg(emp_num);
model.addAttribute("unreadMsg", unreadMsg);
int unreadTotal = yas.unreadTotal(emp_num);
int apvNoTotal = yas.apvNoTotal(emp_num);
model.addAttribute("unreadTotal", unreadTotal);
model.addAttribute("apvNoTotal", apvNoTotal);
return "message/sendMsg";
}
// 메시지 보내기 전송 & 파일 첨부
@RequestMapping(value = "message/writeMsg", method = RequestMethod.POST)
public String writeMsg(Model model, HttpSession session, SyMemberVO vo, SwMsg swmsg,
SwMsg_rcv swmsg_rcv, HttpServletRequest request, MultipartFile file1, String currentPage) throws Exception{
System.out.println("SwController writeMsg Start...");
int emp_num = (int)session.getAttribute("member");
vo.setEmp_num(emp_num);
SyMemberVO svo = jrs.show(vo);
model.addAttribute("emp_num",emp_num);
model.addAttribute("svo",svo);
String uploadPath = request.getSession().getServletContext().getRealPath("/upload/");
String savedName = uploadFile(file1.getOriginalFilename(), file1.getBytes(), uploadPath);
int result1 = 0;
int result2 = 0;
swmsg.setEmp_num(emp_num);
swmsg.setMsg_fl_nm(file1.getOriginalFilename());
swmsg.setMsg_fl_path(savedName);
result1 = sms.insertMsg(swmsg);
result2 = sms.insertMsg_rcv(swmsg_rcv);
List<YjEmp> listEmp = sms.listEmp();
model.addAttribute("listEmp", listEmp);
model.addAttribute("result1", result1);
model.addAttribute("result2", result2);
int unreadMsg = sms.unreadMsg(emp_num);
model.addAttribute("unreadMsg", unreadMsg);
return "message/sendMsg";
}
private String uploadFile(String originalName, byte[] fileData , String uploadPath)
throws Exception {
UUID uid = UUID.randomUUID();
File fileDirectory = new File(uploadPath);
if (!fileDirectory.exists()) {
fileDirectory.mkdirs();
}
String savedName = uid.toString() + "_" + originalName;
File target = new File(uploadPath, savedName);
FileCopyUtils.copy(fileData, target);
return savedName;
}
// 받은 메시지 삭제
@RequestMapping("message/deleteMsg")
public String deleteMsg(HttpServletRequest request, Model model, HttpSession session, SyMemberVO vo, SwMsg swmsg, SwMsg_rcv swmsg_rcv, String currentPage) {
System.out.println("SwController deleteMsg Start ..." );
int emp_num = (int)session.getAttribute("member");
vo.setEmp_num(emp_num);
SyMemberVO svo = jrs.show(vo);
model.addAttribute("emp_num",emp_num);
model.addAttribute("svo",svo);
try {
request.setCharacterEncoding("utf-8");
String zero = "0";
String[] checks = request.getParameterValues("check1");
for (int i=0;i<checks.length;i++){
if(checks[i].equals(zero)) {
System.out.println("Zero i -> "+ i );
int result2 = 0;
model.addAttribute("result2", result2);
} else {
System.out.println("i -> "+ i );
System.out.println("checks[i]->"+ checks[i]);
int result = sms.delete(checks[i]);
int total = sms.total2(emp_num);
SwPaging sp = new SwPaging(total, currentPage);
swmsg.setStart(sp.getStart()); // 시작시 1
swmsg.setEnd(sp.getEnd()); // 시작시 15
swmsg.setEmp_num(emp_num);
int unreadMsg = sms.unreadMsg(emp_num);
model.addAttribute("unreadMsg", unreadMsg);
List<SwMsg> msgList = sms.msgList(swmsg);
model.addAttribute("total", total);
model.addAttribute("msgList", msgList);
model.addAttribute("sp",sp);
model.addAttribute("result", result);
System.out.println("result의 결과는 --> " + result);
}
}
}catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return "message/rcvMsg";
}
// 받은 메시지 상세보기
@GetMapping("message/rcvDetailMsg")
public String rcvDetailMsg(HttpServletRequest request, Model model, HttpSession session, SyMemberVO vo, SwMsg swmsg) {
System.out.println("SwController rcvDetailMsg Start ..." );
int result = 0;
int emp_num = (int)session.getAttribute("member");
vo.setEmp_num(emp_num);
SyMemberVO svo = jrs.show(vo);
model.addAttribute("emp_num",emp_num);
model.addAttribute("svo",svo);
List<SwMsg> rcvDetailMsg = sms.rcvDetailMsg(swmsg.getMsg_sq());
result = sms.update(swmsg.getMsg_sq());
model.addAttribute("rcvDetailMsg", rcvDetailMsg);
model.addAttribute("result", result);
int unreadMsg = sms.unreadMsg(emp_num);
model.addAttribute("unreadMsg", unreadMsg);
int unreadTotal = yas.unreadTotal(emp_num);
int apvNoTotal = yas.apvNoTotal(emp_num);
model.addAttribute("unreadTotal", unreadTotal);
model.addAttribute("apvNoTotal", apvNoTotal);
return "message/rcvDetailMsg";
}
// 보낸 메시지 상세보기
@GetMapping("message/sentDetailMsg")
public String sentDetailMsg(HttpServletRequest request, Model model, HttpSession session, SyMemberVO vo, SwMsg_rcv swmsg_rcv) {
System.out.println("SwController sentDetailMsg Start ..." );
int emp_num = (int)session.getAttribute("member");
vo.setEmp_num(emp_num);
SyMemberVO svo = jrs.show(vo);
model.addAttribute("emp_num",emp_num);
model.addAttribute("svo",svo);
List<SwMsg_rcv> sentDetailMsg = sms.sentDetailMsg(swmsg_rcv.getMsg_sq());
model.addAttribute("sentDetailMsg", sentDetailMsg);
int unreadMsg = sms.unreadMsg(emp_num);
model.addAttribute("unreadMsg", unreadMsg);
int unreadTotal = yas.unreadTotal(emp_num);
int apvNoTotal = yas.apvNoTotal(emp_num);
model.addAttribute("unreadTotal", unreadTotal);
model.addAttribute("apvNoTotal", apvNoTotal);
return "message/sentDetailMsg";
}
} | [
"[email protected]"
] | |
f0caae686bf32ab70822ede18157806ee3affee6 | e7f0ad30649987c6ef454347b1aa0d6892177678 | / projeto-software-optimus/SoftwareOptimus/src/br/com/softwareOptimus/util/Dao.java | 08a638e7d7668d8af83d95cf76b4e6d728f39689 | [] | no_license | fabriciojacob/projeto-software-optimus | e81ddc3d4fa2ccfeeb4d2e73589214f8f13ed211 | 08e300e6900f17157e1e3ab663129903d25ecd7b | refs/heads/master | 2021-01-01T15:51:24.716965 | 2015-08-20T01:48:39 | 2015-08-20T01:48:39 | 41,506,462 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 599 | java | package br.com.softwareOptimus.util;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
public interface Dao<T> {
/*
* - Somente podem existir métodos publicos dentro de uma interface
* independente de ter isso explicito ou não
*
* - Dentro de interfaces não existem atributos somente constantes
*/
Dao<T> insere(T elemento);
Dao<T> atualiza(T elemento);
Dao<T> remove(T elemento);
T get(Long codigo);
List<T> all();
Dao<T> begin() throws IOException, SQLException;
Dao<T> commit();
Dao<T> rollback();
}
| [
"[email protected]"
] | |
9605db076754f1c9a2c4e65b77824ad0aaea83e8 | e1b9584f027769f10984608e50669d79caa1fa4f | /another-demo/src/main/java/org/james/anotherdemo/config/MvcWebApplicationInitializer.java | 8241828a48d977aa2a7f1dc721f7ad3bf132aa5a | [] | no_license | sren0130/jdbc-jpa-hibernate | bfd887ecfe85323e6f69864d8db42ec4ca831327 | e7b250696b94961c3db396aa4040fb3b49e3a475 | refs/heads/master | 2023-05-31T08:48:43.126219 | 2021-06-26T01:39:29 | 2021-06-26T01:39:29 | 380,389,496 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 681 | java | package org.james.anotherdemo.config;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
public class MvcWebApplicationInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
// Load spring security configuration
@Override
protected Class<?>[] getRootConfigClasses() {
return new Class[] { WebSecurityConfig.class };
}
// Load spring web configuration
@Override
protected Class<?>[] getServletConfigClasses() {
return new Class[] { WebConfig.class };
}
@Override
protected String[] getServletMappings() {
return new String[] { "/" };
}
} | [
"[email protected]"
] | |
32f8aa94f30a329148eb8d09bf4cf94e5380b52e | 4f6a0bccc368377204a8be14c90310cedfc8e3fa | /PostingsEntry.java | ea56a778188d28cafb35bd82f02a73f54d796257 | [] | no_license | annzakk/S-kmotorer | 3cd1068a7ee9216fbaee1f513e01c135aab9cd8c | fb928982b7fbbdd66db53f1d2e80513d78c851f7 | refs/heads/master | 2020-04-18T19:14:14.665610 | 2019-01-26T15:57:38 | 2019-01-26T15:57:38 | 167,707,161 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,123 | java | /*
* This file is part of the computer assignment for the
* Information Retrieval course at KTH.
*
* Johan Boye, 2017
*/
package ir;
import java.util.HashMap;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.StringTokenizer;
import java.io.Serializable;
public class PostingsEntry implements Comparable<PostingsEntry>, Serializable {
public int docID;
public double score = 0;
ArrayList<Integer> positions;
/**
* PostingsEntries are compared by their score (only relevant
* in ranked retrieval).
*
* The comparison is defined so that entries will be put in
* descending order.
*/
public int compareTo( PostingsEntry other ) {
return Double.compare( other.score, score );
}
//
// YOUR CODE HERE
//
//constructor
public PostingsEntry(int docID, double score){
this.docID = docID;
this.score = score;
this.positions = new ArrayList<Integer>();
}
public void addOffset(int offset){
this.positions.add(offset);
}
}
| [
"[email protected]"
] | |
db2c212a24bd437730f1e38b853cba6ee8f4cc02 | efcb7b9b8e62b3f3a1027f5ad12fa70ebdc62bcd | /src/main/java/local/radioschedulers/run/StoreLPSchedule.java | 93de67ef383d55c2a4a67f16c3b6f9b471745bc6 | [] | no_license | JohannesBuchner/ska-SchedEng | 12ec54a0fb7027bd35761f4949819ec280f3dae5 | b6e8285b093410cab55532965c0fb7a50346d5e9 | refs/heads/master | 2023-08-14T06:38:13.650797 | 2011-06-25T02:18:05 | 2011-06-25T02:18:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,950 | java | package local.radioschedulers.run;
import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import local.radioschedulers.IScheduler;
import local.radioschedulers.Proposal;
import local.radioschedulers.Schedule;
import local.radioschedulers.ScheduleSpace;
import local.radioschedulers.alg.lp.KeepingOneDayParallelLinearScheduler;
import local.radioschedulers.alg.lp.OneDayParallelLinearScheduler;
import local.radioschedulers.alg.lp.ParallelLinearScheduler;
import local.radioschedulers.alg.serial.SmootheningScheduler;
import local.radioschedulers.exporter.ExportFactory;
import local.radioschedulers.exporter.IExport;
import local.radioschedulers.importer.CsvScheduleReader;
import local.radioschedulers.importer.IProposalReader;
import local.radioschedulers.importer.JsonProposalReader;
import org.apache.log4j.Logger;
public class StoreLPSchedule {
private static int ndays = 365 / 4;
private static double oversubscriptionFactor = 0.2;
private static Logger log = Logger.getLogger(StoreLPSchedule.class);
private static File schedulesFile;
private static File spaceFile;
private static File schedulesHtmlFile;
public static void main(String[] args) throws Exception {
if (args.length >= 1)
oversubscriptionFactor = Double.parseDouble(args[0]);
int maxParallel = 4;
if (args.length >= 2)
maxParallel = Integer.parseInt(args[1]);
PropertiesContext.addReplacement("ndays", ndays + "");
PropertiesContext.addReplacement("oversubs", oversubscriptionFactor
+ "");
PropertiesContext.addReplacement("parallel", maxParallel + "");
schedulesFile = new File(PropertiesContext.schedulesFilename());
schedulesHtmlFile = new File(PropertiesContext.schedulesFilename()
.replace(".csv", ".html"));
spaceFile = new File(PropertiesContext.spaceFilename());
IProposalReader pr = getProposalReader();
Collection<Proposal> proposals = pr.readall();
CsvScheduleReader csv = getScheduleReader(maxParallel, proposals);
log.debug("reading schedule space");
ScheduleSpace template = csv.readspace();
log.debug("read schedule space");
log.debug("creating linear solver solution");
Map<String, Schedule> schedules = new HashMap<String, Schedule>();
PrintStream executionTimeLog = new PrintStream(new FileOutputStream(
"executiontime_lp_" + oversubscriptionFactor + "_"
+ maxParallel + ".log", true));
long start = System.currentTimeMillis();
//ParallelLinearScheduler scheduler = new ParallelLinearScheduler();
//IScheduler scheduler = new OneDayParallelLinearScheduler();
IScheduler scheduler = new KeepingOneDayParallelLinearScheduler();
Schedule s = scheduler.schedule(template);
long duration = System.currentTimeMillis() - start;
executionTimeLog
.println(duration / 1000. + "\t" + scheduler.toString());
executionTimeLog.flush();
schedules.put(scheduler.toString(), s);
log.debug("created linear solver solution");
csv.write(schedules);
ExportFactory.setSpace(template, proposals);
schedulesHtmlFile.mkdir();
for (Entry<String, Schedule> e : schedules.entrySet()) {
IExport ex = ExportFactory.getHtmlExport(new File(
schedulesHtmlFile, e.getKey() + ".html"), e.getKey());
ex.export(e.getValue());
}
}
private static CsvScheduleReader getScheduleReader(int maxParallel,
Collection<Proposal> proposals) {
CsvScheduleReader csv = new CsvScheduleReader(schedulesFile, spaceFile,
proposals);
return csv;
}
private static IProposalReader getProposalReader() throws Exception {
// SqliteProposalReader pr = new SqliteProposalReader();
// PopulationGeneratingProposalReader pr = new
// PopulationGeneratingProposalReader();
// pr.fill((int) (ndays * oversubscriptionFactor));
JsonProposalReader pr = new JsonProposalReader(new File(
PropertiesContext.proposalsFilename()));
return pr;
}
}
| [
"[email protected]"
] | |
bc5d12877d4ce74b664c2b4368eff29734448020 | 9755f5136f14e122ed7a474179dc5a64fe44dfdd | /3ghack.com/src/com/pjxy/common/dao/.svn/text-base/AdminMapper.java.svn-base | b7f585fe8a6c810eab4b2df91d4d24dd089cebac | [] | no_license | angrytoro/other | 55c40f91400cab64caf997c0e638f234cf1a75c7 | 1079fe4a96fcd321c1264dbc9e0a793f0778ed03 | refs/heads/master | 2016-09-06T07:27:24.102735 | 2012-02-28T15:01:36 | 2012-02-28T15:01:36 | 3,571,923 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,470 | package com.pjxy.common.dao;
import com.pjxy.common.model.Admin;
import com.pjxy.common.model.AdminExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
public interface AdminMapper {
/**
* This method was generated by MyBatis Generator. This method corresponds to the database table admin
* @mbggenerated
*/
@SelectProvider(type = AdminSqlProvider.class, method = "countByExample")
int countByExample(AdminExample example);
/**
* This method was generated by MyBatis Generator. This method corresponds to the database table admin
* @mbggenerated
*/
@DeleteProvider(type = AdminSqlProvider.class, method = "deleteByExample")
int deleteByExample(AdminExample example);
/**
* This method was generated by MyBatis Generator. This method corresponds to the database table admin
* @mbggenerated
*/
@Delete({ "delete from admin", "where ID = #{id,jdbcType=INTEGER}" })
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator. This method corresponds to the database table admin
* @mbggenerated
*/
@Insert({
"insert into admin (USER_ID, BLOCK_ID, ",
"MANAGE_TYPE, CREATE_TIME, ",
"USER_NAME)",
"values (#{userId,jdbcType=INTEGER}, #{blockId,jdbcType=INTEGER}, ",
"#{manageType,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{userName,jdbcType=VARCHAR})" })
@SelectKey(statement = "SELECT LAST_INSERT_ID()", keyProperty = "id", before = false, resultType = Integer.class)
int insert(Admin record);
/**
* This method was generated by MyBatis Generator. This method corresponds to the database table admin
* @mbggenerated
*/
@InsertProvider(type = AdminSqlProvider.class, method = "insertSelective")
@SelectKey(statement = "SELECT LAST_INSERT_ID()", keyProperty = "id", before = false, resultType = Integer.class)
int insertSelective(Admin record);
/**
* This method was generated by MyBatis Generator. This method corresponds to the database table admin
* @mbggenerated
*/
@SelectProvider(type = AdminSqlProvider.class, method = "selectByExample")
@Results({
@Result(column = "ID", property = "id", jdbcType = JdbcType.INTEGER, id = true),
@Result(column = "USER_ID", property = "userId", jdbcType = JdbcType.INTEGER),
@Result(column = "BLOCK_ID", property = "blockId", jdbcType = JdbcType.INTEGER),
@Result(column = "MANAGE_TYPE", property = "manageType", jdbcType = JdbcType.TINYINT),
@Result(column = "CREATE_TIME", property = "createTime", jdbcType = JdbcType.TIMESTAMP),
@Result(column = "USER_NAME", property = "userName", jdbcType = JdbcType.VARCHAR) })
List<Admin> selectByExample(AdminExample example);
/**
* This method was generated by MyBatis Generator. This method corresponds to the database table admin
* @mbggenerated
*/
@Select({ "select",
"ID, USER_ID, BLOCK_ID, MANAGE_TYPE, CREATE_TIME, USER_NAME",
"from admin", "where ID = #{id,jdbcType=INTEGER}" })
@Results({
@Result(column = "ID", property = "id", jdbcType = JdbcType.INTEGER, id = true),
@Result(column = "USER_ID", property = "userId", jdbcType = JdbcType.INTEGER),
@Result(column = "BLOCK_ID", property = "blockId", jdbcType = JdbcType.INTEGER),
@Result(column = "MANAGE_TYPE", property = "manageType", jdbcType = JdbcType.TINYINT),
@Result(column = "CREATE_TIME", property = "createTime", jdbcType = JdbcType.TIMESTAMP),
@Result(column = "USER_NAME", property = "userName", jdbcType = JdbcType.VARCHAR) })
Admin selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator. This method corresponds to the database table admin
* @mbggenerated
*/
@UpdateProvider(type = AdminSqlProvider.class, method = "updateByExampleSelective")
int updateByExampleSelective(@Param("record") Admin record,
@Param("example") AdminExample example);
/**
* This method was generated by MyBatis Generator. This method corresponds to the database table admin
* @mbggenerated
*/
@UpdateProvider(type = AdminSqlProvider.class, method = "updateByExample")
int updateByExample(@Param("record") Admin record,
@Param("example") AdminExample example);
/**
* This method was generated by MyBatis Generator. This method corresponds to the database table admin
* @mbggenerated
*/
@UpdateProvider(type = AdminSqlProvider.class, method = "updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(Admin record);
/**
* This method was generated by MyBatis Generator. This method corresponds to the database table admin
* @mbggenerated
*/
@Update({ "update admin", "set USER_ID = #{userId,jdbcType=INTEGER},",
"BLOCK_ID = #{blockId,jdbcType=INTEGER},",
"MANAGE_TYPE = #{manageType,jdbcType=TINYINT},",
"CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},",
"USER_NAME = #{userName,jdbcType=VARCHAR}",
"where ID = #{id,jdbcType=INTEGER}" })
int updateByPrimaryKey(Admin record);
} | [
"[email protected]"
] | ||
d7a266fa6a0125cbdfe6058ecb5cb54fd830ee70 | ff9533710a6c5296257c4e3135284abd23b3cd9b | /src/main/java/br/com/jpo/transaction/impl/JTATransactionFactory.java | a31d88321378e33527a56f1967663e5c8e852ff0 | [
"MIT"
] | permissive | dalmiaf/JPO | 7d83ca85b5e884dde4004ebdc74320bb71890156 | 118669e4be27f73dbefdc978c06b0d11e0bbe708 | refs/heads/master | 2021-01-25T14:24:06.740689 | 2018-03-30T10:06:19 | 2018-03-30T10:06:19 | 123,695,638 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 397 | java | package br.com.jpo.transaction.impl;
import br.com.jpo.session.JPOSessionContext;
import br.com.jpo.transaction.JPOTransaction;
import br.com.jpo.transaction.JPOTransactionFactory;
public class JTATransactionFactory implements JPOTransactionFactory {
@Override
public JPOTransaction create(JPOSessionContext sessionContext) throws Exception {
return new JTATransaction();
}
} | [
"[email protected]"
] | |
6765a9300613b1bfffea7431189d5b0c6f31a99d | 30e2cb0f82d70cab392f70518c16067705c752eb | /src/test/java/outcomes/input_handle/TestInputHandler1.java | 13cbbc262ef6af9a8be5e7527d65c78d9fcd19be | [] | no_license | hyperskill/hs-test | 7afb9fbfb32d3efea9f810be8116f6d99728b8d1 | 94a14529121e3509a0db1e1a552378085587f34d | refs/heads/master | 2023-08-10T04:28:38.330242 | 2023-06-12T10:25:57 | 2023-06-12T10:25:57 | 167,659,709 | 35 | 19 | null | 2023-06-12T10:25:58 | 2019-01-26T06:55:37 | Java | UTF-8 | Java | false | false | 1,124 | java | package outcomes.input_handle;
import org.hyperskill.hstest.stage.StageTest;
import org.hyperskill.hstest.testcase.CheckResult;
import org.hyperskill.hstest.testcase.TestCase;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
class TestInputHandler1Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
if (123 != scanner.nextInt()
|| 234 != scanner.nextInt()
|| 345 != scanner.nextInt()
|| 456 != scanner.nextInt()
|| 567 != scanner.nextInt()
|| 678 != scanner.nextInt()) {
throw new RuntimeException();
}
}
}
public class TestInputHandler1 extends StageTest {
public TestInputHandler1() {
super(TestInputHandler1Main.class);
}
@Override
public List<TestCase> generate() {
return Arrays.asList(
new TestCase<String>()
.setInput("123 234 345\n456 567 678")
);
}
@Override
public CheckResult check(String reply, Object attach) {
return CheckResult.correct();
}
}
| [
"[email protected]"
] | |
7d48f25a9c249b80e0cd6c9f4f5ec6b5e2b236d0 | 236d21e3eb05fff7460aae81782b997e1cd78c04 | /Question2/src/org/dictionaryService/FrenchDictionaryActivator.java | 7a4311553484600fe3653321de402491a62b8b87 | [] | no_license | y3lousso/PM_TP2 | ba867f8e24c6d6cd360e8a808b18391f5bfd4f25 | d7212434caf1bd280bb51cf966afd512434b0ae8 | refs/heads/master | 2021-04-28T08:36:41.894786 | 2018-03-14T13:53:48 | 2018-03-14T13:53:48 | 122,253,994 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,150 | java | package org.dictionaryService;
import org.dictionaryService.able.IDictionaryService;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import java.io.IOException;
/** A bundle to launch a service for English Dictionary
*/
public class FrenchDictionaryActivator implements BundleActivator {
private ServiceRegistration registration;
@Override
public void start(BundleContext bundleContext) {
try {
// create the service with the dictionary file
IDictionaryService service = new DictionaryService("/fr.txt", "French");
registration = bundleContext.registerService(
IDictionaryService.class.getName(),
service,
null);
System.out.println("French dictionary service started !");
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public void stop(BundleContext bundleContext) {
registration.unregister();
System.out.println("French dictionary service stopped !");
}
}
| [
"[email protected]"
] | |
c913f41cafc8171238f5741e86de229e38473a34 | 6540edb1d7853bf57fbd904f1972b631143f71ee | /3xHIT/Abgabe/dlangheiter/A11/src/langheiter/david/View.java | 3d192aec42c1e5e03965414f26ecca7ca4aff8fa | [] | no_license | TGM-HIT/acc-2016 | 259e33f60130e4d3ecab0277d8760519ec6cdb62 | e10cd86cb7e9323893d9990eae973a2edad3382e | refs/heads/master | 2021-03-16T05:15:39.371390 | 2017-11-13T13:29:18 | 2017-11-13T13:29:18 | 74,851,475 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,106 | java | package langheiter.david;
import java.awt.BorderLayout;
import java.awt.Font;
import java.awt.GridLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
public class View {
private Controller c;
private JFrame frame;
private JPanel panel;
private JLabel question;
private JButton[] answers;
private JButton exit;
public View(Controller c) {
this.c = c;
}
public void init() {
frame = new JFrame("Quiz");
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(550, 330);
frame.setLocationRelativeTo(null);
panel = new JPanel(new BorderLayout());
frame.setContentPane(panel);
question = new JLabel("Question", SwingConstants.CENTER);
question.setFont(new Font(question.getFont().getName(), Font.PLAIN, 30));
panel.add(question, BorderLayout.NORTH);
JPanel answerPanel = new JPanel(new GridLayout(4, 1));
answers = new JButton[4];
for(int i = 0; i < 4; i++) {
answers[i] = new JButton();
answers[i].addActionListener(c);
answers[i].setActionCommand("answer" + i);
answerPanel.add(answers[i]);
}
panel.add(answerPanel, BorderLayout.CENTER);
exit = new JButton("Exit");
exit.addActionListener(c);
panel.add(exit, BorderLayout.SOUTH);
}
public void showQuiz(String questions, String[] answers) {
question.setText(questions);
for(int i = 0; i < 4; i++) {
this.answers[i].setText(answers[i]);
}
}
public void showStats(int right, int wrong) {
JPanel stats = new JPanel(new GridLayout(2, 1));
Font f = new JLabel().getFont();
f = new Font(f.getName(), f.getStyle(), 30);
JLabel rightLabel = new JLabel("Right: " + right, SwingConstants.CENTER);
rightLabel.setFont(f);
stats.add(rightLabel);
JLabel wrongLabel = new JLabel("Wrong: " + wrong, SwingConstants.CENTER);
wrongLabel.setFont(f);
stats.add(wrongLabel);
frame.setContentPane(stats);
frame.revalidate();
}
}
| [
"[email protected]"
] | |
1981cbbaac410235b610f6d19dc01bfff3895b87 | dc35e99ccd8ff99d1fc150dfef4320cb0bb81b11 | /mall-tiny-04/src/main/java/com/jihu/mall/tiny/dto/AdminUserDetails.java | ff80ee3908278814e7869f1315959644de4898b8 | [] | no_license | Springhuge/mall | 2037214067725198facaa505be6aa93cd85c39b9 | 69292e4fbdbc06631877b602387c8625ac40a4c6 | refs/heads/master | 2022-06-24T05:16:49.114348 | 2020-03-26T00:46:40 | 2020-03-26T00:46:40 | 249,357,736 | 1 | 0 | null | 2022-06-21T03:03:44 | 2020-03-23T06:58:44 | Java | UTF-8 | Java | false | false | 1,662 | java | package com.jihu.mall.tiny.dto;
import com.jihu.mall.tiny.mbg.model.UmsAdmin;
import com.jihu.mall.tiny.mbg.model.UmsPermission;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
/**
* SpringSecurity需要的用户详情
*/
public class AdminUserDetails implements UserDetails {
private UmsAdmin admin;
private List<UmsPermission> permissionList;
public AdminUserDetails (UmsAdmin admin, List<UmsPermission> permissions){
this.admin = admin;
this.permissionList = permissions;
}
@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
//当前用户的权限
return permissionList.stream()
.filter(permission -> permission.getValue() != null)
.map(permission -> new SimpleGrantedAuthority(permission.getValue()))
.collect(Collectors.toList());
}
@Override
public String getPassword() {
return admin.getPassword();
}
@Override
public String getUsername() {
return admin.getUsername();
}
@Override
public boolean isAccountNonExpired() {
return true;
}
@Override
public boolean isAccountNonLocked() {
return true;
}
@Override
public boolean isCredentialsNonExpired() {
return true;
}
@Override
public boolean isEnabled() {
return admin.getStatus().equals("1");
}
}
| [
"[email protected]"
] | |
13f56248d18a411533e160efae7afc8e3989a7b1 | 7f00b463514153cdbb12403a8818853e4c1653b6 | /src/main/java/com/evilnotch/lib/minecraft/basicmc/auto/json/BasicBlockJSON.java | cf25c664f2a066d931fa3e1501265d9de1fcc73c | [
"Apache-2.0"
] | permissive | JadenSlashMonkey/evilnotchlib | 124cfb7ca4c4ca438a271b3f7fe9e273ead946cd | deb0e8aab56f61dad507ffc0baaf6d387e0c64f1 | refs/heads/master | 2020-04-26T07:21:03.137926 | 2019-03-01T20:44:02 | 2019-03-01T20:44:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,002 | java | package com.evilnotch.lib.minecraft.basicmc.auto.json;
import com.evilnotch.lib.minecraft.basicmc.client.model.ModelPart;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.ResourceLocation;
public class BasicBlockJSON implements IBasicBlockJSON{
public ResourceLocation loc;
public Block block;
public Item item;
public ModelPart model;
public BasicBlockJSON(Block b, ModelPart part)
{
this.loc = b.getRegistryName();
this.block = b;
this.item = ItemBlock.getItemFromBlock(b);
this.model = part;
}
/**
* used for the the object registry name isn't set for the json yet
*/
public BasicBlockJSON(Block b, ResourceLocation loc)
{
this.loc = loc;
this.block = b;
}
@Override
public ResourceLocation getResourceLocation()
{
return this.loc;
}
@Override
public Block getObject()
{
return this.block;
}
@Override
public ModelPart getModelPart()
{
return this.model;
}
}
| [
"[email protected]"
] | |
b47006e8bb1b79acb194bf086e9bc9610f89edd6 | 7ff5f6c497a33f268ead6170e6d0cb900e6ab973 | /BeCheck/app/src/androidTest/java/com/nataliajastrzebska/becheck/ApplicationTest.java | 08dbef0f8e91a9c6e2fe6b83accd9ae18303b190 | [] | no_license | nani92/Beacons | 4fb62e5c45d080806fe4c3940a76a9af28210432 | 653be67d7fdb070689670d8bee86558a9c30ff47 | refs/heads/master | 2021-01-10T06:59:35.719643 | 2015-11-18T11:58:20 | 2015-11-18T11:58:20 | 46,415,842 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 361 | java | package com.nataliajastrzebska.becheck;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
} | [
"[email protected]"
] | |
7bab38a1aad2cdd4438af6885ebfeddbf3efca77 | cfe033f1a111823bb6fb198eaf28e85f9d6a5e3b | /UI源码/仿QQ微信/UI_QQWeiXing/src/cn/buaa/myweixin/shake/ShakeListener.java | fc1c302d90b6c228cce11f306e3adc3582294fed | [] | no_license | uusoft/Android_UI | ac0021a1c81c6e23f7d1373250adbebce080fca8 | 7bec95d611c0a46857fd1d02b4ac979a55cf04b8 | refs/heads/master | 2021-01-17T22:52:33.254006 | 2014-01-23T15:25:13 | 2014-01-23T15:25:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,950 | java | package cn.buaa.myweixin.shake;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.util.Log;
/**
* 一个检测手机摇晃的监听器
*/
public class ShakeListener implements SensorEventListener {
// 速度阈值,当摇晃速度达到这值后产生作用
private static final int SPEED_SHRESHOLD = 3000;
// 两次检测的时间间隔
private static final int UPTATE_INTERVAL_TIME = 70;
// 传感器管理器
private SensorManager sensorManager;
// 传感器
private Sensor sensor;
// 重力感应监听器
private OnShakeListener onShakeListener;
// 上下文
private Context mContext;
// 手机上一个位置时重力感应坐标
private float lastX;
private float lastY;
private float lastZ;
// 上次检测时间
private long lastUpdateTime;
// 构造器
public ShakeListener(Context c) {
// 获得监听对象
mContext = c;
start();
}
// 开始
public void start() {
// 获得传感器管理器
sensorManager = (SensorManager) mContext
.getSystemService(Context.SENSOR_SERVICE);
if (sensorManager != null) {
// 获得重力传感器
sensor = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
}
// 注册
if (sensor != null) {
sensorManager.registerListener(this, sensor,
SensorManager.SENSOR_DELAY_GAME);
}
}
// 停止检测
public void stop() {
sensorManager.unregisterListener(this);
}
// 设置重力感应监听器
public void setOnShakeListener(OnShakeListener listener) {
onShakeListener = listener;
}
// 重力感应器感应获得变化数据
public void onSensorChanged(SensorEvent event) {
// 现在检测时间
long currentUpdateTime = System.currentTimeMillis();
// 两次检测的时间间隔
long timeInterval = currentUpdateTime - lastUpdateTime;
// 判断是否达到了检测时间间隔
if (timeInterval < UPTATE_INTERVAL_TIME)
return;
// 现在的时间变成last时间
lastUpdateTime = currentUpdateTime;
// 获得x,y,z坐标
float x = event.values[0];
float y = event.values[1];
float z = event.values[2];
// 获得x,y,z的变化值
float deltaX = x - lastX;
float deltaY = y - lastY;
float deltaZ = z - lastZ;
// 将现在的坐标变成last坐标
lastX = x;
lastY = y;
lastZ = z;
double speed = Math.sqrt(deltaX * deltaX + deltaY * deltaY + deltaZ
* deltaZ)
/ timeInterval * 10000;
Log.v("thelog", "===========log===================");
// 达到速度阀值,发出提示
if (speed >= SPEED_SHRESHOLD) {
onShakeListener.onShake();
}
}
public void onAccuracyChanged(Sensor sensor, int accuracy) {
}
// 摇晃监听接口
public interface OnShakeListener {
public void onShake();
}
} | [
"[email protected]"
] | |
58c5ecabf41d5c13ca7f09e2ee02825911ed0609 | 505246e41282750331317d67c3a4d533d8362df8 | /app/src/main/java/edu/buffalo/cse/cse486586/simpledht/MessageStatus.java | beaf73ee05df46b6c1409204083d18cc61324cf0 | [] | no_license | shashank-raghunath15/SimpleDht-shashank-buffalo | d931b76633ad3b659380b5ac08c9fbf30014ca38 | c8f9b33c449253d926801117c6ca783a24cbe810 | refs/heads/master | 2020-03-25T12:49:21.137923 | 2018-08-06T23:52:02 | 2018-08-06T23:52:02 | 143,795,500 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 182 | java | package edu.buffalo.cse.cse486586.simpledht;
/**
* Created by shash on 3/31/2018.
*/
public enum MessageStatus {
JOIN,
ACK,
INSERT,
QUERY,
QREPLY,
QAll
}
| [
"[email protected]"
] | |
6737d0857b78feecebbefdf665931909cc2ccc32 | 92c30008a8fd3ff634553da8b325119054440cba | /app/src/androidTest/java/com/example/homework_whatsapp_linearlayout/ExampleInstrumentedTest.java | 06f0d99ac087893847c291b8cb96f3cb91cd7286 | [] | no_license | nikitaluga/WhatsApp_LinearLayout | ede88cf66718fda942ab9f2bf2ad1d3749d28895 | 24236c9ee99781036f5ceeef32f3b83f19ac1b27 | refs/heads/master | 2020-12-20T23:36:20.563595 | 2020-01-28T11:21:19 | 2020-01-28T11:21:19 | 236,243,174 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 800 | java | package com.example.homework_whatsapp_linearlayout;
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.homework_whatsapp_linearlayout", appContext.getPackageName());
}
}
| [
"[email protected]"
] | |
bae985068d3dadb075ae293a7e48f534d6ef352e | 26b7f30c6640b8017a06786e4a2414ad8a4d71dd | /src/number_of_direct_superinterfaces/i6729.java | fba9d12362cd6d2ae66b7feee891deefc175c432 | [] | no_license | vincentclee/jvm-limits | b72a2f2dcc18caa458f1e77924221d585f23316b | 2fd1c26d1f7984ea8163bc103ad14b6d72282281 | refs/heads/master | 2020-05-18T11:18:41.711400 | 2014-09-14T04:25:18 | 2014-09-14T04:25:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 68 | java | package number_of_direct_superinterfaces;
public interface i6729 {} | [
"[email protected]"
] | |
bbc1784dcf0e02fcd76e537a2af1198a49c6cab2 | 03190ed6c348c04b613a21edd5236f3ba9c015af | /tyrian-game/src/com/blogspot/steigert/tyrian/screens/StartGameScreen.java | 65a2795dd0dc40c72dbe07fd67d8668a9543d625 | [] | no_license | duchien85/steigert-libgdx | 01cad32801c74d0e059ced80341a3291fbf56ac1 | d0ba6df3108e6ebae29deff38ad6ae0c8cb2ab48 | refs/heads/master | 2021-01-25T03:19:03.560175 | 2012-07-09T23:03:59 | 2012-07-09T23:03:59 | 32,403,002 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,867 | java | package com.blogspot.steigert.tyrian.screens;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.ActorEvent;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.SelectBox;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
import com.blogspot.steigert.tyrian.Tyrian;
import com.blogspot.steigert.tyrian.domain.FrontGun;
import com.blogspot.steigert.tyrian.domain.Item;
import com.blogspot.steigert.tyrian.domain.Profile;
import com.blogspot.steigert.tyrian.domain.Shield;
import com.blogspot.steigert.tyrian.domain.Ship;
import com.blogspot.steigert.tyrian.domain.ShipModel;
import com.blogspot.steigert.tyrian.services.MusicManager.TyrianMusic;
import com.blogspot.steigert.tyrian.services.SoundManager.TyrianSound;
import com.blogspot.steigert.tyrian.utils.DefaultActorListener;
public class StartGameScreen
extends
AbstractScreen
{
private Profile profile;
private Ship ship;
private TextButton episode1Button;
private TextButton episode2Button;
private TextButton episode3Button;
private SelectBox shipModelSelectBox;
private SelectBox frontGunSelectBox;
private SelectBox shieldSelectBox;
private Label creditsLabel;
private Image shipModelImage;
private Image frontGunImage;
private Image shieldImage;
private LevelClickListener levelClickListener;
private ItemSelectionListener itemSelectionListener;
public StartGameScreen(
Tyrian game )
{
super( game );
// create the listeners
levelClickListener = new LevelClickListener();
itemSelectionListener = new ItemSelectionListener();
}
@Override
public void show()
{
super.show();
// start playing the menu music (the player might be returning from the
// level screen)
game.getMusicManager().play( TyrianMusic.MENU );
// retrieve the default table actor
Table table = super.getTable();
table.defaults().spaceBottom( 20 );
table.columnDefaults( 0 ).padRight( 20 );
table.columnDefaults( 4 ).padLeft( 10 );
table.add( "Start Game" ).colspan( 5 );
// retrieve the table's layout
profile = game.getProfileManager().retrieveProfile();
ship = profile.getShip();
// create the level buttons
table.row();
table.add( "Episodes" );
episode1Button = new TextButton( "Episode 1", getSkin() );
episode1Button.addListener( levelClickListener );
table.add( episode1Button ).fillX().padRight( 10 );
episode2Button = new TextButton( "Episode 2", getSkin() );
episode2Button.addListener( levelClickListener );
table.add( episode2Button ).fillX().padRight( 10 );
episode3Button = new TextButton( "Episode 3", getSkin() );
episode3Button.addListener( levelClickListener );
table.add( episode3Button ).fillX();
// create the item select boxes
shipModelSelectBox = new SelectBox( ShipModel.values(), getSkin() );
shipModelSelectBox.addListener( itemSelectionListener );
shipModelImage = new Image();
table.row();
table.add( "Ship model" );
table.add( shipModelSelectBox ).fillX().colspan( 3 );
table.add( shipModelImage );
frontGunSelectBox = new SelectBox( FrontGun.values(), getSkin() );
frontGunSelectBox.addListener( itemSelectionListener );
frontGunImage = new Image();
table.row();
table.add( "Front gun" );
table.add( frontGunSelectBox ).fillX().colspan( 3 );
table.add( frontGunImage );
shieldSelectBox = new SelectBox( Shield.values(), getSkin() );
shieldSelectBox.addListener( itemSelectionListener );
shieldImage = new Image();
table.row();
table.add( "Shield" );
table.add( shieldSelectBox ).fillX().colspan( 3 );
table.add( shieldImage );
// create the credits label
creditsLabel = new Label( profile.getCreditsAsText(), getSkin() );
table.row();
table.add( "Credits" );
table.add( creditsLabel ).left().colspan( 4 );
// register the back button
TextButton backButton = new TextButton( "Back to main menu", getSkin() );
backButton.addListener( new DefaultActorListener() {
public void touchUp(
ActorEvent event,
float x,
float y,
int pointer,
int button )
{
game.getSoundManager().play( TyrianSound.CLICK );
game.setScreen( new MenuScreen( game ) );
}
} );
table.row();
table.add( backButton ).size( 250, 60 ).colspan( 5 );
// set the select boxes' initial values
updateValues();
}
private void updateValues()
{
// select boxes
shipModelSelectBox.setSelection( ship.getShipModel().ordinal() );
frontGunSelectBox.setSelection( ship.getFrontGun().ordinal() );
shieldSelectBox.setSelection( ship.getShield().ordinal() );
// drawables
String prefix = "start-game-screen/";
TextureRegion shipModel = getAtlas().findRegion(
prefix + ship.getShipModel().getSimpleName() );
TextureRegion frontGun = getAtlas().findRegion( prefix + ship.getFrontGun().getSimpleName() );
TextureRegion shield = getAtlas().findRegion( prefix + ship.getShield().getSimpleName() );
// images
shipModelImage.setDrawable( new TextureRegionDrawable( shipModel ) );
frontGunImage.setDrawable( new TextureRegionDrawable( frontGun ) );
shieldImage.setDrawable( new TextureRegionDrawable( shield ) );
}
/**
* Listener for all the level buttons.
*/
private class LevelClickListener
extends
DefaultActorListener
{
@Override
public void touchUp(
ActorEvent event,
float x,
float y,
int pointer,
int button )
{
super.touchUp( event, x, y, pointer, button );
game.getSoundManager().play( TyrianSound.CLICK );
// find the target level ID
int targetLevelId = - 1;
Actor actor = event.getListenerActor();
if( actor == episode1Button ) {
targetLevelId = 0;
} else if( actor == episode2Button ) {
targetLevelId = 1;
} else if( actor == episode3Button ) {
targetLevelId = 2;
} else {
return;
}
// check the current level ID
if( profile.getCurrentLevelId() >= targetLevelId ) {
Gdx.app.log( Tyrian.LOG, "Starting level: " + targetLevelId );
game.setScreen( new LevelScreen( game, targetLevelId ) );
} else {
Gdx.app.log( Tyrian.LOG, "Unable to start level: " + targetLevelId );
}
}
}
/**
* Listener for all the item select boxes.
*/
private class ItemSelectionListener
extends
ChangeListener
{
@Override
public void changed(
ChangeEvent event,
Actor actor )
{
// find the selected item
Item selectedItem = null;
int selectedIndex = ( (SelectBox) actor ).getSelectionIndex();
if( actor == shipModelSelectBox ) {
selectedItem = ShipModel.values()[ selectedIndex ];
} else if( actor == frontGunSelectBox ) {
selectedItem = FrontGun.values()[ selectedIndex ];
} else if( actor == shieldSelectBox ) {
selectedItem = Shield.values()[ selectedIndex ];
} else {
return;
}
// if the ship already contains the item, there is no need to buy it
if( ship.contains( selectedItem ) ) return;
// try and buy the item
if( profile.buy( selectedItem ) ) {
creditsLabel.setText( profile.getCreditsAsText() );
}
// update the widgets
updateValues();
}
}
}
| [
"[email protected]@aaa5c38f-40d0-5178-f449-cb61844b74a3"
] | [email protected]@aaa5c38f-40d0-5178-f449-cb61844b74a3 |
6e8a204bd9bc9e025f88db516f9b349f1ed0b12f | e2172a846908b42bffaa2c88881d5f8d609c50ed | /src/main/java/com/rando/service/PhotoService.java | 6bf2a6d88411f839b1176dc74f2ecb362e9460d1 | [
"MIT"
] | permissive | yoshimitsoul/hikingjack | f85db90e189e789a594bd27889a3ab6533062712 | 79e6a6a29892d035ddf6574d438dd18d8e4f5d6f | refs/heads/master | 2023-01-27T21:20:45.283977 | 2020-12-14T13:14:53 | 2020-12-14T13:14:53 | 299,220,881 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 233 | java | package com.rando.service;
import java.util.List;
import com.rando.modele.Photo;
public interface PhotoService {
List<Photo> getAllPhotosByIdEtape(int idEtape);
public void savePhotosWithEtape(String urlPhoto ,int idEtape);
}
| [
"[email protected]"
] | |
0a7a2d4c678575124ebe0aaddcb692044feb9f23 | 6a6a985d39b3bfb50530352a043d9ecd626ce4b6 | /app/src/main/java/com/enrich/pengyouhui/utils/LogUtils.java | 7738fc5f1f76a9de895325bd2b7e6c2656535683 | [] | no_license | coocpu/Pengyouhui | e5907211c6559fffcafb564770f9b1db31250142 | 3f8242c4eda6b8fbc4c58e9b00753b6966d3f031 | refs/heads/master | 2020-05-23T08:03:38.401887 | 2016-09-22T08:10:30 | 2016-09-22T08:10:31 | 68,897,499 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,242 | java | package com.enrich.pengyouhui.utils;
import android.util.Log;
/**
* @describe log日志工具类
* @date 2016年9月8日
*/
public class LogUtils {
public static boolean isDebug = false;//统一管理日志开启关闭的控制
private static final String TAG = "鹏友会"; //标识
/**
* @param msg
* @describe 默认标识的log日志打印
*/
public static void e(String msg) {
if (isDebug)
Log.e(TAG, msg);
}
public static void d(String msg) {
if (isDebug)
Log.d(TAG, msg);
}
public static void i(String msg) {
if (isDebug)
Log.i(TAG, msg);
}
public static void v(String msg) {
if (isDebug)
Log.v(TAG, msg);
}
// 下面是传入自定义tag的函数
public static void i(String tag, String msg) {
if (isDebug)
Log.i(tag, msg);
}
public static void d(String tag, String msg) {
if (isDebug)
Log.d(tag, msg);
}
public static void e(String tag, String msg) {
if (isDebug)
Log.e(tag, msg);
}
public static void v(String tag, String msg) {
if (isDebug)
Log.v(tag, msg);
}
}
| [
"[email protected]"
] | |
b4b0b415ab8718427c9b49dacb1d04ce06f6e86b | 63651f6fd689bd8dbf3102a0dc35ded60b57d3b7 | /app/src/main/java/com/example/hendryshanedeguia/freshcartadminapp/Models/OrderMainDetailsModel.java | 146d9fa094c0e581b32deb7d9d6b93f20bdc3f0f | [] | no_license | ShaneStarbane/FCAA | 0bfa03439b630d756e52dbd170a017c5d52279ae | bd4c56ae209781a9ad029c23b1b8231e4b56e0f4 | refs/heads/master | 2021-05-15T16:27:27.532457 | 2017-10-18T20:27:15 | 2017-10-18T20:27:15 | 107,459,646 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,766 | java | package com.example.hendryshanedeguia.freshcartadminapp.Models;
/**
* Created by HendryShanedeGuia on 11/10/2017.
*/
public class OrderMainDetailsModel {
public String orderID;
public String orderGross;
public String custContact;
public String custAddress;
public String custImageUrl;
public String custUsername;
public String orderStatus;
public String cashOnHand;
public String noteForDriver;
public String promo;
public String discount;
public String orderVAT;
public String deliveredBy;
public String orderBill;
public OrderMainDetailsModel() {
}
public OrderMainDetailsModel(String orderID, String orderGross, String custContact, String custAddress, String custImageUrl, String custUsername,String orderStatus,String cashOnHand, String noteForDriver, String promo, String discount,String orderVAT, String deliveredBy,String orderBill) {
this.orderID = orderID;
this.orderGross = orderGross;
this.custContact = custContact;
this.custAddress = custAddress;
this.custImageUrl = custImageUrl;
this.custUsername = custUsername;
this.orderStatus = orderStatus;
this.cashOnHand = cashOnHand;
this.noteForDriver = noteForDriver;
this.promo = promo;
this.discount = discount;
this.orderVAT = orderVAT;
this.deliveredBy = deliveredBy;
this.orderBill = orderBill;
}
public String getOrderGross() {
return orderGross;
}
public String getPromo() {
return promo;
}
public String getDiscount() {
return discount;
}
public String getOrderVAT() {
return orderVAT;
}
public String getDeliveredBy() {
return deliveredBy;
}
public void setOrderGross(String orderGross) {
this.orderGross = orderGross;
}
public void setPromo(String promo) {
this.promo = promo;
}
public void setDiscount(String discount) {
this.discount = discount;
}
public void setOrderVAT(String orderVAT) {
this.orderVAT = orderVAT;
}
public void setDeliveredBy(String deliveredBy) {
this.deliveredBy = deliveredBy;
}
public String getCashOnHand() {
return cashOnHand;
}
public String getNoteForDriver() {
return noteForDriver;
}
public String getOrderID() {
return orderID;
}
public String getOrderBill() {
return orderBill;
}
public String getCustContact() {
return custContact;
}
public String getCustAddress() {
return custAddress;
}
public String getCustImageUrl() {
return custImageUrl;
}
public String getCustUsername() {
return custUsername;
}
public String getOrderStatus() {
return orderStatus;
}
public void setOrderID(String orderID) {
this.orderID = orderID;
}
public void setOrderBill(String orderBill) {
this.orderBill = orderBill;
}
public void setCustContact(String custContact) {
this.custContact = custContact;
}
public void setCustAddress(String custAddress) {
this.custAddress = custAddress;
}
public void setCustImageUrl(String custImageUrl) {
this.custImageUrl = custImageUrl;
}
public void setCustUsername(String custUsername) {
this.custUsername = custUsername;
}
public void setOrderStatus(String orderStatus) {
this.orderStatus = orderStatus;
}
public void setCashOnHand(String cashOnHand) {
this.cashOnHand = cashOnHand;
}
public void setNoteForDriver(String noteForDriver) {
this.noteForDriver = noteForDriver;
}
}
| [
"[email protected]"
] | |
e3bccf743fb61a61ae8243e5ba6971d4903a5236 | 895ea02e9fbbbddccd2f550769600608a5ce26bf | /CoreFunctionality/src/au/gov/asd/tac/constellation/functionality/schema/CreateVertexTypePlugin.java | 8869f7279964cf2259f302c7c6b27ea1ae7f074c | [
"Apache-2.0"
] | permissive | sol695510/constellation | 8e26a739a8ae09755f1ff2061206d13566d8b432 | 9ab9e0cc3a0bb673204d74d5b017453a882845a0 | refs/heads/master | 2020-12-19T13:40:11.523350 | 2020-03-16T22:31:41 | 2020-03-16T22:31:41 | 226,787,694 | 1 | 0 | Apache-2.0 | 2019-12-20T00:16:47 | 2019-12-09T04:54:54 | null | UTF-8 | Java | false | false | 10,132 | java | /*
* Copyright 2010-2019 Australian Signals Directorate
*
* 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 au.gov.asd.tac.constellation.functionality.schema;
import au.gov.asd.tac.constellation.graph.GraphWriteMethods;
import au.gov.asd.tac.constellation.graph.schema.SchemaVertexType;
import au.gov.asd.tac.constellation.graph.schema.SchemaVertexTypeUtilities;
import au.gov.asd.tac.constellation.pluginframework.Plugin;
import au.gov.asd.tac.constellation.pluginframework.PluginInfo;
import au.gov.asd.tac.constellation.pluginframework.PluginInteraction;
import au.gov.asd.tac.constellation.pluginframework.PluginType;
import au.gov.asd.tac.constellation.pluginframework.parameters.PluginParameter;
import au.gov.asd.tac.constellation.pluginframework.parameters.PluginParameters;
import au.gov.asd.tac.constellation.pluginframework.parameters.types.BooleanParameterType;
import au.gov.asd.tac.constellation.pluginframework.parameters.types.BooleanParameterType.BooleanParameterValue;
import au.gov.asd.tac.constellation.pluginframework.parameters.types.ColorParameterType;
import au.gov.asd.tac.constellation.pluginframework.parameters.types.ColorParameterType.ColorParameterValue;
import au.gov.asd.tac.constellation.pluginframework.parameters.types.StringParameterType;
import au.gov.asd.tac.constellation.pluginframework.parameters.types.StringParameterValue;
import au.gov.asd.tac.constellation.pluginframework.templates.SimpleEditPlugin;
import au.gov.asd.tac.constellation.visual.color.ConstellationColor;
import au.gov.asd.tac.constellation.visual.icons.CharacterIconProvider;
import au.gov.asd.tac.constellation.visual.icons.ConstellationIcon;
import au.gov.asd.tac.constellation.visual.icons.DefaultIconProvider;
import au.gov.asd.tac.constellation.visual.icons.IconManager;
import java.util.Map;
import java.util.regex.Pattern;
import org.openide.util.NbBundle.Messages;
import org.openide.util.lookup.ServiceProvider;
/**
* Create a new vertex type on the fly.
*
* @author algol
*/
@ServiceProvider(service = Plugin.class)
@PluginInfo(pluginType = PluginType.CREATE, tags = {"SCHEMA", "TYPE", "VERTEX"})
@Messages("CreateVertexTypePlugin=Create Vertex Type")
public class CreateVertexTypePlugin extends SimpleEditPlugin {
public static final String NAME_PARAMETER_ID = PluginParameter.buildId(CreateVertexTypePlugin.class, "name");
public static final String DESCRIPTION_PARAMETER_ID = PluginParameter.buildId(CreateVertexTypePlugin.class, "description");
public static final String COLOR_PARAMETER_ID = PluginParameter.buildId(CreateVertexTypePlugin.class, "color");
public static final String FG_ICON_PARAMETER_ID = PluginParameter.buildId(CreateVertexTypePlugin.class, "fg_icon");
public static final String BG_ICON_PARAMETER_ID = PluginParameter.buildId(CreateVertexTypePlugin.class, "bg_icon");
public static final String DETECTION_REGEX_PARAMETER_ID = PluginParameter.buildId(CreateVertexTypePlugin.class, "detection_regex");
public static final String VALIDATION_REGEX_PARAMETER_ID = PluginParameter.buildId(CreateVertexTypePlugin.class, "validation_regex");
public static final String SUPER_TYPE_PARAMETER_ID = PluginParameter.buildId(CreateVertexTypePlugin.class, "super_type");
public static final String OVERRIDDEN_TYPE_PARAMETER_ID = PluginParameter.buildId(CreateVertexTypePlugin.class, "overridden_type");
public static final String INCOMPLETE_PARAMETER_ID = PluginParameter.buildId(CreateVertexTypePlugin.class, "incomplete");
@Override
public PluginParameters createParameters() {
final PluginParameters params = new PluginParameters();
final PluginParameter<StringParameterValue> nameParam = StringParameterType.build(NAME_PARAMETER_ID);
nameParam.setName("Name");
nameParam.setDescription("The name of the new vertex type");
nameParam.setStringValue(null);
params.addParameter(nameParam);
final PluginParameter<StringParameterValue> descriptionParam = StringParameterType.build(DESCRIPTION_PARAMETER_ID);
descriptionParam.setName("Description");
descriptionParam.setDescription("The description of the new vertex type");
descriptionParam.setStringValue(null);
params.addParameter(descriptionParam);
final PluginParameter<ColorParameterValue> colorParam = ColorParameterType.build(COLOR_PARAMETER_ID);
colorParam.setName("Color");
colorParam.setDescription("The color of the new vertex type");
colorParam.setStringValue(ConstellationColor.GREY.getName());
params.addParameter(colorParam);
final PluginParameter<StringParameterValue> fgIconParam = StringParameterType.build(FG_ICON_PARAMETER_ID);
fgIconParam.setName("Foreground Icon");
fgIconParam.setDescription("The name of the foreground icon of the new vertex type");
fgIconParam.setStringValue(CharacterIconProvider.CHAR_003F.getExtendedName());
params.addParameter(fgIconParam);
final PluginParameter<StringParameterValue> bgIconParam = StringParameterType.build(BG_ICON_PARAMETER_ID);
bgIconParam.setName("Background Icon");
bgIconParam.setDescription("The name of the background icon of the new vertex type");
bgIconParam.setStringValue(DefaultIconProvider.FLAT_SQUARE.getExtendedName());
params.addParameter(bgIconParam);
final PluginParameter<StringParameterValue> detectionRegexParam = StringParameterType.build(DETECTION_REGEX_PARAMETER_ID);
detectionRegexParam.setName("Detection Regular Expression");
detectionRegexParam.setDescription("The detection regular expression (case of the new vertex type");
detectionRegexParam.setStringValue(null);
params.addParameter(detectionRegexParam);
final PluginParameter<StringParameterValue> validationRegexParam = StringParameterType.build(VALIDATION_REGEX_PARAMETER_ID);
validationRegexParam.setName("Validation Regular Expression");
validationRegexParam.setDescription("The detection regular expression of the new vertex type");
validationRegexParam.setStringValue(null);
params.addParameter(validationRegexParam);
final PluginParameter<StringParameterValue> superTypeParam = StringParameterType.build(SUPER_TYPE_PARAMETER_ID);
superTypeParam.setName("Super Type");
superTypeParam.setDescription("The name of the super type of the new vertex type");
superTypeParam.setStringValue(null);
params.addParameter(superTypeParam);
final PluginParameter<StringParameterValue> overriddenTypeParam = StringParameterType.build(OVERRIDDEN_TYPE_PARAMETER_ID);
overriddenTypeParam.setName("Overridden Type");
overriddenTypeParam.setDescription("The name of the overridden type of the new vertex type");
overriddenTypeParam.setStringValue(null);
params.addParameter(overriddenTypeParam);
final PluginParameter<BooleanParameterValue> incompleteParam = BooleanParameterType.build(INCOMPLETE_PARAMETER_ID);
incompleteParam.setName("Incomplete");
incompleteParam.setDescription("Is the new vertex type incomplete?");
incompleteParam.setBooleanValue(false);
params.addParameter(incompleteParam);
return params;
}
@Override
public void edit(final GraphWriteMethods graph, final PluginInteraction interaction, final PluginParameters parameters) throws InterruptedException {
final String name = parameters.getStringValue(NAME_PARAMETER_ID);
if (name == null) {
throw new IllegalArgumentException("A name must be supplied");
}
final String description = parameters.getStringValue(DESCRIPTION_PARAMETER_ID);
if (description == null) {
throw new IllegalArgumentException("A description must be supplied");
}
final ConstellationColor color = parameters.getColorValue(COLOR_PARAMETER_ID);
final String fgIconName = parameters.getStringValue(FG_ICON_PARAMETER_ID);
final ConstellationIcon foregroundIcon = IconManager.getIcon(fgIconName);
final String bgIconName = parameters.getStringValue(BG_ICON_PARAMETER_ID);
final ConstellationIcon backgroundIcon = IconManager.getIcon(bgIconName);
final String dregex = parameters.getStringValue(DETECTION_REGEX_PARAMETER_ID);
final Pattern detectionRegex = dregex != null ? Pattern.compile(dregex, Pattern.CASE_INSENSITIVE) : null;
final String vregex = parameters.getStringValue(VALIDATION_REGEX_PARAMETER_ID);
final Pattern validationRegex = vregex != null ? Pattern.compile(vregex, Pattern.CASE_INSENSITIVE) : null;
final String stype = parameters.getStringValue(SUPER_TYPE_PARAMETER_ID);
final SchemaVertexType superType = stype != null ? SchemaVertexTypeUtilities.getType(stype) : null;
final String otype = parameters.getStringValue(OVERRIDDEN_TYPE_PARAMETER_ID);
final SchemaVertexType overridenType = otype != null ? SchemaVertexTypeUtilities.getType(otype) : null;
final boolean incomplete = parameters.getBooleanValue(INCOMPLETE_PARAMETER_ID);
final Map<String, String> properties = null;
final SchemaVertexType svt = new SchemaVertexType(
name, description,
color, foregroundIcon,
backgroundIcon, detectionRegex,
validationRegex, superType,
overridenType, properties,
incomplete);
SchemaVertexTypeUtilities.addCustomType(svt, true);
}
}
| [
"[email protected]"
] | |
e0f6c2b4bd8bb345ae9f286bae13fe183435afec | d5eb91234f0484fd9ed5a1841cc019f3e3378bfe | /src/org/elderlucas/controller/ResponsableTurnoController.java | 5eee1fd22ba9b385d15d1bc50e423cf36a586e4c | [] | no_license | elucas2015337/Hospital | b47f6c1411fd2ea858731486c52cf61a88a12c6c | cdd2272d1446078bc75c426cf32a8c3398104b84 | refs/heads/master | 2022-11-21T20:55:03.901787 | 2020-07-15T00:33:08 | 2020-07-15T00:33:08 | 279,721,836 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 17,287 | java | package org.elderlucas.controller;
import java.net.URL;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.ResourceBundle;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.image.ImageView;
import javafx.scene.input.KeyEvent;
import javax.swing.JOptionPane;
import org.elderlucas.bean.Area;
import org.elderlucas.bean.Cargo;
import org.elderlucas.bean.Responsable;
import org.elderlucas.db.Conexion;
import org.elderlucas.sistema.Principal;
public class ResponsableTurnoController implements Initializable{
private Principal escenarioPrincipal;
private enum operaciones {NUEVO, ELIMINAR, GUARDAR, CANCELAR, NINGUNO, REPORTE, ACTUALIZAR};
private operaciones tipoDeOperacion = operaciones.NINGUNO;
private ObservableList<Responsable> listaResponsable;
private ObservableList<Area> listaArea;
private ObservableList<Cargo> listaCargo;
@FXML private ImageView imageResponsable;
@FXML private TextField txtNombre;
@FXML private TextField txtApellido;
@FXML private TextField txtTelefono;
@FXML private ComboBox cmbArea;
@FXML private ComboBox cmbCargo;
@FXML private TableView tblResponsables;
@FXML private TableColumn colCodigo;
@FXML private TableColumn colNombre;
@FXML private TableColumn colApellido;
@FXML private TableColumn colTelefono;
@FXML private TableColumn colCodigoArea;
@FXML private TableColumn colCodigoCargo;
@FXML private Button btnNuevo;
@FXML private Button btnEliminar;
@FXML private Button btnEditar;
@FXML private Button btnReporte;
@Override
public void initialize(URL location, ResourceBundle resources) {
cargarDatos();
cmbCargo.setItems(getCargos());
cmbArea.setItems(getAreas());
}
public void image1(){
imageResponsable.setFitHeight(imageResponsable.getFitHeight() + 10);
imageResponsable.setFitWidth(imageResponsable.getFitWidth()+ 10);
}
public void image2(){
imageResponsable.setFitHeight(imageResponsable.getFitHeight() - 10);
imageResponsable.setFitWidth(imageResponsable.getFitWidth() - 10);
}
public void SoloNumerosEnteros(KeyEvent keyEvent) {
try{
char key = keyEvent.getCharacter().charAt(0);
if (!Character.isDigit(key))
keyEvent.consume();
if(txtTelefono.getText().length() > 8)
keyEvent.consume();
if(txtTelefono.getText().length() < 8)
btnNuevo.setDisable(true);
else
btnNuevo.setDisable(false);
} catch (Exception ex){ }
}
public void cargarDatos(){
tblResponsables.setItems(getResponsable());
colCodigo.setCellValueFactory(new PropertyValueFactory<Responsable, Integer>("codigoResponsableTurno"));
colNombre.setCellValueFactory(new PropertyValueFactory<Responsable, String>("nombreResponsable"));
colApellido.setCellValueFactory(new PropertyValueFactory<Responsable, String>("apellidosResponsable"));
colTelefono.setCellValueFactory(new PropertyValueFactory<Responsable, String>("telefonoPersonal"));
colCodigoArea.setCellValueFactory(new PropertyValueFactory<Responsable, Integer>("codigoArea"));
colCodigoCargo.setCellValueFactory(new PropertyValueFactory<Responsable, Integer>("codigoCargo"));
}
public ObservableList <Responsable> getResponsable(){
ArrayList <Responsable> lista = new ArrayList <Responsable>();
try {
PreparedStatement procedimiento = Conexion.getInstancia().getConexion().prepareCall("{call sp_listarResponsables()}");
ResultSet resultado = procedimiento.executeQuery();
while (resultado.next()){
lista.add(new Responsable(resultado.getInt("codigoResponsableTurno"),
resultado.getString("nombreResponsable"),
resultado.getString("apellidosResponsable"),
resultado.getString("telefonoPersonal"),
resultado.getInt("codigoArea"),
resultado.getInt("codigoCargo")));
}
} catch (Exception e) {
e.printStackTrace();
}
return listaResponsable = FXCollections.observableList(lista);
}
public ObservableList <Cargo> getCargos(){
ArrayList <Cargo> lista = new ArrayList <Cargo>();
try {
PreparedStatement procedimiento = Conexion.getInstancia().getConexion().prepareCall("{call sp_listarCargos}");
ResultSet resultado = procedimiento.executeQuery();
while (resultado.next()){
lista.add(new Cargo(resultado.getInt("codigoCargo"),
resultado.getString("nombreCargo")));
}
} catch (Exception e) {
e.printStackTrace();
}
return listaCargo = FXCollections.observableList(lista);
}
public ObservableList <Area> getAreas(){
ArrayList <Area> lista = new ArrayList <Area>();
try {
PreparedStatement procedimiento = Conexion.getInstancia().getConexion().prepareCall("{call sp_ListarAreas}");
ResultSet resultado = procedimiento.executeQuery();
while (resultado.next()){
lista.add(new Area(resultado.getInt("codigoArea"),
resultado.getString("nombreArea")));
}
} catch (Exception e) {
e.printStackTrace();
}
return listaArea = FXCollections.observableList(lista);
}
public void seleccionarElemento(){
if(tblResponsables.getSelectionModel().getSelectedItem() != null){
txtNombre.setText(((Responsable)tblResponsables.getSelectionModel().getSelectedItem()).getNombreResponsable());
txtApellido.setText(((Responsable)tblResponsables.getSelectionModel().getSelectedItem()).getApellidosResponsable());
txtTelefono.setText(((Responsable)tblResponsables.getSelectionModel().getSelectedItem()).getTelefonoPersonal());
cmbArea.getSelectionModel().select(buscarArea(((Responsable)tblResponsables.getSelectionModel().getSelectedItem()).getCodigoArea()));
cmbCargo.getSelectionModel().select(buscarCargo(((Responsable)tblResponsables.getSelectionModel().getSelectedItem()).getCodigoCargo()));
}else{
tblResponsables.getSelectionModel().clearSelection();
}
}
public Area buscarArea(int codigoArea){
Area resultado = null;
try{
PreparedStatement procedimiento = Conexion.getInstancia().getConexion().prepareCall("{call sp_buscarArea(?)}");
procedimiento.setInt(1, codigoArea);
ResultSet registro = procedimiento.executeQuery();
while(registro.next()){
resultado = new Area(registro.getInt("codigoArea"),
registro.getString("nombreArea")
);
}
}catch(Exception e){
e.printStackTrace();
}
return resultado;
}
public Cargo buscarCargo(int codigoCargo){
Cargo resultado = null;
try{
PreparedStatement procedimiento = Conexion.getInstancia().getConexion().prepareCall("{call sp_buscarCargo(?)}");
procedimiento.setInt(1, codigoCargo);
ResultSet registro = procedimiento.executeQuery();
while(registro.next()){
resultado = new Cargo(registro.getInt("codigoCargo"),
registro.getString("nombreCargo")
);
}
}catch(Exception e){
e.printStackTrace();
}
return resultado;
}
public void editar(){
switch(tipoDeOperacion){
case NINGUNO:
if (tblResponsables.getSelectionModel().getSelectedItem() != null){
btnEditar.setText("Actualizar");
btnReporte.setText("Cancelar");
btnNuevo.setDisable(true);
btnEliminar.setDisable(true);
btnReporte.setOnAction(e -> cancelar());
tblResponsables.setOnMouseClicked(null);
activarControles();
cmbArea.setDisable(true);
cmbCargo.setDisable(true);
tipoDeOperacion = operaciones.ACTUALIZAR;
}else{
JOptionPane.showMessageDialog(null, "Debe seleccionar un elemento");
}
break;
case ACTUALIZAR:
actualizar();
btnEditar.setText("Editar");
btnReporte.setText("Reporte");
btnReporte.setOnAction(null);
btnNuevo.setDisable(false);
btnEliminar.setDisable(false);
tblResponsables.setOnMouseClicked(e -> seleccionarElemento());
tipoDeOperacion = operaciones.NINGUNO;
cargarDatos();
break;
}
}
public void actualizar(){
try{
PreparedStatement procedimiento = Conexion.getInstancia().getConexion().prepareCall("{call sp_editarResponsable(?,?,?,?,?,?)}");
Responsable registro = (Responsable)tblResponsables.getSelectionModel().getSelectedItem();
registro.setNombreResponsable(txtNombre.getText());
registro.setApellidosResponsable(txtApellido.getText());
registro.setTelefonoPersonal(txtTelefono.getText());
procedimiento.setInt(1, registro.getCodigoResponsableTurno());
procedimiento.setString(2, registro.getNombreResponsable());
procedimiento.setString(3, registro.getApellidosResponsable());
procedimiento.setString(4, registro.getTelefonoPersonal());
procedimiento.setInt(5, registro.getCodigoArea());
procedimiento.setInt(6, registro.getCodigoCargo());
procedimiento.execute();
desactivarControles();
limpiarControles();
}catch(Exception e){
e.printStackTrace();
}
}
public void eliminar(){
switch (tipoDeOperacion){
case GUARDAR:
desactivarControles();
limpiarControles();
btnNuevo.setText("Nuevo");
btnEliminar.setText("Eliminar");
btnEditar.setDisable(false);
btnReporte.setDisable(false);
tipoDeOperacion = operaciones.NUEVO;
break;
default:
if (tblResponsables.getSelectionModel().getSelectedItem() != null){
int respuesta = JOptionPane.showConfirmDialog(null, "¿Está seguro de Eliminar el registro?", "Eliminar Responsable de Turno", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (respuesta == JOptionPane.YES_OPTION){
try{
PreparedStatement procedimiento =Conexion.getInstancia().getConexion().prepareCall("{call sp_eliminarResponsable(?)}");
procedimiento.setInt(1, ((Responsable)tblResponsables.getSelectionModel().getSelectedItem()).getCodigoResponsableTurno());
procedimiento.execute();
listaResponsable.remove(tblResponsables.getSelectionModel().getSelectedIndex());
limpiarControles();
}catch(Exception e){
e.printStackTrace();
}
}else{
tblResponsables.getSelectionModel().clearSelection();
limpiarControles();
}
}else{
JOptionPane.showMessageDialog(null, "Debe seleccionar un elemento");
}
}
}
public void nuevo(){
switch (tipoDeOperacion){
case NINGUNO:
tblResponsables.setOnMouseClicked(null);
limpiarControles();
activarControles();
btnNuevo.setText("Guardar");
btnEliminar.setText("Cancelar");
btnEliminar.setOnAction(e -> cancelar());
btnEditar.setDisable(true);
btnReporte.setDisable(true);
tipoDeOperacion = operaciones.GUARDAR;
break;
case GUARDAR:
if(!txtTelefono.getText().equals("") && !txtNombre.getText().equals("") && !txtApellido.getText().equals("") && cmbArea.getSelectionModel().getSelectedItem() != null && cmbCargo.getSelectionModel().getSelectedItem() != null){
guardar();
desactivarControles();
limpiarControles();
btnNuevo.setText("Nuevo");
btnEliminar.setText("Eliminar");
btnEditar.setDisable(false);
btnReporte.setDisable(false);
tipoDeOperacion = operaciones.NINGUNO;
tblResponsables.setOnMouseClicked(e -> seleccionarElemento());
cargarDatos();
}else{
tipoDeOperacion = operaciones.GUARDAR;
JOptionPane.showMessageDialog(null, "Es obligatorio ingresar todos los campos");
}
}
}
public void guardar(){
Responsable registro = new Responsable();
registro.setNombreResponsable(txtNombre.getText());
registro.setApellidosResponsable(txtApellido.getText());
registro.setTelefonoPersonal(txtTelefono.getText());
registro.setCodigoArea(((Area)cmbArea.getSelectionModel().getSelectedItem()).getCodigoArea());
registro.setCodigoCargo(((Cargo)cmbCargo.getSelectionModel().getSelectedItem()).getCodigoCargo());
try{
PreparedStatement procedimiento = Conexion.getInstancia().getConexion().prepareCall("{call sp_AgregarResponsable(?,?,?,?,?)}");
procedimiento.setString(1, registro.getNombreResponsable());
procedimiento.setString(2, registro.getApellidosResponsable());
procedimiento.setString(3, registro.getTelefonoPersonal());
procedimiento.setInt(4, registro.getCodigoArea());
procedimiento.setInt(5, registro.getCodigoCargo());
procedimiento.execute();
listaResponsable.add(registro);
}catch(Exception e){
e.printStackTrace();
}
}
public void cancelar (){
desactivarControles();
btnNuevo.setText("Nuevo");
btnEliminar.setText("Eliminar");
btnReporte.setText("Reporte");
btnEditar.setText("Editar");
btnNuevo.setDisable(false);
btnEliminar.setDisable(false);
btnEditar.setDisable(false);
btnReporte.setDisable(false);
tipoDeOperacion = operaciones.NINGUNO;
limpiarControles();
btnEliminar.setOnAction(e -> eliminar());
tblResponsables.setOnMouseClicked(e -> seleccionarElemento());
}
public void desactivarControles(){
txtNombre.setEditable(false);
txtApellido.setEditable(false);
txtTelefono.setEditable(false);
cmbArea.setDisable(true);
cmbCargo.setDisable(true);
}
public void activarControles(){
txtNombre.setEditable(true);
txtApellido.setEditable(true);
txtTelefono.setEditable(true);
cmbArea.setDisable(false);
cmbCargo.setDisable(false);
}
public void limpiarControles(){
txtNombre.setText("");
txtApellido.setText("");
txtTelefono.setText("");
cmbArea.getSelectionModel().clearSelection();
cmbArea.setValue(null);
cmbCargo.getSelectionModel().clearSelection();
cmbCargo.setValue(null);
}
public Principal getEscenarioPrincipal() {
return escenarioPrincipal;
}
public void setEscenarioPrincipal(Principal escenarioPrincipal) {
this.escenarioPrincipal = escenarioPrincipal;
}
public void regresarMenu(){
escenarioPrincipal.menuPrincipal();
}
public void ventanaAreas(){
escenarioPrincipal.ventanaAreas();
}
public void ventanaCargos(){
escenarioPrincipal.ventanaCargos();
}
}
| [
"[email protected]"
] | |
573cd8211f25b3fe3bc4aa076d59457797f68cdb | 5ac4696e42f1b09b98f0a45f2752ec80eee90323 | /app/src/main/java/com/sam_chordas/android/stockhawk/data/QuoteColumns.java | 867dd5893cd80d7b74ccfe13073e4b43f303c74d | [] | no_license | prithvibhola/StockHawk | 74048ea508d424018b05431ae2f7945139a01d69 | f189714515eb3c5e5c8b0aa7d7ed5b2fd497abd0 | refs/heads/master | 2023-08-28T14:42:39.032434 | 2016-08-23T06:57:37 | 2016-08-23T06:57:37 | 66,339,846 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,168 | java | package com.sam_chordas.android.stockhawk.data;
import net.simonvt.schematic.annotation.AutoIncrement;
import net.simonvt.schematic.annotation.DataType;
import net.simonvt.schematic.annotation.NotNull;
import net.simonvt.schematic.annotation.PrimaryKey;
/**
* Created by sam_chordas on 10/5/15.
*/
public class QuoteColumns {
@DataType(DataType.Type.INTEGER) @PrimaryKey @AutoIncrement
public static final String _ID = "_id";
@DataType(DataType.Type.TEXT) @NotNull
public static final String NAME = "name";
@DataType(DataType.Type.TEXT) @NotNull
public static final String SYMBOL = "symbol";
@DataType(DataType.Type.TEXT) @NotNull
public static final String PERCENT_CHANGE = "percent_change";
@DataType(DataType.Type.TEXT) @NotNull
public static final String CHANGE = "change";
@DataType(DataType.Type.TEXT) @NotNull
public static final String BIDPRICE = "bid_price";
@DataType(DataType.Type.TEXT)
public static final String CREATED = "created";
@DataType(DataType.Type.INTEGER) @NotNull
public static final String ISUP = "is_up";
@DataType(DataType.Type.INTEGER) @NotNull
public static final String ISCURRENT = "is_current";
}
| [
"[email protected]"
] | |
699f8c2d3b4bc1b17ffcce5b8671ecc3c772b558 | 4472c921a4a8a683b5c46c092c790718b45f651c | /bingo-core/src/main/java/com/example/bingo/core/MybatisMethodResolver.java | 408d9e534dbea12bd456e37eca42681151a3d8f7 | [] | no_license | Seadam/bingo | ec0837912a1206a0e099435a5c16adb93b1b559e | 9de3a4ca8f9a0be35ba8d26074dd94b293342ffd | refs/heads/master | 2023-07-22T18:19:37.035981 | 2021-09-06T01:08:50 | 2021-09-06T01:08:50 | 402,305,041 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,354 | java | /*
* Copyright (c) 2011-2021, baomidou ([email protected]).
*
* 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.example.bingo.core;
import org.apache.ibatis.builder.annotation.MethodResolver;
import java.lang.reflect.Method;
/**
* 继承 {@link MethodResolver}
*
* @author miemie
* @since 2019-01-05
*/
public class MybatisMethodResolver extends MethodResolver {
private final com.example.bingo.core.MybatisMapperAnnotationBuilder annotationBuilder;
private final Method method;
public MybatisMethodResolver(com.example.bingo.core.MybatisMapperAnnotationBuilder annotationBuilder, Method method) {
super(null, null);
this.annotationBuilder = annotationBuilder;
this.method = method;
}
@Override
public void resolve() {
annotationBuilder.parseStatement(method);
}
}
| [
"[email protected]"
] | |
3d897f14828ef25f867deceaac14c33b756ba73b | 886e588cee89c32b49412462e3b2851c5cf85963 | /app/src/main/java/com/vayetek/financeapp/services/BourseTunisWebApiRetrofitServices.java | a58f5b42aaf18ad2318aad0284e9e542e0aab93f | [] | no_license | S4M37/FinanceApp | 7252f8303b26886067958cab59b373bf07435660 | 2254f6673568fdfc5401e3d86b30f94ebf6a364e | refs/heads/master | 2021-01-19T14:21:43.801612 | 2017-05-04T00:26:15 | 2017-05-04T00:26:15 | 88,152,315 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 538 | java | package com.vayetek.financeapp.services;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.vayetek.financeapp.config.Endpoints;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.POST;
public interface BourseTunisWebApiRetrofitServices {
@POST(Endpoints.INDICE_SECTORIEL_API)
Call<ResponseBody> getPerformanceIndices(@Body JsonArray requestBody);
@POST(Endpoints.HANDSHAKE)
Call<ResponseBody> handshake(@Body JsonArray requestBody);
}
| [
"[email protected]"
] | |
ed1b03b29619744df64f6d9922608ca003bd2ae3 | e132ed99c459d491f97ccee39cfb0a6375ca7034 | /SelfStudyJava/chap02/src/sec04/verify/exam01/Exam01.java | c9bb301671a7278f139fbfc4a324edb4250da1de | [] | no_license | SKTSecDev/JavaCK | d0e01461fdc0ab6a4f73574f8f2bc0e3b8d6aca8 | adf0a87a4290a368aecc5578e066bfcca48f3d14 | refs/heads/main | 2023-05-09T21:56:13.659151 | 2021-05-31T07:58:01 | 2021-05-31T07:58:01 | 372,417,314 | 0 | 1 | null | null | null | null | UHC | Java | false | false | 341 | java | package sec04.verify.exam01;
public class Exam01 {
public static void main(String[] args) {
String name = "감자바";
int age = 25;
String tel1="010", tel2="123", tel3="4567";
System.out.println("이름: " + name);
System.out.print("나이: " + age + "\n");
System.out.printf("전화: %1$s-%2$s-%3$s", tel1, tel2, tel3);
}
}
| [
"kakao.com"
] | kakao.com |
630ca9563aca4e804f1c7c38ae411920989e1917 | 3706fa253f8ab4ba984915151df2654324afeee5 | /FMS/houduan-BladeX-Boot/src/main/java/org/springblade/modules/auth/controller/AuthController.java | 8123128af9d9d90fb63b35f96452d5d781079058 | [] | no_license | FanWenTao-Felix/yunjie | a15209af901b142a7b73c4af3532d6090a9c9552 | 3ebe4c95211261e116d28682036b2d463a374978 | refs/heads/master | 2020-09-02T00:55:45.328374 | 2019-10-31T03:33:42 | 2019-10-31T03:33:42 | 219,099,186 | 1 | 0 | null | 2019-11-02T03:40:32 | 2019-11-02T03:40:32 | null | UTF-8 | Java | false | false | 3,568 | java | /*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 ([email protected])
*/
package org.springblade.modules.auth.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiSort;
import lombok.AllArgsConstructor;
import org.springblade.core.launch.constant.AppConstant;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.tool.support.Kv;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.WebUtil;
import org.springblade.modules.auth.granter.ITokenGranter;
import org.springblade.modules.auth.granter.TokenGranterBuilder;
import org.springblade.modules.auth.granter.TokenParameter;
import org.springblade.modules.auth.utils.TokenUtil;
import org.springblade.modules.system.entity.UserInfo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
/**
* 认证模块
*
* @author Chill
*/
@RestController
@AllArgsConstructor
@RequestMapping(AppConstant.APPLICATION_AUTH_NAME)
@ApiSort(1)
@Api(value = "用户授权认证", tags = "授权接口")
public class AuthController {
@ApiLog("登录用户验证")
@PostMapping("/oauth/token")
@ApiOperation(value = "获取认证token", notes = "传入租户ID:tenantId,账号:account,密码:password")
public Kv token(@ApiParam(value = "租户ID", required = true) @RequestParam(defaultValue = "000000", required = false) String tenantId,
@ApiParam(value = "账号", required = true) @RequestParam(required = false) String username,
@ApiParam(value = "密码", required = true) @RequestParam(required = false) String password) {
Kv authInfo = Kv.create();
String grantType = WebUtil.getRequest().getParameter("grant_type");
String refreshToken = WebUtil.getRequest().getParameter("refresh_token");
String userType = Func.toStr(WebUtil.getRequest().getHeader(TokenUtil.USER_TYPE_HEADER_KEY), TokenUtil.DEFAULT_USER_TYPE);
TokenParameter tokenParameter = new TokenParameter();
tokenParameter.getArgs().set("tenantId", tenantId).set("username", username).set("password", password).set("grantType", grantType).set("refreshToken", refreshToken).set("userType", userType);
ITokenGranter granter = TokenGranterBuilder.getGranter(grantType);
UserInfo userInfo = granter.grant(tokenParameter);
if (userInfo == null || userInfo.getUser() == null) {
return authInfo.set("error_code", HttpServletResponse.SC_BAD_REQUEST).set("error_description", "用户名或密码不正确");
}
return TokenUtil.createAuthInfo(userInfo);
}
}
| [
"[email protected]"
] | |
f7ff2a31a5f31feee1929adbfcdc7ca35e31177d | 232fe31ab52a453bf77f3922c042377a4b6e9bf5 | /src/main/java/com/bigfix/schemas/relevance/GetRelevanceResult.java | 3bb9107cc63dc4c611c576f2a940bd9b04cb4786 | [
"Apache-2.0"
] | permissive | eyce9000/iem4j | 20533b8544b9664d699b760dc6e63dbadaead542 | 9d6a7d7f3cfe8705b90da112475472020a9f757d | refs/heads/master | 2020-04-06T15:51:06.002599 | 2016-11-29T17:43:51 | 2016-11-29T17:43:51 | 31,443,750 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,798 | java |
package com.bigfix.schemas.relevance;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="relevanceExpr" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="username" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="password" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"relevanceExpr",
"username",
"password"
})
@XmlRootElement(name = "GetRelevanceResult")
public class GetRelevanceResult {
@XmlElement(required = true)
protected String relevanceExpr;
@XmlElement(required = true)
protected String username;
@XmlElement(required = true)
protected String password;
/**
* Gets the value of the relevanceExpr property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRelevanceExpr() {
return relevanceExpr;
}
/**
* Sets the value of the relevanceExpr property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRelevanceExpr(String value) {
this.relevanceExpr = value;
}
/**
* Gets the value of the username property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUsername() {
return username;
}
/**
* Sets the value of the username property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUsername(String value) {
this.username = value;
}
/**
* Gets the value of the password property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPassword() {
return password;
}
/**
* Sets the value of the password property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPassword(String value) {
this.password = value;
}
}
| [
"[email protected]"
] | |
7131ec98ee392bc29a67ccac690e589612d69dc0 | 37cb51c2513ad08ddf5b63366ebd9dc029ee241c | /res/yaoyy/ms-tools/src/main/java/com/ms/tools/ClazzUtil.java | 3597b9b9a881215928563769f3da6fd6dde191fe | [] | no_license | 13816016736/yaoyy | a2d7cd8cc2b986fd9307a9bd42851660f630cd15 | 811e3a6e4ca14e92738001d385d0bb2eba097f0f | refs/heads/master | 2020-03-12T09:15:17.208582 | 2017-09-15T10:42:33 | 2017-09-15T10:42:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,886 | java | package com.ms.tools;
import org.springframework.cglib.beans.BeanCopier;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Author: koabs
* 10/12/16.
* 实体类属性复制工具类
*/
public class ClazzUtil {
/**
* The constant beanCopierMap.
*/
public static final Map<String, BeanCopier> beanCopierMap = new HashMap<>();
/**
* Copy.
*
* @param source
* the source
* @param target
* the target
*/
public static void copy(Object source, Object target) {
String beanKey = generateKey(source.getClass(), target.getClass());
BeanCopier copier;
if (!beanCopierMap.containsKey(beanKey)) {
copier = BeanCopier.create(source.getClass(), target.getClass(), false);
beanCopierMap.put(beanKey, copier);
} else {
copier = beanCopierMap.get(beanKey);
}
copier.copy(source, target, null);
}
/**
*
* copyForSameFieldName:(按照相同的域名 copy对象). <br/>
*
* @author zhichao.zhu
* @param source
* @param target
* @since JDK 1.7
*/
@SuppressWarnings("unused")
public static <S, T> boolean copyForSameFieldName(Object source, Object target) {
if(source == null || target == null){
return false;
}
/* Class<S> sClass = (Class<S>)source.getClass();
Class<T> tClass = (Class<T>)target.getClass();*/
if(source.getClass().toString().equals(target.getClass().toString()) ){
return true;
}
// sFields.
return true;
}
/**
* Copy list list.
*
* @param <S>
* the type parameter
* @param <T>
* the type parameter
* @param source
* the source
* @param cls
* the cls
* @return the list
* @throws InstantiationException
* the instantiation exception
* @throws IllegalAccessException
* the illegal access exception
*/
public static <S, T> List<T> copyList(List<S> source, Class<T> cls)
throws InstantiationException, IllegalAccessException {
List<T> target = new ArrayList<>();
if (null != source && source.size() > 0) {
for (S s : source) {
T t = cls.newInstance();
copy(s, t);
target.add(t);
}
}
return target;
}
/**
* Generate key string.
*
* @param classSource
* the class source
* @param classTarget
* the class target
* @return the string
*/
private static String generateKey(Class<?> classSource, Class<?> classTarget) {
return classSource.toString() + classTarget.toString();
}
}
| [
"[email protected]"
] | |
a3e52b4eee454f3186bdf0a4d7493b91ea6c4f33 | 3fbefb817ae2a62350edfb6444ec62053dbf73d1 | /backend/src/main/java/com/r/connect/entity/Account.java | 04406ea9e5fa2bf12e5769d5bf8fca0d0384e818 | [] | no_license | CodeVaDOs/client-bank--spring-react | 4631dd9bfe374f167368b510fbfd7556b7512acc | ec2f7f45d4f748b351dafc001aa37cc93bdce16c | refs/heads/master | 2023-02-16T23:03:08.223640 | 2021-01-10T21:37:22 | 2021-01-10T21:37:22 | 328,484,114 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 862 | java | package com.r.connect.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.r.connect.enumeration.Currency;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.persistence.*;
@SuppressWarnings("ID")
@Entity
@Data
@EqualsAndHashCode(exclude = {"customer"}, callSuper = false)
@ToString(exclude = {"customer"})
@Table(name = "account")
public class Account extends AbstractEntity<Account> {
@Column(unique = true)
private String number;
private Currency currency;
private Double balance = 0d;
@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.REMOVE})
@JoinTable(name = "accounts_to_customer",
joinColumns = @JoinColumn(name = "account_id"),
inverseJoinColumns = @JoinColumn(name = "customer_id"))
private Customer customer;
} | [
"[email protected]"
] | |
9412d7a3d25c4551141c1410ae55c0697c78397a | f321db1ace514d08219cc9ba5089ebcfff13c87a | /generated-tests/random/tests/s49/6_re2j/evosuite-tests/com/google/re2j/Utils_ESTest.java | dd8edb667d74311716c05496a8003e6e4719f2a6 | [] | no_license | sealuzh/dynamic-performance-replication | 01bd512bde9d591ea9afa326968b35123aec6d78 | f89b4dd1143de282cd590311f0315f59c9c7143a | refs/heads/master | 2021-07-12T06:09:46.990436 | 2020-06-05T09:44:56 | 2020-06-05T09:44:56 | 146,285,168 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 12,697 | java | /*
* This file was automatically generated by EvoSuite
* Sun Mar 24 10:55:46 GMT 2019
*/
package com.google.re2j;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import com.google.re2j.Utils;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class Utils_ESTest extends Utils_ESTest_scaffolding {
@Test(timeout = 4000)
public void test00() throws Throwable {
byte[] byteArray0 = new byte[9];
byteArray0[0] = (byte)81;
byteArray0[2] = (byte) (-42);
byteArray0[3] = (byte)110;
byte[] byteArray1 = new byte[2];
int int0 = Utils.indexOf(byteArray0, byteArray1, (-7));
assertEquals(4, int0);
}
@Test(timeout = 4000)
public void test01() throws Throwable {
byte[] byteArray0 = new byte[9];
byte[] byteArray1 = new byte[2];
byteArray1[0] = (byte)103;
int int0 = Utils.indexOf(byteArray0, byteArray1, (-7));
assertEquals((-1), int0);
}
@Test(timeout = 4000)
public void test02() throws Throwable {
int int0 = Utils.unhex(65);
assertEquals(10, int0);
}
@Test(timeout = 4000)
public void test03() throws Throwable {
// Undeclared exception!
try {
Utils.subarray((int[]) null, 125, 0);
fail("Expecting exception: NegativeArraySizeException");
} catch(NegativeArraySizeException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("com.google.re2j.Utils", e);
}
}
@Test(timeout = 4000)
public void test04() throws Throwable {
byte[] byteArray0 = new byte[1];
byte[] byteArray1 = Utils.subarray(byteArray0, 0, 0);
assertEquals(0, byteArray1.length);
}
@Test(timeout = 4000)
public void test05() throws Throwable {
byte[] byteArray0 = new byte[3];
byte[] byteArray1 = Utils.subarray(byteArray0, 3601, 3601);
// Undeclared exception!
try {
Utils.subarray(byteArray1, (-2381), (byte) (-27));
fail("Expecting exception: ArrayIndexOutOfBoundsException");
} catch(ArrayIndexOutOfBoundsException e) {
//
// -2381
//
verifyException("com.google.re2j.Utils", e);
}
}
@Test(timeout = 4000)
public void test06() throws Throwable {
String string0 = Utils.runeToString(0);
assertEquals("\u0000", string0);
}
@Test(timeout = 4000)
public void test07() throws Throwable {
boolean boolean0 = Utils.isalnum(0);
assertFalse(boolean0);
}
@Test(timeout = 4000)
public void test08() throws Throwable {
boolean boolean0 = Utils.isalnum((-4712));
assertFalse(boolean0);
}
@Test(timeout = 4000)
public void test09() throws Throwable {
boolean boolean0 = Utils.isWordRune(0);
assertFalse(boolean0);
}
@Test(timeout = 4000)
public void test10() throws Throwable {
boolean boolean0 = Utils.isWordRune((byte) (-20));
assertFalse(boolean0);
}
@Test(timeout = 4000)
public void test11() throws Throwable {
byte[] byteArray0 = new byte[5];
int int0 = Utils.indexOf(byteArray0, byteArray0, 0);
assertEquals(0, int0);
}
@Test(timeout = 4000)
public void test12() throws Throwable {
int int0 = Utils.emptyOpContext(0, 0);
assertEquals(32, int0);
}
@Test(timeout = 4000)
public void test13() throws Throwable {
byte[] byteArray0 = new byte[3];
// Undeclared exception!
try {
Utils.subarray(byteArray0, 751, (byte)3);
fail("Expecting exception: NegativeArraySizeException");
} catch(NegativeArraySizeException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("com.google.re2j.Utils", e);
}
}
@Test(timeout = 4000)
public void test14() throws Throwable {
// Undeclared exception!
try {
Utils.stringToRunes((String) null);
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("com.google.re2j.Utils", e);
}
}
@Test(timeout = 4000)
public void test15() throws Throwable {
int int0 = Utils.emptyOpContext(10, 10);
assertEquals(35, int0);
}
@Test(timeout = 4000)
public void test16() throws Throwable {
int int0 = Utils.emptyOpContext(1666, 95);
assertEquals(16, int0);
}
@Test(timeout = 4000)
public void test17() throws Throwable {
int int0 = Utils.emptyOpContext(1358, 57);
assertEquals(16, int0);
}
@Test(timeout = 4000)
public void test18() throws Throwable {
boolean boolean0 = Utils.isWordRune(102);
assertTrue(boolean0);
}
@Test(timeout = 4000)
public void test19() throws Throwable {
int int0 = Utils.emptyOpContext((-112), 90);
assertEquals(21, int0);
}
@Test(timeout = 4000)
public void test20() throws Throwable {
int int0 = Utils.emptyOpContext(1030, (-1742));
assertEquals(42, int0);
}
@Test(timeout = 4000)
public void test21() throws Throwable {
byte[] byteArray0 = new byte[9];
byteArray0[1] = (byte) (-124);
byteArray0[3] = (byte)110;
byteArray0[5] = (byte) (-77);
byteArray0[7] = (byte)72;
byte[] byteArray1 = new byte[2];
int int0 = Utils.indexOf(byteArray0, byteArray1, (-7));
assertEquals((-1), int0);
}
@Test(timeout = 4000)
public void test22() throws Throwable {
byte[] byteArray0 = new byte[3];
byte[] byteArray1 = Utils.subarray(byteArray0, 3601, 3601);
int int0 = Utils.indexOf(byteArray0, byteArray1, (-3708));
assertEquals(0, int0);
assertEquals(0, byteArray1.length);
}
@Test(timeout = 4000)
public void test23() throws Throwable {
byte[] byteArray0 = new byte[8];
int int0 = Utils.indexOf(byteArray0, byteArray0, 5);
assertEquals((-1), int0);
}
@Test(timeout = 4000)
public void test24() throws Throwable {
byte[] byteArray0 = new byte[0];
int int0 = Utils.indexOf(byteArray0, byteArray0, 1961);
assertEquals(0, int0);
}
@Test(timeout = 4000)
public void test25() throws Throwable {
byte[] byteArray0 = new byte[1];
int int0 = Utils.indexOf(byteArray0, byteArray0, 3344);
assertEquals((-1), int0);
}
@Test(timeout = 4000)
public void test26() throws Throwable {
int[] intArray0 = new int[5];
int[] intArray1 = Utils.subarray(intArray0, 6, 6);
assertEquals(0, intArray1.length);
}
@Test(timeout = 4000)
public void test27() throws Throwable {
String string0 = Utils.runeToString(1002);
assertEquals("\u03EA", string0);
}
@Test(timeout = 4000)
public void test28() throws Throwable {
String string0 = Utils.runeToString((-1));
assertEquals("\uFFFF", string0);
}
@Test(timeout = 4000)
public void test29() throws Throwable {
int[] intArray0 = Utils.stringToRunes("gWBmPz}{WE");
// Undeclared exception!
try {
Utils.subarray(intArray0, (byte)9, (-7));
fail("Expecting exception: NegativeArraySizeException");
} catch(NegativeArraySizeException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("com.google.re2j.Utils", e);
}
}
@Test(timeout = 4000)
public void test30() throws Throwable {
int[] intArray0 = Utils.stringToRunes("");
// Undeclared exception!
try {
Utils.subarray(intArray0, (-1946), 52);
fail("Expecting exception: ArrayIndexOutOfBoundsException");
} catch(ArrayIndexOutOfBoundsException e) {
//
// -1946
//
verifyException("com.google.re2j.Utils", e);
}
}
@Test(timeout = 4000)
public void test31() throws Throwable {
StringBuilder stringBuilder0 = new StringBuilder("A");
Utils.escapeRune(stringBuilder0, 6);
assertEquals("A\\x06", stringBuilder0.toString());
}
@Test(timeout = 4000)
public void test32() throws Throwable {
StringBuilder stringBuilder0 = new StringBuilder(2);
Utils.escapeRune(stringBuilder0, 2776);
assertEquals("\\x{ad8}", stringBuilder0.toString());
}
@Test(timeout = 4000)
public void test33() throws Throwable {
StringBuilder stringBuilder0 = new StringBuilder("gWBmPz}{WE");
Utils.escapeRune(stringBuilder0, (byte)13);
assertEquals("gWBmPz}{WE\\r", stringBuilder0.toString());
}
@Test(timeout = 4000)
public void test34() throws Throwable {
// Undeclared exception!
try {
Utils.escapeRune((StringBuilder) null, 12);
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("com.google.re2j.Utils", e);
}
}
@Test(timeout = 4000)
public void test35() throws Throwable {
// Undeclared exception!
try {
Utils.escapeRune((StringBuilder) null, 10);
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("com.google.re2j.Utils", e);
}
}
@Test(timeout = 4000)
public void test36() throws Throwable {
// Undeclared exception!
try {
Utils.escapeRune((StringBuilder) null, 9);
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("com.google.re2j.Utils", e);
}
}
@Test(timeout = 4000)
public void test37() throws Throwable {
// Undeclared exception!
try {
Utils.escapeRune((StringBuilder) null, 8);
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("com.google.re2j.Utils", e);
}
}
@Test(timeout = 4000)
public void test38() throws Throwable {
StringBuilder stringBuilder0 = new StringBuilder("A");
Utils.escapeRune(stringBuilder0, (byte)125);
assertEquals("A\\}", stringBuilder0.toString());
}
@Test(timeout = 4000)
public void test39() throws Throwable {
StringBuilder stringBuilder0 = new StringBuilder(1244);
Utils.escapeRune(stringBuilder0, 1244);
assertEquals("\u04DC", stringBuilder0.toString());
}
@Test(timeout = 4000)
public void test40() throws Throwable {
StringBuilder stringBuilder0 = new StringBuilder("&]L509-_O>Y");
Utils.escapeRune(stringBuilder0, (-1287));
assertEquals("&]L509-_O>Y\\xfffffaf9", stringBuilder0.toString());
}
@Test(timeout = 4000)
public void test41() throws Throwable {
int int0 = Utils.unhex((byte)67);
assertEquals(12, int0);
}
@Test(timeout = 4000)
public void test42() throws Throwable {
int int0 = Utils.unhex((byte)97);
assertEquals(10, int0);
}
@Test(timeout = 4000)
public void test43() throws Throwable {
int int0 = Utils.unhex(51);
assertEquals(3, int0);
}
@Test(timeout = 4000)
public void test44() throws Throwable {
int int0 = Utils.unhex(457);
assertEquals((-1), int0);
}
@Test(timeout = 4000)
public void test45() throws Throwable {
int int0 = Utils.unhex((-1427));
assertEquals((-1), int0);
}
@Test(timeout = 4000)
public void test46() throws Throwable {
boolean boolean0 = Utils.isalnum(97);
assertTrue(boolean0);
}
@Test(timeout = 4000)
public void test47() throws Throwable {
boolean boolean0 = Utils.isalnum((byte)86);
assertTrue(boolean0);
}
@Test(timeout = 4000)
public void test48() throws Throwable {
boolean boolean0 = Utils.isalnum(48);
assertTrue(boolean0);
}
@Test(timeout = 4000)
public void test49() throws Throwable {
boolean boolean0 = Utils.isalnum(2474);
assertFalse(boolean0);
}
}
| [
"[email protected]"
] | |
169859571784db1b313fbb26589d1a8f7fecbaf3 | b7e948ffd0a9b56a8cc98487862197d1312dc66d | /src/main/java/com/soft/service/package-info.java | 2eb6280fa5a27b81c405efa873d09bac0a1ad99d | [] | no_license | jhorber95/soaint | 053def0050cd85b4292bafede4842010fe6f7069 | 0705a43c1f07cfd2c9384974a327d3bca379e9ba | refs/heads/master | 2022-12-16T00:45:18.721177 | 2020-09-24T05:55:11 | 2020-09-24T05:55:11 | 298,128,237 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 58 | java | /**
* Service layer beans.
*/
package com.soft.service;
| [
"[email protected]"
] | |
c4e64287008143e6687c9ebe8cd0f572f46e593c | 7469cfc6a37a6467238b1c1189f0458c59ea87e1 | /gemini-core/src/test/java/it/at7/gemini/api/RestAPIControllerListTest.java | d94441301deff0a063ddd91e5d0280b559a4562e | [
"Apache-2.0"
] | permissive | HubBucket-Team/gemini | 72a1e20e6da343aa4a75dd7c906ed507e0e0990c | e13bba5c55e7c56d6e48db37b18662bc190bc257 | refs/heads/master | 2020-06-30T18:19:31.761270 | 2019-08-06T15:39:02 | 2019-08-06T15:39:02 | 200,908,468 | 1 | 1 | null | 2019-08-06T19:01:34 | 2019-08-06T19:01:34 | null | UTF-8 | Java | false | false | 9,905 | java | package it.at7.gemini.api;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import it.at7.gemini.UnitTestBase;
import it.at7.gemini.core.EntityRecord;
import it.at7.gemini.core.Services;
import it.at7.gemini.core.entitymanager.TestData;
import org.junit.Assert;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.springframework.test.web.servlet.MvcResult;
import java.util.List;
import java.util.Map;
import static it.at7.gemini.api.ApiUtility.GEMINI_API_META_TYPE;
import static it.at7.gemini.api.ApiUtility.GEMINI_HEADER;
import static it.at7.gemini.core.FilterContextBuilder.*;
import static org.springframework.http.MediaType.APPLICATION_JSON;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public abstract class RestAPIControllerListTest extends UnitTestBase {
@Test
public void n1_getList() throws Exception {
// lets save 10 entity records
for (int i = 1; i <= 10; i++) {
EntityRecord entityRecord = TestData.getTestDataTypeEntityRecord("logKey-" + i);
Services.getEntityManager().putIfAbsent(entityRecord);
}
MvcResult result = mockMvc.perform(get(API_PATH + "/TestDataType")
.contentType(APPLICATION_JSON)
.accept(APPLICATION_JSON))
.andExpect(status().isOk())
.andReturn();
String stringResponseBody = result.getResponse().getContentAsString();
List<Map<String, Object>> listRecord = new ObjectMapper().readValue(stringResponseBody,
new TypeReference<List<Map<String, Object>>>() {
});
Assert.assertEquals(10, listRecord.size());
// with gemini API Data Type - default limit
mockMvc.perform(get(API_PATH + "/TestDataType")
.header(GEMINI_HEADER, GEMINI_API_META_TYPE)
.contentType(APPLICATION_JSON)
.accept(APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(content()
.json("{'meta':{'limit': 100}}"));
}
@Test
public void n2_getListDefaultLimit() throws Exception {
// lets save other 100 records
for (int i = 100; i < 200; i++) {
EntityRecord entityRecord = TestData.getTestDataTypeEntityRecord("logKey-" + i);
Services.getEntityManager().putIfAbsent(entityRecord);
}
MvcResult result = mockMvc.perform(get(API_PATH + "/TestDataType")
.contentType(APPLICATION_JSON)
.accept(APPLICATION_JSON))
.andExpect(status().isOk())
.andReturn();
String stringResponseBody = result.getResponse().getContentAsString();
List<Map<String, Object>> listRecord = new ObjectMapper().readValue(stringResponseBody,
new TypeReference<List<Map<String, Object>>>() {
});
Assert.assertEquals(100, listRecord.size());
// no need to check the limit - done in n1
}
@Test
public void n3_getListLimitParameter() throws Exception {
for (int i = 2000; i < 2050; i++) {
EntityRecord entityRecord = TestData.getTestDataTypeEntityRecord("logKey-" + i);
entityRecord.put("numberLong", i);
Services.getEntityManager().putIfAbsent(entityRecord);
}
MvcResult result = mockMvc.perform(get(API_PATH + "/TestDataType")
.param(LIMIT_PARAMETER, "30")
.contentType(APPLICATION_JSON)
.accept(APPLICATION_JSON))
.andExpect(status().isOk())
.andReturn();
String stringResponseBody = result.getResponse().getContentAsString();
List<Map<String, Object>> listRecord = new ObjectMapper().readValue(stringResponseBody,
new TypeReference<List<Map<String, Object>>>() {
});
Assert.assertEquals(30, listRecord.size());
// gemini Api Meta - have limit
mockMvc.perform(get(API_PATH + "/TestDataType")
.param(LIMIT_PARAMETER, "30")
.header(GEMINI_HEADER, GEMINI_API_META_TYPE)
.contentType(APPLICATION_JSON)
.accept(APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(content()
.json("{'meta':{'limit': 30}}"));
}
@Test
public void n4_getLisNoLimit() throws Exception {
MvcResult result = mockMvc.perform(get(API_PATH + "/TestDataType")
.param(LIMIT_PARAMETER, "0")
.contentType(APPLICATION_JSON)
.accept(APPLICATION_JSON))
.andExpect(status().isOk())
.andReturn();
String stringResponseBody = result.getResponse().getContentAsString();
List<Map<String, Object>> listRecord = new ObjectMapper().readValue(stringResponseBody,
new TypeReference<List<Map<String, Object>>>() {
});
// the sum of the previously inserted records
Assert.assertEquals(160, listRecord.size());
// gemini Api Meta - no limit
mockMvc.perform(get(API_PATH + "/TestDataType")
.param(LIMIT_PARAMETER, "0")
.header(GEMINI_HEADER, GEMINI_API_META_TYPE)
.contentType(APPLICATION_JSON)
.accept(APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(content()
.json("{'meta':{}}"));
}
@Test
public void n5_getLisLimitPlusStart() throws Exception {
MvcResult result = mockMvc.perform(get(API_PATH + "/TestDataType")
.param(LIMIT_PARAMETER, "50")
.param(START_PARAMETER, "150")
.contentType(APPLICATION_JSON)
.accept(APPLICATION_JSON))
.andExpect(status().isOk())
.andReturn();
String stringResponseBody = result.getResponse().getContentAsString();
List<Map<String, Object>> listRecord = new ObjectMapper().readValue(stringResponseBody,
new TypeReference<List<Map<String, Object>>>() {
});
// the sum of the previously inserted records - from 150 to 160 are 10
Assert.assertEquals(10, listRecord.size());
// gemini Api Meta
mockMvc.perform(get(API_PATH + "/TestDataType")
.param(LIMIT_PARAMETER, "50")
.param(START_PARAMETER, "150")
.header(GEMINI_HEADER, GEMINI_API_META_TYPE)
.contentType(APPLICATION_JSON)
.accept(APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(content()
.json("{'meta':{'limit': 50, 'start': 150}}"));
}
@Test
public void n6_getLisLimitPlusStartAndOrderBy() throws Exception {
// DESCENDING
MvcResult result = mockMvc.perform(get(API_PATH + "/TestDataType")
.param(ORDER_BY_PARAMETER, "-numberLong")
.contentType(APPLICATION_JSON)
.accept(APPLICATION_JSON))
.andExpect(status().isOk())
.andReturn();
String stringResponseBody = result.getResponse().getContentAsString();
List<Map<String, Object>> listRecord = new ObjectMapper().readValue(stringResponseBody,
new TypeReference<List<Map<String, Object>>>() {
});
// the default limit
Assert.assertEquals(100, listRecord.size());
for (int i = 0; i < 50; i++) {
Map<String, Object> theRec = listRecord.get(i);
int numberLong = (int) theRec.get("numberLong");
Assert.assertEquals(2049 - i, numberLong);
}
mockMvc.perform(get(API_PATH + "/TestDataType")
.param(ORDER_BY_PARAMETER, "-numberLong")
.header(GEMINI_HEADER, GEMINI_API_META_TYPE)
.contentType(APPLICATION_JSON)
.accept(APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(content()
.json("{'meta':{'limit': 100, orderBy: ['-numberLong']}}"));
// ASCENDING
result = mockMvc.perform(get(API_PATH + "/TestDataType")
.param(ORDER_BY_PARAMETER, "numberLong")
.param(LIMIT_PARAMETER, "0")
.contentType(APPLICATION_JSON)
.accept(APPLICATION_JSON))
.andExpect(status().isOk())
.andReturn();
stringResponseBody = result.getResponse().getContentAsString();
listRecord = new ObjectMapper().readValue(stringResponseBody,
new TypeReference<List<Map<String, Object>>>() {
});
// no limit
Assert.assertEquals(160, listRecord.size());
for (int i = 110; i < 160; i++) {
Map<String, Object> theRec = listRecord.get(i);
int numberLong = (int) theRec.get("numberLong");
// from 2000 to 2049 (inserted in n3)
Assert.assertEquals(2000 + i - 110, numberLong);
}
mockMvc.perform(get(API_PATH + "/TestDataType")
.param(ORDER_BY_PARAMETER, "numberLong")
.header(GEMINI_HEADER, GEMINI_API_META_TYPE)
.contentType(APPLICATION_JSON)
.accept(APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(content()
.json("{'meta':{orderBy: ['numberLong']}}"));
}
}
| [
"[email protected]"
] | |
311ded9da82b62f4ae645ac084831fddbd88a9f8 | 8e49cfa0708afa49d702676393010935eb2b7109 | /app/src/main/java/com/example/musicapp/Model/MusicModel.java | ba57cf08a19c6772c7350587da14165a658ce9c7 | [] | no_license | quannm18/MusicApp | 05ab60983497b8f6c66b4a0156d9f63d30186164 | 7180dae78ab504cd3be0a0e642ca5be6c529b704 | refs/heads/master | 2023-08-25T03:25:02.644337 | 2021-11-01T10:38:09 | 2021-11-01T10:38:09 | 423,420,991 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 515 | java | package com.example.musicapp.Model;
public class MusicModel {
private String title;
private int link;
public MusicModel(String title, int link) {
this.title = title;
this.link = link;
}
public MusicModel() {
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public int getLink() {
return link;
}
public void setLink(int link) {
this.link = link;
}
}
| [
"[email protected]"
] | |
76592f3974981630d49bd231f20ffe987891eb97 | 2aad4286fc6f7dcd413dedbc46a8bb272b13153b | /ChatServerSelector.java | 415efc0221a6636a19d69bac9bd01562220f2f2f | [] | no_license | ifat-github/chat-selectors | 11db1421785ad681105d0334e94ebdf0ab20ae7e | 56f32dfb1d3ffcf69b69f5a6813da7c16a01affc | refs/heads/master | 2020-07-03T22:52:57.034980 | 2019-08-13T06:24:07 | 2019-08-13T06:24:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,503 | java | package il.co.ilrd.chatselectors;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
public class ChatServerSelector {
private Selector selector;
private ServerSocketChannel socket;
private int port;
private InetSocketAddress address;
private List<SocketChannel> clients;
private boolean run;
public ChatServerSelector(int port) {
this.port = port;
this.run = true;
clients = new ArrayList<>();
try {
selector = Selector.open();
} catch (IOException e) {
e.printStackTrace();
}
}
public void run() {
try {
socket = ServerSocketChannel.open();
address = new InetSocketAddress("10.1.0.178", port);
socket.bind(address);
socket.configureBlocking(false);
int ops = socket.validOps();
socket.register(selector, ops, null);
while (run) {
selector.select();
Set<SelectionKey> keys = selector.selectedKeys();
Iterator<SelectionKey> keysIterator = keys.iterator();
while (keysIterator.hasNext()) {
SelectionKey myKey = keysIterator.next();
SocketChannel client;
if (myKey.isAcceptable()) {
client = socket.accept();
client.configureBlocking(false);
client.register(selector, SelectionKey.OP_READ);
clients.add(client);
} else if (myKey.isReadable()) {
client = (SocketChannel) myKey.channel();
ByteBuffer buffer = ByteBuffer.allocate(1024);
client.read(buffer);
String result = new String(buffer.array());
if (result.equals("exit")) {
clients.remove(client);
}
byte[] byteMessage = result.getBytes();
buffer = ByteBuffer.wrap(byteMessage);
for (int i = 0; i < clients.size(); i++) {
clients.get(i).write(buffer);
buffer.rewind();
}
}
keysIterator.remove();
}
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
socket.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
public static void main(String[] args) {
ChatServerSelector server = new ChatServerSelector(8900);
server.run();
try {
Thread.sleep(20000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
} | [
"[email protected]"
] | |
f54a060fad73e7e257cf1f91eba8a6aaff3b8bb0 | e502c0f869a9c8b62741a212d34f2a2178761c83 | /APT_Eclipse_Plugin/src/com/tencent/wstt/apt/chart/TableAllDataObserver.java | cae3b9ae838c510102914b93479bb9d04b9987a9 | [] | no_license | 8enet/GT | 40931a65a1adaaea9898c2d82d674c36e0e205e1 | 0aff1f13b3540eafcba2e97281faa8df1160ec8d | refs/heads/master | 2020-12-28T22:00:48.695550 | 2016-11-25T08:13:20 | 2016-11-25T08:13:20 | 56,823,109 | 5 | 3 | null | 2016-11-25T08:13:20 | 2016-04-22T03:18:54 | Java | UTF-8 | Java | false | false | 4,066 | java | /**
* Tencent is pleased to support the open source community by making APT available.
* Copyright (C) 2014 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/
package com.tencent.wstt.apt.chart;
import java.util.Arrays;
import java.util.Date;
import org.eclipse.jface.viewers.TableViewer;
import com.tencent.wstt.apt.data.GeneralStatisticsDataInfo;
/**
* @Description CPU内存统计表格观察者
* @date 2013年11月10日 下午5:33:23
*
*/
public class TableAllDataObserver extends Observer {
private TableViewer viewer;
private long testCount = 0;
private GeneralStatisticsDataInfo[] statisticsDatas = null;
private int pkgNumber = 0;
private int dataNumber = 0;
public TableAllDataObserver(TableViewer viewer, String[] pkgNames, String[] datas)
{
this.viewer = viewer;
this.pkgNumber = pkgNames.length;
this.dataNumber = datas.length;
int allDataNumber = pkgNumber*dataNumber;//总数据条数
statisticsDatas = new GeneralStatisticsDataInfo[allDataNumber];
if(datas.length == 1)
{
for(int i = 0; i < pkgNumber; i++)
{
statisticsDatas[i] = new GeneralStatisticsDataInfo();
statisticsDatas[i].itemName = pkgNames[i];
Arrays.fill(statisticsDatas[i].contents, 0);
}
}
else
{
for(int i = 0; i < pkgNumber; i++)
{
for(int j = 0; j < dataNumber; j++)
{
statisticsDatas[i*dataNumber+j] = new GeneralStatisticsDataInfo();
statisticsDatas[i*dataNumber+j].itemName = pkgNames[i] + "_" + datas[j];
}
}
}
//清空之前的数据;不能用下面的这种方式,主要是因为用到了过滤功能,过滤以为这数据结构发生了变化
//this.viewer.setInput(null);
//this.viewer.add(curDatas);
this.viewer.setInput(null);
}
@Override
public void update(Date time, Number[] datas) {
if(testCount == 0)
{
for(int i = 0; i < datas.length; i++)
{
//对于第一个值,除了DValue,其他值都等于第一个值
for(int j = 0; j < GeneralStatisticsDataInfo.VALUE_NUMBER; j++)
{
statisticsDatas[i].contents[j] = datas[i].longValue();
}
statisticsDatas[i].contents[GeneralStatisticsDataInfo.DVALUE_INDEX] = 0;
}
}
else
{
for(int i = 0; i < datas.length; i++)
{
long curValue = datas[i].longValue();
statisticsDatas[i].contents[GeneralStatisticsDataInfo.CURVALUE_INDEX] = curValue;
statisticsDatas[i].contents[GeneralStatisticsDataInfo.DVALUE_INDEX] = curValue - statisticsDatas[i].contents[GeneralStatisticsDataInfo.FIRST_INDEX];
statisticsDatas[i].contents[GeneralStatisticsDataInfo.SUM_INDEX] = statisticsDatas[i].contents[GeneralStatisticsDataInfo.SUM_INDEX] + curValue;
statisticsDatas[i].contents[GeneralStatisticsDataInfo.AVGVALUE_INDEX] = statisticsDatas[i].contents[GeneralStatisticsDataInfo.SUM_INDEX]/(testCount+1);
statisticsDatas[i].contents[GeneralStatisticsDataInfo.MAXVALUE_INDEX] = Math.max(statisticsDatas[i].contents[GeneralStatisticsDataInfo.MAXVALUE_INDEX], curValue);
statisticsDatas[i].contents[GeneralStatisticsDataInfo.MINVALUE_INDEX] = Math.min(statisticsDatas[i].contents[GeneralStatisticsDataInfo.MINVALUE_INDEX], curValue);
}
}
testCount++;
if(!viewer.getTable().isDisposed())
{
viewer.getTable().getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
if(!viewer.getTable().isDisposed())
{
// viewer.update(curDatas, null);
viewer.setInput(statisticsDatas);
viewer.refresh();
}
}
});
}
}
}
| [
"[email protected]"
] | |
781fc37c7ae48e02ba210a89c5069e06c1891a1d | d0e74ff6e8d37984cea892dfe8508e2b44de5446 | /logistics-wms-city-1.1.3.44.5/logistics-wms-city-dal/src/main/java/com/yougou/logistics/city/dal/mapper/ItemPackMapper.java | 85ded8d4124c0ee1e1a004667cfdeb5c7387f4a2 | [] | no_license | heaven6059/wms | fb39f31968045ba7e0635a4416a405a226448b5a | 5885711e188e8e5c136956956b794f2a2d2e2e81 | refs/heads/master | 2021-01-14T11:20:10.574341 | 2015-04-11T08:11:59 | 2015-04-11T08:11:59 | 29,462,213 | 1 | 4 | null | null | null | null | UTF-8 | Java | false | false | 802 | java | /*
* 类名 com.yougou.logistics.city.dal.mapper.ItemPackMapper
* @author luo.hl
* @date Wed Oct 09 19:26:37 CST 2013
* @version 1.0.0
* @copyright (C) 2013 YouGou Information Technology Co.,Ltd
* All Rights Reserved.
*
* The software for the YouGou technology development, without the
* company's written consent, and any other individuals and
* organizations shall not be used, Copying, Modify or distribute
* the software.
*
*/
package com.yougou.logistics.city.dal.mapper;
import java.util.List;
import java.util.Map;
import com.yougou.logistics.base.common.exception.DaoException;
import com.yougou.logistics.base.dal.database.BaseCrudMapper;
public interface ItemPackMapper extends BaseCrudMapper {
public List<Map<String, String>> selectPackSpec() throws DaoException;
} | [
"[email protected]"
] | |
fdad8ce34055e2f402697b470a813e9030b368e7 | 1b9ccc6f1c7320b6160d43146242192d0f54499f | /heima-leadnews/heima-leadnews-admin/src/main/java/com/heima/admin/controller/AdArticleStatisticsController.java | 17ccbc1de0ba33b1da6b418508838e6e342ff1b3 | [] | no_license | xlaity/leadnews | c61adc5ff83f5f784236be7d62cbe381cbd2955a | ff5b485ed62fa7d04cf01f12623d4671d4c82e6a | refs/heads/master | 2023-07-12T08:56:42.679156 | 2021-08-19T09:18:47 | 2021-08-19T09:18:47 | 397,841,803 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 953 | java | package com.heima.admin.controller;
import com.heima.admin.service.AdArticleStatisticsService;
import com.heima.common.controller.AbstractController;
import com.heima.model.admin.pojos.AdArticleStatistics;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 文章数据统计表 控制器</p>
* @author heima
* @since 2021-07-21
*/
@RestController
@RequestMapping("/api/adArticleStatistics")
public class AdArticleStatisticsController extends AbstractController<AdArticleStatistics>{
private AdArticleStatisticsService adArticleStatisticsService;
//注入
@Autowired
public AdArticleStatisticsController(AdArticleStatisticsService adArticleStatisticsService) {
super(adArticleStatisticsService);
this.adArticleStatisticsService=adArticleStatisticsService;
}
}
| [
"[email protected]"
] | |
41939d2346a1419c8e6caf9641b315579500ca89 | e45bdfe09f5abddcccbcbf44ca532729c6480123 | /老版本eclipse/xxxxxx/从入门到精通/xxxxx/Huffman.java | 8e89675896efaffb79b819bb9cff2993ea8d43e4 | [] | no_license | 18222137497/Learning-path | 71417330650c326637290cbbb9c77375a284b94f | 12a415ffce3ba8528666792ad99b8c9e6f9d107f | refs/heads/master | 2023-03-12T06:37:09.380592 | 2021-02-23T10:18:32 | 2021-02-23T10:18:32 | 303,752,409 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,130 | java | package xxxxx;
import java.awt.Color;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.util.Scanner;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
public class Huffman extends JFrame {
public Huffman() {
setTitle("哈夫曼编码器");
setBounds(100, 100, 600, 400);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container c = getContentPane();
c.setLayout(null);
JLabel jl = new JLabel("请输入字符个数:");
jl.setBounds(10, 10, 120, 30);
JLabel jl1 = new JLabel("请输入编码字符:");
jl1.setBounds(10, 40, 120, 30);
JLabel arr = new JLabel("");
c.add(arr);
JTextField jt = new JTextField("");
jt.setBounds(120, 10, 160, 30);
jt.addFocusListener(new FocusListener() {
public void focusLost(FocusEvent e) {
Object obj = e.getSource();
JTextField jtt = (JTextField) obj;
try {
Integer.parseInt(jtt.getText());
arr.setText("✔");
} catch (Exception e2) {
arr.setText("输入的不是整形数字");
}
}
public void focusGained(FocusEvent e) {
arr.setText("内容格式为:");
arr.setBounds(300, 10, 160, 30);
}
});
jt.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Object obj = e.getSource();
JTextField jtt = (JTextField) obj;
try {
Integer.parseInt(jtt.getText());
arr.setText("✔");
} catch (Exception e2) {
arr.setText("输入的不是整形数字");
}
}
});
JLabel arr1 = new JLabel("");
c.add(arr1);
JTextField jt1 = new JTextField();
jt1.setBounds(120, 40, 160, 30);
jt1.addFocusListener(new FocusListener() {
public void focusLost(FocusEvent e) {
Object obj = e.getSource();
JTextField jtt = (JTextField) obj;
try {
Integer.parseInt(jtt.getText());
arr1.setText("✔");
} catch (Exception e2) {
arr1.setText("输入的不是整形数字");
}
}
public void focusGained(FocusEvent e) {
arr1.setText("内容格式为:");
arr1.setBounds(300, 40, 160, 30);
}
});
jt1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Object obj = e.getSource();
JTextField jtt = (JTextField) obj;
try {
Integer.parseInt(jtt.getText());
arr1.setText("✔");
} catch (Exception e2) {
arr1.setText("输入的不是整形数字");
}
}
});
c.add(jt1);
JLabel arr3 = new JLabel();
arr3.setText("内容格式为:");
JTextField jt3 = new JTextField("");
jt3.setBounds(120, 70, 160, 30);
jt3.addFocusListener(new FocusListener() {
public void focusLost(FocusEvent e) {
Object obj = e.getSource();
JTextField jtt = (JTextField) obj;
try {
Integer.parseInt(jtt.getText());
arr3.setText("✔");
} catch (Exception e2) {
arr3.setText("输入的不是整形数字");
}
}
@Override
public void focusGained(FocusEvent e) {
arr3.setText("内容格式为:");
arr3.setBounds(300, 70, 160, 30);
}
});
jt3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Object obj = e.getSource();
JTextField jtt = (JTextField) obj;
try {
Integer.parseInt(jtt.getText());
arr3.setText("✔");
} catch (Exception e2) {
arr3.setText("输入的不是整形数字");
}
}
});
c.add(jt3);
c.add(arr3);
JLabel jl2 = new JLabel("请输入对应频数:");
jl2.setBounds(10, 70, 120, 30);
JButton jb = new JButton("编码");
jb.setBounds(120, 120, 80, 80);
jb.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(Huffman.this, "字符与编码的关系如下:");
}
});
c.add(jl);
c.add(jt);
c.add(jl1);
c.add(jl2);
c.add(jb);
setVisible(true);
}
// 主函数
public static void main(String[] args) {
new Huffman();
}
}
| [
"[email protected]"
] | |
dc2207bc6fe6ca09aeff086960599d2ac6404112 | 6ff52bc312befa1b7c0a6354791786e4cf5a7d7f | /app/src/main/java/br/edu/iff/pooa20181/trabalho04_2018_1/CaminhaoFragment.java | 65182a5bf2d96d0edf5ad1a5b2a6bee8c4870941 | [] | no_license | mbissonho/Trabalho04-2018-1 | 7c9fc5eee70551dcdc6234f8d5e2e59f6cbd1a51 | 98b41fda61e8cae0ef90f66074c33b5df3a93b72 | refs/heads/master | 2020-03-27T15:01:55.927213 | 2018-09-03T20:53:10 | 2018-09-03T20:53:10 | 146,694,084 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,204 | java | package br.edu.iff.pooa20181.trabalho04_2018_1;
import android.app.AlertDialog;
import android.content.Context;
import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.Toast;
import java.util.List;
import br.edu.iff.pooa20181.trabalho04_2018_1.model.Ano;
import br.edu.iff.pooa20181.trabalho04_2018_1.model.Marca;
import br.edu.iff.pooa20181.trabalho04_2018_1.model.Modelo;
import br.edu.iff.pooa20181.trabalho04_2018_1.model.ModeloAno;
import br.edu.iff.pooa20181.trabalho04_2018_1.model.Veiculo;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class CaminhaoFragment extends Fragment {
private Button btnView;
private Context ctx;
private List<Marca> listMarca = null;
private List<Modelo> listModelo = null;
private List<Ano> listAno = null;
private Veiculo veiculo;
private Spinner brandSpinner;
private Spinner modelSpinner;
private Spinner yearSpinner;
private Marca currentBrand = null;
private Modelo currentModel = null;
private Ano currentYear = null;
private AlertDialog.Builder dialog;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_caminhao, container, false);
this.bind(view);
FIPEUserAPI fipeUserAPI = FIPEUserAPI.retrofit.create(FIPEUserAPI.class);
Call<List<Marca>> listMarcaCall = fipeUserAPI.getMarcas("caminhoes");
listMarcaCall.enqueue(new Callback<List<Marca>>() {
@Override
public void onResponse(Call<List<Marca>> call, Response<List<Marca>> response) {
int code = response.code();
if(code == 200){
CaminhaoFragment.this.listMarca = response.body();
int size = CaminhaoFragment.this.listMarca.size();
String[] brands = new String[size];
for(int i = 0; i < size; i++){
brands[i] = CaminhaoFragment.this.listMarca.get(i).getNome();
}
ArrayAdapter<String> adpt = new ArrayAdapter<String>(CaminhaoFragment.this.ctx, R.layout.support_simple_spinner_dropdown_item, brands);
CaminhaoFragment.this.brandSpinner.setAdapter(adpt);
}else {
Toast.makeText(CaminhaoFragment.this.ctx, "Erro. Não foi possível obter as informações!",Toast.LENGTH_SHORT).show();
}
}
@Override
public void onFailure(Call<List<Marca>> call, Throwable t) {
}
});
this.setListeners();
return view;
}
private void bind(View view){
this.ctx = getContext();
this.btnView = view.findViewById(R.id.btnView);
this.brandSpinner = view.findViewById(R.id.brandSpinner);
this.modelSpinner = view.findViewById(R.id.modelSpinner);
this.yearSpinner = view.findViewById(R.id.yearSpinner);
this.btnView.setEnabled(false);
this.brandSpinner.setEnabled(false);
this.modelSpinner.setEnabled(false);
this.yearSpinner.setEnabled(false);
Toast.makeText(CaminhaoFragment.this.ctx, "Aguarde...",Toast.LENGTH_SHORT).show();
}
private void setListeners(){
this.brandSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
Toast.makeText(CaminhaoFragment.this.ctx, "Marca selecionada!",Toast.LENGTH_SHORT).show();
CaminhaoFragment.this.getCurrentMarca();
FIPEUserAPI fipeUserAPI = FIPEUserAPI.retrofit.create(FIPEUserAPI.class);
Call<ModeloAno> listModeloCall = fipeUserAPI.getModelos("caminhoes", Integer.toString(CaminhaoFragment.this.currentBrand.getCodigo()));
listModeloCall.enqueue(new Callback<ModeloAno>() {
@Override
public void onResponse(Call<ModeloAno> call, Response<ModeloAno> response) {
int code = response.code();
if(code == 200){
ModeloAno modeloAno = response.body();
CaminhaoFragment.this.listModelo = modeloAno.getModelos();
int size = CaminhaoFragment.this.listModelo.size();
String[] models = new String[size];
for(int i = 0; i < size; i++){
models[i] = CaminhaoFragment.this.listModelo.get(i).getNome();
}
ArrayAdapter<String> adpt = new ArrayAdapter<String>(CaminhaoFragment.this.ctx, R.layout.support_simple_spinner_dropdown_item, models);
CaminhaoFragment.this.modelSpinner.setAdapter(adpt);
}else {
Toast.makeText(CaminhaoFragment.this.ctx, "Erro. Não foi possível obter as informações!",Toast.LENGTH_SHORT).show();
}
}
@Override
public void onFailure(Call<ModeloAno> call, Throwable t) {
Log.d("FAILURE: ",t.getMessage());
}
});
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
this.modelSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
Toast.makeText(CaminhaoFragment.this.ctx, "Modelo selecionado!",Toast.LENGTH_SHORT).show();
CaminhaoFragment.this.getCurrentModelo();
FIPEUserAPI fipeUserAPI = FIPEUserAPI.retrofit.create(FIPEUserAPI.class);
String marca, modelo;
marca = Integer.toString(CaminhaoFragment.this.currentBrand.getCodigo());
modelo = Integer.toString(CaminhaoFragment.this.currentModel.getCodigo());
Call<List<Ano>> listAnoCall = fipeUserAPI.getAnos("caminhoes",marca,modelo);
listAnoCall.enqueue(new Callback<List<Ano>>() {
@Override
public void onResponse(Call<List<Ano>> call, Response<List<Ano>> response) {
int code = response.code();
if(code == 200){
CaminhaoFragment.this.listAno = response.body();
int size = CaminhaoFragment.this.listAno.size();
String[] years = new String[size];
for(int i = 0; i < size; i++){
years[i] = CaminhaoFragment.this.listAno.get(i).getNome();
}
ArrayAdapter<String> adpt = new ArrayAdapter<String>(CaminhaoFragment.this.ctx, R.layout.support_simple_spinner_dropdown_item, years);
CaminhaoFragment.this.yearSpinner.setAdapter(adpt);
CaminhaoFragment.this.unlock();
}else {
Toast.makeText(CaminhaoFragment.this.ctx, "Erro. Não foi possível obter as informações!",Toast.LENGTH_SHORT).show();
}
}
@Override
public void onFailure(Call<List<Ano>> call, Throwable t) {
Log.d("FAILURE: ",t.getMessage());
}
});
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
this.btnView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(CaminhaoFragment.this.ctx, "Veículo selecionado!",Toast.LENGTH_SHORT).show();
CaminhaoFragment.this.getCurrentAno();
FIPEUserAPI fipeUserAPI = FIPEUserAPI.retrofit.create(FIPEUserAPI.class);
String marca, modelo, ano;
marca = Integer.toString(CaminhaoFragment.this.currentBrand.getCodigo());
modelo = Integer.toString(CaminhaoFragment.this.currentModel.getCodigo());
ano = CaminhaoFragment.this.currentYear.getCodigo();
Call<Veiculo> veiculoCall = fipeUserAPI.getVeiculo("caminhoes",marca,modelo,ano);
veiculoCall.enqueue(new Callback<Veiculo>() {
@Override
public void onResponse(Call<Veiculo> call, Response<Veiculo> response) {
int code = response.code();
if(code == 200){
CaminhaoFragment.this.veiculo = response.body();
Veiculo veiculo = CaminhaoFragment.this.veiculo;
String message =
"Valor: "+veiculo.getValor()+"\n"+
"Marca: "+veiculo.getMarca()+"\n"+
"Modelo: "+veiculo.getModelo()+"\n"+
"AnoModelo: "+veiculo.getAnoModelo()+"\n"+
"Combustivel: "+veiculo.getCombustivel()+"\n"+
"CodigoFipe: "+veiculo.getCodigoFipe()+"\n"+
"MesReferencia: "+veiculo.getMesReferencia()+"\n"+
"TipoVeiculo: "+veiculo.getTipoVeiculo()+"\n"+
"SiglaCombustivel: "+veiculo.getSiglaCombustivel();
dialog = new AlertDialog.Builder(CaminhaoFragment.this.ctx);
dialog.setTitle("Caminhão Pesquisado");
dialog.setMessage(message);
dialog.setNeutralButton("OK",null);
dialog.show();
}else {
Toast.makeText(CaminhaoFragment.this.ctx, "Erro. Não foi possível obter as informações!",Toast.LENGTH_SHORT).show();
}
}
@Override
public void onFailure(Call<Veiculo> call, Throwable t) {
Log.d("FAILURE: ",t.getMessage());
}
});
}
});
}
private void getCurrentMarca(){
for(Marca brand : this.listMarca){
if(this.brandSpinner.getSelectedItem().toString().equals(brand.getNome().toString())){
this.currentBrand = brand;
}
}
}
private void getCurrentModelo(){
for(Modelo model : this.listModelo){
if(this.modelSpinner.getSelectedItem().toString().equals(model.getNome().toString())){
this.currentModel = model;
}
}
}
private void getCurrentAno(){
for(Ano year : this.listAno){
if(this.yearSpinner.getSelectedItem().toString().equals(year.getNome().toString())){
this.currentYear = year;
}
}
}
private void lock(){
this.btnView.setEnabled(false);
this.brandSpinner.setEnabled(false);
this.modelSpinner.setEnabled(false);
this.yearSpinner.setEnabled(false);
}
private void unlock(){
this.btnView.setEnabled(true);
this.brandSpinner.setEnabled(true);
this.modelSpinner.setEnabled(true);
this.yearSpinner.setEnabled(true);
}
}
| [
"[email protected]"
] | |
bee2de3376678b759682393d881cb303bae8851b | a72c559f74aeb6fde09c16210f03ec9626a9c590 | /gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/java/lang/ClassLoader.java | 149b2c4f4d62c1d180354b847b9bec022d3f9d0a | [
"Apache-2.0"
] | permissive | ManfredTremmel/gwt-bean-validators | 4437b40f5987243af47124416ad661aa246ce6cf | fed075f8746efd471e0a486de5f9aafd5716bd29 | refs/heads/master | 2021-04-15T04:54:50.749984 | 2020-02-22T21:21:57 | 2020-02-22T21:21:57 | 28,275,474 | 32 | 6 | Apache-2.0 | 2020-02-22T21:21:22 | 2014-12-20T18:37:01 | Java | UTF-8 | Java | false | false | 8,955 | java | package java.lang;
import com.google.gwt.core.client.JavaScriptObject;
import java.io.InputStream;
import java.net.URL;
import java.util.Objects;
/**
* This stripped down ClassLoader class is simply here to give us cross-platform support for code
* that might need a valid classloader.
*
* <p>
* xapi-gwt-reflect does call into the one and only system classloader, to define mappings of
* java-names to runtime classes, in order to enable Class.forName() and ClassLoader.loadClass();
* </p>
*
* @author "James X. Nelson ([email protected])"
*
*/
public class ClassLoader {
// The parent class loader for delegation
private final ClassLoader parent;
// A JSO with all known classes;
// We access this value via reflection in ConstPool#extractClasses
private final JavaScriptObject classes = JavaScriptObject.createObject(); // NOPMD
/**
* Creates a new class loader using the specified parent class loader for delegation.
*
* @param parent The parent class loader
*/
protected ClassLoader(final ClassLoader parent) {
this.parent = parent;
}
/**
* Creates a new class loader using the <tt>ClassLoader</tt> returned by the method
* {@link #getSystemClassLoader() <tt>getSystemClassLoader()</tt>} as the parent class loader.
*/
protected ClassLoader() {
this(getSystemClassLoader());
}
// -- Class --
/**
* Loads the class with the specified <a href="#name">binary name</a>. This method searches for
* classes in the same manner as the {@link #loadClass(String, boolean)} method. It is invoked by
* the Java virtual machine to resolve class references. Invoking this method is equivalent to
* invoking {@link #loadClass(String, boolean) <tt>loadClass(name,
* false)</tt>}.
* </p>
*
* @param name The <a href="#name">binary name</a> of the class
*
* @return The resulting <tt>Class</tt> object
*
* @throws ClassNotFoundException If the class was not found
*/
public Class<?> loadClass(final String name) throws ClassNotFoundException {
return this.loadClass(name, false);
}
/**
* Loads the class with the specified <a href="#name">binary name</a>. The default implementation
* of this method searches for classes in the following order:
*
* <ol>
* <li>
* <p>
* Invoke {@link #findLoadedClass(String)} to check if the class has already been loaded.
* </p>
* </li>
*
* <li>
* <p>
* Invoke the {@link #loadClass(String) <tt>loadClass</tt>} method on the parent class loader. If
* the parent is <tt>null</tt> the class loader built-in to the virtual machine is used, instead.
* </p>
* </li>
*
* <li>
* <p>
* Invoke the {@link #findClass(String)} method to find the class.
* </p>
* </li>
*
* </ol>
*
* <p>
* If the class was found using the above steps, and the <tt>resolve</tt> flag is true, this
* method will then invoke the {@link #resolveClass(Class)} method on the resulting <tt>Class</tt>
* object.
* </p>
*
* <p>
* Subclasses of <tt>ClassLoader</tt> are encouraged to override {@link #findClass(String)},
* rather than this method.
* </p>
*
* @param name The <a href="#name">binary name</a> of the class
*
* @param resolve If <tt>true</tt> then resolve the class
*
* @return The resulting <tt>Class</tt> object
*
* @throws ClassNotFoundException If the class could not be found
*/
protected Class<?> loadClass(final String name, final boolean resolve)
throws ClassNotFoundException {
// First, check if the class has already been loaded
Class<?> clazz = null; // TODO: reimplement this goodness findLoadedClass(name);
if (clazz == null) {
try {
if (this.parent == null) {
// clazz = findBootstrapClassOrNull(name);
} else {
clazz = this.parent.loadClass(name, false);
}
} catch (final ClassNotFoundException e) { // NOPMD
// ClassNotFoundException thrown if class not found
// from the non-null parent class loader
}
if (clazz == null) {
// If still not found, then invoke findClass in order
// to find the class.
clazz = this.findClass(name);
}
}
// if (resolve) {
// resolveClass(c);
// }
return clazz;
}
// This method is invoked by the virtual machine to load a class.
private Class<?> loadClassInternal(final String name) throws ClassNotFoundException {
return this.loadClass(name);
}
/**
* Finds the class with the specified <a href="#name">binary name</a>. This method should be
* overridden by class loader implementations that follow the delegation model for loading
* classes, and will be invoked by the {@link #loadClass <tt>loadClass</tt>} method after checking
* the parent class loader for the requested class. The default implementation throws a
* <tt>ClassNotFoundException</tt>.
* </p>
*
* @param name The <a href="#name">binary name</a> of the class
*
* @return The resulting <tt>Class</tt> object
*
* @throws ClassNotFoundException If the class could not be found
*
* @since 1.2
*/
protected Class<?> findClass(final String name) throws ClassNotFoundException {
throw new ClassNotFoundException(name);
}
/**
* Our ClassLoader doesn't actually load anything; it just holds a jso mapping from class name to
* class object.
*/
public final native Class<?> defineClass(String name, Class<?> cls)
/*-{
[email protected]::classes[name] = cls;
return cls;
}-*/;
/**
* Finds a class with the specified <a href="#name">binary name</a>, loading it if necessary.
*
* <p>
* This method loads the class through the system class loader (see
* {@link #getSystemClassLoader()}). The <tt>Class</tt> object returned might have more than one
* <tt>ClassLoader</tt> associated with it. Subclasses of <tt>ClassLoader</tt> need not usually
* invoke this method, because most class loaders need to override just
* {@link #findClass(String)}.
* </p>
*
* @param name The <a href="#name">binary name</a> of the class
*
* @return The <tt>Class</tt> object for the specified <tt>name</tt>
*
* @throws ClassNotFoundException If the class could not be found
*
* @see #ClassLoader(ClassLoader)
* @see #getParent()
*/
protected final Class<?> findSystemClass(final String name) throws ClassNotFoundException {
return getSystemClassLoader().loadClass(name);
}
/**
* No-op for compatibility.
*/
protected final void setSigners(final Class<?> pclass, final Object[] signers) {
// do nothing
}
// -- Resource --
public URL getResource(final String name) {
// TODO return a magic url backed by an IO request
return null;
}
/**
* Unsupported.
*/
public InputStream getResourceAsStream(final String name) {
throw new UnsupportedOperationException();
// URL url = getResource(name);
// try {
// return url != null ? url.openStream() : null;
// } catch (IOException e) {
// return null;
// }
}
/**
* Unsupported.
*/
public static InputStream getSystemResourceAsStream(final String name) {
throw new UnsupportedOperationException();
// URL url = getSystemResource(name);
// try {
// return url != null ? url.openStream() : null;
// } catch (IOException e) {
// return null;
// }
}
/**
* Returns the parent class loader for delegation. Some implementations may use <tt>null</tt> to
* represent the bootstrap class loader. This method will return <tt>null</tt> in such
* implementations if this class loader's parent is the bootstrap class loader.
*
*/
public final ClassLoader getParent() {
return this.parent;
}
private static ClassLoader cl;
/**
* get system class loader.
*
* @return ClassLoader
*/
public static ClassLoader getSystemClassLoader() {
if (cl == null) { // NOPMD
cl = new ClassLoader(null);
}
return cl;
}
// Returns true if the specified class loader can be found in this class
// loader's delegation chain.
@SuppressWarnings("checkstyle:rightCurly")
boolean isAncestor(final ClassLoader cl) {
ClassLoader acl = this;
do {
acl = acl.parent;
if (Objects.equals(cl, acl)) {
return true;
}
} while (acl != null);
return false;
}
// Returns the invoker's class loader, or null if none.
// NOTE: This must always be invoked when there is exactly one intervening
// frame from the core libraries on the stack between this method's
// invocation and the desired invoker.
static ClassLoader getCallerClassLoader() {
return getSystemClassLoader();
}
// Invoked in the java.lang.Runtime class to implement load and loadLibrary.
static void loadLibrary(final Class<?> fromClass, final String name, final boolean isAbsolute) {}
}
| [
"[email protected]"
] | |
8f6439646e0151e92f5319bd61cc244a6733d924 | 3267ab1845045da02541288013f7aabce622e827 | /src/main/java/observer/Main.java | 7f5297367a202b1af755684d96a7cf46480e0e8c | [] | no_license | kunaksergey/PatternsJava | f7c409b2e1a62f74223cbed3d4a30ee9dd82302b | 834e51a8f4873268750984eaf6ec0c6a55f8fad5 | refs/heads/master | 2016-08-10T06:37:59.357550 | 2016-03-24T18:17:46 | 2016-03-24T18:17:46 | 54,216,299 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 631 | java | package observer;
/**
* Created by sa on 16.03.16.
*/
public class Main {
public static void main(String[] args) {
Main main=new Main();
main.test();
}
void test(){
WeatherObserver weatherObserver=new WeatherObserver();
weatherObserver.addObserver(new ForecatDisplay());
weatherObserver.addObserver(new StaticsDisplay());
weatherObserver.addObserver(new CurentConditionsDisplay());
weatherObserver.setMeasurements (80, 65, 30.4f);
weatherObserver.setMeasurements (82, 70, 29.2f);
weatherObserver.setMeasurements (78, 90, 29.2f);
}
}
| [
"[email protected]"
] | |
68479ee44805232cc0d421cc1c21bb4d26d03694 | 913f0e3011b74ab75be48201392318917bf83b71 | /Code/app/src/main/java/com/example/user/worktime/Helpers/ActivityFetcher.java | 8fcc534aa110e5ceeb85be7dd1ac237496c64daa | [] | no_license | HelNi/androidProject | eaf1acbc1dcd29ccd2c8e824d024be4fd59e37fa | 4c240e92014ea01d057d41fe1d00bc0c372453bd | refs/heads/master | 2020-12-02T22:49:53.491142 | 2017-07-19T08:27:58 | 2017-07-19T08:27:58 | 96,189,037 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 733 | java | package com.example.user.worktime.Helpers;
import com.example.user.worktime.Backend.BackendClient;
import com.example.user.worktime.Classes.TimeTable.Activity;
import java.util.List;
import retrofit2.Call;
/**
* Created by User on 17.07.2017.
*
* This could as well be done manually in an Activity.
*/
@Deprecated
public class ActivityFetcher {
public static Call<List<Activity>> getActivitiesAsync() {
// Asynchronously fetch activities. Sub-Views can register callbacks.
// This makes the request for activites every time because you can't enqueue multiple
// Callbacks on one Call object for some reason.
return BackendClient.getInstance().getActivityService().getActivities();
}
}
| [
"[email protected]"
] | |
1a3747ac0b2cac5ab3d034cd9450601c254ea734 | f01a77f6b471d8e1003ae3e3390e24c9dda558da | /Desktop/SWP391/New folder/Project/src/java/control/HomeServlet.java | 85dfc567d29d91f7cbfdb0a6572e393f68dffd1f | [] | no_license | mycode191/quanlysv_c- | afd7b7c86c7ff094ffc8500faad7b012e77372d7 | f81950478e22c3f9af11d23a369090b337fc2af5 | refs/heads/master | 2023-04-30T12:25:08.653054 | 2021-05-20T09:47:59 | 2021-05-20T09:47:59 | 368,990,193 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,516 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package control;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import model.Account;
/**
*
* @author HIEU19
*/
public class HomeServlet extends HttpServlet {
/**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
* methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
request.getRequestDispatcher("view/home.jsp").forward(request, response);
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/**
* Handles the HTTP <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Handles the HTTP <code>POST</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Returns a short description of the servlet.
*
* @return a String containing servlet description
*/
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}
| [
"[email protected]"
] | |
2531f7b6f48e5ebc906e26da885762b8afa1cad1 | f0e2dc567f5e1832a4abcd799c2eb95001fde3f1 | /sdk-services/src/main/java/com/manywho/sdk/services/database/FilterHelper.java | 8574a4bec1aa499a4e4259471509f6c8709414a7 | [
"MIT"
] | permissive | manywho/sdk-java | c801ab27ae40e9394abda4aae6ff4af02b4e6799 | ef4503ccbaa7eaebc9d88aa8bfc0386c8c5f658c | refs/heads/develop | 2023-08-06T09:00:32.495004 | 2021-01-28T11:27:44 | 2021-01-28T11:27:44 | 22,968,123 | 0 | 12 | null | 2021-07-07T02:30:39 | 2014-08-14T20:47:25 | Java | UTF-8 | Java | false | false | 1,242 | java | package com.manywho.sdk.services.database;
import com.manywho.sdk.services.types.Type;
import org.reflections.Reflections;
import javax.inject.Inject;
import java.lang.reflect.Field;
public class FilterHelper {
private final Reflections reflections;
@Inject
public FilterHelper(Reflections reflections) {
this.reflections = reflections;
}
/**
* Find the field name of a defined property on a Type, by the property name.
*
* @param type The ManyWho type in which to look for the property
* @param propertyName The name of the property defined in the ManyWho type to query by
* @return the name of the field that matched the property.
*/
public String findFieldName(Class<? extends Type> type, String propertyName) {
return reflections.getFieldsAnnotatedWith(Type.Property.class).stream()
.filter(field -> field.getDeclaringClass().equals(type))
.filter(field -> field.getAnnotation(Type.Property.class).name().equals(propertyName))
.map(Field::getName)
.findFirst()
.orElseThrow(() -> new RuntimeException("Unable to match a field to the property name " + propertyName));
}
}
| [
"[email protected]"
] | |
79cb14d32a051684a233e5bcffcdc6f871695052 | 5e085c346553d18ffd7e562633e6bf76648964d7 | /org.abreslav.grammatic.query/src/org/abreslav/grammatic/query/Query.java | e229aab69c0b168b3706edeadbd10891431821cc | [] | no_license | abreslav/grammatic | db3a2e7812b43c09c965b0a883f873453b969831 | 8b0e0ae9170522ed4ed500c16fa188928c75f26c | refs/heads/master | 2021-01-10T19:24:59.421314 | 2011-02-04T10:56:04 | 2011-02-04T10:56:04 | 32,310,060 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 386 | java | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.abreslav.grammatic.query;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Query</b></em>'.
* <!-- end-user-doc -->
*
*
* @see org.abreslav.grammatic.query.QueryPackage#getQuery()
* @generated
*/
public interface Query extends EObject {
} // Query
| [
"abreslav@localhost"
] | abreslav@localhost |
638b74edce7b49e154f0da48ef2a87ac506ff3ae | 95c49f466673952b465e19a5ee3ae6eff76bee00 | /src/main/java/com/airbnb/lottie/LottieImageAsset.java | 906e1f01e8f001d74f082c6cd9dff8485f863adc | [] | no_license | Phantoms007/zhihuAPK | 58889c399ae56b16a9160a5f48b807e02c87797e | dcdbd103436a187f9c8b4be8f71bdf7813b6d201 | refs/heads/main | 2023-01-24T01:34:18.716323 | 2020-11-25T17:14:55 | 2020-11-25T17:14:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,126 | java | package com.airbnb.lottie;
import android.graphics.Bitmap;
/* renamed from: com.airbnb.lottie.g */
/* compiled from: LottieImageAsset */
public class LottieImageAsset {
/* renamed from: a */
private final int f5339a;
/* renamed from: b */
private final int f5340b;
/* renamed from: c */
private final String f5341c;
/* renamed from: d */
private final String f5342d;
/* renamed from: e */
private final String f5343e;
/* renamed from: f */
private Bitmap f5344f;
public LottieImageAsset(int i, int i2, String str, String str2, String str3) {
this.f5339a = i;
this.f5340b = i2;
this.f5341c = str;
this.f5342d = str2;
this.f5343e = str3;
}
/* renamed from: a */
public String mo10809a() {
return this.f5341c;
}
/* renamed from: b */
public String mo10811b() {
return this.f5342d;
}
/* renamed from: c */
public Bitmap mo10812c() {
return this.f5344f;
}
/* renamed from: a */
public void mo10810a(Bitmap bitmap) {
this.f5344f = bitmap;
}
}
| [
"[email protected]"
] | |
e529e15ce7e8afdab613e15530f0d194494fc8a6 | f0f4c71b671cec3558f267417a91a56a7e2f4aaa | /src/multiplex/Test.java | 6e7c70b400458f8f5148cfff9c7d99f96f0339cb | [] | no_license | JakePrim/thinkInJava | 9a790b5525d28f2afc5c46f6751e8f063b1f71f9 | 891898441726e1fb671991e9a8a98f0d81a62eb3 | refs/heads/master | 2020-04-16T04:34:42.684438 | 2019-01-27T05:54:43 | 2019-01-27T05:54:43 | 165,273,340 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,356 | java | package multiplex;
import javafx.application.Application;
import javafx.stage.Stage;
public class Test extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
Music music = new Music();
Wind wind = new Wind();
AS as = new AS();
music.tune(wind);
music.a(as);
music.a(wind);
}
//final 有助于提高性能
public enum Note {
MIDDLE_C, C_SHARP, B_FlAT
}
class Insturment {
public void play(Note b) {
System.out.println("Insturment play :" + b);
}
public void aujst(){
System.out.println("Insturment.aujst");
}
}
class Wind extends Insturment {
public void play(Note b) {
System.out.println("Wind.play():" + b);
}
@Override
public void aujst() {
System.out.println("Wind.aujst");
}
}
class AS extends Insturment{
@Override
public void aujst() {
System.out.println("AS.aujst");
}
}
class Music {
public void tune(Insturment insturment) {
insturment.play(Note.B_FlAT);
}
public void a(Insturment insturment){
insturment.aujst();
}
}
}
| [
"prim"
] | prim |
566880ecf189a9ecf1352285da53dba15b7c4832 | 33d2cb3de7eee7d47dc499a20037ae4f23d28fd0 | /packages/apps/CAN/src/com/can/parser/raise/toyota/ReToyotaProtocol.java | 77d0f3bad5026818221be59089a94fa7ababf66c | [] | no_license | lvxiaojia/yecon | 0e139c9dddac12a71d55184bb10eaa658c3b906f | 87658d255c405802d906be389353ef2b2e828d59 | refs/heads/master | 2020-05-18T05:31:19.781960 | 2018-06-07T05:11:17 | 2018-06-07T05:11:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 33,954 | java | package com.can.parser.raise.toyota;
import android.os.Message;
import com.can.assist.CanKey;
import com.can.parser.DDef;
import com.can.parser.DDef.AirInfo;
import com.can.parser.DDef.BaseInfo;
import com.can.parser.DDef.CarInfo;
import com.can.parser.DDef.CurOilInfo;
import com.can.parser.DDef.IntantOilInfo;
import com.can.parser.DDef.OilVatteryInfo;
import com.can.parser.DDef.PowerAmplifier;
import com.can.parser.DDef.RadarInfo;
import com.can.parser.DDef.SetInfo;
import com.can.parser.DDef.SystemInfo;
import com.can.parser.DDef.TPMSInfo;
import com.can.parser.DDef.VehicleSettings;
import com.can.parser.DDef.VerInfo;
import com.can.parser.DDef.WheelInfo;
import com.can.parser.DDef.WheelKeyInfo;
import com.can.parser.raise.ReProtocol;
import com.can.services.CanTxRxStub;
import com.can.tool.DataConvert;
/**
* ClassName:ReToyotaProtocol
*
* @function:睿志城丰田协议
* @author Kim
* @Date: 2016-6-4 上午10:27:30
* @Copyright: Copyright (c) 2016
* @version 1.0
*/
public class ReToyotaProtocol extends ReProtocol {
/**
* 协议数据类型定义 丰田全兼容平台 ver2.2
*/
// Slave -> Host
public static final byte DATA_TYPE_WHEEL_KEY_INFO = (byte) 0x20; // 方向盘按键信息
public static final byte DATA_TYPE_TRIP_INFORMATION_MIN_OIL = (byte) 0x21; // 每分钟油耗
public static final byte DATA_TYPE_TRIP_INFORMATION_INSTANT_OIL = (byte) 0x22; // 瞬时油耗信息
public static final byte DATA_TYPE_TRIP_INFORMATION_HISTORY_OIL = (byte) 0x23; // HISTORY
// 历史油耗信息
public static final byte DATA_TYPE_BASE_INFO = (byte) 0x24; // 基本信息
public static final byte DATA_TYPE_TPMS_INFO = (byte) 0x25; // TPMS 信息
public static final byte DATA_TYPE_VEHICLE_SETTINGS = (byte) 0x26; // VEHICLE
public static final byte DATA_TYPE_PANAL_KEY = (byte) 0x51; // VEHICLE
public static final byte DATA_TYPE_SETTINGS_INFO = (byte) 0x52; // VEHICLE
// SETTINGS
public static final byte DATA_TYPE_TRIP_INFORMATION_15MIN_OIL = (byte) 0x27; // 15分钟油耗
public static final byte DATA_TYPE_AIR_INFO = (byte) 0x28; // 空调信息
public static final byte DATA_TYPE_WHEEL_INFO = (byte) 0x29; // EPS方向盘转角信息
public static final byte DATA_TYPE_VERSION_INFO = (byte) 0x30; // 版本信息
public static final byte DATA_TYPE_FUNC_INFO = (byte) 0x31; // 功放信息
public static final byte DATA_TYPE_SYSTEM_INFO = (byte) 0x32; // 系统信息
public static final byte DATA_TYPE_OILELE_FALG = (byte) 0x1f; // 油电混合指示
public static final byte DATA_TYPE_BACK_RADAR_INFO = (byte) 0x1E; // 后雷达信息
public static final byte DATA_TYPE_FRONT_RADAR_INFO = (byte) 0x1D; // 前雷达信息
public static final byte DATA_TYPE_CAR_INFO = (byte) 0x41; // 兼容欣朴丰田
// Host -> Slave
public static final byte DATA_TYPE_SETTING_REQUEST = (byte) 0x83; // 请求设定信息
public static final byte DATA_TYPE_INQUIRY_REQUEST = (byte) 0x90; // 请求设定信息
public static final byte DATA_TYPE_DSP_REQUEST = (byte) 0x84;
// 设定命令
// 灯光设置
public static final byte DAYTIME_RUNNING_LIGHTS = (byte) 0x04;
public static final byte HEADLAMPS_ON_SENSITIVITY = (byte) 0x06;
public static final byte HRADLAMPS_AUTO_SHUTDOWN_TIMER = (byte) 0x0C;
public static final byte INTERLAMPS_SHUTDOWN_SET = (byte) 0x07;
// 车锁设置
public static final byte AUTOLOCK_BY_SPEED = (byte) 0x00;
public static final byte AUTOLOCK_BY_SHIFT_FROM_P = (byte) 0x01;
public static final byte AUTOUNLOCK_BY_SHIFT_TO_P = (byte) 0x02;
public static final byte REMOTE_2_PRESS_UNLOCK = (byte) 0x03;
public static final byte LOCK_UNLOCK_FEEDBACK_TONE = (byte) 0x05;
public static final byte INCAR_LIGHT_CLOSE_TIME = (byte) 0x0C;
public static final byte REMOTE_2_KEY_UNLOCK = (byte) 0x0D;
public static final byte DRIVE_DOOR_LINKAGE_UNLOCK = (byte) 0x0E;
public static final byte SMART_DOOR_UNLOCK = (byte) 0x0F;
public static final byte SMART_CAR_LOCK_AND_A_BUTTON_TO_START = (byte) 0x10;
public static final byte LOCK_UNLOCK_LIGHT_FLASHING = (byte) 0x11;
public static final byte RADAR_TRACK_SET = (byte) 0x22;
public static final byte ELECTRIC_DOOR_AdJUST = (byte) 0x23;
// 空调设置
public static final byte AC_AUTO_LINKAGE = (byte) 0x12;
public static final byte CHANGE_AIR_LINKAGE = (byte) 0x13;
public static final byte AUTO_LOCK_TIME = (byte) 0x14;
public static final byte SET_RADAR_VOL = (byte) 0x15;
public static final byte SET_FUEL_UNIT = (byte) 0x24;
public static final byte CLEAR_CUR_TRIP_INFORMATION = (byte) 0x0A;
public static final byte CLEAR_HISTORY_TRIP_INFORMATION = (byte) 0x09;
public static final byte UPDATA_HISTORY_TRIP_INFORMATION = (byte) 0x08;
// 按键类型
public class KeyCode {
public static final byte KEY_CODE_NONE = (byte) 0x00;
public static final byte KEY_CODE_VOL_UP = (byte) 0x01;
public static final byte KEY_CODE_VOL_DOWN = (byte) 0x02;
public static final byte KEY_CODE_SRC_RIGHT = (byte) 0x03;
public static final byte KEY_CODE_SRC_LEFT = (byte) 0x04;
public static final byte KEY_CODE_SRC1 = (byte) 0x07;
public static final byte KEY_CODE_SPEECH = (byte) 0x08;
public static final byte KEY_CODE_PICKUP = (byte) 0x09;
public static final byte KEY_CODE_HANGUP = (byte) 0x0a;
public static final byte KEY_CODE_OTHER = (byte) 0x0b;
public static final byte KEY_CODE_SRC_UP = (byte) 0x13;
public static final byte KEY_CODE_SRC_DOWN = (byte) 0x14;
public static final byte KEY_CODE_BACK = (byte) 0x15;
public static final byte KEY_CODE_ENTER = (byte) 0x16;
public static final byte KEY_CODE_VOL_UP_1 = (byte) 0x81;
public static final byte KEY_CODE_VOL_DOWN_1 = (byte) 0x82;
public static final byte KEY_CODE_CH_FLD_UP = (byte) 0x83;
public static final byte KEY_CODE_CH_FLD_DOWN = (byte) 0x84;
public static final byte KEY_CODE_TUNE_TRACK_UP = (byte) 0x85;
public static final byte KEY_CODE_TUNE_TRACK_DOWN = (byte) 0x86;
public static final byte KEY_CODE_PWR = (byte) 0x87;
public static final byte KEY_CODE_MODE = (byte) 0x88;
}
public CarInfo parseTripInfoMinOil(byte[] packet, CarInfo carInfo) {
int cursor = 3; // 跳过 2E、Data Type、Length字段
byte Data0 = (byte) packet[cursor];
byte Data1 = (byte) packet[cursor + 1];
byte Data2 = (byte) packet[cursor + 2];
byte Data3 = (byte) packet[cursor + 3];
byte Data4 = (byte) packet[cursor + 4];
byte Data5 = (byte) packet[cursor + 5];
byte Data6 = (byte) packet[cursor + 6];
carInfo.mAverageSpeedMin = (float) ((DataConvert.byteToInt(Data0) * 256 + DataConvert.byteToInt(Data1)) * 0.1);
carInfo.mElapsedTimeMin = DataConvert.byteToInt(Data2) * 256 + DataConvert.byteToInt(Data3);
carInfo.mCruisingRangeMin = DataConvert.byteToInt(Data4) * 256 + DataConvert.byteToInt(Data5);
carInfo.mUintMin = Data6;
return carInfo;
}
public IntantOilInfo parseTripInfoInstantOil(byte[] packet,
IntantOilInfo intantOilInfo) {
int cursor = 3; // 跳过 2E、Data Type、Length字段
byte Data0 = (byte) packet[cursor];
byte Data1 = (byte) packet[cursor + 1];
byte Data2 = (byte) packet[cursor + 2];
intantOilInfo.mIntantConsumeOilUint = Data0;
intantOilInfo.mIntantConsumeOil = (float) ((DataConvert.byteToInt(Data1) * 256 + DataConvert.byteToInt(Data2)) * 0.1);
return intantOilInfo;
}
public CarInfo parseTripInfoHistoryOil(byte[] packet, CarInfo carInfo) {
int cursor = 3; // 跳过 2E、Data Type、Length字段
byte Data0 = (byte) packet[cursor];
byte Data1 = (byte) packet[cursor + 1];
byte Data2 = (byte) packet[cursor + 2];
byte Data3 = (byte) packet[cursor + 3];
byte Data4 = (byte) packet[cursor + 4];
byte Data5 = (byte) packet[cursor + 5];
byte Data6 = (byte) packet[cursor + 6];
byte Data7 = (byte) packet[cursor + 7];
byte Data8 = (byte) packet[cursor + 8];
byte Data9 = (byte) packet[cursor + 9];
byte Data10 = (byte) packet[cursor + 10];
byte Data11 = (byte) packet[cursor + 11];
byte Data12 = (byte) packet[cursor + 12];
carInfo.mHistoryOilUnit = Data0;
carInfo.mCurrentHistoryOil = (float) ((DataConvert.byteToInt(Data1) * 256 + DataConvert.byteToInt(Data2)) * 0.1);
carInfo.mTripFuel1 = (float) ((DataConvert.byteToInt(Data3) * 256 + DataConvert.byteToInt(Data4)) * 0.1);
carInfo.mTripFuel2 = (float) ((DataConvert.byteToInt(Data5) * 256 + DataConvert.byteToInt(Data6)) * 0.1);
carInfo.mTripFuel3 = (float) ((DataConvert.byteToInt(Data7) * 256 + DataConvert.byteToInt(Data8)) * 0.1);
carInfo.mTripFuel4 = (float) ((DataConvert.byteToInt(Data9) * 256 + DataConvert.byteToInt(Data10)) * 0.1);
carInfo.mTripFuel5 = (float) ((DataConvert.byteToInt(Data11) * 256 + DataConvert.byteToInt(Data12)) * 0.1);
return carInfo;
}
public TPMSInfo parseTPMSInfo(byte[] packet, TPMSInfo tpmsInfo) {
int cursor = 3; // 跳过 2E、Data Type、Length字段
byte Data0 = (byte) packet[cursor];
byte Data1 = (byte) packet[cursor + 1];
byte Data2 = (byte) packet[cursor + 2];
byte Data3 = (byte) packet[cursor + 3];
byte Data4 = (byte) packet[cursor + 4];
byte Data5 = (byte) packet[cursor + 5];
tpmsInfo.mIsExistDevice = (byte) ((Data0 >> 7) & 0x1);
tpmsInfo.mIsNormal = (byte) ((Data0 >> 6) & 0x1);
tpmsInfo.mShowSpareTire = (byte) ((Data0 >> 5) & 0x1);
tpmsInfo.mTireShowMode = (byte) ((Data0 >> 2) & 0x1);
tpmsInfo.mTpmsUnit = (byte) ((Data0) & 0x3);
tpmsInfo.mFLTirePressure = DataConvert.byteToInt(Data1);
tpmsInfo.mFRTirePressure = DataConvert.byteToInt(Data2);
tpmsInfo.mBLTirePressure = DataConvert.byteToInt(Data3);
tpmsInfo.mBRTirePressure = DataConvert.byteToInt(Data4);
tpmsInfo.mSpareTirePressure = DataConvert.byteToInt(Data5);
return tpmsInfo;
}
public VehicleSettings parseVehicleSettingsInfo(byte[] packet,
VehicleSettings vehicleSettingInfo) {
int cursor = 3; // 跳过 2E、Data Type、Length字段
byte Data0 = (byte) packet[cursor];
byte Data1 = (byte) packet[cursor + 1];
byte Data2 = (byte) packet[cursor + 2];
byte Data3 = (byte) packet[cursor + 3];
vehicleSettingInfo.mDayTimeRunningLights = (byte) ((Data0 >> 7) & 0x1);
vehicleSettingInfo.mHeadlampsOnSensitivity = (byte) ((Data0 >> 4) & 0x7);
vehicleSettingInfo.mLightsOffTimer = (byte) ((Data0 >> 2) & 0x3);
vehicleSettingInfo.mHeadlampsAutoOFFTimer = (byte) ((Data0 >> 0) & 0x3);
vehicleSettingInfo.mAutoLockBySpeed = (byte) ((Data1 >> 7) & 0x1);
vehicleSettingInfo.mAutoLockBySHIFTFORMP = (byte) ((Data1 >> 6) & 0x1);
vehicleSettingInfo.mAutoLockBySHIFTToP = (byte) ((Data1 >> 5) & 0x1);
vehicleSettingInfo.mRemote2PressUnlock = (byte) ((Data1 >> 4) & 0x1);
vehicleSettingInfo.mLockUnLockFeedBackTONE = (byte) ((Data1 >> 0) & 0x7);
vehicleSettingInfo.mLockHandleKeyTwoTimes = (byte) ((Data2 >> 7) & 0x1);
vehicleSettingInfo.mLockDrivingSeatOpenDoor = (byte) ((Data2 >> 6) & 0x1);
vehicleSettingInfo.mLockIntelligentDoor = (byte) ((Data2 >> 5) & 0x1);
vehicleSettingInfo.mLockIntelligentVehicle = (byte) ((Data2 >> 4) & 0x1);
vehicleSettingInfo.mUnLockFlash = (byte) ((Data2 >> 3) & 0x1);
vehicleSettingInfo.mElectricdooradjust = (byte)(Data2 & 0x7);
vehicleSettingInfo.mAirSwitchAndAutoLinkage = (byte) ((Data3 >> 7) & 0x1);
vehicleSettingInfo.mAirCircleAndAutoLinkage = (byte) ((Data3 >> 6) & 0x1);
vehicleSettingInfo.mAutoRelockTimer = (byte) (Data3 & 0x3);
return vehicleSettingInfo;
}
public CurOilInfo parseTripInformation15MinOil(byte[] packet,
CurOilInfo curOilInfo) {
int cursor = 3; // 跳过 2E、Data Type、Length字段
byte Data0 = (byte) packet[cursor];
byte Data1 = (byte) packet[cursor + 1];
byte Data2 = (byte) packet[cursor + 2];
byte Data3 = (byte) packet[cursor + 3];
byte Data4 = (byte) packet[cursor + 4];
byte Data5 = (byte) packet[cursor + 5];
byte Data6 = (byte) packet[cursor + 6];
byte Data7 = (byte) packet[cursor + 7];
byte Data8 = (byte) packet[cursor + 8];
byte Data9 = (byte) packet[cursor + 9];
byte Data10 = (byte) packet[cursor + 10];
byte Data11 = (byte) packet[cursor + 11];
byte Data12 = (byte) packet[cursor + 12];
byte Data13 = (byte) packet[cursor + 13];
byte Data14 = (byte) packet[cursor + 14];
byte Data15 = (byte) packet[cursor + 15];
byte Data16 = (byte) packet[cursor + 16];
byte Data17 = (byte) packet[cursor + 17];
byte Data18 = (byte) packet[cursor + 18];
byte Data19 = (byte) packet[cursor + 19];
byte Data20 = (byte) packet[cursor + 20];
byte Data21 = (byte) packet[cursor + 21];
byte Data22 = (byte) packet[cursor + 22];
byte Data23 = (byte) packet[cursor + 23];
byte Data24 = (byte) packet[cursor + 24];
byte Data25 = (byte) packet[cursor + 25];
byte Data26 = (byte) packet[cursor + 26];
byte Data27 = (byte) packet[cursor + 27];
byte Data28 = (byte) packet[cursor + 28];
byte Data29 = (byte) packet[cursor + 29];
byte Data30 = (byte) packet[cursor + 30];
curOilInfo.m15minOilFuelUint = Data0;
curOilInfo.m15minOilFuel_15 = (float) ((DataConvert.byteToInt(Data1) * 256 + DataConvert.byteToInt(Data2)) * 0.1);
curOilInfo.m15minOilFuel_14 = (float) ((DataConvert.byteToInt(Data3) * 256 + DataConvert.byteToInt(Data4)) * 0.1);
curOilInfo.m15minOilFuel_13 = (float) ((DataConvert.byteToInt(Data5) * 256 + DataConvert.byteToInt(Data6)) * 0.1);
curOilInfo.m15minOilFuel_12 = (float) ((DataConvert.byteToInt(Data7) * 256 + DataConvert.byteToInt(Data8)) * 0.1);
curOilInfo.m15minOilFuel_11 = (float) ((DataConvert.byteToInt(Data9) * 256 + DataConvert.byteToInt(Data10)) * 0.1);
curOilInfo.m15minOilFuel_10 = (float) ((DataConvert.byteToInt(Data11) * 256 + DataConvert.byteToInt(Data12)) * 0.1);
curOilInfo.m15minOilFuel_9 = (float) ((DataConvert.byteToInt(Data13) * 256 + DataConvert.byteToInt(Data14)) * 0.1);
curOilInfo.m15minOilFuel_8 = (float) ((DataConvert.byteToInt(Data15) * 256 + DataConvert.byteToInt(Data16)) * 0.1);
curOilInfo.m15minOilFuel_7 = (float) ((DataConvert.byteToInt(Data17) * 256 + DataConvert.byteToInt(Data18)) * 0.1);
curOilInfo.m15minOilFuel_6 = (float) ((DataConvert.byteToInt(Data19) * 256 + DataConvert.byteToInt(Data20)) * 0.1);
curOilInfo.m15minOilFuel_5 = (float) ((DataConvert.byteToInt(Data21) * 256 + DataConvert.byteToInt(Data22)) * 0.1);
curOilInfo.m15minOilFuel_4 = (float) ((DataConvert.byteToInt(Data23) * 256 + DataConvert.byteToInt(Data24)) * 0.1);
curOilInfo.m15minOilFuel_3 = (float) ((DataConvert.byteToInt(Data25) * 256 + DataConvert.byteToInt(Data26)) * 0.1);
curOilInfo.m15minOilFuel_2 = (float) ((DataConvert.byteToInt(Data27) * 256 + DataConvert.byteToInt(Data28)) * 0.1);
curOilInfo.m15minOilFuel_1 = (float) ((DataConvert.byteToInt(Data29) * 256 + DataConvert.byteToInt(Data30)) * 0.1);
return curOilInfo;
}
/**
*
* @Title:TempChange
* @Description: 空调温度,特殊值转换
*
*/
public float TempChange(byte data) {
float temp = 0.0f;
switch (data) {
case 0x20:
temp = 16f;
break;
case 0x21:
temp = 16.5f;
break;
case 0x22:
temp = 17f;
break;
case 0x23:
temp = 17.5f;
default:
break;
}
return temp;
}
public boolean isTempMinMax(byte temp) {
if (temp == 0x00 || temp == 0x1f || temp == 0xff)
return true;
return false;
}
public PowerAmplifier parsePowerAmplifier(byte[] packet,
PowerAmplifier powerAmp) {
int cursor = 3; // 跳过 2E、Data Type、Length字段
byte Data0 = (byte) packet[cursor];
byte Data1 = (byte) packet[cursor + 1];
byte Data2 = (byte) packet[cursor + 2];
byte Data3 = (byte) packet[cursor + 3];
byte Data4 = (byte) packet[cursor + 4];
powerAmp.mFAD = (byte) ((Data0 >> 4) & 0xF);
powerAmp.mBAL = (byte) ((Data0) & 0xF);
powerAmp.mBASS = (byte) ((Data1 >> 4) & 0xF);
powerAmp.mTRE = (byte) ((Data1) & 0xF);
powerAmp.mMID = (byte) ((Data2 >> 4) & 0xF);
powerAmp.mASL = (byte) ((Data2) & 0x0F);
powerAmp.mCurVol = Data3;
powerAmp.mVolByASL = (byte) ((Data4) & 0x01);
return powerAmp;
}
public SystemInfo parseSystemInfo(byte[] packet, SystemInfo sysInfo) {
int cursor = 3; // 跳过 2E、Data Type、Length字段
byte Data0 = (byte) packet[cursor];
sysInfo.mVehiclePowerAmplifier = (byte) ((Data0) & 0x1);
sysInfo.mBackseat = (byte) ((Data0 >> 1) & 0x1);
sysInfo.mPanoramicCamera = (byte) ((Data0 >> 2) & 0x1);
sysInfo.mPanoramicView = (byte) ((Data0 >> 3) & 0x1);
sysInfo.mVehiclePowerAmplifierSwitch = (byte) ((Data0 >> 6) & 0x1);
sysInfo.mMuteSwitch = (byte) ((Data0 >> 7) & 0x1);
return sysInfo;
}
public SetInfo parseSetInfo(byte[] packet, SetInfo setInfo){
int cursor = 3; // 跳过 2E、Data Type、Length字段
byte bydata = (byte) packet[cursor];
setInfo.mbyRadarDis = (byte)((bydata >> 7) & 0x1);
bydata = (byte) packet[cursor+1];
setInfo.mbyFuelUnit = (byte)((bydata >> 7) & 0x1);
bydata = (byte) packet[cursor+2];
setInfo.mbyColorTheme = (byte)(bydata & 0x7);
return setInfo;
}
public OilVatteryInfo parseOilVatteryInfo(byte[] packet,
OilVatteryInfo oilValInfo) {
int cursor = 3; // 跳过2E、Data Type、Length字段
byte Data0 = (byte) packet[cursor];
byte Data1 = (byte) packet[cursor + 1];
oilValInfo.mBatteryVoltage = (byte) ((Data0) & 0x7);
oilValInfo.mHybridEleVehicle = (byte) ((Data0 >> 7) & 0x1);
oilValInfo.mMotorDriveVattery = (byte) ((Data1) & 0x1);
oilValInfo.mMotorDriveWheel = (byte) ((Data1 >> 1) & 0x1);
oilValInfo.mEngineDriveMotor = (byte) ((Data1 >> 2) & 0x1);
oilValInfo.mEngineDriveWheel = (byte) ((Data1 >> 3) & 0x1);
oilValInfo.mVatteryDriveMotor = (byte) ((Data1 >> 4) & 0x1);
oilValInfo.mWheelDriveMotor = (byte) ((Data1 >> 5) & 0x1);
return oilValInfo;
}
public int GetTripInfoMinOilCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_TRIP_INFORMATION_MIN_OIL & 0xFF);
}
public int GetTripInfoInstantOilCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_TRIP_INFORMATION_INSTANT_OIL & 0xFF);
}
public int GetTripInfoHistoryOilCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_TRIP_INFORMATION_HISTORY_OIL & 0xFF);
}
public int GetTPMSCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_TPMS_INFO & 0xFF);
}
public int GetVehicleSettingsCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_VEHICLE_SETTINGS & 0xFF);
}
public int GetTripInfo15MinOilCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_TRIP_INFORMATION_15MIN_OIL & 0xFF);
}
public int GetPowerAmplifierCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_FUNC_INFO & 0xFF);
}
public int GetSystemInfoCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_SYSTEM_INFO & 0xFF);
}
public int GetOilEleInfoCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_OILELE_FALG & 0xFF);
}
/**
*
* @Title:GetLightSetData
* @Description: 灯光数据设置
*
*/
public static byte[] GetSettingData(byte CMD_ID, int value) {
byte[] datas = new byte[2];
datas[0] = CMD_ID;
datas[1] = (byte) value;
return datas;
}
@Override
public int GetAirInfoCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_AIR_INFO & 0xFF);
}
@Override
public int GetCarInfoCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_CAR_INFO & 0xFF);
}
@Override
public int GetBackRadarInfoCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_BACK_RADAR_INFO & 0xFF);
}
@Override
public int GetFrontRadarInfoCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_FRONT_RADAR_INFO & 0xFF);
}
@Override
public int GetBaseInfoCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_BASE_INFO & 0xFF);
}
@Override
public int GetVersionInfoCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_VERSION_INFO & 0xFF);
}
@Override
public int GetWheelInfoCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_WHEEL_INFO & 0xFF);
}
@Override
public int GetWheelKeyInfoCmdId() {
// TODO Auto-generated method stub
return (int) (DATA_TYPE_WHEEL_KEY_INFO & 0xFF);
}
public int GetSettingInfo(){
return (int) (DATA_TYPE_SETTINGS_INFO & 0xFF);
}
public int GetPanelkeyId(){
return (int) (DATA_TYPE_PANAL_KEY & 0xFF);
}
@Override
public CarInfo parseCarInfo(byte[] packet, CarInfo carInfo) {
// TODO Auto-generated method stub
int cursor = 3; // 跳过 2E、Data Type、Length字段
byte carData0 = (byte) packet[cursor];
if (carData0 == 0x01) {
// Data 1
byte carData1 = (byte) packet[cursor + 1];
carInfo.mHoodBoxDoor = (byte) ((carData1 >> 5) & 0x1);
carInfo.mTailBoxDoor = (byte) ((carData1 >> 4) & 0x1);
carInfo.mRightBackDoor = (byte) ((carData1 >> 3) & 0x1);
carInfo.mLeftBackDoor = (byte) ((carData1 >> 2) & 0x1);
carInfo.mRightFrontDoor = (byte) ((carData1 >> 1) & 0x1);
carInfo.mLeftFrontDoor = (byte) ((carData1 >> 0) & 0x1);
// Data2
byte carData2 = (byte) packet[cursor + 2];
carInfo.mHandbrake = (byte) ((carData2 >> 4) & 0x1);
carInfo.mGears = (byte) ((carData2) & 0xF);
// Data3 保留
// Data4
byte carData4 = (byte) packet[cursor + 4];
carInfo.mNearlyHeadlight = (byte) ((carData4 >> 7) & 0x1);
carInfo.mFarHeadlight = (byte) ((carData4 >> 6) & 0x1);
carInfo.mWidlelight = (byte) ((carData4 >> 5) & 0x1);
// Data5
byte carData5 = (byte) packet[cursor + 5];
carInfo.mBackCarLight = (byte) ((carData5 >> 7) & 0x1);
carInfo.mBrakeLight = (byte) ((carData5 >> 6) & 0x1);
carInfo.mLeftTurnLight = (byte) ((carData5 >> 4) & 0x1);
carInfo.mRightTurnLight = (byte) ((carData5 >> 5) & 0x1);
carInfo.mWarningLight = (byte) ((carData5 >> 3) & 0x1);
carInfo.mBackFogLamp = (byte) ((carData5 >> 2) & 0x1);
carInfo.mFontFogLamp = (byte) ((carData5 >> 1) & 0x1);
// Data6
byte carData6 = (byte) packet[cursor + 5];
carInfo.mBackDoorLockState = (byte) ((carData6 >> 2) & 0x1);
carInfo.mFrontLeftDoorLockState = (byte) ((carData6 >> 1) & 0x1);
carInfo.mFrontRightDoorLockState = (byte) ((carData6 >> 0) & 0x1);
} else if (carData0 == 0x02) {
byte carData1 = (byte) packet[cursor + 1];
byte carData2 = (byte) packet[cursor + 2];
byte carData3 = (byte) packet[cursor + 3];
byte carData4 = (byte) packet[cursor + 4];
byte carData5 = (byte) packet[cursor + 5];
byte carData6 = (byte) packet[cursor + 6];
byte carData7 = (byte) packet[cursor + 7];
byte carData8 = (byte) packet[cursor + 8];
byte carData9 = (byte) packet[cursor + 9];
byte carData10 = (byte) packet[cursor + 10];
byte carData11 = (byte) packet[cursor + 11];
byte carData12 = (byte) packet[cursor + 12];
byte carData13 = (byte) packet[cursor + 13];
byte carData14 = (byte) packet[cursor + 14];
byte carData15 = (byte) packet[cursor + 15];
carInfo.mTotalMileage = DataConvert.byteToInt(carData1) * 65536
+ DataConvert.byteToInt(carData2) * 256 + DataConvert.byteToInt(carData3);
carInfo.mMileage = DataConvert.byteToInt(carData4) * 256 + DataConvert.byteToInt(carData5);
carInfo.mMileageA = DataConvert.byteToInt(carData6) * 65536
+ DataConvert.byteToInt(carData7) * 256 + DataConvert.byteToInt(carData8);
carInfo.mMileageB = DataConvert.byteToInt(carData9) * 65536
+ DataConvert.byteToInt(carData10) * 256 + DataConvert.byteToInt(carData11);
carInfo.mCurrentSpeed = (float) ((DataConvert.byteToInt(carData12) * 256 + DataConvert.byteToInt(carData13)) * 0.01);
carInfo.mAverageSpeed = (float) ((DataConvert.byteToInt(carData14) * 256 + DataConvert.byteToInt(carData15)) * 0.1);
} else if (carData0 == 0x03) {
byte carData1 = (byte) packet[cursor + 1];
byte carData2 = (byte) packet[cursor + 2];
byte carData7 = (byte) packet[cursor + 7];
carInfo.mRotationlSpeed = DataConvert.byteToInt(carData1) * 256
+ DataConvert.byteToInt(carData2);
carInfo.mOutCarTemp = DataConvert.byteToInt(carData7);
}
return carInfo;
}
private byte[] mbyAirInfo;
@Override
public AirInfo parseAirInfo(byte[] packet, AirInfo airInfo) {
// TODO Auto-generated method stub
int cursor = 3; // 跳过2E、Data Type、Length字段
// Data 0
byte airData0 = (byte) packet[cursor];
airInfo.mAiron = (byte) ((airData0 >> 7) & 0x1);
airInfo.mAcState = (byte) ((airData0 >> 6) & 0x1);
airInfo.mCircleState = (byte) ((airData0 >> 5) & 0x1);
airInfo.mAutoLight1 = (byte) DataConvert.GetBit(airData0, 4);
airInfo.mAutoLight2 = (byte) ((airData0 >> 3) & 0x1);
airInfo.mDaulLight = (byte) DataConvert.GetBit(airData0, 2);
// Data 1
cursor += 1;
byte airData1 = (byte) packet[cursor];
airInfo.mUpwardWind = (byte) ((airData1 >> 7) & 0x1);
airInfo.mParallelWind = (byte) ((airData1 >> 6) & 0x1);
airInfo.mDowmWind = (byte) ((airData1) >> 5 & 0x1);
airInfo.mDisplay = (byte) ((airData1) >> 4 & 0x1);
airInfo.mWindRate = (byte) ((airData1) & 0x07);
// Data 2
cursor += 1;
byte airData2 = (byte) packet[cursor];
int leftTemp = (int) (airData2 & 0xFF);
// Data 3
cursor += 1;
byte airData3 = (byte) packet[cursor];
int rightTemp = (int) (airData3 & 0xFF);
// Data 4
cursor += 1;
byte airData4 = (byte) packet[cursor];
airInfo.mFWDefogger = (byte) ((airData4 >> 7) & 0x1);
airInfo.mRearLight = (byte) ((airData4 >> 6) & 0x1);
airInfo.mAcMax = (byte) ((airData4 >> 3) & 0x1);
airInfo.mTempUnit = (byte) ((airData4 >> 0) & 0x1);
// 左边温度
if (airInfo.mTempUnit == 0x01) {
airInfo.mLeftTemp = leftTemp;
} else {
if (isTempMinMax(airData2)) {
if (airData2 == 0x1F) {
airInfo.mLeftTemp = 238f;
} else {
airInfo.mLeftTemp = leftTemp; // 0xEE ,自定义区别转换后的31度跟最大标识区别
}
} else {
airInfo.mLeftTemp = TempChange((byte) leftTemp);
if (airInfo.mLeftTemp == 0) {
airInfo.mLeftTemp = (float) (18 + (leftTemp - 1) * 0.5);
}
}
}
// 右边温度
if (airInfo.mTempUnit == 0x01) {
airInfo.mRightTemp = rightTemp;
} else {
if (isTempMinMax(airData3)) {
if (airData3 == 0x1F) {
airInfo.mRightTemp = 238f;
} else {
airInfo.mRightTemp = rightTemp; // 0xEE ,自定义区别转换后的31度跟最大标识区别
}
} else {
airInfo.mRightTemp = TempChange((byte) rightTemp);
if (airInfo.mRightTemp == 0) {
airInfo.mRightTemp = (float) (18 + (rightTemp - 1) * 0.5);
}
}
}
if (airInfo.mTempUnit == 0) {
airInfo.mMinTemp = 0;
airInfo.mMaxTemp = 238f;
}else {
airInfo.mMinTemp = 0;
airInfo.mMaxTemp = 254;
}
if (mbyAirInfo != null) {
airInfo.bAirUIShow = (!mbyAirInfo.equals(packet) &&
(airInfo.mAiron == 1) && (airInfo.mDisplay == 1)) ? true : false;
}
mbyAirInfo = packet;
return airInfo;
}
@Override
public RadarInfo parseRadarInfo(byte[] packet, RadarInfo radarInfo) {
// TODO Auto-generated method stub
int cursor = 0;
byte DataType = (byte) packet[cursor + 1];
cursor += 3; // 跳过 2E、Data Type、Length字段
if (DataType == DATA_TYPE_BACK_RADAR_INFO) {
radarInfo.mBackLeftDis = packet[cursor];
radarInfo.mBackLeftCenterDis = packet[cursor + 1];
radarInfo.mBackRightCenterDis = packet[cursor + 2];
radarInfo.mBackRightDis = packet[cursor + 3];
byte Data4 = packet[cursor + 4];
radarInfo.mRadarShowSwitch = (byte) ((Data4 >> 7) & 0x1);
radarInfo.mDistance = (byte) ((Data4 >> 6) & 0x1);
radarInfo.mRadarSwtich = (byte) ((Data4 >> 5) & 0x1);
radarInfo.mVol = (byte) ((Data4) & 0x7);
} else if (DataType == DATA_TYPE_FRONT_RADAR_INFO) {
radarInfo.mFrontLeftDis = packet[cursor];
radarInfo.mFrontLeftCenterDis = packet[cursor + 1];
radarInfo.mFrontRightCenterDis = packet[cursor + 2];
radarInfo.mFrontRightDis = packet[cursor + 3];
}
radarInfo.mbyRightShowType = 0;
return radarInfo;
}
@Override
public BaseInfo parseBaseInfo(byte[] packet, BaseInfo baseInfo) {
// TODO Auto-generated method stub
int cursor = 3; // 跳过 2E、Data Type、Length字段
byte Data0 = (byte) packet[cursor];
baseInfo.mRightFrontDoor = (byte) ((Data0 >> 7) & 0x1);
baseInfo.mLeftFrontDoor = (byte) ((Data0 >> 6) & 0x1);
baseInfo.mRightBackDoor = (byte) ((Data0 >> 5) & 0x1);
baseInfo.mLeftBackDoor = (byte) ((Data0 >> 4) & 0x1);
baseInfo.mTailBoxDoor = (byte) ((Data0 >> 3) & 0x1);
baseInfo.mTailElectricDoor = (byte) ((Data0 >> 2) & 0x1);
baseInfo.mTailElectricDoorDirect = (byte) ((Data0 >> 1) & 0x1);
// Data1
byte Data1 = (byte) packet[cursor + 1];
baseInfo.mIG = (byte) ((Data1 >> 1) & 0x1);
return baseInfo;
}
@Override
public VerInfo parseVersionInfo(byte[] packet) {
// TODO Auto-generated method stub
int cursor = 3; // 跳过 2E、Data Type、Length字段
VerInfo version = new VerInfo();
byte[] ver = new byte[16];
System.arraycopy(packet, cursor, ver, 0, 16);
version.mVersion = DataConvert.Bytes2Str(ver);
return version;
}
@Override
public WheelInfo parseWheelInfo(byte[] packet, WheelInfo wheelInfo) {
// TODO Auto-generated method stub
int cursor = 3; // 跳过 2E、Data Type、Length字段
byte data1 = (byte) packet[cursor + 1];
byte dire = (byte) (data1 >> 3 & 0x1);
short sWangle = DataConvert.byte2Short(packet, cursor);
System.out.println(sWangle);
if (dire == 1) { // 向右
sWangle = (short) -(((0xFFF - sWangle) + 1) * 40 / 380);
} else {
sWangle = (short) (sWangle * 40 / 380);
}
wheelInfo.mDirect = dire;
wheelInfo.mEps = sWangle;
return wheelInfo;
}
@Override
public WheelKeyInfo parseWheelKeyInfo(byte[] packet, WheelKeyInfo wheelInfo) {
// TODO Auto-generated method stub
int cursor = 3; // 跳过 2E、Data Type、Length字段
wheelInfo.mKeyCode = packet[cursor];
wheelInfo.mKeyStatus = packet[cursor + 1];
return TranslateKey(wheelInfo, false);
}
public WheelKeyInfo parsePanelkey(byte[] packet, WheelKeyInfo wheelKeyInfo){
int cursor = 3; // 跳过 2E、Data Type、Length字段
wheelKeyInfo.mKeyCode = packet[cursor];
wheelKeyInfo.mKeyStatus = packet[cursor + 1];
return TranslateKey(wheelKeyInfo,true);
}
private String mstrKeyCode = null;
public WheelKeyInfo TranslateKey(WheelKeyInfo wheelKeyInfo, boolean bPanalkey) {
// TODO Auto-generated method stub
switch (wheelKeyInfo.mKeyCode) {
case KeyCode.KEY_CODE_BACK:
wheelKeyInfo.mstrKeyCode = DDef.Back;
break;
case KeyCode.KEY_CODE_SRC_DOWN:
case KeyCode.KEY_CODE_CH_FLD_DOWN:
wheelKeyInfo.mstrKeyCode = DDef.Media_next;
break;
case KeyCode.KEY_CODE_TUNE_TRACK_DOWN:
if (bPanalkey) {
wheelKeyInfo.mKnobSteps = wheelKeyInfo.mKeyStatus;
wheelKeyInfo.mKeyStatus = CanKey.KEY_KNOB;
wheelKeyInfo.mstrKeyCode = DDef.Media_next;
}else {
wheelKeyInfo.mstrKeyCode = DDef.Media_next;
}
break;
case KeyCode.KEY_CODE_SRC_UP:
case KeyCode.KEY_CODE_CH_FLD_UP:
wheelKeyInfo.mstrKeyCode = DDef.Media_pre;
break;
case KeyCode.KEY_CODE_TUNE_TRACK_UP:
if (bPanalkey) {
wheelKeyInfo.mKnobSteps = wheelKeyInfo.mKeyStatus;
wheelKeyInfo.mKeyStatus = CanKey.KEY_KNOB;
wheelKeyInfo.mstrKeyCode = DDef.Media_pre;
}else {
wheelKeyInfo.mstrKeyCode = DDef.Media_pre;
}
break;
case KeyCode.KEY_CODE_ENTER:
wheelKeyInfo.mstrKeyCode = DDef.Enter;
break;
case KeyCode.KEY_CODE_HANGUP:
wheelKeyInfo.mstrKeyCode = DDef.Phone_hang;
break;
case KeyCode.KEY_CODE_MODE:
wheelKeyInfo.mstrKeyCode = DDef.Src_mode;
break;
case KeyCode.KEY_CODE_PICKUP:
wheelKeyInfo.mstrKeyCode = DDef.Phone_dial;
break;
case KeyCode.KEY_CODE_PWR:
wheelKeyInfo.mstrKeyCode = DDef.Power;
break;
case KeyCode.KEY_CODE_SPEECH:
wheelKeyInfo.mstrKeyCode = DDef.Volume_mute;
break;
case KeyCode.KEY_CODE_SRC1:
if (wheelKeyInfo.mKeyStatus == 0x02) {
wheelKeyInfo.mKeyStatus = CanKey.KEY_COMPLEX;
wheelKeyInfo.mstrKeyCode = DDef.Volume_mute;
}else {
wheelKeyInfo.mstrKeyCode = DDef.Src_mode;
}
break;
case KeyCode.KEY_CODE_SRC_LEFT:
wheelKeyInfo.mstrKeyCode = DDef.Media_pre;
break;
case KeyCode.KEY_CODE_SRC_RIGHT:
wheelKeyInfo.mstrKeyCode = DDef.Media_next;
break;
case KeyCode.KEY_CODE_VOL_DOWN:
wheelKeyInfo.mstrKeyCode = DDef.Volume_del;
break;
case KeyCode.KEY_CODE_VOL_DOWN_1:
if (bPanalkey) {
wheelKeyInfo.mKnobSteps = wheelKeyInfo.mKeyStatus;
wheelKeyInfo.mKeyStatus = CanKey.KEY_KNOB;
wheelKeyInfo.mstrKeyCode = DDef.Volume_del;
}else {
wheelKeyInfo.mstrKeyCode = DDef.Volume_del;
}
break;
case KeyCode.KEY_CODE_VOL_UP:
wheelKeyInfo.mstrKeyCode = DDef.Volume_add;
break;
case KeyCode.KEY_CODE_VOL_UP_1:
if (bPanalkey) {
wheelKeyInfo.mstrKeyCode = DDef.Volume_add;
wheelKeyInfo.mKnobSteps = wheelKeyInfo.mKeyStatus;
wheelKeyInfo.mKeyStatus = CanKey.KEY_KNOB;
}else {
wheelKeyInfo.mstrKeyCode = DDef.Volume_add;
}
break;
case KeyCode.KEY_CODE_OTHER:
wheelKeyInfo.mstrKeyCode = DDef.Src_home;
break;
}
if (wheelKeyInfo.mKeyCode != 0) {
mstrKeyCode = wheelKeyInfo.mstrKeyCode;
}
if (wheelKeyInfo.mKeyCode == 0) {
wheelKeyInfo.mstrKeyCode = mstrKeyCode;
mstrKeyCode = null;
}
return wheelKeyInfo;
}
@Override
public boolean IsSuportMeInfo() {
// TODO Auto-generated method stub
return true;
}
@Override
public Message getVolInfo(int iVol) {
// TODO Auto-generated method stub
byte[] bydata = new byte[2];
bydata[0] = 0x07;
bydata[1] = (byte) iVol;
return CanTxRxStub.getTxMessage(DATA_TYPE_DSP_REQUEST,
DATA_TYPE_DSP_REQUEST, bydata, this);
}
}
| [
"[email protected]"
] | |
80cffa4c0acde477c5f598f0060e7eb4aec2ce23 | 1b0f163e90a48f4b76e86503f5442ba0e250203f | /src/studentmanagementsystem/AssignedCoursesStudentController.java | 12f9c1f3b3405074037a58bbde75cb7380a768a1 | [] | no_license | imaadi01/StudentManagementSystem | 6df8ffc25d2fc6c5c6e514d33672677ff3db57a4 | fd3cb0a5d531337ea540f575ce6c3ef38a4defd9 | refs/heads/main | 2023-06-17T09:50:09.806984 | 2021-07-12T10:12:20 | 2021-07-12T10:12:20 | 385,205,230 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,772 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package studentmanagementsystem;
import Database_Connection.Database_Connection;
import com.mysql.cj.protocol.Resultset;
import java.net.URL;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ResourceBundle;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.ComboBox;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.control.cell.PropertyValueFactory;
/**
* FXML Controller class
*
* @author aadikumar
*/
public class AssignedCoursesStudentController implements Initializable {
@FXML
private TableView<StudentData> student_table;
@FXML
private TableColumn<StudentData, Integer> col_id;
@FXML
private TableColumn<StudentData, String> col_firstname;
@FXML
private TableColumn<StudentData, String> col_lastname;
@FXML
private TableColumn<StudentData, String> col_father;
@FXML
private TableColumn<StudentData, String> col_email;
@FXML
private TableColumn<StudentData, String> col_gender;
private ComboBox search_by_combobox;
private TextField search_entity;
ObservableList<StudentData> students = FXCollections.observableArrayList();
ObservableList<String> searchoptions = FXCollections.observableArrayList("STUDENT_ID","FIRST_NAME","LAST_NAME","FATHER_NAME","EMAIL","CONTACT_NUMBER");
/**
* Initializes the controller class.
*/
@Override
public void initialize(URL url, ResourceBundle rb) {
// TODO
search_by_combobox.setItems(searchoptions);
}
public void Students(int course_id,String teacher,String section,int semester)
{
Connection cn = new Database_Connection().Database_Connectivity();
String data="SELECT STUDENT_ID,FIRST_NAME,LAST_NAME,FATHER_NAME,EMAIL,GENDER FROM students,courses_enrolled WHERE students.STUDENT_ID=courses_enrolled.STUDENT AND COURSE_ID='"+course_id+"' AND courses_enrolled.SEMESTER='"+semester+"' AND courses_enrolled.SECTION='"+section+"' ";
try {
ResultSet resultset = cn.createStatement().executeQuery(data);
while(resultset.next())
{
students.add(new StudentData(
Integer.parseInt(resultset.getString("STUDENT_ID")),
resultset.getString("FIRST_NAME"),
resultset.getString("LAST_NAME"),
resultset.getString("FATHER_NAME"),
resultset.getString("EMAIL"),
resultset.getString("GENDER")
));
}
col_id.setCellValueFactory(new PropertyValueFactory<>("stu_id"));
col_firstname.setCellValueFactory(new PropertyValueFactory<>("first_name"));
col_lastname.setCellValueFactory(new PropertyValueFactory<>("last_name"));
col_father.setCellValueFactory(new PropertyValueFactory<>("father_name"));
col_email.setCellValueFactory(new PropertyValueFactory<>("email"));
col_gender.setCellValueFactory(new PropertyValueFactory<>("gender"));
student_table.setItems(students);
} catch (SQLException ex) {
Logger.getLogger(AssignedCoursesStudentController.class.getName()).log(Level.SEVERE, null, ex);
}
}
private void SearchButton(ActionEvent event)
{
students.clear();
Connection connectoin = new Database_Connection().Database_Connectivity();
if(!search_entity.getText().equals(""))
{
String searchQuery = "SELECT * FROM students WHERE "+search_by_combobox.getValue().toString()+"= '"+search_entity.getText()+"'";
try {
ResultSet resultset = connectoin.createStatement().executeQuery(searchQuery);
while(resultset.next())
{
students.add(new StudentData(
Integer.parseInt(resultset.getString("STUDENT_ID")),
resultset.getString("FIRST_NAME"),
resultset.getString("LAST_NAME"),
resultset.getString("FATHER_NAME"),
resultset.getString("EMAIL"),
resultset.getString("CONTACT_NUMBER"),
resultset.getString("DATE_OF_BIRTH"),
resultset.getString("GENDER"),
resultset.getString("DEPARTMENT"),
resultset.getString("ADDRESS"),
resultset.getString("SECTION"),
Integer.parseInt(resultset.getString("SEMESTER")),
resultset.getString("JOINED_DATE"),
resultset.getString("LEFT_DATE")
));
}
col_id.setCellValueFactory(new PropertyValueFactory<>("stu_id"));
col_firstname.setCellValueFactory(new PropertyValueFactory<>("first_name"));
col_lastname.setCellValueFactory(new PropertyValueFactory<>("last_name"));
col_father.setCellValueFactory(new PropertyValueFactory<>("father_name"));
col_email.setCellValueFactory(new PropertyValueFactory<>("email"));
col_gender.setCellValueFactory(new PropertyValueFactory<>("gender"));
student_table.setItems(students);
}
catch (SQLException ex) {
Logger.getLogger(StudentSearchController.class.getName()).log(Level.SEVERE, null, ex);
}
}
else
{
}
}
}
| [
"[email protected]"
] | |
c764ad0e06b0620b6eee43e29be13c089a876a56 | 5ad4f98e710c62ba86ff57e43a9873bab0a9f05e | /4.JavaCollections/src/com/javarush/task/task34/task3410/controller/Controller.java | d15ff18bc4d838afd1e72ee789ebfed2a0fea567 | [] | no_license | din812/JavaRushTasks | d9aeac7f5699c223b88b1c97ab23fd0955ee4122 | b942eb42775f40b193ae46f1042a6af5517a2e46 | refs/heads/master | 2022-12-15T05:19:02.906263 | 2020-09-07T08:34:41 | 2020-09-07T08:34:41 | 292,634,514 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,117 | java | package com.javarush.task.task34.task3410.controller;
import com.javarush.task.task34.task3410.model.Direction;
import com.javarush.task.task34.task3410.model.GameObjects;
import com.javarush.task.task34.task3410.model.Model;
import com.javarush.task.task34.task3410.view.View;
public class Controller implements EventListener{
public View view;
public Model model;
public Controller() {
this.view = new View(this);
this.model = new Model();
view.init();
model.restart();
view.setEventListener(this);
model.setEventListener(this);
}
public GameObjects getGameObjects() {
return model.getGameObjects();
}
public static void main(String[] args) {
Controller controller = new Controller();
}
@Override
public void move(Direction direction) {
model.move(direction);
view.update();
}
@Override
public void restart() {
model.restart();
view.update();
}
@Override
public void startNextLevel() {
model.startNextLevel();
view.update();
}
@Override
public void levelCompleted(int level) {
view.completed(level);
}
}
| [
"[email protected]"
] | |
967af6bf4175d9d467658e4725c1b3f546bd30e7 | 04dfdd89aba44c44f809054d260d23c6bf7255c6 | /test/Java Examples in a Nutshell/2nd Edition/com/davidflanagan/examples/basics/Factorial2.java | d0dac0dd50d4dbd7efcbe40b5869eee41945c17a | [
"MIT"
] | permissive | shashanksingh28/code-similarity | f7d8f113501484334d67bfd08b73b6b0685586ea | 66f8714083dfefa65f295e32e3a6168f4d8c608e | refs/heads/master | 2021-01-11T19:34:13.142050 | 2017-09-11T00:54:52 | 2017-09-11T00:54:52 | 72,508,354 | 3 | 3 | null | null | null | null | UTF-8 | Java | false | false | 961 | java | /*
* Copyright (c) 2000 David Flanagan. All rights reserved.
* This code is from the book Java Examples in a Nutshell, 2nd Edition.
* It is provided AS-IS, WITHOUT ANY WARRANTY either expressed or implied.
* You may study, use, and modify it for any non-commercial purpose.
* You may distribute it non-commercially as long as you retain this notice.
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
*/
package com.davidflanagan.examples.basics;
/**
* This class shows a recursive method to compute factorials. This method
* calls itself repeatedly based on the formula: n! = n * (n-1)!
**/
public class Factorial2 {
public static long factorial(long x) {
if (x < 0) throw new IllegalArgumentException("x must be >= 0");
if (x <= 1) return 1; // Stop recursing here
else return x * factorial(x-1); // Recurse by calling ourselves
}
}
| [
"[email protected]"
] | |
65cce701d2a7aecc12d85c6902c4d6b49e9b4dda | 0f32a3fb19be1dd6c8cd7917298f2ae0f418f52c | /src/sg/jackiez/worker/utils/common/ByteArrayPool.java | cff83e93f9fe45e48e23b1a1900382c8e116c49e | [] | no_license | zsigui/Worker | d61b967ba9d985115bd0bef9270cb067081dae71 | 4faa7d76b0b1461ea7267d933d6da174c85aae73 | refs/heads/master | 2020-03-27T19:17:48.094508 | 2018-09-09T15:50:18 | 2018-09-09T15:50:18 | 146,979,118 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,266 | java | package sg.jackiez.worker.utils.common;
import java.util.LinkedList;
public class ByteArrayPool {
/**
* 默认字节缓存大小
*/
public static final int DEFAULT_LIMIT_SIZE = 4096;
private volatile static ByteArrayPool mInstance = new ByteArrayPool(DEFAULT_LIMIT_SIZE);
private int mLimitSize;
private int mCurrentSize;
/**
* 用于执行LRU存储策略的缓存字节数组列表
*/
private final LinkedList<byte[]> mLRUQueue = new LinkedList<>();
private ByteArrayPool(int limitSize) {
mLimitSize = limitSize;
}
/**
* 使用指定大小初始化ByteArrayPool实例,需要确保超过默认缓存大小{@link #DEFAULT_LIMIT_SIZE},
* 否则直接返回已有实例
*/
public static final ByteArrayPool init(int limitSize) {
if (limitSize > DEFAULT_LIMIT_SIZE) {
mInstance = new ByteArrayPool(limitSize);
}
return mInstance;
}
/**
* 获取ByteArrayPool实例
* <p>
* 如果还未初始化,则会首先以默认大小进行初始化操作
*/
public static final ByteArrayPool init() {
return init(0);
}
/**
* 从缓存池中取得不小于指定长度的字节数组
*
* @param len 需要取得字节数组最小长度
*/
public synchronized byte[] obtain(int len) {
if (len > mCurrentSize)
return new byte[len];
for (int i = 0; i < mLRUQueue.size(); i++) {
byte[] tmp = mLRUQueue.get(i);
mLRUQueue.remove(i);
mCurrentSize -= tmp.length;
if (tmp.length >= len)
return tmp;
}
return new byte[len];
}
/**
* 添加字节数组到缓冲池中
*
* @param bs 待添加字节数组
*/
public synchronized void add(byte[] bs) {
if (bs == null || bs.length > mLimitSize)
return;
mLRUQueue.add(bs);
mCurrentSize += bs.length;
trim();
}
/**
* 调整当前的缓冲池以保证大小处于限定范围内
*/
private synchronized void trim() {
while (mCurrentSize > mLimitSize) {
mCurrentSize -= mLRUQueue.removeFirst().length;
}
}
}
| [
"[email protected]"
] | |
c03bfc727b540486532334c8d1e7038a6ba6f26c | f00c25a810d27beea7d28719463d0d31457375b0 | /tm-order/src/main/java/com/tmall/order/mapper/OrderDetailMapper.java | d393d8bdafba78082ab81e55d12e280699d402e7 | [] | no_license | CarryWLTao/tmall | e873c86ebda952932e4e8b456acfdceaa4338c7d | 6a8c1a7f6c13d08a15c4690b12bd2a564af36761 | refs/heads/master | 2022-12-23T16:54:25.203187 | 2020-03-23T03:26:35 | 2020-03-23T03:26:35 | 249,357,055 | 0 | 0 | null | 2022-12-16T00:46:44 | 2020-03-23T06:54:55 | Java | UTF-8 | Java | false | false | 798 | java | package com.tmall.order.mapper;/**
* Copyright(C),2019-2020,CarryWLTao互联网工作室
* FileName:OrderDetailMapper
* Author: Administrator
* Date: 2020-03-16 16:45
* Description: 订单详情
* History:
* <author> <time> <version> <desc>
* 作者姓名 修改时间 版本号 描述
*/
import com.tmall.common.mapper.BaseMapper;
import com.tmall.order.pojo.OrderDetail;
/**
* Copyright(C),2019-2020,CarryWLTao互联网工作室
* FileName:OrderDetailMapper
* Author: Administrator
* Date: 2020-03-16 16:45
* Description: 订单详情
* History:
* <author> <time> <version> <desc>
* 作者姓名 修改时间 版本号 描述
*/
public interface OrderDetailMapper extends BaseMapper<OrderDetail> {
}
| [
"[email protected]"
] | |
1a928cddd6e6e4ccbf02406189edc00cff072151 | 7026ffa508bee979e85ad7c4f2d3ed4d2391b4bc | /src/datechooser/beans/editor/cell/CellEditorPane.java | 286f4dae934486eb70a1240aa625a6f4213761cd | [] | no_license | Indoraptor1/demo1 | ff12486ff43a6cad8503ba5e8ab4bb722a40e114 | bc23b64ce6a0a39842f175426eeba41a4c6905cd | refs/heads/master | 2020-06-15T05:20:16.863692 | 2019-07-12T11:40:21 | 2019-07-12T11:40:21 | 195,213,498 | 1 | 0 | null | null | null | null | WINDOWS-1251 | Java | false | false | 3,866 | java | /*
* CellEditorPane.java
*
* Created on 25 Октябрь 2006 г., 11:17
*
*/
package datechooser.beans.editor.cell;
import static datechooser.beans.locale.LocaleUtils.getEditorLocaleString;
import datechooser.beans.editor.border.SimpleBorderEditor;
import datechooser.beans.editor.font.SimpleFontEditor;
import datechooser.beans.editor.utils.EditorDialog;
import datechooser.view.appearance.CellAppearance;
import datechooser.view.appearance.custom.CustomCellAppearance;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
/**
* Abstract cell appearance editor.<br>
* Заготовка панели редактирования внешнего вида ячейки.
* @author Androsov Vadim
* @since 1.0
*/
public abstract class CellEditorPane extends JPanel {
private EditorDialog fontEditorDialog;
protected MainCellEditorPane mainEditor;
private JButton selCursorColorCash;
public CellEditorPane(MainCellEditorPane parentEditor) {
setMainEditor(parentEditor);
fontEditorDialog = new EditorDialog((Frame)this.getParent(), new SimpleFontEditor());
generateInterface();
}
protected MainCellEditorPane getMainEditor() {
return mainEditor;
}
protected CellAppearance getValue() {
return (CellAppearance) getMainEditor().getValue();
}
protected Color selectColor(Color oldColor, String prompt) {
Color newColor = JColorChooser.showDialog(this, prompt, oldColor);
return newColor != null ? newColor : oldColor;
}
protected void setMainEditor(MainCellEditorPane mainEditor) {
this.mainEditor = mainEditor;
}
protected JButton createFontChooseButton() {
JButton bFont = new JButton(getEditorLocaleString("Font"));
bFont.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Font newFont = (Font)
fontEditorDialog.showDialog(getValue().getFont(), getEditorLocaleString("Select_font"));
if (!fontEditorDialog.isCanceled()) {
getValue().setFont(newFont);
getMainEditor().fireLocalPropertyChange();
}
}
});
return bFont;
}
protected JButton createCursorColorChooseButton() {
JButton selCursorColor = new JButton(getEditorLocaleString("Cursor_color"));
selCursorColor.setEnabled(getValue().isSelectable());
selCursorColor.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
getValue().setCursorColor(
selectColor(getValue().getCursorColor(),
getEditorLocaleString("Select_cursor_color")));
getMainEditor().fireLocalPropertyChange();
}
});
selCursorColorCash = selCursorColor;
return selCursorColor;
}
protected JButton createTextColorChooseButton() {
JButton selTextColor = new JButton(getEditorLocaleString("Text_color"));
selTextColor.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
getValue().setTextColor(
selectColor(getValue().getTextColor(),
getEditorLocaleString("Select_text_color")));
getMainEditor().fireLocalPropertyChange();
}
});
return selTextColor;
}
public EditorDialog getFontEditorDialog() {
return fontEditorDialog;
}
void updateState() {
selCursorColorCash.setEnabled(getValue().isSelectable());
updateEditorState();
}
protected abstract void generateInterface();
protected abstract void updateEditorState();
}
| [
"[email protected]"
] | |
8b2c2c8141c1780be2cca309c505c72ab2911a5d | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-13616-6-21-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/mail/internal/thread/SendMailRunnable_ESTest_scaffolding.java | 3c8b7f485ff22a76339e749d28f9e62bea6c9720 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 451 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Apr 02 22:11:43 UTC 2020
*/
package org.xwiki.mail.internal.thread;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class SendMailRunnable_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"[email protected]"
] | |
ec121c474ba26abaf0c5631fdb4e77829151ae16 | 6cd4bc0cc0152339ddb62673ba2ef265d49b87f3 | /src/it/algos/albergo/promemoria/PromemoriaSchedaPop.java | 05fa6478fdd335aa0282128bda05ffc5efc73f75 | [] | no_license | algos-soft/cinquestelle | aa45513dc881e1f416d9a9478aa7b84e16862ffb | ae73ac4e925ae0fea5d975c875c885b35fa3ad6d | refs/heads/master | 2023-06-08T12:44:33.534035 | 2021-07-01T16:58:34 | 2021-07-01T16:58:34 | 382,099,945 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 606 | java | package it.algos.albergo.promemoria;
import it.algos.base.modulo.Modulo;
/**
* Scheda specifiche del pacchetto Promemoria
* </p>
*
* @author Guido Andrea Ceresa ed Alessandro Valbonesi
* @version 1.0 / 14-mar-2009
*/
public final class PromemoriaSchedaPop extends PromemoriaSchedaBase {
/**
* Costruttore completo con parametri.
*
* @param modulo di riferimento per la scheda
*/
public PromemoriaSchedaPop(Modulo modulo) {
/* rimanda al costruttore della superclasse */
super(modulo);
}// fine del metodo costruttore completo
}// fine della classe} | [
"algos12"
] | algos12 |
cf2452e99b55ba3da81eb51036f60f346d1085c4 | 05a9b94e2e9d93453838833b9c0f04bc47f72160 | /src/main/java/at/htlv/serveradministration/domain/Postcode.java | f8d3b5aa0adae0ca92437e316f0ca22535af6ad1 | [] | no_license | wittiko/7QBIFSAPRS | 21cf8f621699d69254c1048b261da713834566a7 | 580fd42c2aa4575e5f342b93634e26fd114586c5 | refs/heads/master | 2021-01-17T12:09:09.685077 | 2012-06-14T12:44:33 | 2012-06-14T12:44:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,415 | java | package at.htlv.serveradministration.domain;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Version;
import javax.validation.constraints.NotNull;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@Entity
public class Postcode {
@NotNull
@Column(unique = true)
private Integer postcode;
@NotNull
private String city;
public String toString() {
return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE);
}
public Integer getPostcode() {
return this.postcode;
}
public void setPostcode(Integer postcode) {
this.postcode = postcode;
}
public String getCity() {
return this.city;
}
public void setCity(String city) {
this.city = city;
}
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
private Long id;
@Version
@Column(name = "version")
private Integer version;
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getVersion() {
return this.version;
}
public void setVersion(Integer version) {
this.version = version;
}
}
| [
"[email protected]"
] | |
a11669475fc8d1b50f0e4169de406b7444b4546a | 629455709e716b0c804ac08a3ec9dd2915895a2d | /src/code/Lotto.java | e3b638f83b61c1403c5e5e39d2d92677e9d37c8b | [] | no_license | qorvhfl080/Lotto_20210830 | 4f960321185286b28f07d9ae069321392e7a764a | ffa87724918784d83709be8c23d2aa77646fdfff | refs/heads/main | 2023-07-12T11:15:03.379125 | 2021-08-30T04:16:26 | 2021-08-30T04:16:26 | 401,196,531 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,011 | java | package code;
import java.util.Random;
import java.util.Scanner;
public class Lotto {
public static void main(String[] args) {
// 입력한 6개의 숫자를 저장할 배열
int[] inputNumbers = new int[6];
// 6개의 숫자에 Scanner를 이용해서 숫자 입력
Scanner sc = new Scanner(System.in);
for (int i = 0; i < inputNumbers.length; i++) {
while (true) {
System.out.print((i + 1) + "번째 숫자 입력 : ");
int num = sc.nextInt();
boolean isRangeOk = 1 <= num && num <= 45;
boolean isDuplOk = true;
for (int input : inputNumbers) {
if (num == input) {
isDuplOk = false;
break;
}
}
if (isRangeOk && isDuplOk) {
inputNumbers[i] = num;
break;
} else {
if (!isRangeOk)
System.out.println("범위가 맞지 않습니다");
else if (!isDuplOk)
System.out.println("중복입니다.");
else
System.out.println("숫자를 입력하세요");
System.out.println("다시 입력해주세요 : ");
}
}
}
sc.close();
int[] winNumbers = new int[6];
for (int i = 0; i < winNumbers.length; i++) {
// 1 ~ 45
int randomNum = (int)(Math.random() * 45 + 1);
boolean isDulOk = true;
for (int winNum : winNumbers) {
if (randomNum == winNum) {
isDulOk = false;
break;
}
}
if (isDulOk) {
winNumbers[i] = randomNum;
break;
}
}
int bonusNum = 0;
while (true) {
int randomNum = (int) (Math.random() * 45 + 1);
boolean isDuplOk = true;
for (int num : winNumbers) {
if (num == randomNum) {
isDuplOk = false;
break;
}
}
if (isDuplOk) {
bonusNum = randomNum;
break;
}
}
for (int i = 0; i < winNumbers.length; i++) {
for (int j = 0; j < winNumbers.length - 1; j++) {
if (winNumbers[j] > winNumbers[j + 1]) {
int t = winNumbers[j];
winNumbers[j] = winNumbers[j + 1];
winNumbers[j + 1] = t;
}
}
}
for (int winNum : winNumbers) {
System.out.print(winNum + " ");
}
System.out.println();
int correctNumCount = 0;
for (int myNum : inputNumbers) {
for (int winNum : winNumbers) {
if (myNum == winNum) {
correctNumCount++;
}
}
}
switch (correctNumCount) {
case 6:
System.out.println("1등 - 10억원");
break;
case 5:
System.out.println("2등");
boolean isBonusCorrect = false;
for (int myNum : inputNumbers) {
if (myNum == bonusNum) {
isBonusCorrect = true;
break;
}
}
if (isBonusCorrect) {
System.out.println("2등 - 4천만원");
} else {
System.out.println("3등 - 2백만원");
}
break;
case 4:
System.out.println("3등 - 2백만원");
break;
case 3:
System.out.println("4등 - 5만원");
break;
case 2:
System.out.println("5등 - 5천원");
break;
default:
System.out.println("낙첨입니다.");
break;
}
}
}
| [
"[email protected]"
] | |
964160bf13c5a5300e6eeeec87a5c02b3043421f | 36e2e4f4813f9d86fbdf6399c649aaafd02aa9b3 | /QuanLyPhongMachTu/src/dao/PhieuKhamBenhDAO.java | 709158582b148b2834747f2542c7a3437706c442 | [] | no_license | NakunMinh/QuanLyPhongmachTu_Hibernate_Java | c1887654d196e0d1250719e6bf504535087179ff | e56d48b93ef6a8058f5c1020c803a8aef3b9c118 | refs/heads/master | 2021-01-20T19:52:41.870935 | 2016-06-05T06:18:52 | 2016-06-05T06:18:52 | 60,446,195 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,035 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package dao;
import java.util.List;
import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.Transaction;
import pojo.BenhNhan;
import pojo.PhieuKhamBenh;
/**
*
* @author Minh Nhi
*/
public class PhieuKhamBenhDAO {
//lay danh sach phieu kham benh
public List<PhieuKhamBenh> laydanhsach(){
List<PhieuKhamBenh> ds = null;
Session s = HibernateUtil.getSessionFactory().openSession();
try {
String hql = "FROM PhieuKhamBenh";
Query q = s.createQuery(hql);
ds = q.list();
} catch (HibernateException ex) {
System.err.println(ex);
}finally{
s.close();
}
return ds;
}
//them phieu kham benh
public boolean themphieu(PhieuKhamBenh phieu){
Session session = HibernateUtil.getSessionFactory().openSession();
Transaction transaction = null;
try {
transaction = session.beginTransaction();
session.save(phieu);
transaction.commit();
} catch (HibernateException ex) {
transaction.rollback();
System.err.println(ex);
}finally {
session.close();
}
return true;
}
//lay danh sach theo ten
public List<PhieuKhamBenh> laydanhsachtheoten(BenhNhan hoten){
List<PhieuKhamBenh> ds = null;
Session s = HibernateUtil.getSessionFactory().openSession();
try {
String hql = "FROM PhieuKhamBenh P WHERE P.benhNhan = :hoten";
Query q = s.createQuery(hql);
q.setParameter("hoten", hoten);
ds = q.list();
} catch (HibernateException ex) {
System.err.println(ex);
}finally{
s.close();
}
return ds;
}
}
| [
"[email protected]"
] | |
c10a8b95d5d0a25c8a28583f3d66b98539e313ce | 5159558be5ab0b251758f009fd4e466dff144cbd | /src/javaSolution/math/rangeAdditionII/Solution.java | e4e4b39162ae87e5d510bf16624269bf36c70b39 | [] | no_license | myrontin/leetcode | 640ab92f0db38cd15d79b222efd03dc13b8c27ee | ce7917ab52ba27e7fb6f84a7f3abf369e7b2ac0f | refs/heads/master | 2020-03-12T16:31:57.625466 | 2018-04-25T02:54:47 | 2018-04-25T02:54:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 319 | java | package javaSolution.math.rangeAdditionII;
public class Solution {
public int maxCount(int m, int n, int[][] ops) {
if (ops.length == 0)
return m * n;
int a = Integer.MAX_VALUE;
int b = Integer.MAX_VALUE;
for (int[] i : ops) {
a = Math.min(a, i[0]);
b = Math.min(b, i[1]);
}
return a * b;
}
}
| [
"[email protected]"
] | |
fb8b1a31f81d66b5d85677c2c15b8e50d3a2b8c5 | cf2a7ec9c6295ec009b5df5d6af2398532aecbe9 | /Assignment1/src/tictactoe/Model/FieldState.java | 1a4a6004b444f45e3170794bc11b2ec0a1e7e269 | [] | no_license | Eldraev/Assignment-1 | 76e4a08c9e0992fa9aaf79ce85e0ee72ce6767a6 | 58f795817728e0f4404d5cbdd0857f12cd54e3a8 | refs/heads/master | 2021-01-01T05:52:08.716595 | 2014-11-25T19:35:42 | 2014-11-25T19:35:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 85 | java | package tictactoe.Model;
public enum FieldState {
Empty,
Cross,
Circle;
}
| [
"[email protected]"
] | |
51f710be9c9d11965b7e5fca109e393eb533586f | 4dc5a44f11dcbdd3bbccec5e3e113024e2f6eb02 | /src/Enter.java | 0f1164ce58267e2f44e38a0e7796d0fe67f22063 | [] | no_license | tacsnoo/Test | 028a36cb1a77c7913283141bb1b7ded85f53c28b | 91b99864e65514846ed826ffcf34f4389da80127 | refs/heads/master | 2023-09-03T14:14:56.446275 | 2021-11-10T13:43:11 | 2021-11-10T13:43:11 | 426,634,661 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 445 | java | import java.util.Scanner;
class Enter {
public static void main(String[] args) {
// creates an object of Scanner
Scanner input = new Scanner(System.in);
System.out.print("Enter your name: ");
// takes input from the keyboard
String name = input.nextLine();
// prints the name
System.out.println("My name is " + name);
// closes the scanner
input.close();
}
}
| [
"[email protected]"
] | |
ac7cdc8dd4aecb8a057e4fbfb3412f4663d98d9a | a5c0fe494d9e7de8d04a88eab1e5bdb23053eac1 | /Semester 1/Mobile/mob-labs/src/lab02/lab02/src/lab02/control.java | 0a16132aa77b65309ae4f94b50ac32e819aef35d | [] | no_license | markOflanagan/Year-3 | 7c82d51adbb3762e0c74c46b8a8a4e48b0abc662 | 4994653ddbae216ef03aa62eb08dac723d37d1ab | refs/heads/master | 2021-07-16T00:50:04.508873 | 2017-10-04T13:23:30 | 2017-10-04T13:23:30 | 105,769,909 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 355 | java | package lab02;
import java.util.*;
public class control {
public static void main(String[] args)
{
ArrayList<person> students = new ArrayList<person>();
for(int i=1;i<20;i++)
{
person a = new person ("Mel",'F');
students.add(i,a);
}
for(int a = 0; a < students.size();a++)
{
System.out.println(students.get(a));
}
}
}
| [
"[email protected]"
] | |
c9711ee55e6d3b95bda0972da238d17b6881993c | c6da17e72fed421947b32afdeecbb00fa030a78b | /app/src/main/java/com/call/event/LoginEvent.java | 7adc133ed9bd908fc896d09efb90316357957ebd | [] | no_license | jiangshenghui/CallNumber | 380d6f09899aba74ff40a63a78e9d8864af7b0d4 | 00896027a4d0e5a3a54bf6dbba2f823b64a877a9 | refs/heads/master | 2020-04-06T22:42:12.506888 | 2018-12-17T12:28:39 | 2018-12-17T12:28:39 | 157,844,577 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 287 | java | package com.call.event;
import java.io.Serializable;
public class LoginEvent implements Serializable {
private boolean isLogin = false;
public LoginEvent(boolean isLogin) {
this.isLogin = isLogin;
}
public boolean isLogin() {
return isLogin;
}
}
| [
"[email protected]"
] | |
18be842e66c57d54895b7da87a10fedfd007d34f | 5657a8f01374131b48d35b50f21b67a57b683b63 | /org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklistParser.java | 75322948ac0004dc22f789b9918f039b281ddf1e | [] | no_license | ustok/checklist | 85fedd49542894f18036e4a7b4d241b51a65bc7d | f1b99a6c9052f1c41d565d0f53f1b52eef3e5b70 | refs/heads/master | 2021-01-01T05:50:15.984845 | 2014-09-04T14:18:40 | 2014-09-04T14:18:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 109,184 | java | package org.ustok.checklist.cfg.ui.contentassist.antlr.internal;
import java.io.InputStream;
import org.eclipse.xtext.*;
import org.eclipse.xtext.parser.*;
import org.eclipse.xtext.parser.impl.*;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.DFA;
import org.ustok.checklist.cfg.services.ChecklistGrammarAccess;
import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
@SuppressWarnings("all")
public class InternalChecklistParser extends AbstractInternalContentAssistParser {
public static final String[] tokenNames = new String[] {
"<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_STRING", "RULE_ID", "RULE_INT", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'simple'", "'container'", "'title:'", "';'", "'step:'", "'{'", "'type:'", "'}'", "'description:'", "'children:'"
};
public static final int T__19=19;
public static final int RULE_ID=5;
public static final int RULE_STRING=4;
public static final int T__16=16;
public static final int T__15=15;
public static final int T__18=18;
public static final int T__17=17;
public static final int T__12=12;
public static final int T__11=11;
public static final int T__14=14;
public static final int T__13=13;
public static final int RULE_ANY_OTHER=10;
public static final int T__20=20;
public static final int RULE_INT=6;
public static final int RULE_WS=9;
public static final int RULE_SL_COMMENT=8;
public static final int EOF=-1;
public static final int RULE_ML_COMMENT=7;
// delegates
// delegators
public InternalChecklistParser(TokenStream input) {
this(input, new RecognizerSharedState());
}
public InternalChecklistParser(TokenStream input, RecognizerSharedState state) {
super(input, state);
}
public String[] getTokenNames() { return InternalChecklistParser.tokenNames; }
public String getGrammarFileName() { return "../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g"; }
private ChecklistGrammarAccess grammarAccess;
public void setGrammarAccess(ChecklistGrammarAccess grammarAccess) {
this.grammarAccess = grammarAccess;
}
@Override
protected Grammar getGrammar() {
return grammarAccess.getGrammar();
}
@Override
protected String getValueForTokenName(String tokenName) {
return tokenName;
}
// $ANTLR start "entryRuleModel"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:60:1: entryRuleModel : ruleModel EOF ;
public final void entryRuleModel() throws RecognitionException {
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:61:1: ( ruleModel EOF )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:62:1: ruleModel EOF
{
before(grammarAccess.getModelRule());
pushFollow(FOLLOW_ruleModel_in_entryRuleModel61);
ruleModel();
state._fsp--;
after(grammarAccess.getModelRule());
match(input,EOF,FOLLOW_EOF_in_entryRuleModel68);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
}
return ;
}
// $ANTLR end "entryRuleModel"
// $ANTLR start "ruleModel"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:69:1: ruleModel : ( ( rule__Model__Group__0 ) ) ;
public final void ruleModel() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:73:2: ( ( ( rule__Model__Group__0 ) ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:74:1: ( ( rule__Model__Group__0 ) )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:74:1: ( ( rule__Model__Group__0 ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:75:1: ( rule__Model__Group__0 )
{
before(grammarAccess.getModelAccess().getGroup());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:76:1: ( rule__Model__Group__0 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:76:2: rule__Model__Group__0
{
pushFollow(FOLLOW_rule__Model__Group__0_in_ruleModel94);
rule__Model__Group__0();
state._fsp--;
}
after(grammarAccess.getModelAccess().getGroup());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "ruleModel"
// $ANTLR start "entryRuleTitle"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:88:1: entryRuleTitle : ruleTitle EOF ;
public final void entryRuleTitle() throws RecognitionException {
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:89:1: ( ruleTitle EOF )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:90:1: ruleTitle EOF
{
before(grammarAccess.getTitleRule());
pushFollow(FOLLOW_ruleTitle_in_entryRuleTitle121);
ruleTitle();
state._fsp--;
after(grammarAccess.getTitleRule());
match(input,EOF,FOLLOW_EOF_in_entryRuleTitle128);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
}
return ;
}
// $ANTLR end "entryRuleTitle"
// $ANTLR start "ruleTitle"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:97:1: ruleTitle : ( ( rule__Title__Group__0 ) ) ;
public final void ruleTitle() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:101:2: ( ( ( rule__Title__Group__0 ) ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:102:1: ( ( rule__Title__Group__0 ) )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:102:1: ( ( rule__Title__Group__0 ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:103:1: ( rule__Title__Group__0 )
{
before(grammarAccess.getTitleAccess().getGroup());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:104:1: ( rule__Title__Group__0 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:104:2: rule__Title__Group__0
{
pushFollow(FOLLOW_rule__Title__Group__0_in_ruleTitle154);
rule__Title__Group__0();
state._fsp--;
}
after(grammarAccess.getTitleAccess().getGroup());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "ruleTitle"
// $ANTLR start "entryRuleStep"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:116:1: entryRuleStep : ruleStep EOF ;
public final void entryRuleStep() throws RecognitionException {
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:117:1: ( ruleStep EOF )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:118:1: ruleStep EOF
{
before(grammarAccess.getStepRule());
pushFollow(FOLLOW_ruleStep_in_entryRuleStep181);
ruleStep();
state._fsp--;
after(grammarAccess.getStepRule());
match(input,EOF,FOLLOW_EOF_in_entryRuleStep188);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
}
return ;
}
// $ANTLR end "entryRuleStep"
// $ANTLR start "ruleStep"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:125:1: ruleStep : ( ( rule__Step__Group__0 ) ) ;
public final void ruleStep() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:129:2: ( ( ( rule__Step__Group__0 ) ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:130:1: ( ( rule__Step__Group__0 ) )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:130:1: ( ( rule__Step__Group__0 ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:131:1: ( rule__Step__Group__0 )
{
before(grammarAccess.getStepAccess().getGroup());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:132:1: ( rule__Step__Group__0 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:132:2: rule__Step__Group__0
{
pushFollow(FOLLOW_rule__Step__Group__0_in_ruleStep214);
rule__Step__Group__0();
state._fsp--;
}
after(grammarAccess.getStepAccess().getGroup());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "ruleStep"
// $ANTLR start "ruleStepType"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:145:1: ruleStepType : ( ( rule__StepType__Alternatives ) ) ;
public final void ruleStepType() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:149:1: ( ( ( rule__StepType__Alternatives ) ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:150:1: ( ( rule__StepType__Alternatives ) )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:150:1: ( ( rule__StepType__Alternatives ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:151:1: ( rule__StepType__Alternatives )
{
before(grammarAccess.getStepTypeAccess().getAlternatives());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:152:1: ( rule__StepType__Alternatives )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:152:2: rule__StepType__Alternatives
{
pushFollow(FOLLOW_rule__StepType__Alternatives_in_ruleStepType251);
rule__StepType__Alternatives();
state._fsp--;
}
after(grammarAccess.getStepTypeAccess().getAlternatives());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "ruleStepType"
// $ANTLR start "rule__StepType__Alternatives"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:163:1: rule__StepType__Alternatives : ( ( ( 'simple' ) ) | ( ( 'container' ) ) );
public final void rule__StepType__Alternatives() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:167:1: ( ( ( 'simple' ) ) | ( ( 'container' ) ) )
int alt1=2;
int LA1_0 = input.LA(1);
if ( (LA1_0==11) ) {
alt1=1;
}
else if ( (LA1_0==12) ) {
alt1=2;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 1, 0, input);
throw nvae;
}
switch (alt1) {
case 1 :
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:168:1: ( ( 'simple' ) )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:168:1: ( ( 'simple' ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:169:1: ( 'simple' )
{
before(grammarAccess.getStepTypeAccess().getSimpleEnumLiteralDeclaration_0());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:170:1: ( 'simple' )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:170:3: 'simple'
{
match(input,11,FOLLOW_11_in_rule__StepType__Alternatives287);
}
after(grammarAccess.getStepTypeAccess().getSimpleEnumLiteralDeclaration_0());
}
}
break;
case 2 :
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:175:6: ( ( 'container' ) )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:175:6: ( ( 'container' ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:176:1: ( 'container' )
{
before(grammarAccess.getStepTypeAccess().getContainerEnumLiteralDeclaration_1());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:177:1: ( 'container' )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:177:3: 'container'
{
match(input,12,FOLLOW_12_in_rule__StepType__Alternatives308);
}
after(grammarAccess.getStepTypeAccess().getContainerEnumLiteralDeclaration_1());
}
}
break;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__StepType__Alternatives"
// $ANTLR start "rule__Model__Group__0"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:189:1: rule__Model__Group__0 : rule__Model__Group__0__Impl rule__Model__Group__1 ;
public final void rule__Model__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:193:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:194:2: rule__Model__Group__0__Impl rule__Model__Group__1
{
pushFollow(FOLLOW_rule__Model__Group__0__Impl_in_rule__Model__Group__0341);
rule__Model__Group__0__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Model__Group__1_in_rule__Model__Group__0344);
rule__Model__Group__1();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Model__Group__0"
// $ANTLR start "rule__Model__Group__0__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:201:1: rule__Model__Group__0__Impl : ( ( rule__Model__TitleAssignment_0 ) ) ;
public final void rule__Model__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:205:1: ( ( ( rule__Model__TitleAssignment_0 ) ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:206:1: ( ( rule__Model__TitleAssignment_0 ) )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:206:1: ( ( rule__Model__TitleAssignment_0 ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:207:1: ( rule__Model__TitleAssignment_0 )
{
before(grammarAccess.getModelAccess().getTitleAssignment_0());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:208:1: ( rule__Model__TitleAssignment_0 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:208:2: rule__Model__TitleAssignment_0
{
pushFollow(FOLLOW_rule__Model__TitleAssignment_0_in_rule__Model__Group__0__Impl371);
rule__Model__TitleAssignment_0();
state._fsp--;
}
after(grammarAccess.getModelAccess().getTitleAssignment_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Model__Group__0__Impl"
// $ANTLR start "rule__Model__Group__1"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:218:1: rule__Model__Group__1 : rule__Model__Group__1__Impl ;
public final void rule__Model__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:222:1: ( rule__Model__Group__1__Impl )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:223:2: rule__Model__Group__1__Impl
{
pushFollow(FOLLOW_rule__Model__Group__1__Impl_in_rule__Model__Group__1401);
rule__Model__Group__1__Impl();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Model__Group__1"
// $ANTLR start "rule__Model__Group__1__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:229:1: rule__Model__Group__1__Impl : ( ( rule__Model__StepsAssignment_1 )* ) ;
public final void rule__Model__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:233:1: ( ( ( rule__Model__StepsAssignment_1 )* ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:234:1: ( ( rule__Model__StepsAssignment_1 )* )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:234:1: ( ( rule__Model__StepsAssignment_1 )* )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:235:1: ( rule__Model__StepsAssignment_1 )*
{
before(grammarAccess.getModelAccess().getStepsAssignment_1());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:236:1: ( rule__Model__StepsAssignment_1 )*
loop2:
do {
int alt2=2;
int LA2_0 = input.LA(1);
if ( (LA2_0==15) ) {
alt2=1;
}
switch (alt2) {
case 1 :
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:236:2: rule__Model__StepsAssignment_1
{
pushFollow(FOLLOW_rule__Model__StepsAssignment_1_in_rule__Model__Group__1__Impl428);
rule__Model__StepsAssignment_1();
state._fsp--;
}
break;
default :
break loop2;
}
} while (true);
after(grammarAccess.getModelAccess().getStepsAssignment_1());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Model__Group__1__Impl"
// $ANTLR start "rule__Title__Group__0"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:250:1: rule__Title__Group__0 : rule__Title__Group__0__Impl rule__Title__Group__1 ;
public final void rule__Title__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:254:1: ( rule__Title__Group__0__Impl rule__Title__Group__1 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:255:2: rule__Title__Group__0__Impl rule__Title__Group__1
{
pushFollow(FOLLOW_rule__Title__Group__0__Impl_in_rule__Title__Group__0463);
rule__Title__Group__0__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Title__Group__1_in_rule__Title__Group__0466);
rule__Title__Group__1();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Title__Group__0"
// $ANTLR start "rule__Title__Group__0__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:262:1: rule__Title__Group__0__Impl : ( 'title:' ) ;
public final void rule__Title__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:266:1: ( ( 'title:' ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:267:1: ( 'title:' )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:267:1: ( 'title:' )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:268:1: 'title:'
{
before(grammarAccess.getTitleAccess().getTitleKeyword_0());
match(input,13,FOLLOW_13_in_rule__Title__Group__0__Impl494);
after(grammarAccess.getTitleAccess().getTitleKeyword_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Title__Group__0__Impl"
// $ANTLR start "rule__Title__Group__1"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:281:1: rule__Title__Group__1 : rule__Title__Group__1__Impl rule__Title__Group__2 ;
public final void rule__Title__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:285:1: ( rule__Title__Group__1__Impl rule__Title__Group__2 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:286:2: rule__Title__Group__1__Impl rule__Title__Group__2
{
pushFollow(FOLLOW_rule__Title__Group__1__Impl_in_rule__Title__Group__1525);
rule__Title__Group__1__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Title__Group__2_in_rule__Title__Group__1528);
rule__Title__Group__2();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Title__Group__1"
// $ANTLR start "rule__Title__Group__1__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:293:1: rule__Title__Group__1__Impl : ( ( rule__Title__TitleAssignment_1 ) ) ;
public final void rule__Title__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:297:1: ( ( ( rule__Title__TitleAssignment_1 ) ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:298:1: ( ( rule__Title__TitleAssignment_1 ) )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:298:1: ( ( rule__Title__TitleAssignment_1 ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:299:1: ( rule__Title__TitleAssignment_1 )
{
before(grammarAccess.getTitleAccess().getTitleAssignment_1());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:300:1: ( rule__Title__TitleAssignment_1 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:300:2: rule__Title__TitleAssignment_1
{
pushFollow(FOLLOW_rule__Title__TitleAssignment_1_in_rule__Title__Group__1__Impl555);
rule__Title__TitleAssignment_1();
state._fsp--;
}
after(grammarAccess.getTitleAccess().getTitleAssignment_1());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Title__Group__1__Impl"
// $ANTLR start "rule__Title__Group__2"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:310:1: rule__Title__Group__2 : rule__Title__Group__2__Impl ;
public final void rule__Title__Group__2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:314:1: ( rule__Title__Group__2__Impl )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:315:2: rule__Title__Group__2__Impl
{
pushFollow(FOLLOW_rule__Title__Group__2__Impl_in_rule__Title__Group__2585);
rule__Title__Group__2__Impl();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Title__Group__2"
// $ANTLR start "rule__Title__Group__2__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:321:1: rule__Title__Group__2__Impl : ( ';' ) ;
public final void rule__Title__Group__2__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:325:1: ( ( ';' ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:326:1: ( ';' )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:326:1: ( ';' )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:327:1: ';'
{
before(grammarAccess.getTitleAccess().getSemicolonKeyword_2());
match(input,14,FOLLOW_14_in_rule__Title__Group__2__Impl613);
after(grammarAccess.getTitleAccess().getSemicolonKeyword_2());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Title__Group__2__Impl"
// $ANTLR start "rule__Step__Group__0"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:346:1: rule__Step__Group__0 : rule__Step__Group__0__Impl rule__Step__Group__1 ;
public final void rule__Step__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:350:1: ( rule__Step__Group__0__Impl rule__Step__Group__1 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:351:2: rule__Step__Group__0__Impl rule__Step__Group__1
{
pushFollow(FOLLOW_rule__Step__Group__0__Impl_in_rule__Step__Group__0650);
rule__Step__Group__0__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Step__Group__1_in_rule__Step__Group__0653);
rule__Step__Group__1();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__0"
// $ANTLR start "rule__Step__Group__0__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:358:1: rule__Step__Group__0__Impl : ( 'step:' ) ;
public final void rule__Step__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:362:1: ( ( 'step:' ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:363:1: ( 'step:' )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:363:1: ( 'step:' )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:364:1: 'step:'
{
before(grammarAccess.getStepAccess().getStepKeyword_0());
match(input,15,FOLLOW_15_in_rule__Step__Group__0__Impl681);
after(grammarAccess.getStepAccess().getStepKeyword_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__0__Impl"
// $ANTLR start "rule__Step__Group__1"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:377:1: rule__Step__Group__1 : rule__Step__Group__1__Impl rule__Step__Group__2 ;
public final void rule__Step__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:381:1: ( rule__Step__Group__1__Impl rule__Step__Group__2 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:382:2: rule__Step__Group__1__Impl rule__Step__Group__2
{
pushFollow(FOLLOW_rule__Step__Group__1__Impl_in_rule__Step__Group__1712);
rule__Step__Group__1__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Step__Group__2_in_rule__Step__Group__1715);
rule__Step__Group__2();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__1"
// $ANTLR start "rule__Step__Group__1__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:389:1: rule__Step__Group__1__Impl : ( ( rule__Step__StepIdAssignment_1 ) ) ;
public final void rule__Step__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:393:1: ( ( ( rule__Step__StepIdAssignment_1 ) ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:394:1: ( ( rule__Step__StepIdAssignment_1 ) )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:394:1: ( ( rule__Step__StepIdAssignment_1 ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:395:1: ( rule__Step__StepIdAssignment_1 )
{
before(grammarAccess.getStepAccess().getStepIdAssignment_1());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:396:1: ( rule__Step__StepIdAssignment_1 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:396:2: rule__Step__StepIdAssignment_1
{
pushFollow(FOLLOW_rule__Step__StepIdAssignment_1_in_rule__Step__Group__1__Impl742);
rule__Step__StepIdAssignment_1();
state._fsp--;
}
after(grammarAccess.getStepAccess().getStepIdAssignment_1());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__1__Impl"
// $ANTLR start "rule__Step__Group__2"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:406:1: rule__Step__Group__2 : rule__Step__Group__2__Impl rule__Step__Group__3 ;
public final void rule__Step__Group__2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:410:1: ( rule__Step__Group__2__Impl rule__Step__Group__3 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:411:2: rule__Step__Group__2__Impl rule__Step__Group__3
{
pushFollow(FOLLOW_rule__Step__Group__2__Impl_in_rule__Step__Group__2772);
rule__Step__Group__2__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Step__Group__3_in_rule__Step__Group__2775);
rule__Step__Group__3();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__2"
// $ANTLR start "rule__Step__Group__2__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:418:1: rule__Step__Group__2__Impl : ( '{' ) ;
public final void rule__Step__Group__2__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:422:1: ( ( '{' ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:423:1: ( '{' )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:423:1: ( '{' )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:424:1: '{'
{
before(grammarAccess.getStepAccess().getLeftCurlyBracketKeyword_2());
match(input,16,FOLLOW_16_in_rule__Step__Group__2__Impl803);
after(grammarAccess.getStepAccess().getLeftCurlyBracketKeyword_2());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__2__Impl"
// $ANTLR start "rule__Step__Group__3"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:437:1: rule__Step__Group__3 : rule__Step__Group__3__Impl rule__Step__Group__4 ;
public final void rule__Step__Group__3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:441:1: ( rule__Step__Group__3__Impl rule__Step__Group__4 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:442:2: rule__Step__Group__3__Impl rule__Step__Group__4
{
pushFollow(FOLLOW_rule__Step__Group__3__Impl_in_rule__Step__Group__3834);
rule__Step__Group__3__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Step__Group__4_in_rule__Step__Group__3837);
rule__Step__Group__4();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__3"
// $ANTLR start "rule__Step__Group__3__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:449:1: rule__Step__Group__3__Impl : ( 'type:' ) ;
public final void rule__Step__Group__3__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:453:1: ( ( 'type:' ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:454:1: ( 'type:' )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:454:1: ( 'type:' )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:455:1: 'type:'
{
before(grammarAccess.getStepAccess().getTypeKeyword_3());
match(input,17,FOLLOW_17_in_rule__Step__Group__3__Impl865);
after(grammarAccess.getStepAccess().getTypeKeyword_3());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__3__Impl"
// $ANTLR start "rule__Step__Group__4"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:468:1: rule__Step__Group__4 : rule__Step__Group__4__Impl rule__Step__Group__5 ;
public final void rule__Step__Group__4() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:472:1: ( rule__Step__Group__4__Impl rule__Step__Group__5 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:473:2: rule__Step__Group__4__Impl rule__Step__Group__5
{
pushFollow(FOLLOW_rule__Step__Group__4__Impl_in_rule__Step__Group__4896);
rule__Step__Group__4__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Step__Group__5_in_rule__Step__Group__4899);
rule__Step__Group__5();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__4"
// $ANTLR start "rule__Step__Group__4__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:480:1: rule__Step__Group__4__Impl : ( ( rule__Step__TypeAssignment_4 ) ) ;
public final void rule__Step__Group__4__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:484:1: ( ( ( rule__Step__TypeAssignment_4 ) ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:485:1: ( ( rule__Step__TypeAssignment_4 ) )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:485:1: ( ( rule__Step__TypeAssignment_4 ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:486:1: ( rule__Step__TypeAssignment_4 )
{
before(grammarAccess.getStepAccess().getTypeAssignment_4());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:487:1: ( rule__Step__TypeAssignment_4 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:487:2: rule__Step__TypeAssignment_4
{
pushFollow(FOLLOW_rule__Step__TypeAssignment_4_in_rule__Step__Group__4__Impl926);
rule__Step__TypeAssignment_4();
state._fsp--;
}
after(grammarAccess.getStepAccess().getTypeAssignment_4());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__4__Impl"
// $ANTLR start "rule__Step__Group__5"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:497:1: rule__Step__Group__5 : rule__Step__Group__5__Impl rule__Step__Group__6 ;
public final void rule__Step__Group__5() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:501:1: ( rule__Step__Group__5__Impl rule__Step__Group__6 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:502:2: rule__Step__Group__5__Impl rule__Step__Group__6
{
pushFollow(FOLLOW_rule__Step__Group__5__Impl_in_rule__Step__Group__5956);
rule__Step__Group__5__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Step__Group__6_in_rule__Step__Group__5959);
rule__Step__Group__6();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__5"
// $ANTLR start "rule__Step__Group__5__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:509:1: rule__Step__Group__5__Impl : ( 'title:' ) ;
public final void rule__Step__Group__5__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:513:1: ( ( 'title:' ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:514:1: ( 'title:' )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:514:1: ( 'title:' )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:515:1: 'title:'
{
before(grammarAccess.getStepAccess().getTitleKeyword_5());
match(input,13,FOLLOW_13_in_rule__Step__Group__5__Impl987);
after(grammarAccess.getStepAccess().getTitleKeyword_5());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__5__Impl"
// $ANTLR start "rule__Step__Group__6"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:528:1: rule__Step__Group__6 : rule__Step__Group__6__Impl rule__Step__Group__7 ;
public final void rule__Step__Group__6() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:532:1: ( rule__Step__Group__6__Impl rule__Step__Group__7 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:533:2: rule__Step__Group__6__Impl rule__Step__Group__7
{
pushFollow(FOLLOW_rule__Step__Group__6__Impl_in_rule__Step__Group__61018);
rule__Step__Group__6__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Step__Group__7_in_rule__Step__Group__61021);
rule__Step__Group__7();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__6"
// $ANTLR start "rule__Step__Group__6__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:540:1: rule__Step__Group__6__Impl : ( ( rule__Step__TitleAssignment_6 ) ) ;
public final void rule__Step__Group__6__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:544:1: ( ( ( rule__Step__TitleAssignment_6 ) ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:545:1: ( ( rule__Step__TitleAssignment_6 ) )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:545:1: ( ( rule__Step__TitleAssignment_6 ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:546:1: ( rule__Step__TitleAssignment_6 )
{
before(grammarAccess.getStepAccess().getTitleAssignment_6());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:547:1: ( rule__Step__TitleAssignment_6 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:547:2: rule__Step__TitleAssignment_6
{
pushFollow(FOLLOW_rule__Step__TitleAssignment_6_in_rule__Step__Group__6__Impl1048);
rule__Step__TitleAssignment_6();
state._fsp--;
}
after(grammarAccess.getStepAccess().getTitleAssignment_6());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__6__Impl"
// $ANTLR start "rule__Step__Group__7"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:557:1: rule__Step__Group__7 : rule__Step__Group__7__Impl rule__Step__Group__8 ;
public final void rule__Step__Group__7() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:561:1: ( rule__Step__Group__7__Impl rule__Step__Group__8 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:562:2: rule__Step__Group__7__Impl rule__Step__Group__8
{
pushFollow(FOLLOW_rule__Step__Group__7__Impl_in_rule__Step__Group__71078);
rule__Step__Group__7__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Step__Group__8_in_rule__Step__Group__71081);
rule__Step__Group__8();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__7"
// $ANTLR start "rule__Step__Group__7__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:569:1: rule__Step__Group__7__Impl : ( ( rule__Step__Group_7__0 )? ) ;
public final void rule__Step__Group__7__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:573:1: ( ( ( rule__Step__Group_7__0 )? ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:574:1: ( ( rule__Step__Group_7__0 )? )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:574:1: ( ( rule__Step__Group_7__0 )? )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:575:1: ( rule__Step__Group_7__0 )?
{
before(grammarAccess.getStepAccess().getGroup_7());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:576:1: ( rule__Step__Group_7__0 )?
int alt3=2;
int LA3_0 = input.LA(1);
if ( (LA3_0==19) ) {
alt3=1;
}
switch (alt3) {
case 1 :
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:576:2: rule__Step__Group_7__0
{
pushFollow(FOLLOW_rule__Step__Group_7__0_in_rule__Step__Group__7__Impl1108);
rule__Step__Group_7__0();
state._fsp--;
}
break;
}
after(grammarAccess.getStepAccess().getGroup_7());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__7__Impl"
// $ANTLR start "rule__Step__Group__8"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:586:1: rule__Step__Group__8 : rule__Step__Group__8__Impl rule__Step__Group__9 ;
public final void rule__Step__Group__8() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:590:1: ( rule__Step__Group__8__Impl rule__Step__Group__9 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:591:2: rule__Step__Group__8__Impl rule__Step__Group__9
{
pushFollow(FOLLOW_rule__Step__Group__8__Impl_in_rule__Step__Group__81139);
rule__Step__Group__8__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Step__Group__9_in_rule__Step__Group__81142);
rule__Step__Group__9();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__8"
// $ANTLR start "rule__Step__Group__8__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:598:1: rule__Step__Group__8__Impl : ( ( rule__Step__Group_8__0 )? ) ;
public final void rule__Step__Group__8__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:602:1: ( ( ( rule__Step__Group_8__0 )? ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:603:1: ( ( rule__Step__Group_8__0 )? )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:603:1: ( ( rule__Step__Group_8__0 )? )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:604:1: ( rule__Step__Group_8__0 )?
{
before(grammarAccess.getStepAccess().getGroup_8());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:605:1: ( rule__Step__Group_8__0 )?
int alt4=2;
int LA4_0 = input.LA(1);
if ( (LA4_0==20) ) {
alt4=1;
}
switch (alt4) {
case 1 :
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:605:2: rule__Step__Group_8__0
{
pushFollow(FOLLOW_rule__Step__Group_8__0_in_rule__Step__Group__8__Impl1169);
rule__Step__Group_8__0();
state._fsp--;
}
break;
}
after(grammarAccess.getStepAccess().getGroup_8());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__8__Impl"
// $ANTLR start "rule__Step__Group__9"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:615:1: rule__Step__Group__9 : rule__Step__Group__9__Impl ;
public final void rule__Step__Group__9() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:619:1: ( rule__Step__Group__9__Impl )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:620:2: rule__Step__Group__9__Impl
{
pushFollow(FOLLOW_rule__Step__Group__9__Impl_in_rule__Step__Group__91200);
rule__Step__Group__9__Impl();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__9"
// $ANTLR start "rule__Step__Group__9__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:626:1: rule__Step__Group__9__Impl : ( '}' ) ;
public final void rule__Step__Group__9__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:630:1: ( ( '}' ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:631:1: ( '}' )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:631:1: ( '}' )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:632:1: '}'
{
before(grammarAccess.getStepAccess().getRightCurlyBracketKeyword_9());
match(input,18,FOLLOW_18_in_rule__Step__Group__9__Impl1228);
after(grammarAccess.getStepAccess().getRightCurlyBracketKeyword_9());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group__9__Impl"
// $ANTLR start "rule__Step__Group_7__0"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:665:1: rule__Step__Group_7__0 : rule__Step__Group_7__0__Impl rule__Step__Group_7__1 ;
public final void rule__Step__Group_7__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:669:1: ( rule__Step__Group_7__0__Impl rule__Step__Group_7__1 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:670:2: rule__Step__Group_7__0__Impl rule__Step__Group_7__1
{
pushFollow(FOLLOW_rule__Step__Group_7__0__Impl_in_rule__Step__Group_7__01279);
rule__Step__Group_7__0__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Step__Group_7__1_in_rule__Step__Group_7__01282);
rule__Step__Group_7__1();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group_7__0"
// $ANTLR start "rule__Step__Group_7__0__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:677:1: rule__Step__Group_7__0__Impl : ( 'description:' ) ;
public final void rule__Step__Group_7__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:681:1: ( ( 'description:' ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:682:1: ( 'description:' )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:682:1: ( 'description:' )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:683:1: 'description:'
{
before(grammarAccess.getStepAccess().getDescriptionKeyword_7_0());
match(input,19,FOLLOW_19_in_rule__Step__Group_7__0__Impl1310);
after(grammarAccess.getStepAccess().getDescriptionKeyword_7_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group_7__0__Impl"
// $ANTLR start "rule__Step__Group_7__1"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:696:1: rule__Step__Group_7__1 : rule__Step__Group_7__1__Impl ;
public final void rule__Step__Group_7__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:700:1: ( rule__Step__Group_7__1__Impl )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:701:2: rule__Step__Group_7__1__Impl
{
pushFollow(FOLLOW_rule__Step__Group_7__1__Impl_in_rule__Step__Group_7__11341);
rule__Step__Group_7__1__Impl();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group_7__1"
// $ANTLR start "rule__Step__Group_7__1__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:707:1: rule__Step__Group_7__1__Impl : ( ( rule__Step__DescriptionAssignment_7_1 ) ) ;
public final void rule__Step__Group_7__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:711:1: ( ( ( rule__Step__DescriptionAssignment_7_1 ) ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:712:1: ( ( rule__Step__DescriptionAssignment_7_1 ) )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:712:1: ( ( rule__Step__DescriptionAssignment_7_1 ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:713:1: ( rule__Step__DescriptionAssignment_7_1 )
{
before(grammarAccess.getStepAccess().getDescriptionAssignment_7_1());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:714:1: ( rule__Step__DescriptionAssignment_7_1 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:714:2: rule__Step__DescriptionAssignment_7_1
{
pushFollow(FOLLOW_rule__Step__DescriptionAssignment_7_1_in_rule__Step__Group_7__1__Impl1368);
rule__Step__DescriptionAssignment_7_1();
state._fsp--;
}
after(grammarAccess.getStepAccess().getDescriptionAssignment_7_1());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group_7__1__Impl"
// $ANTLR start "rule__Step__Group_8__0"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:728:1: rule__Step__Group_8__0 : rule__Step__Group_8__0__Impl rule__Step__Group_8__1 ;
public final void rule__Step__Group_8__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:732:1: ( rule__Step__Group_8__0__Impl rule__Step__Group_8__1 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:733:2: rule__Step__Group_8__0__Impl rule__Step__Group_8__1
{
pushFollow(FOLLOW_rule__Step__Group_8__0__Impl_in_rule__Step__Group_8__01402);
rule__Step__Group_8__0__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Step__Group_8__1_in_rule__Step__Group_8__01405);
rule__Step__Group_8__1();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group_8__0"
// $ANTLR start "rule__Step__Group_8__0__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:740:1: rule__Step__Group_8__0__Impl : ( 'children:' ) ;
public final void rule__Step__Group_8__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:744:1: ( ( 'children:' ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:745:1: ( 'children:' )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:745:1: ( 'children:' )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:746:1: 'children:'
{
before(grammarAccess.getStepAccess().getChildrenKeyword_8_0());
match(input,20,FOLLOW_20_in_rule__Step__Group_8__0__Impl1433);
after(grammarAccess.getStepAccess().getChildrenKeyword_8_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group_8__0__Impl"
// $ANTLR start "rule__Step__Group_8__1"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:759:1: rule__Step__Group_8__1 : rule__Step__Group_8__1__Impl rule__Step__Group_8__2 ;
public final void rule__Step__Group_8__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:763:1: ( rule__Step__Group_8__1__Impl rule__Step__Group_8__2 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:764:2: rule__Step__Group_8__1__Impl rule__Step__Group_8__2
{
pushFollow(FOLLOW_rule__Step__Group_8__1__Impl_in_rule__Step__Group_8__11464);
rule__Step__Group_8__1__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Step__Group_8__2_in_rule__Step__Group_8__11467);
rule__Step__Group_8__2();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group_8__1"
// $ANTLR start "rule__Step__Group_8__1__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:771:1: rule__Step__Group_8__1__Impl : ( '{' ) ;
public final void rule__Step__Group_8__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:775:1: ( ( '{' ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:776:1: ( '{' )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:776:1: ( '{' )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:777:1: '{'
{
before(grammarAccess.getStepAccess().getLeftCurlyBracketKeyword_8_1());
match(input,16,FOLLOW_16_in_rule__Step__Group_8__1__Impl1495);
after(grammarAccess.getStepAccess().getLeftCurlyBracketKeyword_8_1());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group_8__1__Impl"
// $ANTLR start "rule__Step__Group_8__2"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:790:1: rule__Step__Group_8__2 : rule__Step__Group_8__2__Impl rule__Step__Group_8__3 ;
public final void rule__Step__Group_8__2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:794:1: ( rule__Step__Group_8__2__Impl rule__Step__Group_8__3 )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:795:2: rule__Step__Group_8__2__Impl rule__Step__Group_8__3
{
pushFollow(FOLLOW_rule__Step__Group_8__2__Impl_in_rule__Step__Group_8__21526);
rule__Step__Group_8__2__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__Step__Group_8__3_in_rule__Step__Group_8__21529);
rule__Step__Group_8__3();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group_8__2"
// $ANTLR start "rule__Step__Group_8__2__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:802:1: rule__Step__Group_8__2__Impl : ( ( rule__Step__ChildrenAssignment_8_2 )* ) ;
public final void rule__Step__Group_8__2__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:806:1: ( ( ( rule__Step__ChildrenAssignment_8_2 )* ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:807:1: ( ( rule__Step__ChildrenAssignment_8_2 )* )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:807:1: ( ( rule__Step__ChildrenAssignment_8_2 )* )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:808:1: ( rule__Step__ChildrenAssignment_8_2 )*
{
before(grammarAccess.getStepAccess().getChildrenAssignment_8_2());
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:809:1: ( rule__Step__ChildrenAssignment_8_2 )*
loop5:
do {
int alt5=2;
int LA5_0 = input.LA(1);
if ( (LA5_0==15) ) {
alt5=1;
}
switch (alt5) {
case 1 :
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:809:2: rule__Step__ChildrenAssignment_8_2
{
pushFollow(FOLLOW_rule__Step__ChildrenAssignment_8_2_in_rule__Step__Group_8__2__Impl1556);
rule__Step__ChildrenAssignment_8_2();
state._fsp--;
}
break;
default :
break loop5;
}
} while (true);
after(grammarAccess.getStepAccess().getChildrenAssignment_8_2());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group_8__2__Impl"
// $ANTLR start "rule__Step__Group_8__3"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:819:1: rule__Step__Group_8__3 : rule__Step__Group_8__3__Impl ;
public final void rule__Step__Group_8__3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:823:1: ( rule__Step__Group_8__3__Impl )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:824:2: rule__Step__Group_8__3__Impl
{
pushFollow(FOLLOW_rule__Step__Group_8__3__Impl_in_rule__Step__Group_8__31587);
rule__Step__Group_8__3__Impl();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group_8__3"
// $ANTLR start "rule__Step__Group_8__3__Impl"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:830:1: rule__Step__Group_8__3__Impl : ( '}' ) ;
public final void rule__Step__Group_8__3__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:834:1: ( ( '}' ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:835:1: ( '}' )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:835:1: ( '}' )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:836:1: '}'
{
before(grammarAccess.getStepAccess().getRightCurlyBracketKeyword_8_3());
match(input,18,FOLLOW_18_in_rule__Step__Group_8__3__Impl1615);
after(grammarAccess.getStepAccess().getRightCurlyBracketKeyword_8_3());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__Group_8__3__Impl"
// $ANTLR start "rule__Model__TitleAssignment_0"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:858:1: rule__Model__TitleAssignment_0 : ( ruleTitle ) ;
public final void rule__Model__TitleAssignment_0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:862:1: ( ( ruleTitle ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:863:1: ( ruleTitle )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:863:1: ( ruleTitle )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:864:1: ruleTitle
{
before(grammarAccess.getModelAccess().getTitleTitleParserRuleCall_0_0());
pushFollow(FOLLOW_ruleTitle_in_rule__Model__TitleAssignment_01659);
ruleTitle();
state._fsp--;
after(grammarAccess.getModelAccess().getTitleTitleParserRuleCall_0_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Model__TitleAssignment_0"
// $ANTLR start "rule__Model__StepsAssignment_1"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:873:1: rule__Model__StepsAssignment_1 : ( ruleStep ) ;
public final void rule__Model__StepsAssignment_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:877:1: ( ( ruleStep ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:878:1: ( ruleStep )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:878:1: ( ruleStep )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:879:1: ruleStep
{
before(grammarAccess.getModelAccess().getStepsStepParserRuleCall_1_0());
pushFollow(FOLLOW_ruleStep_in_rule__Model__StepsAssignment_11690);
ruleStep();
state._fsp--;
after(grammarAccess.getModelAccess().getStepsStepParserRuleCall_1_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Model__StepsAssignment_1"
// $ANTLR start "rule__Title__TitleAssignment_1"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:888:1: rule__Title__TitleAssignment_1 : ( RULE_STRING ) ;
public final void rule__Title__TitleAssignment_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:892:1: ( ( RULE_STRING ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:893:1: ( RULE_STRING )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:893:1: ( RULE_STRING )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:894:1: RULE_STRING
{
before(grammarAccess.getTitleAccess().getTitleSTRINGTerminalRuleCall_1_0());
match(input,RULE_STRING,FOLLOW_RULE_STRING_in_rule__Title__TitleAssignment_11721);
after(grammarAccess.getTitleAccess().getTitleSTRINGTerminalRuleCall_1_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Title__TitleAssignment_1"
// $ANTLR start "rule__Step__StepIdAssignment_1"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:903:1: rule__Step__StepIdAssignment_1 : ( RULE_ID ) ;
public final void rule__Step__StepIdAssignment_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:907:1: ( ( RULE_ID ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:908:1: ( RULE_ID )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:908:1: ( RULE_ID )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:909:1: RULE_ID
{
before(grammarAccess.getStepAccess().getStepIdIDTerminalRuleCall_1_0());
match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__Step__StepIdAssignment_11752);
after(grammarAccess.getStepAccess().getStepIdIDTerminalRuleCall_1_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__StepIdAssignment_1"
// $ANTLR start "rule__Step__TypeAssignment_4"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:918:1: rule__Step__TypeAssignment_4 : ( ruleStepType ) ;
public final void rule__Step__TypeAssignment_4() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:922:1: ( ( ruleStepType ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:923:1: ( ruleStepType )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:923:1: ( ruleStepType )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:924:1: ruleStepType
{
before(grammarAccess.getStepAccess().getTypeStepTypeEnumRuleCall_4_0());
pushFollow(FOLLOW_ruleStepType_in_rule__Step__TypeAssignment_41783);
ruleStepType();
state._fsp--;
after(grammarAccess.getStepAccess().getTypeStepTypeEnumRuleCall_4_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__TypeAssignment_4"
// $ANTLR start "rule__Step__TitleAssignment_6"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:933:1: rule__Step__TitleAssignment_6 : ( RULE_STRING ) ;
public final void rule__Step__TitleAssignment_6() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:937:1: ( ( RULE_STRING ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:938:1: ( RULE_STRING )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:938:1: ( RULE_STRING )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:939:1: RULE_STRING
{
before(grammarAccess.getStepAccess().getTitleSTRINGTerminalRuleCall_6_0());
match(input,RULE_STRING,FOLLOW_RULE_STRING_in_rule__Step__TitleAssignment_61814);
after(grammarAccess.getStepAccess().getTitleSTRINGTerminalRuleCall_6_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__TitleAssignment_6"
// $ANTLR start "rule__Step__DescriptionAssignment_7_1"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:948:1: rule__Step__DescriptionAssignment_7_1 : ( RULE_STRING ) ;
public final void rule__Step__DescriptionAssignment_7_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:952:1: ( ( RULE_STRING ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:953:1: ( RULE_STRING )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:953:1: ( RULE_STRING )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:954:1: RULE_STRING
{
before(grammarAccess.getStepAccess().getDescriptionSTRINGTerminalRuleCall_7_1_0());
match(input,RULE_STRING,FOLLOW_RULE_STRING_in_rule__Step__DescriptionAssignment_7_11845);
after(grammarAccess.getStepAccess().getDescriptionSTRINGTerminalRuleCall_7_1_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__DescriptionAssignment_7_1"
// $ANTLR start "rule__Step__ChildrenAssignment_8_2"
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:963:1: rule__Step__ChildrenAssignment_8_2 : ( ruleStep ) ;
public final void rule__Step__ChildrenAssignment_8_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:967:1: ( ( ruleStep ) )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:968:1: ( ruleStep )
{
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:968:1: ( ruleStep )
// ../org.ustok.checklist.cfg.dsl.ui/src-gen/org/ustok/checklist/cfg/ui/contentassist/antlr/internal/InternalChecklist.g:969:1: ruleStep
{
before(grammarAccess.getStepAccess().getChildrenStepParserRuleCall_8_2_0());
pushFollow(FOLLOW_ruleStep_in_rule__Step__ChildrenAssignment_8_21876);
ruleStep();
state._fsp--;
after(grammarAccess.getStepAccess().getChildrenStepParserRuleCall_8_2_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
}
// $ANTLR end "rule__Step__ChildrenAssignment_8_2"
// Delegated rules
public static final BitSet FOLLOW_ruleModel_in_entryRuleModel61 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleModel68 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Model__Group__0_in_ruleModel94 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleTitle_in_entryRuleTitle121 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleTitle128 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Title__Group__0_in_ruleTitle154 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleStep_in_entryRuleStep181 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleStep188 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group__0_in_ruleStep214 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__StepType__Alternatives_in_ruleStepType251 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_11_in_rule__StepType__Alternatives287 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_12_in_rule__StepType__Alternatives308 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Model__Group__0__Impl_in_rule__Model__Group__0341 = new BitSet(new long[]{0x0000000000008000L});
public static final BitSet FOLLOW_rule__Model__Group__1_in_rule__Model__Group__0344 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Model__TitleAssignment_0_in_rule__Model__Group__0__Impl371 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Model__Group__1__Impl_in_rule__Model__Group__1401 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Model__StepsAssignment_1_in_rule__Model__Group__1__Impl428 = new BitSet(new long[]{0x0000000000008002L});
public static final BitSet FOLLOW_rule__Title__Group__0__Impl_in_rule__Title__Group__0463 = new BitSet(new long[]{0x0000000000000010L});
public static final BitSet FOLLOW_rule__Title__Group__1_in_rule__Title__Group__0466 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_13_in_rule__Title__Group__0__Impl494 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Title__Group__1__Impl_in_rule__Title__Group__1525 = new BitSet(new long[]{0x0000000000004000L});
public static final BitSet FOLLOW_rule__Title__Group__2_in_rule__Title__Group__1528 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Title__TitleAssignment_1_in_rule__Title__Group__1__Impl555 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Title__Group__2__Impl_in_rule__Title__Group__2585 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_14_in_rule__Title__Group__2__Impl613 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group__0__Impl_in_rule__Step__Group__0650 = new BitSet(new long[]{0x0000000000000020L});
public static final BitSet FOLLOW_rule__Step__Group__1_in_rule__Step__Group__0653 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_15_in_rule__Step__Group__0__Impl681 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group__1__Impl_in_rule__Step__Group__1712 = new BitSet(new long[]{0x0000000000010000L});
public static final BitSet FOLLOW_rule__Step__Group__2_in_rule__Step__Group__1715 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__StepIdAssignment_1_in_rule__Step__Group__1__Impl742 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group__2__Impl_in_rule__Step__Group__2772 = new BitSet(new long[]{0x0000000000020000L});
public static final BitSet FOLLOW_rule__Step__Group__3_in_rule__Step__Group__2775 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_16_in_rule__Step__Group__2__Impl803 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group__3__Impl_in_rule__Step__Group__3834 = new BitSet(new long[]{0x0000000000001800L});
public static final BitSet FOLLOW_rule__Step__Group__4_in_rule__Step__Group__3837 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_17_in_rule__Step__Group__3__Impl865 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group__4__Impl_in_rule__Step__Group__4896 = new BitSet(new long[]{0x0000000000002000L});
public static final BitSet FOLLOW_rule__Step__Group__5_in_rule__Step__Group__4899 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__TypeAssignment_4_in_rule__Step__Group__4__Impl926 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group__5__Impl_in_rule__Step__Group__5956 = new BitSet(new long[]{0x0000000000000010L});
public static final BitSet FOLLOW_rule__Step__Group__6_in_rule__Step__Group__5959 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_13_in_rule__Step__Group__5__Impl987 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group__6__Impl_in_rule__Step__Group__61018 = new BitSet(new long[]{0x00000000001C0000L});
public static final BitSet FOLLOW_rule__Step__Group__7_in_rule__Step__Group__61021 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__TitleAssignment_6_in_rule__Step__Group__6__Impl1048 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group__7__Impl_in_rule__Step__Group__71078 = new BitSet(new long[]{0x00000000001C0000L});
public static final BitSet FOLLOW_rule__Step__Group__8_in_rule__Step__Group__71081 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group_7__0_in_rule__Step__Group__7__Impl1108 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group__8__Impl_in_rule__Step__Group__81139 = new BitSet(new long[]{0x00000000001C0000L});
public static final BitSet FOLLOW_rule__Step__Group__9_in_rule__Step__Group__81142 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group_8__0_in_rule__Step__Group__8__Impl1169 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group__9__Impl_in_rule__Step__Group__91200 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_18_in_rule__Step__Group__9__Impl1228 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group_7__0__Impl_in_rule__Step__Group_7__01279 = new BitSet(new long[]{0x0000000000000010L});
public static final BitSet FOLLOW_rule__Step__Group_7__1_in_rule__Step__Group_7__01282 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_19_in_rule__Step__Group_7__0__Impl1310 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group_7__1__Impl_in_rule__Step__Group_7__11341 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__DescriptionAssignment_7_1_in_rule__Step__Group_7__1__Impl1368 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group_8__0__Impl_in_rule__Step__Group_8__01402 = new BitSet(new long[]{0x0000000000010000L});
public static final BitSet FOLLOW_rule__Step__Group_8__1_in_rule__Step__Group_8__01405 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_20_in_rule__Step__Group_8__0__Impl1433 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group_8__1__Impl_in_rule__Step__Group_8__11464 = new BitSet(new long[]{0x0000000000048000L});
public static final BitSet FOLLOW_rule__Step__Group_8__2_in_rule__Step__Group_8__11467 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_16_in_rule__Step__Group_8__1__Impl1495 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__Group_8__2__Impl_in_rule__Step__Group_8__21526 = new BitSet(new long[]{0x0000000000048000L});
public static final BitSet FOLLOW_rule__Step__Group_8__3_in_rule__Step__Group_8__21529 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rule__Step__ChildrenAssignment_8_2_in_rule__Step__Group_8__2__Impl1556 = new BitSet(new long[]{0x0000000000008002L});
public static final BitSet FOLLOW_rule__Step__Group_8__3__Impl_in_rule__Step__Group_8__31587 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_18_in_rule__Step__Group_8__3__Impl1615 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleTitle_in_rule__Model__TitleAssignment_01659 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleStep_in_rule__Model__StepsAssignment_11690 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_STRING_in_rule__Title__TitleAssignment_11721 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_ID_in_rule__Step__StepIdAssignment_11752 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleStepType_in_rule__Step__TypeAssignment_41783 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_STRING_in_rule__Step__TitleAssignment_61814 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_STRING_in_rule__Step__DescriptionAssignment_7_11845 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleStep_in_rule__Step__ChildrenAssignment_8_21876 = new BitSet(new long[]{0x0000000000000002L});
} | [
"[email protected]"
] | |
b000eb9b77c0d1c878a3e9620fd2494e7a32f6cf | 62e656585f0ffd5cf572a83f28c898f945fb6228 | /org/apache/jsp/HAM/HAMA0409MBar_jsp.java | 1e0e6857608af0f1111928c8a5e29c3bb2ed2363 | [] | no_license | minjindang/TAPF | b6a7edfb7d171665615f108e5ad4baee4e734dce | dd39d455c135d06211654853c8335d03771a1455 | refs/heads/master | 2022-09-02T04:10:10.647610 | 2015-04-24T17:20:02 | 2015-04-24T17:20:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,859 | java | package org.apache.jsp.HAM;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
public final class HAMA0409MBar_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
static {
_jspx_dependants = new java.util.Vector(1);
_jspx_dependants.add("/WEB-INF/taglibs/struts-html.tld");
}
private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_button_value_styleClass_property_onclick_nobody;
private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_submit_value_styleClass_property_onclick_nobody;
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspInit() {
_jspx_tagPool_html_button_value_styleClass_property_onclick_nobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
_jspx_tagPool_html_submit_value_styleClass_property_onclick_nobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
}
public void _jspDestroy() {
_jspx_tagPool_html_button_value_styleClass_property_onclick_nobody.release();
_jspx_tagPool_html_submit_value_styleClass_property_onclick_nobody.release();
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=Big5");
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("<!--\r\n");
out.write("程式目的:歸扣借資料維護-資料匯入修正\r\n");
out.write("程式代號:HAMA0409\r\n");
out.write("程式日期:0991018\r\n");
out.write("程式作者:Chris Wu\r\n");
out.write("--------------------------------------------------------\r\n");
out.write("修改作者 修改日期 修改目的\r\n");
out.write("--------------------------------------------------------\r\n");
out.write("-->\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("<table class='table_1' width='100%'>\r\n");
out.write("\t<tr>\r\n");
out.write("\t\t<td class='table_function' align='right'>\r\n");
out.write("\t\t\t");
if (_jspx_meth_html_button_0(_jspx_page_context))
return;
out.write("\r\n");
out.write("\t\t\t");
if (_jspx_meth_html_submit_0(_jspx_page_context))
return;
out.write("\r\n");
out.write("\t\t</td>\r\n");
out.write("\t</tr>\r\n");
out.write("</table>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
private boolean _jspx_meth_html_button_0(PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// html:button
org.apache.struts.taglib.html.ButtonTag _jspx_th_html_button_0 = (org.apache.struts.taglib.html.ButtonTag) _jspx_tagPool_html_button_value_styleClass_property_onclick_nobody.get(org.apache.struts.taglib.html.ButtonTag.class);
_jspx_th_html_button_0.setPageContext(_jspx_page_context);
_jspx_th_html_button_0.setParent(null);
_jspx_th_html_button_0.setStyleClass("formcss_rbutton");
_jspx_th_html_button_0.setProperty("reset");
_jspx_th_html_button_0.setValue("清除");
_jspx_th_html_button_0.setOnclick("clearForm(this.form);");
int _jspx_eval_html_button_0 = _jspx_th_html_button_0.doStartTag();
if (_jspx_th_html_button_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return true;
_jspx_tagPool_html_button_value_styleClass_property_onclick_nobody.reuse(_jspx_th_html_button_0);
return false;
}
private boolean _jspx_meth_html_submit_0(PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// html:submit
org.apache.struts.taglib.html.SubmitTag _jspx_th_html_submit_0 = (org.apache.struts.taglib.html.SubmitTag) _jspx_tagPool_html_submit_value_styleClass_property_onclick_nobody.get(org.apache.struts.taglib.html.SubmitTag.class);
_jspx_th_html_submit_0.setPageContext(_jspx_page_context);
_jspx_th_html_submit_0.setParent(null);
_jspx_th_html_submit_0.setStyleClass("formcss_rbutton");
_jspx_th_html_submit_0.setProperty("doImport");
_jspx_th_html_submit_0.setValue("匯入");
_jspx_th_html_submit_0.setOnclick("return checkForm2(this.form);");
int _jspx_eval_html_submit_0 = _jspx_th_html_submit_0.doStartTag();
if (_jspx_th_html_submit_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return true;
_jspx_tagPool_html_submit_value_styleClass_property_onclick_nobody.reuse(_jspx_th_html_submit_0);
return false;
}
}
| [
"[email protected]"
] | |
e6d7c78a8c51731e9b89ffa12f1810157cfc262e | 0d430563d908de7cda867380b6fe85e77be11c3d | /workspace/DSA Programs/src/com/RandomMix/LargestPrimeFactor.java | 53368cab6f47d90109b2b357a8fad8decfcadfd6 | [] | no_license | hshar89/MyCodes | e2eec3b9a2649fec04e5b391d0ca3d4d9d5ae6dc | e388f005353c9606873b6cafdfce1e92d13273e7 | refs/heads/master | 2022-12-23T00:36:01.951137 | 2020-04-03T13:39:22 | 2020-04-03T13:39:22 | 252,720,397 | 1 | 0 | null | 2022-12-16T00:35:41 | 2020-04-03T12:04:10 | Java | UTF-8 | Java | false | false | 883 | java | package PractiseJavaPrograms;
import java.util.ArrayList;
import java.util.List;
public class LargestPrimeFactor {
public static void main(String[] args) {
// TODO Auto-generated method stub
//int[] prime = findPrimeLessThanNum(6587688);
//printArray(prime);
findLargestPrimeFactor(15l);
}
static void printArray(int arr[])
{
int n = arr.length;
for (int i=0; i<n; ++i)
System.out.print(arr[i] + " ");
System.out.println();
}
static void findLargestPrimeFactor(long num){
long i=2l, largestPrime = 2l;
while(num>1){
while(num%i ==0){
num = num/i;
largestPrime = i;
}
i++;
if(i*i>num){
largestPrime = num;
break;
}
}
System.out.println(largestPrime);
}
}
| [
"[email protected]"
] | |
ab774b01846ea16b8e316af0e1d0061239cd82c4 | 62a76be5824212afb2a01f1cfeae33cc15ec64bb | /app/src/main/java/com/weygo/weygophone/pages/shopcart/model/response/WGShopCartGiftResponse.java | 0b5c555bc33d7a2faedb70fbbddefa14cc8dfbcd | [
"Apache-2.0"
] | permissive | mumabinggan/WeygoPhone | 34336b66a2b49945ab8c5876821b2e3deba49a78 | 15b6eb23160b010dc399fe54c923c48c6a0b737d | refs/heads/master | 2021-01-12T10:02:17.958826 | 2017-12-03T15:36:12 | 2017-12-03T15:36:12 | 76,335,438 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 314 | java | package com.weygo.weygophone.pages.shopcart.model.response;
import com.weygo.weygophone.base.WGResponse;
import com.weygo.weygophone.pages.shopcart.model.WGShopCartGiftData;
/**
* Created by muma on 2017/8/18.
*/
public class WGShopCartGiftResponse extends WGResponse {
public WGShopCartGiftData data;
}
| [
"[email protected]"
] | |
2853dc02a8b111439ccb2b02b1c690abb3a07057 | b85c9ebc92be24a154a45a434a7e08435e6ca95d | /src/main/java/com/example/restapi/models/Feedback.java | 68c32d23c34680a5e5db58e80fa0001dc531b1de | [] | no_license | benjaminsmith489/phase3 | 20ebf7cc81ee6466b057e59179b4a923fbb62425 | 0202570896f1f8e4995d373d847718653b593699 | refs/heads/master | 2023-03-06T19:13:39.313928 | 2021-02-12T01:01:24 | 2021-02-12T01:01:24 | 338,193,702 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 807 | java | package com.example.restapi.models;
import java.time.LocalDateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name="feedback")
public class Feedback {
@Id
@GeneratedValue(strategy=(GenerationType.AUTO))
int id;
@Column(name="message")
String message;
@Column(name="extra")
String extra;
public String getExtra() {
return extra;
}
public int getId() {
return id;
}
public String getMessage() {
return message;
}
public void setExtra(String extra) {
this.extra = extra;
}
public void setId(int id) {
this.id = id;
}
public void setMessage(String message) {
this.message = message;
}
}
| [
"[email protected]"
] | |
6c428b6a10768a1624cd0a8f4a69a1d28031ac27 | 5047944adff762209ebff5881d20815f7d53efa0 | /src/main/java/com/zzw/myo2o/service/UserAwardMapService.java | 772b622b5ae70608b621ec6fdc40520b6ee8255b | [] | no_license | coolcoolercool/xiaoyuansahngpuo2o_zzw2.0 | 1f57e73ac78c3eb76b300a5e0637abc1afdbb703 | d602814b97e31cf834b73d2db77199dddf6f6843 | refs/heads/master | 2020-04-05T00:12:15.840069 | 2018-11-11T07:11:02 | 2018-11-11T07:11:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 881 | java | package com.zzw.myo2o.service;
import com.zzw.myo2o.dto.UserAwardMapExecution;
import com.zzw.myo2o.entity.UserAwardMap;
public interface UserAwardMapService {
/**
*
* @param userAwardCondition
* @param pageIndex
* @param pageSize
* @return
*/
UserAwardMapExecution listUserAwardMap(UserAwardMap userAwardCondition,
Integer pageIndex, Integer pageSize);
/**
*
* @param userAwardMapId
* @return
*/
UserAwardMap getUserAwardMapById(long userAwardMapId);
/**
*
* @param userAwardMap
* @return
* @throws RuntimeException
*/
UserAwardMapExecution addUserAwardMap(UserAwardMap userAwardMap)
throws RuntimeException;
/**
*
* @param userAwardMap
* @return
* @throws RuntimeException
*/
UserAwardMapExecution modifyUserAwardMap(UserAwardMap userAwardMap)
throws RuntimeException;
}
| [
"[email protected]"
] | |
0759b767b2d63a7d04d72bebe3909823bd1bf74a | 197e3cbfe43a0a22b8be3cf5702f13a12e9a3637 | /src/main/java/conexion/conexion.java | bfb0ae35437875f1802401bcbef91c9b9c6edd41 | [] | no_license | xXZOFXx/examen-tercer-parcial | 1f47986ee1347e721fef7c655f7e89ebdbd06ac8 | 80a3483ac4717e4576466a7044d436ff5ed8d2b6 | refs/heads/master | 2023-04-28T12:47:10.822811 | 2021-05-15T21:24:43 | 2021-05-15T21:24:43 | 367,718,917 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 954 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package conexion;
import java.sql.Connection;
import java.sql.DriverManager;
/**
*
* @author zof-pc
*/
public class conexion {
//conexion
Connection con;
//constructor
public conexion(){
//estructura de control de tratamiento de errores. try catch
try {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/bdexamen","root","");
} catch (Exception e) {
System.err.println("Error de base de datos: " + e);
}
}
//metodo de tipo conexion
public Connection getConnection(){
return con;
}
}
| [
"[email protected]"
] | |
40730765e555c4163c686dfc366c2187d2984f66 | a112f3515b6e893607956929e00e5b212d8c8fa4 | /src/main/java/com/kangda/onlinebookstore/OnlineBookstoreApplication.java | d66f96ef1b59a00bfad2e224a957d34d1a9bf87e | [] | no_license | kangda1998/online-bookstore | 050c04f09bb95c690044fdddffe5984158566599 | 2f47f5201919ac40a7381517e12be35b44007aeb | refs/heads/master | 2020-12-08T12:05:41.580743 | 2020-01-10T06:11:26 | 2020-01-10T06:11:26 | 232,977,615 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 349 | java | package com.kangda.onlinebookstore;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class OnlineBookstoreApplication {
public static void main(String[] args) {
SpringApplication.run(OnlineBookstoreApplication.class, args);
}
}
| [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.